{Copyright or © or Copr. :

CNRS - Laboratoire Mouvement & Perception
franck.buloup@univmed.fr

This software is a computer program whose purpose is to highly simplify  
the use of ADwinPro realtime systems when you develop experimental
protocols  on life's sciences area.

This software is governed by the CeCILL  license under French law and
abiding by the rules of distribution of free software.  You can  use, 
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info". 

As a counterpart to the access to the source code and  rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty  and the software's author,  the holder of the
economic rights,  and the successive licensors  have only  limited
liability. 

In this respect, the user's attention is drawn to the risks associated
with loading,  using,  modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean  that it is complicated to manipulate,  and  that  also
therefore means  that it is reserved for developers  and  experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or 
data to be ensured and,  more generally, to use and operate it in the 
same conditions as regards security. 

The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.}
unit XMLClasses;

interface

uses xmldom, XMLDoc, XMLIntf, SysUtils, IniFiles, Classes, UGlobal;

type

  TInfoCanaux = class
    Nom                     : TStringList;
    NumCanal                : TStringList;
    RappFreq                : TStringList;
    NumCanalCarteES         : TStringList;
    floatORint              : TStringList;
    inORoutORcanint         : TStringList;
    purORparam              : TStringList;
    propag                  : TStringList;
    ISPSerie                : TStringList;
    ISArray                 : TStringList;
    ArraySizeOrElementNum   : TStringList;
    TailleTampon            : TStringList;
    public
      constructor Create;
      destructor  Free;
  end;

{ Décl. Forward }

  IXMLROOTType = interface;
  IXMLEXPERIENCEType = interface;
  IXMLDESCRIPTIFType = interface;
  IXMLDESCRIPTIFTypeList = interface;
  IXMLCTRLEANType = interface;
  IXMLCTRLSANType = interface;
  IXMLCTRLESNUMType = interface;
  IXMLEANType = interface;
  IXMLEANTypeList = interface;
  IXMLSANType = interface;
  IXMLSANTypeList = interface;
  IXMLSNUMType = interface;
  IXMLSNUMTypeList = interface;
  IXMLENUMType = interface;
  IXMLENUMTypeList = interface;
  IXMLCANINTType = interface;
  IXMLCANINTTypeList = interface;
  IXMLPSERIEType = interface;
  IXMLPSERIETypeList = interface;
  IXMLSTType = interface;
  IXMLSTTypeList = interface;
  IXMLListeCanauxEnregVisuTypeList = interface;
  IXMLListeCanauxEnregVisuType = interface;
  IXMLListeGraphesTypeList = interface;
  IXMLListeGraphesType = interface;
  IXMLListeCourbesTypeList = interface;
  IXMLListeCourbesType = interface;
  IXMLBLOCType = interface;
  IXMLBLOCTypeList = interface;
  IXMLFONCTIONType = interface;
  IXMLFONCTIONTypeList = interface;
  IXMLENTREEType = interface;
  IXMLENTREETypeList = interface;
  IXMLSORTIEType = interface;
  IXMLSORTIETypeList = interface;
  IXMLPARAMType = interface;
  IXMLPARAMTypeList = interface;
  IXMLADBASICType = interface;
  IXMLINCLUDEType = interface;
  IXMLINCLUDETypeList = interface;
  IXMLIMPORTType = interface;
  IXMLIMPORTTypeList = interface;
  IXMLVARType = interface;
  IXMLVARTypeList = interface;
  IXMLLOWINITType = interface;
  IXMLLOWINITTypeList = interface;
  IXMLCODEType = interface;
  IXMLCODETypeList = interface;
  IXMLFINISHType = interface;
  IXMLFINISHTypeList = interface;
  IXMLFCTSSPType = interface;
  IXMLFCTSSPTypeList = interface;
  IXMLLIBRARYType = interface;
  IXMLLIBRARYTypeList = interface;
  IXMLPASCALType = interface;
  IXMLESSAIType = interface;
  IXMLESSAISTypeList = interface;
  IXMLSESSIONType = interface;
  IXMLSESSIONSTypeList = interface;
  IXMLATTRIBUTType = interface;
  IXMLATTRIBUTSTypeList = interface;
  IXMLSUJETType = interface;
  IXMLSUJETSTypeList = interface;
  IXMLFORMATNOMFICHIERSSAVEType = interface;
{ IXMLROOTType }

  IXMLROOTType = interface(IXMLNode)
    ['{2D28AB08-B290-4638-8F95-29BCD26F22E1}']
    { Accesseurs de propriétés }
    function Get_EXPERIENCE: IXMLEXPERIENCEType;
    function Get_CTRLEAN: IXMLCTRLEANType;
    function Get_CTRLSAN: IXMLCTRLSANType;
    function Get_CTRLESNUM: IXMLCTRLESNUMType;
    function Get_EAN: IXMLEANTypeList;
    function Get_SAN: IXMLSANTypeList;
    function Get_SNUM: IXMLSNUMTypeList;
    function Get_ENUM: IXMLENUMTypeList;
    function Get_CANINT: IXMLCANINTTypeList;
    function Get_PSERIE: IXMLPSERIETypeList;
    function Get_ST: IXMLSTTypeList;
    function Get_SESSIONS: IXMLSESSIONSTypeList;
    function Get_SUJETS: IXMLSUJETSTypeList;
    function Get_FORMATNOMFICHIERSSAVE: IXMLFORMATNOMFICHIERSSAVEType;
    function RendreListeInfoCanaux:TInfoCanaux;
    { Méthodes & propriétés }
    property EXPERIENCE: IXMLEXPERIENCEType read Get_EXPERIENCE;
    property CTRLEAN: IXMLCTRLEANType read Get_CTRLEAN;
    property CTRLSAN: IXMLCTRLSANType read Get_CTRLSAN;
    property CTRLESNUM: IXMLCTRLESNUMType read Get_CTRLESNUM;
    property EAN: IXMLEANTypeList read Get_EAN;
    property SAN: IXMLSANTypeList read Get_SAN;
    property SNUM: IXMLSNUMTypeList read Get_SNUM;
    property ENUM: IXMLENUMTypeList read Get_ENUM;
    property CANINT: IXMLCANINTTypeList read Get_CANINT;
    property PSERIE: IXMLPSERIETypeList read Get_PSERIE;
    property ST: IXMLSTTypeList read Get_ST;
    property SESSIONS: IXMLSESSIONSTypeList read Get_SESSIONS;
    property SUJETS : IXMLSUJETSTypeList read Get_SUJETS;
    property FORMATNOMFICHIERSSAVE : IXMLFORMATNOMFICHIERSSAVEType read Get_FORMATNOMFICHIERSSAVE;
  end;

{ IXMLEXPERIENCEType }

  IXMLEXPERIENCEType = interface(IXMLNode)
    ['{4206CC90-D98C-4ED0-83DE-2EEFCD4AE846}']
    { Accesseurs de propriétés }
    function Get_FEG: Integer;
    function Get_NBSESSIONS: Integer;
    function Get_NOM: WideString;
    function Get_DUMMYNODEEXPE: WideString;
    function Get_DESCRIPTIF: IXMLDESCRIPTIFTypeList;
    procedure Set_FEG(Value: Integer);
    procedure Set_NBSESSIONS(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_DUMMYNODEEXPE(Value: WideString);
    { Méthodes & propriétés }
    property FEG: Integer read Get_FEG write Set_FEG;
    property NBSESSIONS: Integer read Get_NBSESSIONS write Set_NBSESSIONS;
    property NOM: WideString read Get_NOM write Set_NOM;
    property DUMMYNODEEXPE: WideString read Get_DUMMYNODEEXPE write Set_DUMMYNODEEXPE;
    property DESCRIPTIF: IXMLDESCRIPTIFTypeList read Get_DESCRIPTIF;
  end;

{ IXMLDESCRIPTIFType }

  IXMLDESCRIPTIFType = interface(IXMLNode)
    ['{293951E3-A244-4643-A269-57F4D734E568}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLDESCRIPTIFTypeList }

  IXMLDESCRIPTIFTypeList = interface(IXMLNodeCollection)
    ['{5CE8D416-D660-4900-A5BB-E374655A5C0B}']
    { Méthodes & propriétés }
    function Add: IXMLDESCRIPTIFType;
    function Insert(const Index: Integer): IXMLDESCRIPTIFType;
    function Get_Item(Index: Integer): IXMLDESCRIPTIFType;
    property Items[Index: Integer]: IXMLDESCRIPTIFType read Get_Item; default;
  end;

{ IXMLCTRLEANType }

  IXMLCTRLEANType = interface(IXMLNode)
    ['{407FBF3B-322F-4983-A004-5E4242F629B0}']
    { Accesseurs de propriétés }
    function Get_AMPLITUDE: WideString;
    function Get_SEDIFF: WideString;
    procedure Set_AMPLITUDE(Value: WideString);
    procedure Set_SEDIFF(Value: WideString);
    { Méthodes & propriétés }
    property AMPLITUDE: WideString read Get_AMPLITUDE write Set_AMPLITUDE;
    property SEDIFF: WideString read Get_SEDIFF write Set_SEDIFF;
  end;

{ IXMLCTRLSANType }

  IXMLCTRLSANType = interface(IXMLNode)
    ['{D768438E-2D4B-4EDA-B4C2-4C06A1E2C60A}']
    { Accesseurs de propriétés }
    function Get_AMPLITUDE: WideString;
    procedure Set_AMPLITUDE(Value: WideString);
    { Méthodes & propriétés }
    property AMPLITUDE: WideString read Get_AMPLITUDE write Set_AMPLITUDE;
  end;

{ IXMLCTRLESNUMType }

  IXMLCTRLESNUMType = interface(IXMLNode)
    ['{6FBB5DE9-4E69-4DCE-AE07-63D8303FC1C1}']
    { Accesseurs de propriétés }
    function Get_FE: Double;
    procedure Set_FE(Value: Double);
    { Méthodes & propriétés }
    property FE: Double read Get_FE write Set_FE;
  end;

{ IXMLEANType }

  IXMLEANType = interface(IXMLNode)
    ['{FF80DF97-6121-4DC6-8D47-62E30F63B46E}']
    { Accesseurs de propriétés }
    function Get_FE: Double;
    function Get_GAIN: Integer;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    function Get_UNITE: WideString;
    procedure Set_FE(Value: Double);
    procedure Set_GAIN(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    procedure Set_UNITE(Value: WideString);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    function Get_AMIN : Double;
    procedure Set_AMIN(Value : Double);
    function Get_AMAX : Double;
    procedure Set_AMAX(Value : Double);
    function Get_UMIN : Double;
    procedure Set_UMIN(Value : Double);
    function Get_UMAX : Double;
    procedure Set_UMAX(Value : Double);
    { Méthodes & propriétés }
    property FE: Double read Get_FE write Set_FE;
    property GAIN: Integer read Get_GAIN write Set_GAIN;
    property NOM: WideString read Get_NOM write Set_NOM;
    property NUMERO: Integer read Get_NUMERO write Set_NUMERO;
    property UNITE: WideString read Get_UNITE write Set_UNITE;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
    property AMIN : Double read Get_AMIN write Set_AMIN;
    property AMAX : Double read Get_AMAX write Set_AMAX;
    property UMIN : Double read Get_UMIN write Set_UMIN;
    property UMAX : Double read Get_UMAX write Set_UMAX;
  end;

{ IXMLEANTypeList }

  IXMLEANTypeList = interface(IXMLNodeCollection)
    ['{B31199DD-2E8A-4ED7-9B8D-A58EEEC03872}']
    { Méthodes & propriétés }
    function Add: IXMLEANType;
    function Insert(const Index: Integer): IXMLEANType;
    function Get_Item(Index: Integer): IXMLEANType;
    property Items[Index: Integer]: IXMLEANType read Get_Item; default;
  end;

{ IXMLSANType }

  IXMLSANType = interface(IXMLNode)
    ['{3F41C355-6D8E-426B-9095-C29385E8918B}']
    { Accesseurs de propriétés }
    function Get_FE: Double;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_FE(Value: Double);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    { Méthodes & propriétés }
    property FE: Double read Get_FE write Set_FE;
    property NOM: WideString read Get_NOM write Set_NOM;
    property NUMERO: Integer read Get_NUMERO write Set_NUMERO;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
  end;

{ IXMLSANTypeList }

  IXMLSANTypeList = interface(IXMLNodeCollection)
    ['{CE837DCF-3F7C-473F-BCD5-27B500510EC3}']
    { Méthodes & propriétés }
    function Add: IXMLSANType;
    function Insert(const Index: Integer): IXMLSANType;
    function Get_Item(Index: Integer): IXMLSANType;
    property Items[Index: Integer]: IXMLSANType read Get_Item; default;
  end;

{ IXMLSNUMType }

  IXMLSNUMType = interface(IXMLNode)
    ['{2DC7398A-DC14-4A0F-B376-237B65098F13}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
    property NUMERO: Integer read Get_NUMERO write Set_NUMERO;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
  end;

{ IXMLSNUMTypeList }

  IXMLSNUMTypeList = interface(IXMLNodeCollection)
    ['{7831682F-3777-44C9-8D4D-6A257367196A}']
    { Méthodes & propriétés }
    function Add: IXMLSNUMType;
    function Insert(const Index: Integer): IXMLSNUMType;
    function Get_Item(Index: Integer): IXMLSNUMType;
    property Items[Index: Integer]: IXMLSNUMType read Get_Item; default;
  end;

{ IXMLENUMType }

  IXMLENUMType = interface(IXMLNode)
    ['{AECA4085-91A3-4F3C-BC43-F2747E6D8B1F}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
    property NUMERO: Integer read Get_NUMERO write Set_NUMERO;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
  end;

{ IXMLENUMTypeList }

  IXMLENUMTypeList = interface(IXMLNodeCollection)
    ['{DE360F7A-702C-416C-8790-433BA6E35B3F}']
    { Méthodes & propriétés }
    function Add: IXMLENUMType;
    function Insert(const Index: Integer): IXMLENUMType;
    function Get_Item(Index: Integer): IXMLENUMType;
    property Items[Index: Integer]: IXMLENUMType read Get_Item; default;
  end;

{ IXMLCANINTType }

  IXMLCANINTType = interface(IXMLNode)
    ['{70089BF6-51B2-44CF-84F9-C0CBC5EE91CA}']
    { Accesseurs de propriétés }
    function Get_FENUMPAR: Double;
    function Get_GENRE: WideString;
    function Get_NOM: WideString;
    function Get_TAILLE: integer;
    function Get_FORMAT: WideString;
    function Get_PROPAG: integer;
    function Get_VALEUR: double;
    procedure Set_FENUMPAR(Value: Double);
    procedure Set_GENRE(Value: WideString);
    procedure Set_NOM(Value: WideString);
    procedure Set_TAILLE(Value: Integer);
    procedure Set_FORMAT(Value: WideString);
    procedure Set_PROPAG(Value: integer);
    procedure Set_VALEUR(Value: double);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    { Méthodes & propriétés }
    property FENUMPAR: Double read Get_FENUMPAR write Set_FENUMPAR;
    property GENRE: WideString read Get_GENRE write Set_GENRE;
    property NOM: WideString read Get_NOM write Set_NOM;
    property TAILLE: Integer read Get_TAILLE write Set_TAILLE;
    property FORMAT: WideString read Get_FORMAT write Set_FORMAT;
    property PROPAG: integer read Get_PROPAG write Set_PROPAG;
    property VALEUR: double read Get_VALEUR write Set_VALEUR;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
  end;

{ IXMLCANINTTypeList }

  IXMLCANINTTypeList = interface(IXMLNodeCollection)
    ['{B94477A5-9548-43DF-AB1E-F68863C05BC0}']
    { Méthodes & propriétés }
    function Add: IXMLCANINTType;
    function Insert(const Index: Integer): IXMLCANINTType;
    function Get_Item(Index: Integer): IXMLCANINTType;
    property Items[Index: Integer]: IXMLCANINTType read Get_Item; default;
  end;

{ IXMLPSERIEType }

  IXMLPSERIEType = interface(IXMLNode)
    ['{C494E9E6-6852-4D98-94E6-90361BB2C3CA}']
    { Accesseurs de propriétés }
    function Get_BAUDRATE: Integer;
    function Get_FLUX: WideString;
    function Get_FREQUENCE: Double;
    function Get_MODE: WideString;
    function Get_NBBITDATA: Integer;
    function Get_NBBITSTOP: Double;
    function Get_NBCAPTEURS: Integer;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    function Get_PARITE: WideString;
    function Get_SYSTEME: WideString;
    procedure Set_BAUDRATE(Value: Integer);
    procedure Set_FLUX(Value: WideString);
    procedure Set_FREQUENCE(Value: Double);
    procedure Set_MODE(Value: WideString);
    procedure Set_NBBITDATA(Value: Integer);
    procedure Set_NBBITSTOP(Value: Double);
    procedure Set_NBCAPTEURS(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    procedure Set_PARITE(Value: WideString);
    procedure Set_SYSTEME(Value: WideString);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    { Méthodes & propriétés }
    property BAUDRATE: Integer read Get_BAUDRATE write Set_BAUDRATE;
    property FLUX: WideString read Get_FLUX write Set_FLUX;
    property FREQUENCE: Double read Get_FREQUENCE write Set_FREQUENCE;
    property MODE: WideString read Get_MODE write Set_MODE;
    property NBBITDATA: Integer read Get_NBBITDATA write Set_NBBITDATA;
    property NBBITSTOP: Double read Get_NBBITSTOP write Set_NBBITSTOP;
    property NBCAPTEURS: Integer read Get_NBCAPTEURS write Set_NBCAPTEURS;
    property NOM: WideString read Get_NOM write Set_NOM;
    property NUMERO: Integer read Get_NUMERO write Set_NUMERO;
    property PARITE: WideString read Get_PARITE write Set_PARITE;
    property SYSTEME: WideString read Get_SYSTEME write Set_SYSTEME;
    property TAILLETAMPON: integer read Get_TAILLETAMPON write Set_TAILLETAMPON;
  end;

{ IXMLPSERIETypeList }

  IXMLPSERIETypeList = interface(IXMLNodeCollection)
    ['{6997399C-AB14-4A1B-9C2F-0573F9D3FC17}']
    { Méthodes & propriétés }
    function Add: IXMLPSERIEType;
    function Insert(const Index: Integer): IXMLPSERIEType;
    function Get_Item(Index: Integer): IXMLPSERIEType;
    property Items[Index: Integer]: IXMLPSERIEType read Get_Item; default;
  end;

{ IXMLSTType }

	IXMLSTType = interface(IXMLNode)
    ['{2E1E6F08-4660-46D4-BB55-13A8EE87B6A1}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_DUMMYNODEST: WideString;
    function Get_BLOC: IXMLBLOCTypeList;
    function Get_LISTECANAUXENREG: IXMLListeCanauxEnregVisuTypeList;
    function Get_LISTECANAUXVISU: IXMLListeCanauxEnregVisuTypeList;
    function Get_FULLSCREEN: integer;
    function Get_STATUSBAR: integer;
    function Get_GRAPHES: IXMLListeGraphesTypeList;
    procedure Set_NOM(Value: WideString);
    procedure Set_DUMMYNODEST(Value: WideString);
		procedure ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
    procedure Set_FULLSCREEN(value : integer);
		procedure Set_STATUSBAR(value : integer);
		procedure RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
		procedure RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
    { Méthodes & propriétés }
		function  UseStim : WideString;
		function  UseStimFileWithName(name : string) : boolean;
    property NOM: WideString read Get_NOM write Set_NOM;
    property DUMMYNODEST: WideString read Get_DUMMYNODEST write Set_DUMMYNODEST;
    property BLOC: IXMLBLOCTypeList read Get_BLOC;
    property LISTECANAUXENREG: IXMLListeCanauxEnregVisuTypeList read Get_LISTECANAUXENREG;
    property LISTECANAUXVISU: IXMLListeCanauxEnregVisuTypeList read Get_LISTECANAUXVISU;
    property FULLSCREEN: integer read Get_FULLSCREEN write Set_FULLSCREEN;
    property STATUSBAR: integer read Get_STATUSBAR write Set_STATUSBAR;
    property GRAPHES: IXMLListeGraphesTypeList read Get_GRAPHES;
  end;

{ IXMLSTTypeList }

	IXMLSTTypeList = interface(IXMLNodeCollection)
    ['{178517A2-3DBC-4603-84A3-135FEBB12CBF}']
    { Méthodes & propriétés }
    function Add: IXMLSTType;
    function Insert(const Index: Integer): IXMLSTType;
    function Get_Item(Index: Integer): IXMLSTType;
    procedure ChangeChannelName(OldName,NewName : string; PSerie : string;InfoCanaux : TInfoCanaux);
    property Items[Index: Integer]: IXMLSTType read Get_Item; default;
  end;

{ IXMLListeCanauxEnregVisuType }

  IXMLListeCanauxEnregVisuType = interface(IXMLNode)
    ['{10d285f0-2f37-11da-8cd6-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOMCANAL: WideString;
    procedure Set_NOMCANAL(Value : WideString);
    { Méthodes & propriétés }
    property NOMCANAL: WideString read Get_NOMCANAL write Set_NOMCANAL;
  end;

{ IXMLListeCanauxEnregVisuTypeList }

  IXMLListeCanauxEnregVisuTypeList = interface(IXMLNodeCollection)
    ['{d4c54b10-2f36-11da-8cd6-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLListeCanauxEnregVisuType;
    function Insert(const Index: Integer): IXMLListeCanauxEnregVisuType;
    function Get_Item(Index: Integer): IXMLListeCanauxEnregVisuType;
    property Items[Index: Integer]: IXMLListeCanauxEnregVisuType read Get_Item; default;
  end;

{ IXMLListeGraphesType }

  IXMLListeGraphesType = interface(IXMLNode)
    ['{7b2dd520-30eb-11da-8cd6-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_GENRE: WideString;
    procedure Set_GENRE(Value : WideString);
    function Get_TEMPSVISU: Double;
    procedure Set_TEMPSVISU(Value : Double);
    function Get_ECHELLEYAUTO: integer;
    procedure Set_ECHELLEYAUTO(Value : Integer);
    function Get_YMIN: Double;
    procedure Set_YMIN(Value : Double);
    function Get_YMAX: Double;
    procedure Set_YMAX(Value : Double);
    function Get_ECHELLEXAUTO: Integer;
    procedure Set_ECHELLEXAUTO(Value : Integer);
    function Get_XMIN: Double;
    procedure Set_XMIN(Value : Double);
    function Get_XMAX: Double;
    procedure Set_XMAX(Value : Double);
    function Get_COURBES: IXMLListeCourbesTypeList;
    { Méthodes & propriétés }
    property GENRE: WideString read Get_GENRE write Set_GENRE;
    property TEMPSVISU: Double read Get_TEMPSVISU write Set_TEMPSVISU;
    property ECHELLEYAUTO: integer read Get_ECHELLEYAUTO write Set_ECHELLEYAUTO;
    property YMIN: Double read Get_YMIN write Set_YMIN;
    property YMAX: Double read Get_YMAX write Set_YMAX;
    property ECHELLEXAUTO: integer read Get_ECHELLEXAUTO write Set_ECHELLEXAUTO;
    property XMIN: Double read Get_XMIN write Set_XMIN;
    property XMAX: Double read Get_XMAX write Set_XMAX;
    property COURBES: IXMLListeCourbesTypeList read Get_COURBES;
  end;

{ IXMLListeGraphesTypeList }

  IXMLListeGraphesTypeList = interface(IXMLNodeCollection)
    ['{85ab8830-30eb-11da-8cd6-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLListeGraphesType;
    function Insert(const Index: Integer): IXMLListeGraphesType;
    function Get_Item(Index: Integer): IXMLListeGraphesType;
    property Items[Index: Integer]: IXMLListeGraphesType read Get_Item; default;
  end;

{ IXMLListeCourbesType }

  IXMLListeCourbesType = interface(IXMLNode)
    ['{81e97e40-3187-11da-8cd6-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOMCANALORDO: WideString;
    procedure Set_NOMCANALORDO(Value : WideString);
    function Get_NOMCANALABSC: WideString;
    procedure Set_NOMCANALABSC(Value : WideString);
    function Get_COLOR: integer;
    procedure Set_COLOR(Value : Integer);
    { Méthodes & propriétés }
    property NOMCANALORDO: WideString read Get_NOMCANALORDO write Set_NOMCANALORDO;
    property NOMCANALABSC: WideString read Get_NOMCANALABSC write Set_NOMCANALABSC;
    property COLOR: integer read Get_COLOR write Set_COLOR;
  end;

{ IXMLListeCourbesTypeList }

  IXMLListeCourbesTypeList = interface(IXMLNodeCollection)
    ['{4bb41510-3187-11da-8cd6-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLListeCourbesType;
    function Insert(const Index: Integer): IXMLListeCourbesType;
    function Get_Item(Index: Integer): IXMLListeCourbesType;
    property Items[Index: Integer]: IXMLListeCourbesType read Get_Item; default;
  end;
  
{ IXMLBLOCType }

  IXMLBLOCType = interface(IXMLNode)
    ['{81426512-18B3-46C7-BCE8-FE946120EA92}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_ADBASICCODE1: WideString;
    function Get_ADBASICCODE2: WideString;
    function Get_DELPHICODE1: WideString;
    function Get_DELPHICODE2: WideString;
    function Get_GENRE: WideString;
    function Get_PARAM1: WideString;
    function Get_PARAM2: WideString;
    function Get_PARAM3: WideString;
    function Get_DUMMYNODEBLOC: WideString;
    function Get_BLOC: IXMLBLOCTypeList;
    function Get_FONCTION: IXMLFONCTIONTypeList;
    procedure Set_NOM(Value: WideString);
    procedure Set_ADBASICCODE1(Value: WideString);
    procedure Set_ADBASICCODE2(Value: WideString);
    procedure Set_DELPHICODE1(Value: WideString);
    procedure Set_DELPHICODE2(Value: WideString);
    procedure Set_GENRE(Value: WideString);
    procedure Set_PARAM1(Value: WideString);
    procedure Set_PARAM2(Value: WideString);
    procedure Set_PARAM3(Value: WideString);
    procedure Set_DUMMYNODEBLOC(Value: WideString);
		function  UseStim : WideString;
		function  UseStimFileWithName(name : string) : boolean;
    procedure GetStimFileNames(var StimFilesName : TStringList);
    procedure ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
    procedure MAJCodeADBasic_Pascal;
    procedure RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
    procedure RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
    property ADBASICCODE1: WideString read Get_ADBASICCODE1 write Set_ADBASICCODE1;
    property ADBASICCODE2: WideString read Get_ADBASICCODE2 write Set_ADBASICCODE2;
    property DELPHICODE1: WideString read Get_DELPHICODE1 write Set_DELPHICODE1;
    property DELPHICODE2: WideString read Get_DELPHICODE2 write Set_DELPHICODE2;
    property GENRE: WideString read Get_GENRE write Set_GENRE;
    property PARAM1: WideString read Get_PARAM1 write Set_PARAM1;
    property PARAM2: WideString read Get_PARAM2 write Set_PARAM2;
    property PARAM3: WideString read Get_PARAM3 write Set_PARAM3;
    property DUMMYNODEBLOC: WideString read Get_DUMMYNODEBLOC write Set_DUMMYNODEBLOC;
    property BLOC: IXMLBLOCTypeList read Get_BLOC;
    property FONCTION: IXMLFONCTIONTypeList read Get_FONCTION;
  end;

{ IXMLBLOCTypeList }

  IXMLBLOCTypeList = interface(IXMLNodeCollection)
    ['{2DAA9D9C-79B4-47C4-B516-B53A2A9CE9CC}']
    { Méthodes & propriétés }
    function Add: IXMLBLOCType;
    function Insert(const Index: Integer): IXMLBLOCType;
    function Get_Item(Index: Integer): IXMLBLOCType;
    property Items[Index: Integer]: IXMLBLOCType read Get_Item; default;
  end;

{ IXMLFONCTIONType }

	IXMLFONCTIONType = interface(IXMLNode)
    ['{C6342E23-CA72-4BFE-A646-920563DFED4A}']
    { Accesseurs de propriétés }
    function Get_DUREE: Double;
    function Get_FICHIER: WideString;
    function Get_GENRE: WideString;
    function Get_TITRE: WideString;
    function Get_ENTREE: IXMLENTREETypeList;
    function Get_SORTIE: IXMLSORTIETypeList;
    function Get_PARAM: IXMLPARAMTypeList;
    function Get_ADBASIC: IXMLADBASICType;
    function Get_PASCAL: IXMLPASCALType;
    procedure Set_DUREE(Value: Double);
    procedure Set_FICHIER(Value: WideString);
    procedure Set_GENRE(Value: WideString);
    procedure Set_TITRE(Value: WideString);

		//Code source ADBasic et Pascal
		procedure Replace(TypeReplace : string; Nbboucle : integer; var Aligne : string;ADB_OR_PAS : integer;
											InfoCanaux : TInfoCanaux);
		procedure Read_Section(LANG_ADBASIC : IXMLADBASICType;LANG_PASCAL : IXMLPASCALType;
														NomSection,PrefixeLigne : string; pNum_Fonction : integer;InfoCanaux : TInfoCanaux);
		procedure MAJCodeADBasic_Pascal(pNum_Fonction : integer; pRep_FichiersInf : string;InfoCanaux : TInfoCanaux);

		{ Méthodes & propriétés }
    property DUREE: Double read Get_DUREE write Set_DUREE;
    property FICHIER: WideString read Get_FICHIER write Set_FICHIER;
    property GENRE: WideString read Get_GENRE write Set_GENRE;
    property TITRE: WideString read Get_TITRE write Set_TITRE;
    property ENTREE: IXMLENTREETypeList read Get_ENTREE;
    property SORTIE: IXMLSORTIETypeList read Get_SORTIE;
    property PARAM: IXMLPARAMTypeList read Get_PARAM;
    property ADBASIC: IXMLADBASICType read Get_ADBASIC;
    property PASCAL_: IXMLPASCALType read Get_PASCAL;
  end;

{ IXMLFONCTIONTypeList }

  IXMLFONCTIONTypeList = interface(IXMLNodeCollection)
    ['{E69A48D3-0712-409E-92D8-A2C385C51C42}']
    { Méthodes & propriétés }
    function Add: IXMLFONCTIONType;
    function Insert(const Index: Integer): IXMLFONCTIONType;
    function Get_Item(Index: Integer): IXMLFONCTIONType;
    property Items[Index: Integer]: IXMLFONCTIONType read Get_Item; default;
  end;

{ IXMLENTREEType }

  IXMLENTREEType = interface(IXMLNode)
    ['{4497A8C8-5F0A-49D8-9458-63E4BCCB2FA6}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
  end;

{ IXMLENTREETypeList }

  IXMLENTREETypeList = interface(IXMLNodeCollection)
    ['{161CF3A0-4421-4854-8F50-0BCFD79FEA1E}']
    { Méthodes & propriétés }
    function Add: IXMLENTREEType;
    function Insert(const Index: Integer): IXMLENTREEType;
    function Get_Item(Index: Integer): IXMLENTREEType;
    property Items[Index: Integer]: IXMLENTREEType read Get_Item; default;
  end;

{ IXMLSORTIEType }

  IXMLSORTIEType = interface(IXMLNode)
    ['{7C360FA2-B25D-44B4-83D2-3F97D4F96AD0}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
  end;

{ IXMLSORTIETypeList }

  IXMLSORTIETypeList = interface(IXMLNodeCollection)
    ['{075DA21A-B763-44CD-97EB-20FD095D5A1A}']
    { Méthodes & propriétés }
    function Add: IXMLSORTIEType;
    function Insert(const Index: Integer): IXMLSORTIEType;
    function Get_Item(Index: Integer): IXMLSORTIEType;
    property Items[Index: Integer]: IXMLSORTIEType read Get_Item; default;
  end;

{ IXMLPARAMType }

  IXMLPARAMType = interface(IXMLNode)
    ['{E99FBDB9-1EF8-4622-8CBC-CFA0FB11DE45}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
    { Méthodes & propriétés }
    property NOM: WideString read Get_NOM write Set_NOM;
  end;

{ IXMLPARAMTypeList }

  IXMLPARAMTypeList = interface(IXMLNodeCollection)
    ['{55CC3FF7-7948-46D0-AEE3-C69C317E18BA}']
    { Méthodes & propriétés }
    function Add: IXMLPARAMType;
    function Insert(const Index: Integer): IXMLPARAMType;
    function Get_Item(Index: Integer): IXMLPARAMType;
    property Items[Index: Integer]: IXMLPARAMType read Get_Item; default;
  end;

{ IXMLADBASICType }

  IXMLADBASICType = interface(IXMLNode)
    ['{6B42138C-7F4C-4F6C-91BA-F5E693BCCBD0}']
    { Accesseurs de propriétés }
    function Get_INCLUDE: IXMLINCLUDETypeList;
    function Get_IMPORT: IXMLIMPORTTypeList;
    function Get_VAR_: IXMLVARTypeList;
    function Get_LOWINIT: IXMLLOWINITTypeList;
    function Get_CODE: IXMLCODETypeList;
    function Get_FINISH: IXMLFINISHTypeList;
    function Get_FCTSSP: IXMLFCTSSPTypeList;
    function Get_LIBRARY_: IXMLLIBRARYTypeList;
    { Méthodes & propriétés }
    property INCLUDE: IXMLINCLUDETypeList read Get_INCLUDE;
    property IMPORT: IXMLIMPORTTypeList read Get_IMPORT;
    property VAR_: IXMLVARTypeList read Get_VAR_;
    property LOWINIT: IXMLLOWINITTypeList read Get_LOWINIT;
    property CODE: IXMLCODETypeList read Get_CODE;
    property FINISH: IXMLFINISHTypeList read Get_FINISH;
    property FCTSSP: IXMLFCTSSPTypeList read Get_FCTSSP;
    property LIBRARY_: IXMLLIBRARYTypeList read Get_LIBRARY_;
  end;

{ IXMLINCLUDEType }

  IXMLINCLUDEType = interface(IXMLNode)
    ['{AE36E8FB-A9C5-413B-B0FC-32D59EF1EF71}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLINCLUDETypeList }

  IXMLINCLUDETypeList = interface(IXMLNodeCollection)
    ['{FBD4AF93-6E9A-4F50-A8E2-219F842A648F}']
    { Méthodes & propriétés }
    function Add: IXMLINCLUDEType;
    function Insert(const Index: Integer): IXMLINCLUDEType;
    function Get_Item(Index: Integer): IXMLINCLUDEType;
    property Items[Index: Integer]: IXMLINCLUDEType read Get_Item; default;
  end;

{ IXMLIMPORTType }

  IXMLIMPORTType = interface(IXMLNode)
    ['{622F2F2D-DA08-43C9-9751-20CCD3301687}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLIMPORTTypeList }

  IXMLIMPORTTypeList = interface(IXMLNodeCollection)
    ['{6A53C513-B3F8-43F7-A6A2-34A537DDEC25}']
    { Méthodes & propriétés }
    function Add: IXMLIMPORTType;
    function Insert(const Index: Integer): IXMLIMPORTType;
    function Get_Item(Index: Integer): IXMLIMPORTType;
    property Items[Index: Integer]: IXMLIMPORTType read Get_Item; default;
  end;

{ IXMLVARType }

  IXMLVARType = interface(IXMLNode)
    ['{7FEB9841-6389-44E6-89F6-B95E0ECF53E1}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLVARTypeList }

  IXMLVARTypeList = interface(IXMLNodeCollection)
    ['{1E30D7C7-145D-4DF2-ACEA-77A730CA60B6}']
    { Méthodes & propriétés }
    function Add: IXMLVARType;
    function Insert(const Index: Integer): IXMLVARType;
    function Get_Item(Index: Integer): IXMLVARType;
    property Items[Index: Integer]: IXMLVARType read Get_Item; default;
  end;

{ IXMLLOWINITType }

  IXMLLOWINITType = interface(IXMLNode)
    ['{23C4CB87-177A-44B8-98C5-11ABAABFF10B}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLLOWINITTypeList }

  IXMLLOWINITTypeList = interface(IXMLNodeCollection)
    ['{CDEA6568-109E-43A6-8C2D-F9004C779BF5}']
    { Méthodes & propriétés }
    function Add: IXMLLOWINITType;
    function Insert(const Index: Integer): IXMLLOWINITType;
    function Get_Item(Index: Integer): IXMLLOWINITType;
    property Items[Index: Integer]: IXMLLOWINITType read Get_Item; default;
  end;

{ IXMLCODEType }

  IXMLCODEType = interface(IXMLNode)
    ['{B4DFE47A-B7B6-473C-8D60-1737F014748A}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLCODETypeList }

  IXMLCODETypeList = interface(IXMLNodeCollection)
    ['{8C49A9CE-B80E-4055-B972-33C59D512C3C}']
    { Méthodes & propriétés }
    function Add: IXMLCODEType;
    function Insert(const Index: Integer): IXMLCODEType;
    function Get_Item(Index: Integer): IXMLCODEType;
    property Items[Index: Integer]: IXMLCODEType read Get_Item; default;
  end;

{ IXMLFINISHType }

  IXMLFINISHType = interface(IXMLNode)
    ['{F39046ED-8E9C-473D-96BD-9A22EBCEC295}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLFINISHTypeList }

  IXMLFINISHTypeList = interface(IXMLNodeCollection)
    ['{B7BDB81F-62BB-40B0-B372-0E9CBDCE16BB}']
    { Méthodes & propriétés }
    function Add: IXMLFINISHType;
    function Insert(const Index: Integer): IXMLFINISHType;
    function Get_Item(Index: Integer): IXMLFINISHType;
    property Items[Index: Integer]: IXMLFINISHType read Get_Item; default;
  end;

{ IXMLFCTSSPType }

  IXMLFCTSSPType = interface(IXMLNode)
    ['{63491695-13A4-4896-96F9-4177868A67B3}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLFCTSSPTypeList }

  IXMLFCTSSPTypeList = interface(IXMLNodeCollection)
    ['{C8CCEB8C-DBA8-4793-AA0B-91D79E872BAA}']
    { Méthodes & propriétés }
    function Add: IXMLFCTSSPType;
    function Insert(const Index: Integer): IXMLFCTSSPType;
    function Get_Item(Index: Integer): IXMLFCTSSPType;
    property Items[Index: Integer]: IXMLFCTSSPType read Get_Item; default;
  end;

{ IXMLLIBRARYType }

  IXMLLIBRARYType = interface(IXMLNode)
    ['{1D9B095F-88CA-4B01-AAC8-70A119A9C384}']
    { Accesseurs de propriétés }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
    { Méthodes & propriétés }
    property TEXT: WideString read Get_TEXT write Set_TEXT;
  end;

{ IXMLLIBRARYTypeList }

  IXMLLIBRARYTypeList = interface(IXMLNodeCollection)
    ['{BCAD4DBC-FA87-4DB9-A2C9-D9311FE18045}']
    { Méthodes & propriétés }
    function Add: IXMLLIBRARYType;
    function Insert(const Index: Integer): IXMLLIBRARYType;
    function Get_Item(Index: Integer): IXMLLIBRARYType;
    property Items[Index: Integer]: IXMLLIBRARYType read Get_Item; default;
  end;

{ IXMLPASCALType }

  IXMLPASCALType = interface(IXMLNode)
    ['{278527F9-590D-40BC-A8D1-CCCD7A5644DE}']
    { Accesseurs de propriétés }
    function Get_INCLUDE: IXMLINCLUDETypeList;
    function Get_IMPORT: IXMLIMPORTTypeList;
    function Get_VAR_: IXMLVARTypeList;
    function Get_LOWINIT: IXMLLOWINITTypeList;
    function Get_CODE: IXMLCODETypeList;
    function Get_FINISH: IXMLFINISHTypeList;
    function Get_FCTSSP: IXMLFCTSSPTypeList;
    function Get_LIBRARY_: IXMLLIBRARYTypeList;
    { Méthodes & propriétés }
    property INCLUDE: IXMLINCLUDETypeList read Get_INCLUDE;
    property IMPORT: IXMLIMPORTTypeList read Get_IMPORT;
    property VAR_: IXMLVARTypeList read Get_VAR_;
    property LOWINIT: IXMLLOWINITTypeList read Get_LOWINIT;
    property CODE: IXMLCODETypeList read Get_CODE;
    property FINISH: IXMLFINISHTypeList read Get_FINISH;
    property FCTSSP: IXMLFCTSSPTypeList read Get_FCTSSP;
    property LIBRARY_: IXMLLIBRARYTypeList read Get_LIBRARY_;
  end;

{ IXMLESSAIType }

  IXMLESSAIType = interface(IXMLNode)
    ['{b7c9b0f0-016a-11d9-9669-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOMST: WideString;
    function Get_MODEDEM: WideString;
    function Get_ETAT: WideString;
    procedure Set_NOMST(Value: WideString);
    procedure Set_MODEDEM(Value: WideString);
    procedure Set_ETAT(Value: WideString);
    { Méthodes & propriétés }
    property NOMST : wideString read Get_NOMST write Set_NOMST;
    property MODEDEM : wideString read Get_MODEDEM write Set_MODEDEM;
    property ETAT : wideString read Get_ETAT write Set_ETAT;
  end;

{ IXMLESSAISTypeList }

  IXMLESSAISTypeList = interface(IXMLNodeCollection)
    ['{a6f53830-016a-11d9-9669-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLESSAIType;
    function Insert(const Index: Integer): IXMLESSAIType;
    function Get_Item(Index: Integer): IXMLESSAIType;
    property Items[Index: Integer]: IXMLESSAIType read Get_Item; default;
  end;

{ IXMLSESSIONType }

  IXMLSESSIONType = interface(IXMLNode)
    ['{ddeaf610-0168-11d9-9669-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_ESSAIS : IXMLESSAISTypeList;
    procedure Set_NOM(Value : WideString);
    procedure ChangeSTName(OldName,NewName : string);
    function  percentDone : integer;
    { Méthodes & propriétés }
    property NOM : WideString read Get_NOM write Set_NOM;
    property ESSAIS : IXMLESSAISTypeList read Get_ESSAIS;
  end;

{ IXMLSESSIONSTypeList }

  IXMLSESSIONSTypeList = interface(IXMLNodeCollection)
    ['{a7d9b6b0-0168-11d9-9669-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLSESSIONType;
    function Insert(const Index: Integer): IXMLSESSIONType;
    function Get_Item(Index: Integer): IXMLSESSIONType;
    function IndexOf(Value : WideString) : integer;
    procedure ChangeSTName(OldName,NewName : string);
    property Items[Index: Integer]: IXMLSESSIONType read Get_Item; default;
  end;

//--------

///-----
{ IXMLATTRIBUTType }

  IXMLATTRIBUTType = interface(IXMLNode)
    ['{bbb91a90-3e26-11d9-9669-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    function Get_VALEUR: WideString;
    procedure Set_NOM(Value : WideString);
    procedure Set_VALEUR(Value : WideString);
    { Méthodes & propriétés }
    property NOM : WideString read Get_NOM write Set_NOM;
    property VALEUR : WideString read Get_VALEUR write Set_VALEUR;
  end;

{ IXMLATTRIBUTSTypeList }

  IXMLATTRIBUTSTypeList = interface(IXMLNodeCollection)
    ['{c2b68080-3e26-11d9-9669-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLATTRIBUTType;
    function Insert(const Index: Integer): IXMLATTRIBUTType;
    function Get_Item(Index: Integer): IXMLATTRIBUTType;
    property Items[Index: Integer]: IXMLATTRIBUTType read Get_Item; default;
  end;

{ IXMLSUJETType }

  IXMLSUJETType = interface(IXMLNode)
    ['{f4cf1080-3d4c-11d9-9669-0800200c9a66}']
    { Accesseurs de propriétés }
    function Get_NOM: WideString;
    procedure Set_NOM(Value : WideString);
    function Get_PARAMSFILEPATH: WideString;
    procedure Set_PARAMSFILEPATH(Value : WideString);
    function Get_SESSIONS : IXMLSESSIONSTypeList;
    function Get_ATTRIBUTS : IXMLATTRIBUTSTypeList;
    { Méthodes & propriétés }
    property NOM : WideString read Get_NOM write Set_NOM;
    property PARAMSFILEPATH : WideString read Get_PARAMSFILEPATH write Set_PARAMSFILEPATH;
    property SESSIONS : IXMLSESSIONSTypeList read Get_SESSIONS;
    property ATTRIBUTS : IXMLATTRIBUTSTypeList read Get_ATTRIBUTS;
  end;


{ IXMLSUJETSTypeList }

  IXMLSUJETSTypeList = interface(IXMLNodeCollection)
    ['{da997840-3d4c-11d9-9669-0800200c9a66}']
    { Méthodes & propriétés }
    function Add: IXMLSUJETType;
    function Insert(const Index: Integer): IXMLSUJETType;
    function Get_Item(Index: Integer): IXMLSUJETType;
    property Items[Index: Integer]: IXMLSUJETType read Get_Item; default;
  end;


{ IXMLFORMATNOMFICHIERSSAVEType }

  IXMLFORMATNOMFICHIERSSAVEType = interface(IXMLNode)
    ['{64339230-26ad-11da-8cd6-0800200c9a66}']
    { Accesseurs de propriétés }
    function Use_NOMCANAL: Integer;
    function Use_NOMST: Integer;
    function Use_NOMSESSION: Integer;
    function Use_NUMSESSION: Integer;
    function Use_NUMESSAI: Integer;
    procedure Set_UseNOMCANAL(Value: Integer);
    procedure Set_UseNOMST(Value: Integer);
    procedure Set_UseNOMSESSION(Value: Integer);
    procedure Set_UseNUMSESSION(Value: Integer);
    procedure Set_UseNUMESSAI(Value: Integer);
    { Méthodes & propriétés }
    property UseNOMCANAL: Integer read Use_NOMCANAL write Set_UseNOMCANAL;
    property UseNOMST: Integer read Use_NOMST write Set_UseNOMST;
    property UseNOMSESSION: Integer read Use_NOMSESSION write Set_UseNOMSESSION;
    property UseNUMSESSION: Integer read Use_NUMSESSION write Set_UseNUMSESSION;
    property UseNUMESSAI: Integer read Use_NUMESSAI write Set_UseNUMESSAI;
  end;

//--------


{ Décl. Forward }

  TXMLROOTType = class;
  TXMLEXPERIENCEType = class;
  TXMLDESCRIPTIFType = class;
  TXMLDESCRIPTIFTypeList = class;
  TXMLCTRLEANType = class;
  TXMLCTRLSANType = class;
  TXMLCTRLESNUMType = class;
  TXMLEANType = class;
  TXMLEANTypeList = class;
  TXMLSANType = class;
  TXMLSANTypeList = class;
  TXMLSNUMType = class;
  TXMLSNUMTypeList = class;
  TXMLENUMType = class;
  TXMLENUMTypeList = class;
  TXMLCANINTType = class;
  TXMLCANINTTypeList = class;
  TXMLPSERIEType = class;
  TXMLPSERIETypeList = class;
  TXMLSTType = class;
  TXMLSTTypeList = class;
  TXMLListeCanauxEnregVisuTypeList = class;
  TXMLListeCanauxEnregVisuType = class;
  TXMLListeGraphesTypeList = class;
  TXMLListeGraphesType = class;
  TXMLListeCourbesTypeList = class;
  TXMLListeCourbesType = class;
  TXMLBLOCType = class;
  TXMLBLOCTypeList = class;
  TXMLFONCTIONType = class;
  TXMLFONCTIONTypeList = class;
  TXMLENTREEType = class;
  TXMLENTREETypeList = class;
  TXMLSORTIEType = class;
  TXMLSORTIETypeList = class;
  TXMLPARAMType = class;
  TXMLPARAMTypeList = class;
  TXMLADBASICType = class;
  TXMLINCLUDEType = class;
  TXMLINCLUDETypeList = class;
  TXMLIMPORTType = class;
  TXMLIMPORTTypeList = class;
  TXMLVARType = class;
  TXMLVARTypeList = class;
  TXMLLOWINITType = class;
  TXMLLOWINITTypeList = class;
  TXMLCODEType = class;
  TXMLCODETypeList = class;
  TXMLFINISHType = class;
  TXMLFINISHTypeList = class;
  TXMLFCTSSPType = class;
  TXMLFCTSSPTypeList = class;
  TXMLLIBRARYType = class;
  TXMLLIBRARYTypeList = class;
  TXMLPASCALType = class;
  TXMLESSAIType = class;
  TXMLESSAISTypeList = class;
  TXMLSESSIONType = class;
  TXMLSESSIONSTypeList = class;
  TXMLATTRIBUTType = class;
  TXMLATTRIBUTSTypeList = class;
  TXMLSUJETType = class;
  TXMLSUJETSTypeList = class;
  TXMLFORMATNOMFICHIERSSAVEType = class;

{ TXMLROOTType }

	TXMLROOTType = class(TXMLNode, IXMLROOTType)
  private
    FEAN: IXMLEANTypeList;
    FSAN: IXMLSANTypeList;
    FSNUM: IXMLSNUMTypeList;
    FENUM: IXMLENUMTypeList;
    FCANINT: IXMLCANINTTypeList;
    FPSERIE: IXMLPSERIETypeList;
    FST: IXMLSTTypeList;
    FSESSIONS: IXMLSESSIONSTypeList;
    FSUJETS : IXMLSUJETSTypeList;
	protected
    { IXMLROOTType }
    function Get_EXPERIENCE: IXMLEXPERIENCEType;
    function Get_CTRLEAN: IXMLCTRLEANType;
    function Get_CTRLSAN: IXMLCTRLSANType;
    function Get_CTRLESNUM: IXMLCTRLESNUMType;
    function Get_EAN: IXMLEANTypeList;
    function Get_SAN: IXMLSANTypeList;
    function Get_SNUM: IXMLSNUMTypeList;
    function Get_ENUM: IXMLENUMTypeList;
    function Get_CANINT: IXMLCANINTTypeList;
    function Get_PSERIE: IXMLPSERIETypeList;
    function Get_ST: IXMLSTTypeList;
    function Get_SESSIONS: IXMLSESSIONSTypeList;
    function Get_SUJETS: IXMLSUJETSTypeList;
    function Get_FORMATNOMFICHIERSSAVE: IXMLFORMATNOMFICHIERSSAVEType;
    function RendreListeInfoCanaux:TInfoCanaux;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLEXPERIENCEType }

  TXMLEXPERIENCEType = class(TXMLNode, IXMLEXPERIENCEType)
  private
    FDESCRIPTIF: IXMLDESCRIPTIFTypeList;
  protected
    { IXMLEXPERIENCEType }
    function Get_FEG: Integer;
    function Get_NBSESSIONS: Integer;
    function Get_NOM: WideString;
    function Get_DUMMYNODEEXPE: WideString;
    function Get_DESCRIPTIF: IXMLDESCRIPTIFTypeList;
    procedure Set_FEG(Value: Integer);
    procedure Set_NBSESSIONS(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_DUMMYNODEEXPE(Value: WideString);
  public
    procedure AfterConstruction; override;
  end;

{ TXMLDESCRIPTIFType }

  TXMLDESCRIPTIFType = class(TXMLNode, IXMLDESCRIPTIFType)
  protected
    { IXMLDESCRIPTIFType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLDESCRIPTIFTypeList }

  TXMLDESCRIPTIFTypeList = class(TXMLNodeCollection, IXMLDESCRIPTIFTypeList)
  protected
    { IXMLDESCRIPTIFTypeList }
    function Add: IXMLDESCRIPTIFType;
    function Insert(const Index: Integer): IXMLDESCRIPTIFType;
    function Get_Item(Index: Integer): IXMLDESCRIPTIFType;
  end;

{ TXMLCTRLEANType }

  TXMLCTRLEANType = class(TXMLNode, IXMLCTRLEANType)
  protected
    { IXMLCTRLEANType }
    function Get_AMPLITUDE: WideString;
    function Get_SEDIFF: WideString;
    procedure Set_AMPLITUDE(Value: WideString);
    procedure Set_SEDIFF(Value: WideString);
  end;

{ TXMLCTRLSANType }

  TXMLCTRLSANType = class(TXMLNode, IXMLCTRLSANType)
  protected
    { IXMLCTRLSANType }
    function Get_AMPLITUDE: WideString;
    procedure Set_AMPLITUDE(Value: WideString);
  end;

{ TXMLCTRLESNUMType }

  TXMLCTRLESNUMType = class(TXMLNode, IXMLCTRLESNUMType)
  protected
    { IXMLCTRLESNUMType }
    function Get_FE: Double;
    procedure Set_FE(Value: Double);
  end;

{ TXMLEANType }

  TXMLEANType = class(TXMLNode, IXMLEANType)
  protected
    { IXMLEANType }
    function Get_FE: Double;
    function Get_GAIN: Integer;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    function Get_UNITE: WideString;
    procedure Set_FE(Value: Double);
    procedure Set_GAIN(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    procedure Set_UNITE(Value: WideString);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
    function Get_AMIN : Double;
    procedure Set_AMIN(Value : Double);
    function Get_AMAX : Double;
    procedure Set_AMAX(Value : Double);
    function Get_UMIN : Double;
    procedure Set_UMIN(Value : Double);
    function Get_UMAX : Double;
    procedure Set_UMAX(Value : Double);
  end;

{ TXMLEANTypeList }

  TXMLEANTypeList = class(TXMLNodeCollection, IXMLEANTypeList)
  protected
    { IXMLEANTypeList }
    function Add: IXMLEANType;
    function Insert(const Index: Integer): IXMLEANType;
    function Get_Item(Index: Integer): IXMLEANType;
  end;

{ TXMLSANType }

  TXMLSANType = class(TXMLNode, IXMLSANType)
  protected
    { IXMLSANType }
    function Get_FE: Double;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_FE(Value: Double);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
  end;

{ TXMLSANTypeList }

  TXMLSANTypeList = class(TXMLNodeCollection, IXMLSANTypeList)
  protected
    { IXMLSANTypeList }
    function Add: IXMLSANType;
    function Insert(const Index: Integer): IXMLSANType;
    function Get_Item(Index: Integer): IXMLSANType;
  end;

{ TXMLSNUMType }

  TXMLSNUMType = class(TXMLNode, IXMLSNUMType)
  protected
    { IXMLSNUMType }
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
  end;

{ TXMLSNUMTypeList }

  TXMLSNUMTypeList = class(TXMLNodeCollection, IXMLSNUMTypeList)
  protected
    { IXMLSNUMTypeList }
    function Add: IXMLSNUMType;
    function Insert(const Index: Integer): IXMLSNUMType;
    function Get_Item(Index: Integer): IXMLSNUMType;
  end;

{ TXMLENUMType }

  TXMLENUMType = class(TXMLNode, IXMLENUMType)
  protected
    { IXMLENUMType }
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
  end;

{ TXMLENUMTypeList }

  TXMLENUMTypeList = class(TXMLNodeCollection, IXMLENUMTypeList)
  protected
    { IXMLENUMTypeList }
    function Add: IXMLENUMType;
    function Insert(const Index: Integer): IXMLENUMType;
    function Get_Item(Index: Integer): IXMLENUMType;
  end;

{ TXMLCANINTType }

  TXMLCANINTType = class(TXMLNode, IXMLCANINTType)
  protected
    { IXMLCANINTType }
    function Get_FENUMPAR: Double;
    function Get_GENRE: WideString;
    function Get_NOM: WideString;
    function Get_TAILLE: Integer;
    function Get_FORMAT: WideString;
    function Get_PROPAG: integer;
    function Get_VALEUR: double;
    procedure Set_FENUMPAR(Value: Double);
    procedure Set_GENRE(Value: WideString);
    procedure Set_NOM(Value: WideString);
    procedure Set_TAILLE(Value: Integer);
    procedure Set_FORMAT(Value: WideString);
    procedure Set_PROPAG(Value: integer);
    procedure Set_VALEUR(Value: double);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
  end;

{ TXMLCANINTTypeList }

  TXMLCANINTTypeList = class(TXMLNodeCollection, IXMLCANINTTypeList)
  protected
    { IXMLCANINTTypeList }
    function Add: IXMLCANINTType;
    function Insert(const Index: Integer): IXMLCANINTType;
    function Get_Item(Index: Integer): IXMLCANINTType;
  end;

{ TXMLPSERIEType }

  TXMLPSERIEType = class(TXMLNode, IXMLPSERIEType)
  protected
    { IXMLPSERIEType }
    function Get_BAUDRATE: Integer;
    function Get_FLUX: WideString;
    function Get_FREQUENCE: Double;
    function Get_MODE: WideString;
    function Get_NBBITDATA: Integer;
    function Get_NBBITSTOP: Double;
    function Get_NBCAPTEURS: Integer;
    function Get_NOM: WideString;
    function Get_NUMERO: Integer;
    function Get_PARITE: WideString;
    function Get_SYSTEME: WideString;
    procedure Set_BAUDRATE(Value: Integer);
    procedure Set_FLUX(Value: WideString);
    procedure Set_FREQUENCE(Value: Double);
    procedure Set_MODE(Value: WideString);
    procedure Set_NBBITDATA(Value: Integer);
    procedure Set_NBBITSTOP(Value: Double);
    procedure Set_NBCAPTEURS(Value: Integer);
    procedure Set_NOM(Value: WideString);
    procedure Set_NUMERO(Value: Integer);
    procedure Set_PARITE(Value: WideString);
    procedure Set_SYSTEME(Value: WideString);
    function Get_TAILLETAMPON: integer;
    procedure Set_TAILLETAMPON(Value: integer);
  end;

{ TXMLPSERIETypeList }

  TXMLPSERIETypeList = class(TXMLNodeCollection, IXMLPSERIETypeList)
  protected
    { IXMLPSERIETypeList }
    function Add: IXMLPSERIEType;
    function Insert(const Index: Integer): IXMLPSERIEType;
    function Get_Item(Index: Integer): IXMLPSERIEType;
	end;

{ TXMLSTType }

	TXMLSTType = class(TXMLNode, IXMLSTType)
  private
    FBLOC: IXMLBLOCTypeList;
    FLISTECANAUXENREG : IXMLListeCanauxEnregVisuTypeList;
    FLISTECANAUXVISU : IXMLListeCanauxEnregVisuTypeList;
    FGRAPHES : IXMLListeGraphesTypeList;
  protected
    { IXMLSTType }
    function Get_NOM: WideString;
    function Get_DUMMYNODEST: WideString;
    function Get_BLOC: IXMLBLOCTypeList;
    function Get_LISTECANAUXENREG: IXMLListeCanauxEnregVisuTypeList;
    function Get_LISTECANAUXVISU: IXMLListeCanauxEnregVisuTypeList;
    function Get_FULLSCREEN: integer;
    function Get_STATUSBAR: integer;
    function Get_GRAPHES: IXMLListeGraphesTypeList;
    procedure Set_NOM(Value: WideString);
    procedure Set_DUMMYNODEST(Value: WideString);
    procedure Set_FULLSCREEN(value : integer);
    procedure Set_STATUSBAR(value : integer);
  public
    procedure AfterConstruction; override;
		function  UseStim : WideString;
		function  UseStimFileWithName(name : string) : boolean;
    procedure ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
    procedure RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
    procedure RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
	end;

{ TXMLSTTypeList }

	TXMLSTTypeList = class(TXMLNodeCollection, IXMLSTTypeList)
  protected
    { IXMLSTTypeList }
    function Add: IXMLSTType;
    function Insert(const Index: Integer): IXMLSTType;
    function Get_Item(Index: Integer): IXMLSTType;
		procedure ChangeChannelName(OldName,NewName : string; PSerie : string;InfoCanaux : TInfoCanaux);
  end;


  ////


{ TXMLListeCanauxEnregVisuType }

  TXMLListeCanauxEnregVisuType = class(TXMLNode, IXMLListeCanauxEnregVisuType)
  protected
    { IXMLListeCanauxEnregVisuType }
    function Get_NOMCANAL: WideString;
    procedure Set_NOMCANAL(Value : WideString);
  end;

{ TXMLListeCanauxEnregVisuTypeList }

  TXMLListeCanauxEnregVisuTypeList = class(TXMLNodeCollection, IXMLListeCanauxEnregVisuTypeList)
    { IXMLListeCanauxEnregVisuTypeList }
    function Add: IXMLListeCanauxEnregVisuType;
    function Insert(const Index: Integer): IXMLListeCanauxEnregVisuType;
    function Get_Item(Index: Integer): IXMLListeCanauxEnregVisuType;
  end;

{ TXMLListeGraphesType }

  TXMLListeGraphesType = class(TXMLNode, IXMLListeGraphesType)
  private
    FCOURBES : IXMLListeCourbesTypeList;
  protected
    { IXMLListeGraphesType }
    function Get_GENRE: WideString;
    procedure Set_GENRE(Value : WideString);
    function Get_TEMPSVISU: Double;
    procedure Set_TEMPSVISU(Value : Double);
    function Get_ECHELLEYAUTO: integer;
    procedure Set_ECHELLEYAUTO(Value : Integer);
    function Get_YMIN: Double;
    procedure Set_YMIN(Value : Double);
    function Get_YMAX: Double;
    procedure Set_YMAX(Value : Double);
    function Get_ECHELLEXAUTO: Integer;
    procedure Set_ECHELLEXAUTO(Value : Integer);
    function Get_XMIN: Double;
    procedure Set_XMIN(Value : Double);
    function Get_XMAX: Double;
    procedure Set_XMAX(Value : Double);
    function Get_COURBES : IXMLListeCourbesTypeList;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLListeGraphesTypeList }

  TXMLListeGraphesTypeList = class(TXMLNodeCollection, IXMLListeGraphesTypeList)
    { IXMLListeGraphesTypeList }
    function Add: IXMLListeGraphesType;
    function Insert(const Index: Integer): IXMLListeGraphesType;
    function Get_Item(Index: Integer): IXMLListeGraphesType;
  end;

{ TXMLListeCourbesType }

  TXMLListeCourbesType = class(TXMLNode,IXMLListeCourbesType)
  protected
    function Get_NOMCANALORDO: WideString;
    procedure Set_NOMCANALORDO(Value : WideString);
    function Get_NOMCANALABSC: WideString;
    procedure Set_NOMCANALABSC(Value : WideString);
    function Get_COLOR: integer;
    procedure Set_COLOR(Value : Integer);
  end;

{ TXMLListeCourbesTypeList }

  TXMLListeCourbesTypeList = class(TXMLNodeCollection, IXMLListeCourbesTypeList)
    function Add: IXMLListeCourbesType;
    function Insert(const Index: Integer): IXMLListeCourbesType;
    function Get_Item(Index: Integer): IXMLListeCourbesType;
    property Items[Index: Integer]: IXMLListeCourbesType read Get_Item; default;
  end;

//////

{ TXMLBLOCType }

  TXMLBLOCType = class(TXMLNode, IXMLBLOCType)
  private
    FBLOC: IXMLBLOCTypeList;
    FFONCTION: IXMLFONCTIONTypeList;
  protected
    { IXMLBLOCType }
    function Get_NOM: WideString;
    function Get_ADBASICCODE1: WideString;
    function Get_ADBASICCODE2: WideString;
    function Get_DELPHICODE1: WideString;
    function Get_DELPHICODE2: WideString;
    function Get_GENRE: WideString;
    function Get_PARAM1: WideString;
    function Get_PARAM2: WideString;
    function Get_PARAM3: WideString;
    function Get_DUMMYNODEBLOC: WideString;
    function Get_BLOC: IXMLBLOCTypeList;
    function Get_FONCTION: IXMLFONCTIONTypeList;
    procedure Set_NOM(Value: WideString);
    procedure Set_ADBASICCODE1(Value: WideString);
    procedure Set_ADBASICCODE2(Value: WideString);
    procedure Set_DELPHICODE1(Value: WideString);
    procedure Set_DELPHICODE2(Value: WideString);
    procedure Set_GENRE(Value: WideString);
    procedure Set_PARAM1(Value: WideString);
		procedure Set_PARAM2(Value: WideString);
    procedure Set_PARAM3(Value: WideString);
    procedure Set_DUMMYNODEBLOC(Value: WideString);
  public
    procedure AfterConstruction; override;
		function  UseStim : WideString;
    function  UseStimFileWithName(name : string) : boolean;
    procedure GetStimFileNames(var StimFileNames : TStringList);
    procedure ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
    procedure MAJCodeADBasic_Pascal;
    procedure RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
    procedure RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
  end;

{ TXMLBLOCTypeList }

  TXMLBLOCTypeList = class(TXMLNodeCollection, IXMLBLOCTypeList)
  protected
    { IXMLBLOCTypeList }
    function Add: IXMLBLOCType;
    function Insert(const Index: Integer): IXMLBLOCType;
    function Get_Item(Index: Integer): IXMLBLOCType;
  end;

{ TXMLFONCTIONType }

	TXMLFONCTIONType = class(TXMLNode, IXMLFONCTIONType)
  private
    FENTREE: IXMLENTREETypeList;
    FSORTIE: IXMLSORTIETypeList;
    FPARAM: IXMLPARAMTypeList;
    InfFile : TIniFile;
  protected
		{ IXMLFONCTIONType }
    function Get_DUREE: Double;
    function Get_FICHIER: WideString;
		function Get_GENRE: WideString;
    function Get_TITRE: WideString;
    function Get_ENTREE: IXMLENTREETypeList;
    function Get_SORTIE: IXMLSORTIETypeList;
    function Get_PARAM: IXMLPARAMTypeList;
    function Get_ADBASIC: IXMLADBASICType;
    function Get_PASCAL: IXMLPASCALType;
    procedure Set_DUREE(Value: Double);
    procedure Set_FICHIER(Value: WideString);
    procedure Set_GENRE(Value: WideString);
    procedure Set_TITRE(Value: WideString);
  public
    procedure AfterConstruction; override;
    procedure Replace(TypeReplace : string; Nbboucle : integer; var Aligne : string;ADB_OR_PAS : integer;InfoCanaux : TInfoCanaux);
    procedure Read_Section(LANG_ADBASIC : IXMLADBASICType;LANG_PASCAL : IXMLPASCALType;
														NomSection,PrefixeLigne : string; pNum_Fonction : integer;InfoCanaux : TInfoCanaux);
		procedure MAJCodeADBasic_Pascal(pNum_Fonction : integer;pRep_FichiersInf : string; InfoCanaux : TInfoCanaux);
	end;

{ TXMLFONCTIONTypeList }

  TXMLFONCTIONTypeList = class(TXMLNodeCollection, IXMLFONCTIONTypeList)
  protected
    { IXMLFONCTIONTypeList }
    function Add: IXMLFONCTIONType;
    function Insert(const Index: Integer): IXMLFONCTIONType;
    function Get_Item(Index: Integer): IXMLFONCTIONType;
  end;

{ TXMLENTREEType }

  TXMLENTREEType = class(TXMLNode, IXMLENTREEType)
  protected
    { IXMLENTREEType }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
  end;

{ TXMLENTREETypeList }

  TXMLENTREETypeList = class(TXMLNodeCollection, IXMLENTREETypeList)
  protected
    { IXMLENTREETypeList }
    function Add: IXMLENTREEType;
    function Insert(const Index: Integer): IXMLENTREEType;
    function Get_Item(Index: Integer): IXMLENTREEType;
  end;

{ TXMLSORTIEType }

  TXMLSORTIEType = class(TXMLNode, IXMLSORTIEType)
  protected
    { IXMLSORTIEType }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
  end;

{ TXMLSORTIETypeList }

  TXMLSORTIETypeList = class(TXMLNodeCollection, IXMLSORTIETypeList)
  protected
    { IXMLSORTIETypeList }
    function Add: IXMLSORTIEType;
    function Insert(const Index: Integer): IXMLSORTIEType;
    function Get_Item(Index: Integer): IXMLSORTIEType;
  end;

{ TXMLPARAMType }

  TXMLPARAMType = class(TXMLNode, IXMLPARAMType)
  protected
    { IXMLPARAMType }
    function Get_NOM: WideString;
    procedure Set_NOM(Value: WideString);
  end;

{ TXMLPARAMTypeList }

  TXMLPARAMTypeList = class(TXMLNodeCollection, IXMLPARAMTypeList)
  protected
    { IXMLPARAMTypeList }
    function Add: IXMLPARAMType;
    function Insert(const Index: Integer): IXMLPARAMType;
    function Get_Item(Index: Integer): IXMLPARAMType;
  end;

{ TXMLADBASICType }

  TXMLADBASICType = class(TXMLNode, IXMLADBASICType)
  private
    FINCLUDE: IXMLINCLUDETypeList;
    FIMPORT: IXMLIMPORTTypeList;
    FVAR_: IXMLVARTypeList;
    FLOWINIT: IXMLLOWINITTypeList;
    FCODE: IXMLCODETypeList;
    FFINISH: IXMLFINISHTypeList;
    FFCTSSP: IXMLFCTSSPTypeList;
    FLIBRARY_: IXMLLIBRARYTypeList;
  protected
    { IXMLADBASICType }
    function Get_INCLUDE: IXMLINCLUDETypeList;
    function Get_IMPORT: IXMLIMPORTTypeList;
    function Get_VAR_: IXMLVARTypeList;
    function Get_LOWINIT: IXMLLOWINITTypeList;
    function Get_CODE: IXMLCODETypeList;
    function Get_FINISH: IXMLFINISHTypeList;
    function Get_FCTSSP: IXMLFCTSSPTypeList;
    function Get_LIBRARY_: IXMLLIBRARYTypeList;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLINCLUDEType }

  TXMLINCLUDEType = class(TXMLNode, IXMLINCLUDEType)
  protected
    { IXMLINCLUDEType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLINCLUDETypeList }

  TXMLINCLUDETypeList = class(TXMLNodeCollection, IXMLINCLUDETypeList)
  protected
    { IXMLINCLUDETypeList }
    function Add: IXMLINCLUDEType;
    function Insert(const Index: Integer): IXMLINCLUDEType;
    function Get_Item(Index: Integer): IXMLINCLUDEType;
  end;

{ TXMLIMPORTType }

  TXMLIMPORTType = class(TXMLNode, IXMLIMPORTType)
  protected
    { IXMLIMPORTType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLIMPORTTypeList }

  TXMLIMPORTTypeList = class(TXMLNodeCollection, IXMLIMPORTTypeList)
  protected
    { IXMLIMPORTTypeList }
    function Add: IXMLIMPORTType;
    function Insert(const Index: Integer): IXMLIMPORTType;
    function Get_Item(Index: Integer): IXMLIMPORTType;
  end;

{ TXMLVARType }

  TXMLVARType = class(TXMLNode, IXMLVARType)
  protected
    { IXMLVARType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLVARTypeList }

  TXMLVARTypeList = class(TXMLNodeCollection, IXMLVARTypeList)
  protected
    { IXMLVARTypeList }
    function Add: IXMLVARType;
    function Insert(const Index: Integer): IXMLVARType;
    function Get_Item(Index: Integer): IXMLVARType;
  end;

{ TXMLLOWINITType }

  TXMLLOWINITType = class(TXMLNode, IXMLLOWINITType)
  protected
    { IXMLLOWINITType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLLOWINITTypeList }

  TXMLLOWINITTypeList = class(TXMLNodeCollection, IXMLLOWINITTypeList)
  protected
    { IXMLLOWINITTypeList }
    function Add: IXMLLOWINITType;
    function Insert(const Index: Integer): IXMLLOWINITType;
    function Get_Item(Index: Integer): IXMLLOWINITType;
  end;

{ TXMLCODEType }

  TXMLCODEType = class(TXMLNode, IXMLCODEType)
  protected
    { IXMLCODEType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLCODETypeList }

  TXMLCODETypeList = class(TXMLNodeCollection, IXMLCODETypeList)
  protected
    { IXMLCODETypeList }
    function Add: IXMLCODEType;
    function Insert(const Index: Integer): IXMLCODEType;
    function Get_Item(Index: Integer): IXMLCODEType;
  end;

{ TXMLFINISHType }

  TXMLFINISHType = class(TXMLNode, IXMLFINISHType)
  protected
    { IXMLFINISHType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLFINISHTypeList }

  TXMLFINISHTypeList = class(TXMLNodeCollection, IXMLFINISHTypeList)
  protected
    { IXMLFINISHTypeList }
    function Add: IXMLFINISHType;
    function Insert(const Index: Integer): IXMLFINISHType;
    function Get_Item(Index: Integer): IXMLFINISHType;
  end;

{ TXMLFCTSSPType }

  TXMLFCTSSPType = class(TXMLNode, IXMLFCTSSPType)
  protected
    { IXMLFCTSSPType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLFCTSSPTypeList }

  TXMLFCTSSPTypeList = class(TXMLNodeCollection, IXMLFCTSSPTypeList)
  protected
    { IXMLFCTSSPTypeList }
    function Add: IXMLFCTSSPType;
    function Insert(const Index: Integer): IXMLFCTSSPType;
    function Get_Item(Index: Integer): IXMLFCTSSPType;
  end;

{ TXMLLIBRARYType }

  TXMLLIBRARYType = class(TXMLNode, IXMLLIBRARYType)
  protected
    { IXMLLIBRARYType }
    function Get_TEXT: WideString;
    procedure Set_TEXT(Value: WideString);
  end;

{ TXMLLIBRARYTypeList }

  TXMLLIBRARYTypeList = class(TXMLNodeCollection, IXMLLIBRARYTypeList)
  protected
    { IXMLLIBRARYTypeList }
    function Add: IXMLLIBRARYType;
    function Insert(const Index: Integer): IXMLLIBRARYType;
    function Get_Item(Index: Integer): IXMLLIBRARYType;
  end;

{ TXMLPASCALType }

  TXMLPASCALType = class(TXMLNode, IXMLPASCALType)
  private
    FINCLUDE: IXMLINCLUDETypeList;
    FIMPORT: IXMLIMPORTTypeList;
    FVAR_: IXMLVARTypeList;
    FLOWINIT: IXMLLOWINITTypeList;
    FCODE: IXMLCODETypeList;
    FFINISH: IXMLFINISHTypeList;
    FFCTSSP: IXMLFCTSSPTypeList;
    FLIBRARY_: IXMLLIBRARYTypeList;
  protected
    { IXMLPASCALType }
    function Get_INCLUDE: IXMLINCLUDETypeList;
    function Get_IMPORT: IXMLIMPORTTypeList;
    function Get_VAR_: IXMLVARTypeList;
    function Get_LOWINIT: IXMLLOWINITTypeList;
    function Get_CODE: IXMLCODETypeList;
    function Get_FINISH: IXMLFINISHTypeList;
    function Get_FCTSSP: IXMLFCTSSPTypeList;
    function Get_LIBRARY_: IXMLLIBRARYTypeList;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLESSAIType }

  TXMLESSAIType = class(TXMLNode,IXMLESSAIType)
  protected
    { IXMLESSAIType }
    function Get_NOMST: WideString;
    function Get_MODEDEM: WideString;
    function Get_ETAT: WideString;
    procedure Set_NOMST(Value: WideString);
    procedure Set_MODEDEM(Value: WideString);
    procedure Set_ETAT(Value: WideString);
  end;

{ TXMLESSAISTypeList }

  TXMLESSAISTypeList = class(TXMLNodeCollection,IXMLESSAISTypeList)
  protected
    { IXMLESSAISTypeList }
    function Add: IXMLESSAIType;
    function Insert(const Index: Integer): IXMLESSAIType;
    function Get_Item(Index: Integer): IXMLESSAIType;
  end;

{ TXMLSESSIONType }

  TXMLSESSIONType = class(TXMLNode,IXMLSESSIONType)
  private
    FESSAIS : IXMLESSAISTypeList;
  protected
    { IXMLSESSIONType }
    function Get_NOM: WideString;
    function Get_ESSAIS : IXMLESSAISTypeList;
    procedure Set_NOM(Value : WideString);
  public
    procedure AfterConstruction; override;
    procedure ChangeSTName(OldName,NewName : string);
    function  PercentDone : integer;
  end;

{ TXMLSESSIONSTypeList }

  TXMLSESSIONSTypeList = class(TXMLNodeCollection,IXMLSESSIONSTypeList)
  protected
    { IXMLSESSIONSTypeList }
    function Add: IXMLSESSIONType;
    function Insert(const Index: Integer): IXMLSESSIONType;
    function Get_Item(Index: Integer): IXMLSESSIONType;
    function IndexOf(Value : WideString) : integer;
    procedure ChangeSTName(OldName,NewName : string);
  end;

{ TXMLATTRIBUTType }

  TXMLATTRIBUTType = class(TXMLNode,IXMLATTRIBUTType)
  protected
    { IXMLATTRIBUTType }
    function Get_NOM: WideString;
    function Get_VALEUR: WideString;
    procedure Set_NOM(Value : WideString);
    procedure Set_VALEUR(Value : WideString);
  end;

{ TXMLATTRIBUTSTypeList }

  TXMLATTRIBUTSTypeList = class(TXMLNodeCollection,IXMLATTRIBUTSTypeList)
  protected
    { IXMLATTRIBUTSTypeList }
    function Add: IXMLATTRIBUTType;
    function Insert(const Index: Integer): IXMLATTRIBUTType;
    function Get_Item(Index: Integer): IXMLATTRIBUTType;
  end;

{ TXMLSUJETType }

  TXMLSUJETType = class(TXMLNode,IXMLSUJETType)
  private
    FSESSIONS : IXMLSESSIONSTypeList;
    FATTRIBUTS : IXMLATTRIBUTSTypeList;
  protected
    { IXMLSUJETType }
    function Get_NOM: WideString;
    procedure Set_NOM(Value : WideString);
    function Get_PARAMSFILEPATH: WideString;
    procedure Set_PARAMSFILEPATH(Value : WideString);
    function Get_SESSIONS : IXMLSESSIONSTypeList;
    function Get_ATTRIBUTS : IXMLATTRIBUTSTypeList;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLSUJETSTypeList }

  TXMLSUJETSTypeList = class(TXMLNodeCollection,IXMLSUJETSTypeList)
  protected
    { IXMLSUJETSTypeList }
    function Add: IXMLSUJETType;
    function Insert(const Index: Integer): IXMLSUJETType;
    function Get_Item(Index: Integer): IXMLSUJETType;
    procedure Delete(Index: Integer);overload;
  end;

{ TXMLFORMATNOMFICHIERSSAVEType }

  TXMLFORMATNOMFICHIERSSAVEType = class(TXMLNode,IXMLFORMATNOMFICHIERSSAVEType)
    function Use_NOMCANAL: Integer;
    function Use_NOMST: Integer;
    function Use_NOMSESSION: Integer;
    function Use_NUMSESSION: Integer;
    function Use_NUMESSAI: Integer;
    procedure Set_UseNOMCANAL(Value: Integer);
    procedure Set_UseNOMST(Value: Integer);
    procedure Set_UseNOMSESSION(Value: Integer);
    procedure Set_UseNUMSESSION(Value: Integer);
    procedure Set_UseNUMESSAI(Value: Integer);
  end;

{ Fonctions globales }

function GetROOT(Doc: IXMLDocument): IXMLROOTType;
function LoadROOT(const FileName: WideString): IXMLROOTType;
function NewROOT: IXMLROOTType;

const
  TargetNamespace = '';

implementation

{ Fonctions globales }

function GetROOT(Doc: IXMLDocument): IXMLROOTType;
begin
  Result := Doc.GetDocBinding('ROOT', TXMLROOTType, TargetNamespace) as IXMLROOTType;
end;

function LoadROOT(const FileName: WideString): IXMLROOTType;
begin
  Result := LoadXMLDocument(FileName).GetDocBinding('ROOT', TXMLROOTType, TargetNamespace) as IXMLROOTType;
end;

function NewROOT: IXMLROOTType;
begin
  Result := NewXMLDocument.GetDocBinding('ROOT', TXMLROOTType, TargetNamespace) as IXMLROOTType;
end;

//Classe infocanaux
constructor TInfoCanaux.Create;
begin
  Nom := TStringList.Create;
  NumCanal := TStringList.Create;
  RappFreq := TStringList.Create;
  NumCanalCarteES := TStringList.Create;
  floatORint := TStringList.Create;
  inORoutORcanint := TStringList.Create;
  purORparam := TStringList.Create;
  propag := TStringList.Create;
  ISPSerie := TStringList.Create;
  ISArray         := TStringList.Create;
  ArraySizeOrElementNum := TStringList.Create;
  TailleTampon := TStringList.Create;
end;

destructor  TInfoCanaux.Free;
begin
  Nom.Free;
  NumCanal.Free;
  RappFreq.Free;
  NumCanalCarteES.Free;
  floatORint.Free;
  inORoutORcanint.Free;
  purORparam.Free;
  propag.Free;
  ISPSerie.free;
  ISArray.Free;
  ArraySizeOrElementNum.Free;
  TailleTampon.Free;
  Nom := nil;
  NumCanal := nil;
  RappFreq := nil;
  NumCanalCarteES := nil;
  floatORint := nil;
  inORoutORcanint := nil;
  purORparam := nil;
  ISPSerie := nil;
  ISArray := nil;
  ArraySizeOrElementNum := nil;
  TailleTampon := nil;
end;


{ TXMLROOTType }

procedure TXMLROOTType.AfterConstruction;
begin
  RegisterChildNode('EXPERIENCE', TXMLEXPERIENCEType);
  RegisterChildNode('CTRLEAN', TXMLCTRLEANType);
  RegisterChildNode('CTRLSAN', TXMLCTRLSANType);
  RegisterChildNode('CTRLESNUM', TXMLCTRLESNUMType);
  RegisterChildNode('EAN', TXMLEANType);
  RegisterChildNode('SAN', TXMLSANType);
  RegisterChildNode('SNUM', TXMLSNUMType);
  RegisterChildNode('ENUM', TXMLENUMType);
  RegisterChildNode('CANINT', TXMLCANINTType);
  RegisterChildNode('PSERIE', TXMLPSERIEType);
  RegisterChildNode('ST', TXMLSTType);
  RegisterChildNode('SESSION', TXMLSESSIONType);
  RegisterChildNode('SUJET', TXMLSUJETType);
  RegisterChildNode('FORMATNOMFICHIERSSAVE', TXMLFORMATNOMFICHIERSSAVEType);
  FEAN := CreateCollection(TXMLEANTypeList, IXMLEANType, 'EAN') as IXMLEANTypeList;
  FSAN := CreateCollection(TXMLSANTypeList, IXMLSANType, 'SAN') as IXMLSANTypeList;
  FSNUM := CreateCollection(TXMLSNUMTypeList, IXMLSNUMType, 'SNUM') as IXMLSNUMTypeList;
  FENUM := CreateCollection(TXMLENUMTypeList, IXMLENUMType, 'ENUM') as IXMLENUMTypeList;
  FCANINT := CreateCollection(TXMLCANINTTypeList, IXMLCANINTType, 'CANINT') as IXMLCANINTTypeList;
  FPSERIE := CreateCollection(TXMLPSERIETypeList, IXMLPSERIEType, 'PSERIE') as IXMLPSERIETypeList;
  FST := CreateCollection(TXMLSTTypeList, IXMLSTType, 'ST') as IXMLSTTypeList;
  FSESSIONS := CreateCollection(TXMLSESSIONSTypeList, IXMLSESSIONType, 'SESSION') as IXMLSESSIONSTypeList;
  FSUJETS := CreateCollection(TXMLSUJETSTypeList, IXMLSUJETType, 'SUJET') as IXMLSUJETSTypeList;
  inherited;
end;



function TXMLROOTType.RendreListeInfoCanaux:TInfoCanaux;
var i,NumCanal,RF,j : integer;
    ListeInfoCanaux : TInfoCanaux;
begin
  ListeInfoCanaux := TInfoCanaux.Create;

  //Calcul de la base en fonction du nb total process et du numero du process
  NumCanal := (80 div Nb_Process)*(Num_Process - 1);
  for i := 0 to Self.FEAN.Count - 1 do
  begin
    NumCanal := NumCanal + 1;
    ListeInfoCanaux.Nom.Add(Self.FEAN.Items[i].NOM);
    ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
    RF := round(Get_EXPERIENCE.FEG/Self.FEAN.Items[i].FE);
    ListeInfoCanaux.RappFreq.Add(inttostr(RF));
    ListeInfoCanaux.NumCanalCarteES.Add(inttostr(FEAN.Items[i].NUMERO));
    ListeInfoCanaux.floatORint.Add('float');
    ListeInfoCanaux.inORoutORcanint.Add('in');
    ListeInfoCanaux.purORparam.Add('');
    ListeInfoCanaux.propag.Add('0');
    ListeInfoCanaux.ISPSerie.Add('0');
    ListeInfoCanaux.ISArray.Add('0');
    ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
    ListeInfoCanaux.TailleTampon.Add(inttostr(FEAN.Items[i].TAILLETAMPON));
  end;
  for i := 0 to FSAN.Count - 1 do
  begin
    NumCanal := NumCanal + 1;
    ListeInfoCanaux.Nom.Add(FSAN.Items[i].NOM);
    ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
    RF := round(Get_EXPERIENCE.FEG/FSAN.Items[i].FE);
    ListeInfoCanaux.RappFreq.Add(inttostr(RF));
    ListeInfoCanaux.NumCanalCarteES.Add(inttostr(FSAN.Items[i].NUMERO));
    ListeInfoCanaux.floatORint.Add('float');
    ListeInfoCanaux.inORoutORcanint.Add('out');
    ListeInfoCanaux.purORparam.Add('');
    ListeInfoCanaux.propag.Add('0');
    ListeInfoCanaux.ISPSerie.Add('0');
    ListeInfoCanaux.ISArray.Add('0');
    ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
    ListeInfoCanaux.TailleTampon.Add(inttostr(FSAN.Items[i].TAILLETAMPON));
  end;
  for i := 0 to FENUM.Count - 1 do
  begin
    NumCanal := NumCanal + 1;
    ListeInfoCanaux.Nom.Add(FENUM.Items[i].NOM);
    ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
    RF := round(Get_EXPERIENCE.FEG/Get_CTRLESNUM.FE);
    ListeInfoCanaux.RappFreq.Add(inttostr(RF));
    ListeInfoCanaux.NumCanalCarteES.Add(inttostr(FENUM.Items[i].NUMERO));
    ListeInfoCanaux.floatORint.Add('int');
    ListeInfoCanaux.inORoutORcanint.Add('in');
    ListeInfoCanaux.purORparam.Add('');
    ListeInfoCanaux.propag.Add('0');
    ListeInfoCanaux.ISPSerie.Add('0');
    ListeInfoCanaux.ISArray.Add('0');
    ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
    ListeInfoCanaux.TailleTampon.Add(inttostr(FENUM.Items[i].TAILLETAMPON));
  end;
  for i := 0 to FSNUM.Count - 1 do
  begin
    NumCanal := NumCanal + 1;
    ListeInfoCanaux.Nom.Add(FSNUM.Items[i].NOM);
    ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
    RF := round(Get_EXPERIENCE.FEG/Get_CTRLESNUM.FE);
    ListeInfoCanaux.RappFreq.Add(inttostr(RF));
    ListeInfoCanaux.NumCanalCarteES.Add(inttostr(FSNUM.Items[i].NUMERO));
    ListeInfoCanaux.floatORint.Add('int');
    ListeInfoCanaux.inORoutORcanint.Add('out');
    ListeInfoCanaux.purORparam.Add('');
    ListeInfoCanaux.propag.Add('0');
    ListeInfoCanaux.ISPSerie.Add('0');
    ListeInfoCanaux.ISArray.Add('0');
    ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
    ListeInfoCanaux.TailleTampon.Add(inttostr(FSNUM.Items[i].TAILLETAMPON));
  end;
  for i := 0 to FCANINT.Count - 1 do
  begin

    if FCANINT.Items[i].TAILLE > 1 then
    begin
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FCANINT.Items[i].NOM);
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      if FCANINT.Items[i].GENRE = 'PUR'
      then RF := round(Get_EXPERIENCE.FEG/FCANINT.Items[i].FENUMPAR)
      else RF := 1;
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      if FCANINT.Items[i].FORMAT = 'Flottant'
      then ListeInfoCanaux.floatORint.Add('float')
      else ListeInfoCanaux.floatORint.Add('int');
      ListeInfoCanaux.inORoutORcanint.Add('canint');
      if FCANINT.Items[i].GENRE = 'PUR' then
      begin
        ListeInfoCanaux.purORparam.Add('PUR');
        ListeInfoCanaux.propag.Add('0');
      end else
      begin
        ListeInfoCanaux.purORparam.Add('PARAM');
        if FCANINT.Items[i].PROPAG = 1
        then ListeInfoCanaux.propag.Add('1')
        else ListeInfoCanaux.propag.Add('0');
      end;
      ListeInfoCanaux.ISPSerie.Add('0');
      ListeInfoCanaux.ISArray.Add('1');
      ListeInfoCanaux.ArraySizeOrElementNum.Add(inttostr(FCANINT.Items[i].TAILLE));
      ListeInfoCanaux.TailleTampon.Add(inttostr(FCANINT.Items[i].TAILLETAMPON));
    end;

    for j := 0 to FCANINT.Items[i].TAILLE - 1 do
    begin
      NumCanal := NumCanal + 1;
      if FCANINT.Items[i].TAILLE > 1
      then ListeInfoCanaux.Nom.Add(FCANINT.Items[i].NOM+'['+inttostr(j+1)+']')
      else ListeInfoCanaux.Nom.Add(FCANINT.Items[i].NOM);
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      if FCANINT.Items[i].GENRE = 'PUR'
      then RF := round(Get_EXPERIENCE.FEG/FCANINT.Items[i].FENUMPAR)
      else RF := 1;
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      if FCANINT.Items[i].FORMAT = 'Flottant'
      then ListeInfoCanaux.floatORint.Add('float')
      else ListeInfoCanaux.floatORint.Add('int');
      ListeInfoCanaux.inORoutORcanint.Add('canint');
      if FCANINT.Items[i].GENRE = 'PUR' then
      begin
        ListeInfoCanaux.purORparam.Add('PUR');
        ListeInfoCanaux.propag.Add('0');
      end else
      begin
        ListeInfoCanaux.purORparam.Add('PARAM');
        if FCANINT.Items[i].PROPAG = 1
        then ListeInfoCanaux.propag.Add('1')
        else ListeInfoCanaux.propag.Add('0');
      end;
      ListeInfoCanaux.ISPSerie.Add('0');
      if FCANINT.Items[i].TAILLE > 1 then
      begin
        ListeInfoCanaux.ISArray.Add('1');
        ListeInfoCanaux.ArraySizeOrElementNum.Add(inttostr(j+1));
      end else
      begin
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      end;
      ListeInfoCanaux.TailleTampon.Add(inttostr(FCANINT.Items[i].TAILLETAMPON));
    end;
  end;
  for i := 0 to FPSERIE.Count - 1 do
  begin
		RF := round(Get_EXPERIENCE.FEG/FPSERIE.Items[i].FREQUENCE);
    if ((FPSERIE.Items[i].SYSTEME = 'Polhemus') or
       (FPSERIE.Items[i].SYSTEME = 'Bird')) then
    begin
      for j := 0 to FPSERIE.Items[i].NBCAPTEURS - 1 do
      begin
        //X
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_X');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_X');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //Y
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_Y');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_Y');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //Z
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_Z');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_Z');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //THETAX
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_THETAX');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_THETAX');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //THETAY
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_THETAY');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_THETAY');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //THETAZ
        NumCanal := NumCanal + 1;
        if (FPSERIE.Items[i].SYSTEME = 'Polhemus')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_THETAZ');
        if (FPSERIE.Items[i].SYSTEME = 'Bird')
        then ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_THETAZ');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      end;
      //TEMPS
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_TEMPS');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('float');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
    end;
    if (FPSERIE.Items[i].SYSTEME = 'SummaGrid IV') then
    begin
      //X
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_X');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('float');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      //Y
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_Y');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('float');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      //BOUTON1
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_BOUTON1');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('int');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      //BOUTON2
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_BOUTON2');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('int');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      //BOUTON3
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_BOUTON3');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('int');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      //TEMPS
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_TEMPS');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('float');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
    end;

    if (FPSERIE.Items[i].SYSTEME = 'CODAmotion') then
    begin
      for j := 0 to FPSERIE.Items[i].NBCAPTEURS - 1 do
      begin
        //X
        NumCanal := NumCanal + 1;
        ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_X');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //Y
        NumCanal := NumCanal + 1;
        ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_Y');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
        //Z
        NumCanal := NumCanal + 1;
        ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_C'+inttostr(j+1)+'_Z');
        ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
        ListeInfoCanaux.RappFreq.Add(inttostr(RF));
        ListeInfoCanaux.floatORint.Add('float');
        ListeInfoCanaux.inORoutORcanint.Add('in');
        ListeInfoCanaux.purORparam.Add('');
        ListeInfoCanaux.propag.Add('0');
        ListeInfoCanaux.ISPSerie.Add('1');
        ListeInfoCanaux.ISArray.Add('0');
        ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
        ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
      end;
      //FrameID
      NumCanal := NumCanal + 1;
      ListeInfoCanaux.Nom.Add(FPSERIE.Items[i].NOM+'_FRAMEID');
      ListeInfoCanaux.NumCanal.Add(inttostr(NumCanal));
      ListeInfoCanaux.RappFreq.Add(inttostr(RF));
      ListeInfoCanaux.floatORint.Add('float');
      ListeInfoCanaux.inORoutORcanint.Add('in');
      ListeInfoCanaux.purORparam.Add('');
      ListeInfoCanaux.propag.Add('0');
      ListeInfoCanaux.ISPSerie.Add('1');
      ListeInfoCanaux.ISArray.Add('0');
      ListeInfoCanaux.ArraySizeOrElementNum.Add('0');
      ListeInfoCanaux.TailleTampon.Add(inttostr(FPSERIE.Items[i].TAILLETAMPON));
    end;

  end;
  result := ListeInfoCanaux;
end;

function TXMLROOTType.Get_EXPERIENCE: IXMLEXPERIENCEType;
begin
  Result := ChildNodes['EXPERIENCE'] as IXMLEXPERIENCEType;
end;

function TXMLROOTType.Get_CTRLEAN: IXMLCTRLEANType;
begin
  Result := ChildNodes['CTRLEAN'] as IXMLCTRLEANType;
end;

function TXMLROOTType.Get_CTRLSAN: IXMLCTRLSANType;
begin
  Result := ChildNodes['CTRLSAN'] as IXMLCTRLSANType;
end;

function TXMLROOTType.Get_CTRLESNUM: IXMLCTRLESNUMType;
begin
  Result := ChildNodes['CTRLESNUM'] as IXMLCTRLESNUMType;
end;

function TXMLROOTType.Get_EAN: IXMLEANTypeList;
begin
  Result := FEAN;
end;

function TXMLROOTType.Get_SAN: IXMLSANTypeList;
begin
  Result := FSAN;
end;

function TXMLROOTType.Get_SNUM: IXMLSNUMTypeList;
begin
  Result := FSNUM;
end;

function TXMLROOTType.Get_ENUM: IXMLENUMTypeList;
begin
  Result := FENUM;
end;

function TXMLROOTType.Get_CANINT: IXMLCANINTTypeList;
begin
  Result := FCANINT;
end;

function TXMLROOTType.Get_PSERIE: IXMLPSERIETypeList;
begin
  Result := FPSERIE;
end;

function TXMLROOTType.Get_ST: IXMLSTTypeList;
begin
  Result := FST;
end;

function TXMLROOTType.Get_SESSIONS: IXMLSESSIONSTypeList;
begin
  Result := FSESSIONS;
end;

function TXMLROOTType.Get_SUJETS: IXMLSUJETSTypeList;
begin
  Result := FSUJETS;
end;

function TXMLROOTType.Get_FORMATNOMFICHIERSSAVE: IXMLFORMATNOMFICHIERSSAVEType;
begin
  Result := ChildNodes['FORMATNOMFICHIERSSAVE'] as IXMLFORMATNOMFICHIERSSAVEType;
end;

{ TXMLEXPERIENCEType }

procedure TXMLEXPERIENCEType.AfterConstruction;
begin
  RegisterChildNode('DESCRIPTIF', TXMLDESCRIPTIFType);
  FDESCRIPTIF := CreateCollection(TXMLDESCRIPTIFTypeList, IXMLDESCRIPTIFType, 'DESCRIPTIF') as IXMLDESCRIPTIFTypeList;
  inherited;
end;

function TXMLEXPERIENCEType.Get_FEG: Integer;
begin
  Result := AttributeNodes['FEG'].NodeValue;
end;

procedure TXMLEXPERIENCEType.Set_FEG(Value: Integer);
begin
	SetAttribute('FEG', Value);
end;

function TXMLEXPERIENCEType.Get_NBSESSIONS: Integer;
begin
  Result := AttributeNodes['NBSESSIONS'].NodeValue;
end;

procedure TXMLEXPERIENCEType.Set_NBSESSIONS(Value: Integer);
begin
  SetAttribute('NBSESSIONS', Value);
end;

function TXMLEXPERIENCEType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLEXPERIENCEType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLEXPERIENCEType.Get_DUMMYNODEEXPE: WideString;
begin
  Result := ChildNodes['DUMMYNODEEXPE'].Text;
end;

procedure TXMLEXPERIENCEType.Set_DUMMYNODEEXPE(Value: WideString);
begin
  ChildNodes['DUMMYNODEEXPE'].NodeValue := Value;
end;

function TXMLEXPERIENCEType.Get_DESCRIPTIF: IXMLDESCRIPTIFTypeList;
begin
  Result := FDESCRIPTIF;
end;

{ TXMLDESCRIPTIFType }

function TXMLDESCRIPTIFType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLDESCRIPTIFType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLDESCRIPTIFTypeList }

function TXMLDESCRIPTIFTypeList.Add: IXMLDESCRIPTIFType;
begin
  Result := AddItem(-1) as IXMLDESCRIPTIFType;
end;

function TXMLDESCRIPTIFTypeList.Insert(const Index: Integer): IXMLDESCRIPTIFType;
begin
  Result := AddItem(Index) as IXMLDESCRIPTIFType;
end;
function TXMLDESCRIPTIFTypeList.Get_Item(Index: Integer): IXMLDESCRIPTIFType;
begin
  Result := List[Index] as IXMLDESCRIPTIFType;
end;

{ TXMLCTRLEANType }

function TXMLCTRLEANType.Get_AMPLITUDE: WideString;
begin
  Result := AttributeNodes['AMPLITUDE'].Text;
end;

procedure TXMLCTRLEANType.Set_AMPLITUDE(Value: WideString);
begin
  SetAttribute('AMPLITUDE', Value);
end;

function TXMLCTRLEANType.Get_SEDIFF: WideString;
begin
  Result := AttributeNodes['SEDIFF'].Text;
end;

procedure TXMLCTRLEANType.Set_SEDIFF(Value: WideString);
begin
  SetAttribute('SEDIFF', Value);
end;

{ TXMLCTRLSANType }

function TXMLCTRLSANType.Get_AMPLITUDE: WideString;
begin
  Result := AttributeNodes['AMPLITUDE'].Text;
end;

procedure TXMLCTRLSANType.Set_AMPLITUDE(Value: WideString);
begin
  SetAttribute('AMPLITUDE', Value);
end;

{ TXMLCTRLESNUMType }

function TXMLCTRLESNUMType.Get_FE: Double;
begin
  Result := AttributeNodes['FE'].NodeValue;
end;

procedure TXMLCTRLESNUMType.Set_FE(Value: Double);
begin
  SetAttribute('FE', Value);
end;

{ TXMLEANType }

function TXMLEANType.Get_FE: Double;
begin
  Result := AttributeNodes['FE'].NodeValue;
end;

procedure TXMLEANType.Set_FE(Value: Double);
begin
  SetAttribute('FE', Value);
end;

function TXMLEANType.Get_GAIN: Integer;
begin
  Result := AttributeNodes['GAIN'].NodeValue;
end;

procedure TXMLEANType.Set_GAIN(Value: Integer);
begin
  SetAttribute('GAIN', Value);
end;

function TXMLEANType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLEANType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLEANType.Get_NUMERO: Integer;
begin
  Result := AttributeNodes['NUMERO'].NodeValue;
end;

procedure TXMLEANType.Set_NUMERO(Value: Integer);
begin
  SetAttribute('NUMERO', Value);
end;

function TXMLEANType.Get_UNITE: WideString;
begin
  Result := AttributeNodes['UNITE'].Text;
end;

procedure TXMLEANType.Set_UNITE(Value: WideString);
begin
  SetAttribute('UNITE', Value);
end;

function TXMLEANType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLEANType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

function TXMLEANType.Get_AMIN : Double;
begin
  Result := AttributeNodes['AMIN'].NodeValue;
end;

procedure TXMLEANType.Set_AMIN(Value : Double);
begin
  SetAttribute('AMIN', Value);
end;

function TXMLEANType.Get_AMAX : Double;
begin
  Result := AttributeNodes['AMAX'].NodeValue;
end;

procedure TXMLEANType.Set_AMAX(Value : Double);
begin
  SetAttribute('AMAX', Value);
end;

function TXMLEANType.Get_UMIN : Double;
begin
  Result := AttributeNodes['UMIN'].NodeValue;
end;

procedure TXMLEANType.Set_UMIN(Value : Double);
begin
  SetAttribute('UMIN', Value);
end;

function TXMLEANType.Get_UMAX : Double;
begin
  Result := AttributeNodes['UMAX'].NodeValue;
end;

procedure TXMLEANType.Set_UMAX(Value : Double);
begin
  SetAttribute('UMAX', Value);
end;

{ TXMLEANTypeList }

function TXMLEANTypeList.Add: IXMLEANType;
begin
  Result := AddItem(-1) as IXMLEANType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLEANTypeList.Insert(const Index: Integer): IXMLEANType;
begin
  Result := AddItem(Index) as IXMLEANType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLEANTypeList.Get_Item(Index: Integer): IXMLEANType;
begin
  Result := List[Index] as IXMLEANType;
end;

{ TXMLSANType }

function TXMLSANType.Get_FE: Double;
begin
  Result := AttributeNodes['FE'].NodeValue;
end;

procedure TXMLSANType.Set_FE(Value: Double);
begin
  SetAttribute('FE', Value);
end;

function TXMLSANType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLSANType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLSANType.Get_NUMERO: Integer;
begin
  Result := AttributeNodes['NUMERO'].NodeValue;
end;

procedure TXMLSANType.Set_NUMERO(Value: Integer);
begin
  SetAttribute('NUMERO', Value);
end;

function TXMLSANType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLSANType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

{ TXMLSANTypeList }

function TXMLSANTypeList.Add: IXMLSANType;
begin
  Result := AddItem(-1) as IXMLSANType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLSANTypeList.Insert(const Index: Integer): IXMLSANType;
begin
  Result := AddItem(Index) as IXMLSANType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLSANTypeList.Get_Item(Index: Integer): IXMLSANType;
begin
  Result := List[Index] as IXMLSANType;
end;

{ TXMLSNUMType }

function TXMLSNUMType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLSNUMType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLSNUMType.Get_NUMERO: Integer;
begin
  Result := AttributeNodes['NUMERO'].NodeValue;
end;

procedure TXMLSNUMType.Set_NUMERO(Value: Integer);
begin
  SetAttribute('NUMERO', Value);
end;

function TXMLSNUMType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLSNUMType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

{ TXMLSNUMTypeList }

function TXMLSNUMTypeList.Add: IXMLSNUMType;
begin
  Result := AddItem(-1) as IXMLSNUMType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLSNUMTypeList.Insert(const Index: Integer): IXMLSNUMType;
begin
  Result := AddItem(Index) as IXMLSNUMType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLSNUMTypeList.Get_Item(Index: Integer): IXMLSNUMType;
begin
  Result := List[Index] as IXMLSNUMType;
end;

{ TXMLENUMType }

function TXMLENUMType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLENUMType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLENUMType.Get_NUMERO: Integer;
begin
  Result := AttributeNodes['NUMERO'].NodeValue;
end;

procedure TXMLENUMType.Set_NUMERO(Value: Integer);
begin
  SetAttribute('NUMERO', Value);
end;

function TXMLENUMType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLENUMType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

{ TXMLENUMTypeList }

function TXMLENUMTypeList.Add: IXMLENUMType;
begin
  Result := AddItem(-1) as IXMLENUMType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLENUMTypeList.Insert(const Index: Integer): IXMLENUMType;
begin
  Result := AddItem(Index) as IXMLENUMType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLENUMTypeList.Get_Item(Index: Integer): IXMLENUMType;
begin
  Result := List[Index] as IXMLENUMType;
end;

{ TXMLCANINTType }

function TXMLCANINTType.Get_FENUMPAR: Double;
begin
  Result := AttributeNodes['FENUMPAR'].NodeValue;
end;

procedure TXMLCANINTType.Set_FENUMPAR(Value: Double);
begin
  SetAttribute('FENUMPAR', Value);
end;

function TXMLCANINTType.Get_GENRE: WideString;
begin
  Result := AttributeNodes['GENRE'].Text;
end;

procedure TXMLCANINTType.Set_GENRE(Value: WideString);
begin
  SetAttribute('GENRE', Value);
end;

function TXMLCANINTType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLCANINTType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLCANINTType.Get_TAILLE: Integer;
begin
  Result := AttributeNodes['TAILLE'].NodeValue;
end;

procedure TXMLCANINTType.Set_TAILLE(Value: Integer);
begin
  SetAttribute('TAILLE', Value);
end;

function TXMLCANINTType.Get_FORMAT: WideString;
begin
  Result := AttributeNodes['FORMAT'].Text;
end;

procedure TXMLCANINTType.Set_FORMAT(Value: WideString);
begin
  SetAttribute('FORMAT', Value);
end;

function TXMLCANINTType.Get_PROPAG: integer;
begin
  Result := AttributeNodes['PROPAG'].NodeValue;
end;

procedure TXMLCANINTType.Set_PROPAG(Value: integer);
begin
  SetAttribute('PROPAG', Value);
end;

function TXMLCANINTType.Get_VALEUR: double;
begin
  Result := AttributeNodes['VALEUR'].NodeValue;
end;

procedure TXMLCANINTType.Set_VALEUR(Value: double);
begin
  SetAttribute('VALEUR', Value);
end;

function TXMLCANINTType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLCANINTType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

{ TXMLCANINTTypeList }

function TXMLCANINTTypeList.Add: IXMLCANINTType;
begin
  Result := AddItem(-1) as IXMLCANINTType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLCANINTTypeList.Insert(const Index: Integer): IXMLCANINTType;
begin
  Result := AddItem(Index) as IXMLCANINTType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLCANINTTypeList.Get_Item(Index: Integer): IXMLCANINTType;
begin
  Result := List[Index] as IXMLCANINTType;
end;

{ TXMLPSERIEType }

function TXMLPSERIEType.Get_BAUDRATE: Integer;
begin
  Result := AttributeNodes['BAUDRATE'].NodeValue;
end;

procedure TXMLPSERIEType.Set_BAUDRATE(Value: Integer);
begin
  SetAttribute('BAUDRATE', Value);
end;

function TXMLPSERIEType.Get_FLUX: WideString;
begin
  Result := AttributeNodes['FLUX'].Text;
end;

procedure TXMLPSERIEType.Set_FLUX(Value: WideString);
begin
  SetAttribute('FLUX', Value);
end;

function TXMLPSERIEType.Get_FREQUENCE: Double;
begin
  Result := AttributeNodes['FREQUENCE'].NodeValue;
end;

procedure TXMLPSERIEType.Set_FREQUENCE(Value: Double);
begin
  SetAttribute('FREQUENCE', Value);
end;

function TXMLPSERIEType.Get_MODE: WideString;
begin
  Result := AttributeNodes['MODE'].Text;
end;

procedure TXMLPSERIEType.Set_MODE(Value: WideString);
begin
  SetAttribute('MODE', Value);
end;

function TXMLPSERIEType.Get_NBBITDATA: Integer;
begin
  Result := AttributeNodes['NBBITDATA'].NodeValue;
end;

procedure TXMLPSERIEType.Set_NBBITDATA(Value: Integer);
begin
  SetAttribute('NBBITDATA', Value);
end;

function TXMLPSERIEType.Get_NBBITSTOP: Double;
begin
  Result := AttributeNodes['NBBITSTOP'].NodeValue;
end;

procedure TXMLPSERIEType.Set_NBBITSTOP(Value: Double);
begin
  SetAttribute('NBBITSTOP', Value);
end;

function TXMLPSERIEType.Get_NBCAPTEURS: Integer;
begin
  Result := AttributeNodes['NBCAPTEURS'].NodeValue;
end;

procedure TXMLPSERIEType.Set_NBCAPTEURS(Value: Integer);
begin
  SetAttribute('NBCAPTEURS', Value);
end;

function TXMLPSERIEType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLPSERIEType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLPSERIEType.Get_NUMERO: Integer;
begin
  Result := AttributeNodes['NUMERO'].NodeValue;
end;

procedure TXMLPSERIEType.Set_NUMERO(Value: Integer);
begin
  SetAttribute('NUMERO', Value);
end;

function TXMLPSERIEType.Get_PARITE: WideString;
begin
  Result := AttributeNodes['PARITE'].Text;
end;

procedure TXMLPSERIEType.Set_PARITE(Value: WideString);
begin
  SetAttribute('PARITE', Value);
end;

function TXMLPSERIEType.Get_SYSTEME: WideString;
begin
  Result := AttributeNodes['SYSTEME'].Text;
end;

procedure TXMLPSERIEType.Set_SYSTEME(Value: WideString);
begin
  SetAttribute('SYSTEME', Value);
end;

function TXMLPSERIEType.Get_TAILLETAMPON: integer;
begin
  Result := AttributeNodes['TAILLETAMPON'].NodeValue;
end;

procedure TXMLPSERIEType.Set_TAILLETAMPON(Value: integer);
begin
  SetAttribute('TAILLETAMPON', Value);
end;

{ TXMLPSERIETypeList }

function TXMLPSERIETypeList.Add: IXMLPSERIEType;
begin
  Result := AddItem(-1) as IXMLPSERIEType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLPSERIETypeList.Insert(const Index: Integer): IXMLPSERIEType;
begin
  Result := AddItem(Index) as IXMLPSERIEType;
  Result.TAILLETAMPON := 1000;
end;

function TXMLPSERIETypeList.Get_Item(Index: Integer): IXMLPSERIEType;
begin
  Result := List[Index] as IXMLPSERIEType;
end;

{ TXMLSTType }

procedure TXMLSTType.AfterConstruction;
begin
  RegisterChildNode('BLOC', TXMLBLOCType);
  FBLOC := CreateCollection(TXMLBLOCTypeList, IXMLBLOCType, 'BLOC') as IXMLBLOCTypeList;
  RegisterChildNode('LISTECANAUXENREG', TXMLListeCanauxEnregVisuType);
  FLISTECANAUXENREG := CreateCollection(TXMLListeCanauxEnregVisuTypeList, IXMLListeCanauxEnregVisuType, 
'LISTECANAUXENREG') as IXMLListeCanauxEnregVisuTypeList;
  RegisterChildNode('LISTECANAUXVISU', TXMLListeCanauxEnregVisuType);
  FLISTECANAUXVISU := CreateCollection(TXMLListeCanauxEnregVisuTypeList, IXMLListeCanauxEnregVisuType, 
'LISTECANAUXVISU') as IXMLListeCanauxEnregVisuTypeList;
  RegisterChildNode('GRAPHES', TXMLListeGRAPHESType);
  FGRAPHES := CreateCollection(TXMLListeGRAPHESTypeList, IXMLListeGRAPHESType, 'GRAPHES') as 
IXMLListeGRAPHESTypeList;
  inherited;
end;

function TXMLSTType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLSTType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLSTType.Get_FULLSCREEN: integer;
begin
  Result := AttributeNodes['FULLSCREEN'].NodeValue;
end;

function TXMLSTType.Get_STATUSBAR: integer;
begin
  Result := AttributeNodes['STATUSBAR'].NodeValue;
end;

procedure TXMLSTType.Set_FULLSCREEN(value : integer);
begin
  SetAttribute('FULLSCREEN', Value);
end;

procedure TXMLSTType.Set_STATUSBAR(value : integer);
begin
  SetAttribute('STATUSBAR', Value);
end;

function TXMLSTType.Get_DUMMYNODEST: WideString;
begin
  Result := ChildNodes['DUMMYNODEST'].Text;
end;

procedure TXMLSTType.Set_DUMMYNODEST(Value: WideString);
begin
  ChildNodes['DUMMYNODEST'].NodeValue := Value;
end;

function TXMLSTType.Get_LISTECANAUXENREG : IXMLListeCanauxEnregVisuTypeList;
begin
  Result := FLISTECANAUXENREG;
end;

function TXMLSTType.Get_LISTECANAUXVISU : IXMLListeCanauxEnregVisuTypeList;
begin
  Result := FLISTECANAUXVISU;
end;

function TXMLSTType.Get_GRAPHES : IXMLListeGraphesTypeList;
begin
  Result := FGRAPHES;
end;

function TXMLSTType.Get_BLOC: IXMLBLOCTypeList;
begin
  Result := FBLOC;
end;

function TXMLSTType.UseStim : WideString;
var i : integer;
begin
  Result := '';
  for i := 0 to Self.FBLOC.Count - 1
  do Result := Result + Self.FBLOC[i].UseStim;
end;

function  TXMLSTType.UseStimFileWithName(name : string) : boolean;
var i : integer;
begin
	Result := false;
  for i := 0 to Self.FBLOC.Count - 1
	do Result := Result or Self.FBLOC[i].UseStimFileWithName(name);
end;

procedure TXMLSTType.ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
var i,j : integer;
begin
  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC.Items[i].ChangeChannelName(OldName,NewName,InfoCanaux);

  for i := 0 to Self.FLISTECANAUXENREG.Count - 1 do
  begin
    if Self.FLISTECANAUXENREG[i].NOMCANAL = OldName then
    begin
      if NewName <> ''
      then Self.FLISTECANAUXENREG[i].NOMCANAL := NewName
      else Self.FLISTECANAUXENREG.Delete(i);
      break;
    end;
  end;

	for i := 0 to Self.FLISTECANAUXVISU.Count - 1 do
	begin
		if Self.FLISTECANAUXVISU[i].NOMCANAL = OldName then
		begin
		 if NewName <> ''
		 then Self.FLISTECANAUXVISU[i].NOMCANAL := NewName
		 else Self.FLISTECANAUXVISU.Delete(i);
		 break;
		end;
	end;

	for i := 0 to Self.FGRAPHES.Count - 1 do
	begin
		for j := 0 to Self.FGRAPHES[i].COURBES.Count - 1 do
		begin

			if Self.FGRAPHES[i].COURBES[j].NOMCANALORDO = OldName then
			begin
				if NewName <> ''
				then Self.FGRAPHES[i].COURBES[j].NOMCANALORDO := NewName
				else Self.FGRAPHES[i].COURBES.Delete(j);
				break;
			end;

			if Self.FGRAPHES[i].COURBES[j].NOMCANALABSC = OldName then
			begin
				if NewName <> ''
				then Self.FGRAPHES[i].COURBES[j].NOMCANALABSC := NewName
				else Self.FGRAPHES[i].COURBES.Delete(j);
				break;
			end;

		end;
	end;

end;

procedure TXMLSTType.RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
var i : integer;
begin
  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC[i].RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt);
end;

procedure TXMLSTType.RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
var i : integer;
begin
  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC[i].RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt);
end;

{ TXMLSTTypeList }

function TXMLSTTypeList.Add: IXMLSTType;
begin
  Result := AddItem(-1) as IXMLSTType;
end;

function TXMLSTTypeList.Insert(const Index: Integer): IXMLSTType;
begin
  Result := AddItem(Index) as IXMLSTType;
end;

function TXMLSTTypeList.Get_Item(Index: Integer): IXMLSTType;
begin
  Result := List[Index] as IXMLSTType;
end;

procedure TXMLSTTypeList.ChangeChannelName(OldName,NewName : string; PSerie : string;
  																				 InfoCanaux : TInfoCanaux);
var i,j : integer;
    SOld,SNew : string;
begin
  for i := 0 to Self.Count - 1 do
  begin
    if PSerie = '' then Self.Get_Item(i).ChangeChannelName(OldName,NewName,InfoCanaux)
    else begin
      SNew := NewName;
      if (Pserie = 'Polhemus') then
      begin
        for j := 1 to 4 do
        begin
          SOld := OldName + '_C' + inttostr(j) + '_X';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_X';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

          SOld := OldName + '_C' + inttostr(j) + '_Y';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_Y';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

          SOld := OldName + '_C' + inttostr(j) + '_Z';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_Z';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

          SOld := OldName + '_C' + inttostr(j) + '_THETAX';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_THETAX';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

					SOld := OldName + '_C' + inttostr(j) + '_THETAY';
					if SNew <> ''
					then SNew := NewName + '_C' + inttostr(j) + '_THETAY';
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

					SOld := OldName + '_C' + inttostr(j) + '_THETAZ';
					if SNew <> ''
					then SNew := NewName + '_C' + inttostr(j) + '_THETAZ';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
				end;
				SOld := OldName + '_TEMPS';
				if SNew <> ''
				then SNew := NewName + '_TEMPS';;
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
			end;

      if (Pserie = 'Bird') then
      begin
        SOld := OldName + '_X';
        if SNew <> ''
        then SNew := NewName + '_X';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_Y';
        if SNew <> ''
        then SNew := NewName + '_Y';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_Z';
        if SNew <> ''
        then SNew := NewName + '_Z';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_THETAX';
        if SNew <> ''
        then SNew := NewName + '_THETAX';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_THETAY';
        if SNew <> ''
        then SNew := NewName + '_THETAY';
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_THETAZ';
        if SNew <> ''
        then SNew := NewName + '_THETAZ';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

				SOld := OldName + '_TEMPS';
				if SNew <> ''
				then SNew := NewName + '_TEMPS';;
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
			end;

      if (Pserie = 'CODAmotion') then
      begin
        for j := 1 to 4 do
        begin
          SOld := OldName + '_C' + inttostr(j) + '_X';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_X';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

          SOld := OldName + '_C' + inttostr(j) + '_Y';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_Y';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

          SOld := OldName + '_C' + inttostr(j) + '_Z';
          if SNew <> ''
          then SNew := NewName + '_C' + inttostr(j) + '_Z';;
					Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
        end;
        SOld := OldName + '_FRAMEID';
				if SNew <> ''
				then SNew := NewName + '_FRAMEID';;
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
      end;


			if Pserie = 'SummaGrid IV' then
      begin
        SOld := OldName + '_X';
        if SNew <> ''
        then SNew := NewName + '_X';;
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_Y';
        if SNew <> ''
        then SNew := NewName + '_Y';;
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_BOUTON1';
        if SNew <> ''
        then SNew := NewName + '_BOUTON1';
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_BOUTON2';
        if SNew <> ''
        then SNew := NewName + '_BOUTON2';
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_BOUTON3';
        if SNew <> ''
				then SNew := NewName + '_BOUTON3';
				Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);

        SOld := OldName + '_TEMPS';
        if SNew <> ''
        then SNew := NewName + '_TEMPS';;
        Self.Get_Item(i).ChangeChannelName(SOld,SNew,InfoCanaux);
      end;
    end;
  end;
end;

{ TXMLListeCanauxEnregVisuType }

function TXMLListeCanauxEnregVisuType.Get_NOMCANAL: WideString;
begin
  Result := AttributeNodes['NOMCANAL'].Text;
end;

procedure TXMLListeCanauxEnregVisuType.Set_NOMCANAL(Value : WideString);
begin
  SetAttribute('NOMCANAL', Value);
end;

{ TXMLListeCanauxEnregVisuTypeList }

function TXMLListeCanauxEnregVisuTypeList.Add: IXMLListeCanauxEnregVisuType;
begin
   Result := AddItem(-1) as IXMLListeCanauxEnregVisuType;
end;

function TXMLListeCanauxEnregVisuTypeList.Insert(const Index: Integer): IXMLListeCanauxEnregVisuType;
begin
  Result := AddItem(Index) as IXMLListeCanauxEnregVisuType;
end;

function TXMLListeCanauxEnregVisuTypeList.Get_Item(Index: Integer): IXMLListeCanauxEnregVisuType;
begin
  Result := List[Index] as IXMLListeCanauxEnregVisuType;
end;

{ TXMLListeGraphesType }

procedure TXMLListeGraphesType.AfterConstruction;
begin
  RegisterChildNode('COURBES', TXMLListeCourbesType);
  FCOURBES := CreateCollection(TXMLListeCourbesTypeList, IXMLListeCourbesType, 'COURBES') as IXMLListeCourbesTypeList;
  inherited;
end;

function TXMLListeGraphesType.Get_GENRE: WideString;
begin
  Result := AttributeNodes['GENRE'].Text;
end;

procedure TXMLListeGraphesType.Set_GENRE(Value : WideString);
begin
  SetAttribute('GENRE', Value);
end;

function TXMLListeGraphesType.Get_TEMPSVISU: Double;
begin
  Result := AttributeNodes['TEMPSVISU'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_TEMPSVISU(Value : Double);
begin
  SetAttribute('TEMPSVISU', Value);
end;

function TXMLListeGraphesType.Get_ECHELLEYAUTO: integer;
begin
  Result := AttributeNodes['ECHELLEYAUTO'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_ECHELLEYAUTO(Value : Integer);
begin
  SetAttribute('ECHELLEYAUTO', Value);
end;

function TXMLListeGraphesType.Get_YMIN: Double;
begin
  Result := AttributeNodes['YMIN'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_YMIN(Value : Double);
begin
  SetAttribute('YMIN', Value);
end;

function TXMLListeGraphesType.Get_YMAX: Double;
begin
  Result := AttributeNodes['YMAX'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_YMAX(Value : Double);
begin
  SetAttribute('YMAX', Value);
end;

function TXMLListeGraphesType.Get_ECHELLEXAUTO: Integer;
begin
  Result := AttributeNodes['ECHELLEXAUTO'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_ECHELLEXAUTO(Value : Integer);
begin
  SetAttribute('ECHELLEXAUTO', Value);
end;

function TXMLListeGraphesType.Get_XMIN: Double;
begin
  Result := AttributeNodes['XMIN'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_XMIN(Value : Double);
begin
  SetAttribute('XMIN', Value);
end;

function TXMLListeGraphesType.Get_XMAX: Double;
begin
  Result := AttributeNodes['XMAX'].NodeValue;
end;

procedure TXMLListeGraphesType.Set_XMAX(Value : Double);
begin
  SetAttribute('XMAX', Value);
end;

function TXMLListeGraphesType.Get_COURBES : IXMLListeCourbesTypeList;
begin
  Result := FCOURBES;
end;

{ TXMLListeGraphesTypeList }

function TXMLListeGraphesTypeList.Add: IXMLListeGraphesType;
begin
   Result := AddItem(-1) as IXMLListeGraphesType;
end;

function TXMLListeGraphesTypeList.Insert(const Index: Integer): IXMLListeGraphesType;
begin
  Result := AddItem(Index) as IXMLListeGraphesType;
end;

function TXMLListeGraphesTypeList.Get_Item(Index: Integer): IXMLListeGraphesType;
begin
  Result := List[Index] as IXMLListeGraphesType;
end;

{ TXMLListeCourbesType }

function TXMLListeCourbesType.Get_NOMCANALORDO: WideString;
begin
  Result := AttributeNodes['NOMCANALORDO'].Text;
end;

procedure TXMLListeCourbesType.Set_NOMCANALORDO(Value : WideString);
begin
  SetAttribute('NOMCANALORDO', Value);
end;

function TXMLListeCourbesType.Get_NOMCANALABSC: WideString;
begin
  Result := AttributeNodes['NOMCANALABSC'].Text;
end;

procedure TXMLListeCourbesType.Set_NOMCANALABSC(Value : WideString);
begin
  SetAttribute('NOMCANALABSC', Value);
end;

function TXMLListeCourbesType.Get_COLOR: integer;
begin
  Result := AttributeNodes['COLOR'].NodeValue;
end;

procedure TXMLListeCourbesType.Set_COLOR(Value : Integer);
begin
  SetAttribute('COLOR', Value);
end;

{ TXMLListeCourbesTypeList }

function TXMLListeCourbesTypeList.Add: IXMLListeCourbesType;
begin
  Result := AddItem(-1) as IXMLListeCourbesType;
end;

function TXMLListeCourbesTypeList.Insert(const Index: Integer): IXMLListeCourbesType;
begin
  Result := AddItem(Index) as IXMLListeCourbesType;
end;

function TXMLListeCourbesTypeList.Get_Item(Index: Integer): IXMLListeCourbesType;
begin
  Result := List[Index] as IXMLListeCourbesType;
end;

{ TXMLBLOCType }

procedure TXMLBLOCType.AfterConstruction;
begin
  RegisterChildNode('BLOC', TXMLBLOCType);
  RegisterChildNode('FONCTION', TXMLFONCTIONType);
  FBLOC := CreateCollection(TXMLBLOCTypeList, IXMLBLOCType, 'BLOC') as IXMLBLOCTypeList;
  FFONCTION := CreateCollection(TXMLFONCTIONTypeList, IXMLFONCTIONType, 'FONCTION') as IXMLFONCTIONTypeList;
  inherited;
end;

function TXMLBLOCType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLBLOCType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLBLOCType.Get_ADBASICCODE1: WideString;
begin
  Result := AttributeNodes['ADBASICCODE1'].Text;
end;

procedure TXMLBLOCType.Set_ADBASICCODE1(Value: WideString);
begin
  SetAttribute('ADBASICCODE1', Value);
end;

function TXMLBLOCType.Get_ADBASICCODE2: WideString;
begin
  Result := AttributeNodes['ADBASICCODE2'].Text;
end;

procedure TXMLBLOCType.Set_ADBASICCODE2(Value: WideString);
begin
  SetAttribute('ADBASICCODE2', Value);
end;

function TXMLBLOCType.Get_DELPHICODE1: WideString;
begin
  Result := AttributeNodes['DELPHICODE1'].Text;
end;

procedure TXMLBLOCType.Set_DELPHICODE1(Value: WideString);
begin
  SetAttribute('DELPHICODE1', Value);
end;

function TXMLBLOCType.Get_DELPHICODE2: WideString;
begin
  Result := AttributeNodes['DELPHICODE2'].Text;
end;

procedure TXMLBLOCType.Set_DELPHICODE2(Value: WideString);
begin
  SetAttribute('DELPHICODE2', Value);
end;

function TXMLBLOCType.Get_GENRE: WideString;
begin
  Result := AttributeNodes['GENRE'].Text;
end;

procedure TXMLBLOCType.Set_GENRE(Value: WideString);
begin
  SetAttribute('GENRE', Value);
end;

function TXMLBLOCType.Get_PARAM1: WideString;
begin
  Result := AttributeNodes['PARAM1'].Text;
end;

procedure TXMLBLOCType.Set_PARAM1(Value: WideString);
begin
  SetAttribute('PARAM1', Value);
end;

function TXMLBLOCType.Get_PARAM2: WideString;
begin
  Result := AttributeNodes['PARAM2'].Text;
end;

procedure TXMLBLOCType.Set_PARAM2(Value: WideString);
begin
  SetAttribute('PARAM2', Value);
end;

function TXMLBLOCType.Get_PARAM3: WideString;
begin
  Result := AttributeNodes['PARAM3'].Text;
end;

procedure TXMLBLOCType.Set_PARAM3(Value: WideString);
begin
  SetAttribute('PARAM3', Value);
end;

function TXMLBLOCType.Get_DUMMYNODEBLOC: WideString;
begin
  Result := ChildNodes['DUMMYNODEBLOC'].Text;
end;

procedure TXMLBLOCType.Set_DUMMYNODEBLOC(Value: WideString);
begin
  ChildNodes['DUMMYNODEBLOC'].NodeValue := Value;
end;

function TXMLBLOCType.Get_BLOC: IXMLBLOCTypeList;
begin
  Result := FBLOC;
end;

function TXMLBLOCType.Get_FONCTION: IXMLFONCTIONTypeList;
begin
  Result := FFONCTION;
end;

function TXMLBLOCType.UseStim : WideString;
var i,j : integer;
begin
  Result := '';

	for i := 0 to Self.FFONCTION.Count - 1
	do if Self.FFONCTION[i].GENRE = 'S' then
		 begin
			 for j := 0 to Self.FFONCTION[i].PASCAL_.FINISH.Count - 1
			 do Result := Result + Self.FFONCTION[i].PASCAL_.FINISH[j].TEXT;
		 end;

	for i := 0 to Self.FBLOC.Count - 1
	do Result := Result + Self.FBLOC[i].UseStim;

end;

function  TXMLBLOCType.UseStimFileWithName(name : string) : boolean;
var i : integer;
begin
	Result := false;

  for i := 0 to Self.FFONCTION.Count - 1
	do if Self.FFONCTION[i].GENRE = 'S' then
		 begin
			 Result := Result or not(Self.FFONCTION[i].FICHIER <> name);
		 end;

	for i := 0 to Self.FBLOC.Count - 1
	do Result := Result or Self.FBLOC[i].UseStimFileWithName(name);

end;

procedure TXMLBLOCType.GetStimFileNames(var StimFileNames : TStringList);
var i : integer;
begin
  for i := 0 to Self.FFONCTION.Count - 1
  do if Self.FFONCTION[i].GENRE = 'S'
     then StimFileNames.Add(Self.FFONCTION[i].FICHIER);

  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC[i].GetStimFileNames(StimFileNames);
end;

procedure TXMLBLOCType.MAJCodeADBasic_Pascal;
begin
  if Self.Get_GENRE = 'NORMAL' then
  begin
    Self.Set_NOM('BLOC - NORMAL');
    Self.Set_ADBASICCODE1('');
    Self.Set_ADBASICCODE2('');
    Self.Set_DELPHICODE1('');
    Self.Set_DELPHICODE2('');
  end;
  if Self.Get_GENRE = 'FOR' then
  begin

    Self.Set_NOM('Pour ' + Self.Get_PARAM1 + ' allant de ' + Self.Get_PARAM2 + ' à '
                    + Self.Get_PARAM3);
    Self.Set_ADBASICCODE1('FOR ' + Self.Get_PARAM1 + ' = ' + Self.Get_PARAM2 + ' TO '
                             + Self.Get_PARAM3);
    Self.Set_ADBASICCODE2('NEXT '+ Self.Get_PARAM1);
    Self.Set_DELPHICODE1(Self.Get_PARAM1 + ':=' + Self.Get_PARAM2 + ';' + #13
                            + 'WHILE ' + Self.Get_PARAM1 + ' <= ' +  Self.Get_PARAM3
                            + ' DO BEGIN');
    Self.Set_DELPHICODE2(Self.Get_PARAM1 + ' := SUCC(' + Self.Get_PARAM1 + ');'
                                        + #13 + 'END;');
    {Self.Set_DELPHICODE1('FOR ' + Self.PARAM1 + ' = ' + Self.PARAM2 + ' TO ' +
                          Self.PARAM3 + ' DO BEGIN';
     Self.Set_DELPHICODE2('END;');}
  end;
  if Self.Get_GENRE = 'DO' then
  begin
    Self.Set_NOM('Faire ... tant que  ' + Self.Get_PARAM1 + ' est ' + Self.Get_PARAM2
                         + ' à ' + Self.Get_PARAM3);
    Self.Set_ADBASICCODE1('DO');
    Self.Set_ADBASICCODE2('UNTIL ('+ Self.Get_PARAM1 + Self.Get_PARAM2 + Self.Get_PARAM3 + ')');
    Self.Set_DELPHICODE1('REPEAT');
    Self.Set_DELPHICODE2('UNTIL ('+ Self.Get_PARAM1 + Self.Get_PARAM2 + Self.Get_PARAM3 + ');');
  end;
  if Self.Get_GENRE = 'IF' then
  begin
    Self.Set_NOM('Si ' + Self.Get_PARAM1 + ' est ' + Self.Get_PARAM2 + ' à '
                                      + Self.Get_PARAM3);
    Self.Set_ADBASICCODE1('IF ('+ Self.Get_PARAM1 + Self.Get_PARAM2
                                  + Self.Get_PARAM3 + ') THEN');
    Self.Set_ADBASICCODE2( 'ENDIF');
    Self.Set_DELPHICODE1('IF ('+ Self.Get_PARAM1+ Self.Get_PARAM2
                             + Self.Get_PARAM3 + ') THEN BEGIN');
    Self.Set_DELPHICODE2('END;');
  end;
end;

procedure TXMLBLOCType.ChangeChannelName(OldName,NewName : string;InfoCanaux : TInfoCanaux);
var i,j : integer;
    AFonction : IXMLFONCTIONType;
    Change : boolean;
		Num_Fonction,N : integer;
		ANode,ANodeParent : IXMLNode;
//		InfoCanaux : TInfoCanaux;
begin
	//Changement dans les Params de ce bloc
	if Self.Get_PARAM1 = OldName then Self.Set_PARAM1(NewName);
	if Self.Get_PARAM2 = OldName then Self.Set_PARAM2(NewName);
	if Self.Get_PARAM3 = OldName then Self.Set_PARAM3(NewName);
	Self.MAJCodeADBasic_Pascal;

	//ANode := self;
	//repeat
	//	ANode := ANode.ParentNode
	//until ANode.NodeName = 'ROOT';
	//InfoCanaux := (ANode as IXMLROOTType).RendreListeInfoCanaux;

	//Changement dans les fonctions de ce bloc
	for i := 0 to Self.FFONCTION.Count - 1 do
	begin
		AFonction := Self.FFONCTION[i];

		ANode := Self;
		Num_fonction := ANode.ChildNodes.IndexOf(AFonction) + 1;
		ANodeParent := ANode.ParentNode;
		N := 10;
		repeat
			Num_fonction := Num_fonction + (ANodeParent.ChildNodes.IndexOf(ANode)+1)*N;
			ANode := ANodeParent;
			ANodeParent :=  ANodeParent.ParentNode;
			N := 10*N;
		until ANodeParent.NodeName = 'ROOT';

		Change := false;
		j:=0;
		while((AFonction.ENTREE.Count>0) and (j<AFonction.ENTREE.Count)) do
		begin
			if AFonction.ENTREE[j].NOM = OldName then
			begin
				if NewName <> ''
				then AFonction.ENTREE[j].NOM := NewName
				else begin
					AFonction.ENTREE.Delete(j);
					dec(j);
				end;
				Change := true;
			 end;
			inc(j);
		end;

		j:=0;
		while((AFonction.SORTIE.Count>0) and (j<AFonction.SORTIE.Count)) do
		begin
			if AFonction.SORTIE[j].NOM = OldName then
			begin
				if NewName <> ''
				then AFonction.SORTIE[j].NOM := NewName
				else begin
					AFonction.SORTIE.Delete(j);
					dec(j);
				end;
				Change := true;
			 end;
			inc(j);
		end;

		j:=0;
		while((AFonction.PARAM.Count>0) and (j<AFonction.PARAM.Count)) do
		begin
			if AFonction.PARAM[j].NOM = OldName then
			begin
				if NewName <> ''
				then AFonction.PARAM[j].NOM := NewName
				else begin
					AFonction.PARAM.Delete(j);
					dec(j);
				end;
				Change := true;
			 end;
			inc(j);
		end;

		{
		for j := 0 to AFonction.ENTREE.Count - 1
		do if AFonction.ENTREE[j].NOM = OldName then
			 begin
				 if NewName <> ''
				 then AFonction.ENTREE[j].NOM := NewName
				 else AFonction.ENTREE.Delete(j);
				 Change := true;
				 break;
			 end;
		for j := 0 to AFonction.SORTIE.Count - 1
		do if AFonction.SORTIE[j].NOM = OldName then
			 begin
				 if NewName <> ''
				 then AFonction.SORTIE[j].NOM := NewName
				 else AFonction.SORTIE.Delete(j);
				 Change := true;
				 break;
			 end;
		for j := 0 to AFonction.PARAM.Count - 1
		do if AFonction.PARAM[j].NOM = OldName then
			 begin
				 if NewName <> ''
				 then AFonction.PARAM[j].NOM := NewName
				 else AFonction.PARAM.Delete(j);
				 Change := true;
				 break;
			 end;        }

		if Change
		then AFonction.MAJCodeADBasic_Pascal(Num_fonction,Rep_FichiersInf,InfoCanaux);

	end;
	//InfoCanaux.Free;
	//Changement dans les blocs de ce bloc
	for i := 0 to Self.FBLOC.Count - 1
	do Self.FBLOC[i].ChangeChannelName(OldName,NewName,InfoCanaux);
end;


procedure TXMLBLOCType.RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt : TStringList);
var i,j : integer;
    AFunction : IXMLFonctionType;
begin
  for i:= 0 to Self.FFONCTION.Count - 1 do
  begin
    AFunction := Self.FFONCTION[i];
    if AFunction.FICHIER = 'Transfert' then
    begin
      for j := 0 to AFunction.SORTIE.Count - 1 do
      begin
        if AFunction.SORTIE[j].NOM <> ''
        then ListeCanauxTrsfrt.Add(AFunction.SORTIE[j].NOM);
      end;
    end;
   { if AFunction.GENRE = 'S' then
    begin
      for j := 0 to AFunction.SORTIE.Count - 1 do
      begin
        if AFunction.SORTIE[j].NOM <> ''
        then ListeCanauxTrsfrt.Add(AFunction.SORTIE[j].NOM);
      end;
    end; }
  end;  

  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC[i].RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt);
end;

procedure TXMLBLOCType.RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt : TStringList);
var i,j : integer;
    AFunction : IXMLFonctionType;
begin
  for i:= 0 to Self.FFONCTION.Count - 1 do
  begin
    AFunction := Self.FFONCTION[i];
    {if AFunction.FICHIER = 'Transfert' then
    begin
      for j := 0 to AFunction.SORTIE.Count - 1 do
      begin
        if AFunction.SORTIE[j].NOM <> ''
        then ListeCanauxTrsfrt.Add(AFunction.SORTIE[j].NOM);
      end;
    end; }
    if AFunction.GENRE = 'S' then
    begin
      for j := 0 to AFunction.SORTIE.Count - 1 do
      begin
        if AFunction.SORTIE[j].NOM <> ''
        then ListeCanauxTrsfrt.Add(AFunction.SORTIE[j].NOM);
      end;
    end;
  end;  

  for i := 0 to Self.FBLOC.Count - 1
  do Self.FBLOC[i].RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt);
end;

{ TXMLBLOCTypeList }

function TXMLBLOCTypeList.Add: IXMLBLOCType;
begin
  Result := AddItem(-1) as IXMLBLOCType;
end;

function TXMLBLOCTypeList.Insert(const Index: Integer): IXMLBLOCType;
begin
  Result := AddItem(Index) as IXMLBLOCType;
end;
function TXMLBLOCTypeList.Get_Item(Index: Integer): IXMLBLOCType;
begin
  Result := List[Index] as IXMLBLOCType;
end;

{ TXMLFONCTIONType }

procedure TXMLFONCTIONType.AfterConstruction;
begin
  RegisterChildNode('ENTREE', TXMLENTREEType);
  RegisterChildNode('SORTIE', TXMLSORTIEType);
  RegisterChildNode('PARAM', TXMLPARAMType);
  RegisterChildNode('ADBASIC', TXMLADBASICType);
  RegisterChildNode('PASCAL', TXMLPASCALType);
  FENTREE := CreateCollection(TXMLENTREETypeList, IXMLENTREEType, 'ENTREE') as IXMLENTREETypeList;
  FSORTIE := CreateCollection(TXMLSORTIETypeList, IXMLSORTIEType, 'SORTIE') as IXMLSORTIETypeList;
  FPARAM := CreateCollection(TXMLPARAMTypeList, IXMLPARAMType, 'PARAM') as IXMLPARAMTypeList;
  inherited;
end;

function TXMLFONCTIONType.Get_DUREE: Double;
begin
  Result := AttributeNodes['DUREE'].NodeValue;
end;

procedure TXMLFONCTIONType.Set_DUREE(Value: Double);
begin
  SetAttribute('DUREE', Value);
end;

function TXMLFONCTIONType.Get_FICHIER: WideString;
begin
  Result := AttributeNodes['FICHIER'].Text;
end;

procedure TXMLFONCTIONType.Set_FICHIER(Value: WideString);
begin
  SetAttribute('FICHIER', Value);
end;

function TXMLFONCTIONType.Get_GENRE: WideString;
begin
  Result := AttributeNodes['GENRE'].Text;
end;

procedure TXMLFONCTIONType.Set_GENRE(Value: WideString);
begin
  SetAttribute('GENRE', Value);
end;

function TXMLFONCTIONType.Get_TITRE: WideString;
begin
  Result := AttributeNodes['TITRE'].Text;
end;

procedure TXMLFONCTIONType.Set_TITRE(Value: WideString);
begin
  SetAttribute('TITRE', Value);
end;

function TXMLFONCTIONType.Get_ENTREE: IXMLENTREETypeList;
begin
  Result := FENTREE;
end;

function TXMLFONCTIONType.Get_SORTIE: IXMLSORTIETypeList;
begin
  Result := FSORTIE;
end;

function TXMLFONCTIONType.Get_PARAM: IXMLPARAMTypeList;
begin
  Result := FPARAM;
end;

function TXMLFONCTIONType.Get_ADBASIC: IXMLADBASICType;
begin
  Result := ChildNodes['ADBASIC'] as IXMLADBASICType;
end;

function TXMLFONCTIONType.Get_PASCAL: IXMLPASCALType;
begin
  Result := ChildNodes['PASCAL'] as IXMLPASCALType;
end;

procedure TXMLFONCTIONType.Replace(TypeReplace : string; Nbboucle : integer; var Aligne : string;
                                    ADB_OR_PAS : integer;InfoCanaux : TInfoCanaux);
var Position,j,k,Taille,num : integer;
    S : string;
    //InfoCanaux : TInfoCanaux;
		//ANode : IXMLNode;
begin
	//ANode := self;
	//repeat
	//  ANode := ANode.ParentNode
	//until ANode.NodeName = 'ROOT';
	//InfoCanaux := (ANode as IXMLROOTType).RendreListeInfoCanaux;
  for j := 1 to NBBoucle do
  begin
    Position := pos('XX_' + TypeReplace + inttostr(j) + '_XX',ALigne);
    while Position <> 0 do
    begin
      Taille := Length('XX_' + TypeReplace + inttostr(j) + '_XX');
      System.Delete(ALigne,Position,Taille);
      if (TypeReplace = 'NUMENTREE') or (TypeReplace = 'NUMSORTIE') then
      begin
        num := 0;
        if TypeReplace = 'NUMENTREE'
        then S := Self.FENTREE.Items[j-1].NOM
        else S := Self.FSORTIE.Items[j-1].NOM;
        for k := 0 to InfoCanaux.Nom.Count - 1 do
        begin
          if InfoCanaux.Nom[k] = S then
          begin
            if ADB_OR_PAS = 0//ADBasic
            then num := strtoint(InfoCanaux.NumCanalCarteES[k]);
            if ADB_OR_PAS = 1//Pascal
            then num := strtoint(InfoCanaux.NumCanal[k]);
            break;
          end;
        end;
        insert(inttostr(num),Aligne,Position);
      end else
      begin
        if TypeReplace = 'ENTREE'
        then insert(Self.FENTREE.Items[j-1].NOM,Aligne,Position);
        if TypeReplace = 'SORTIE'
        then insert(Self.FSORTIE.Items[j-1].NOM,Aligne,Position);
        if TypeReplace = 'PARAM'
        then insert(Self.FPARAM.Items[j-1].NOM,Aligne,Position);
        if TypeReplace = 'NUMFCT'
        then insert(inttostr(NbBoucle),Aligne,Position);
      end;
      Position := pos('XX_' + TypeReplace + inttostr(j) + '_XX',ALigne);
    end;
    //Inutile de faire toute la boucle, on a uniquement un NUMACTFCT (NUMACTFCT1)
    if TypeReplace = 'NUMFCT' then break;
  end;
	//InfoCanaux.Free;
end;

procedure TXMLFONCTIONType.Read_Section(LANG_ADBASIC : IXMLADBASICType;LANG_PASCAL : IXMLPASCALType;
														NomSection,PrefixeLigne : string; pNum_Fonction : integer;
														InfoCanaux : TInfoCanaux);
var Ligne : string;
    i : integer;
    AINCLUDE  : IXMLINCLUDEType;
    AIMPORT   : IXMLIMPORTType;
    AVAR_     : IXMLVARType;
    ALOWINIT  : IXMLLOWINITType;
    ACODE     : IXMLCODEType;
    AFINISH   : IXMLFINISHType;
    AFCTSSP   : IXMLFCTSSPType;
    ALIBRARY_ : IXMLLIBRARYType;
    ADBasicORPascal : integer; //0 : adbasic, 1 : pascal
begin
  i := 1;
  Ligne := InfFile.ReadString(NomSection,PrefixeLigne + inttostr(i),'');
  ADBasicORPascal := -1;
  if LANG_ADBASIC <> nil
  then ADBasicORPascal := 0;
  if LANG_PASCAL <> nil
  then ADBasicORPascal := 1;
  while ( Ligne <> '' ) do
  begin
		//ENTREE
		Replace('ENTREE',Self.FENTREE.Count,Ligne,ADBasicORPascal,InfoCanaux);
		//SORTIE
		Replace('SORTIE',Self.FSORTIE.Count,Ligne,ADBasicORPascal,InfoCanaux);
		//PARAM
		Replace('PARAM',Self.FPARAM.Count,Ligne,ADBasicORPascal,InfoCanaux);
    //NUMENTREE
		Replace('NUMENTREE',Self.FENTREE.Count,Ligne,ADBasicORPascal,InfoCanaux);
    //NUMSORTIE
		Replace('NUMSORTIE',Self.FSORTIE.Count,Ligne,ADBasicORPascal,InfoCanaux);
    //NUMFCT (qui etait NUMACTFCT avant ...)
		Replace('NUMFCT',pNum_Fonction,Ligne,ADBasicORPascal,InfoCanaux);

		//nettoyage des XX_ENTREE,XX_SORTIE,XX_PARAM,
		//              XX_NUMENTREE,XX_NUMSORTIE,XX_NUMFCT restant ...
		if pos('XX_ENTREE',Ligne) <> 0 then Ligne := '';
		if pos('XX_SORTIE',Ligne) <> 0 then Ligne := '';
		if pos('XX_PARAM',Ligne) <> 0 then Ligne := '';
		if pos('XX_NUMENTREE',Ligne) <> 0 then Ligne := '';
		if pos('XX_NUMSORTIE',Ligne) <> 0 then Ligne := '';
		if pos('XX_NUMFCT',Ligne) <> 0 then Ligne := '';

		//Nettoyer les "%" pour indentation
		while(pos('%',Ligne) <> 0) do System.delete(Ligne,pos('%',Ligne),1);

		if Ligne <> '' then
		begin
			if NomSection = 'INCLUDE' then
			begin
				if LANG_ADBASIC = nil
				then AINCLUDE := LANG_PASCAL.INCLUDE.Add
				else AINCLUDE := LANG_ADBASIC.INCLUDE.Add;
				AINCLUDE.TEXT := Ligne;
			end;
			if NomSection = 'IMPORT' then
			begin
				if LANG_ADBASIC = nil
				then AIMPORT := LANG_PASCAL.IMPORT.Add
				else AIMPORT := LANG_ADBASIC.IMPORT.Add;
				AIMPORT.TEXT := Ligne;
			end;
			if NomSection = 'VAR' then
			begin
				if LANG_ADBASIC = nil
				then AVAR_ := LANG_PASCAL.VAR_.Add
				else AVAR_ := LANG_ADBASIC.VAR_.Add;
        AVAR_.TEXT := Ligne;
      end;
      if NomSection = 'LOWINIT' then
      begin
        if LANG_ADBASIC = nil
        then ALOWINIT := LANG_PASCAL.LOWINIT.Add
        else ALOWINIT := LANG_ADBASIC.LOWINIT.Add;
        ALOWINIT.TEXT := Ligne;
      end;
      if NomSection = 'CODE' then
      begin
        if LANG_ADBASIC = nil
        then ACODE := LANG_PASCAL.CODE.Add
        else ACODE := LANG_ADBASIC.CODE.Add;
        ACODE.TEXT := Ligne;
      end;
      if NomSection = 'FINISH' then
      begin
        if LANG_ADBASIC = nil
        then AFINISH := LANG_PASCAL.FINISH.Add
        else AFINISH := LANG_ADBASIC.FINISH.Add;
        AFINISH.TEXT := Ligne;
      end;
      if NomSection = 'FCTSSP' then
      begin
        if LANG_ADBASIC = nil
        then AFCTSSP := LANG_PASCAL.FCTSSP.Add
        else AFCTSSP := LANG_ADBASIC.FCTSSP.Add;
        AFCTSSP.TEXT := Ligne;
      end;
      if NomSection = 'LIBRARY' then
      begin
        if LANG_ADBASIC = nil
        then ALIBRARY_ := LANG_PASCAL.LIBRARY_.Add
        else ALIBRARY_ := LANG_ADBASIC.LIBRARY_.Add;
        ALIBRARY_.TEXT := Ligne;
      end;
    end;

    inc(i);
    Ligne := InfFile.ReadString(NomSection,PrefixeLigne + inttostr(i),'');

    //Pour l'action initCanal, on arrête dès que le nbre de ligne lu
    //est supp au nbre de sortie de la fonction

    if (Self.Get_FICHIER = 'InitCanal') and (i > Self.FSORTIE.Count) then
    begin
      break;
    end;

  end;

end;

procedure TXMLFONCTIONType.MAJCodeADBasic_Pascal(pNum_Fonction : integer; pRep_FichiersInf : string;InfoCanaux : TInfoCanaux);
var i,j,n,numPSerie,indexCanal : integer;
		S,RF,floatORint,numCanal,TailleTampon : string;
		RFTemp : double;
//    InfoCanaux : TInfoCanaux;
    ACODE     : IXMLCODEType;
    AVAR      : IXMLVARType;
    ALOWINIT  : IXMLLOWINITType;
		AFINISH   : IXMLFINISHType;
		ANode : IXMLNode;
		RootNode : IXMLROOTType;
    STNode : IXMLSTType;
		APSerie : IXMLPserieType;
    AlisteGraphes : IXMLListeGraphesTypeList;
    AListeCourbes : IXMLListeCourbesTypeList;
    ListeCanauxTrsfrt : TStringList;
    AListeCanauxEnreg,AListeCanauxVisu : IXMLListeCanauxEnregVisuTypeList;
begin
  Self.Get_ADBASIC.INCLUDE.Clear;
  Self.Get_ADBASIC.IMPORT.Clear;
  Self.Get_ADBASIC.VAR_.Clear;
  Self.Get_ADBASIC.LOWINIT.Clear;
  Self.Get_ADBASIC.CODE.Clear;
  Self.Get_ADBASIC.FINISH.Clear;
  Self.Get_ADBASIC.FCTSSP.Clear;
  Self.Get_ADBASIC.LIBRARY_.Clear;
  Self.Get_PASCAL.INCLUDE.Clear;
  Self.Get_PASCAL.IMPORT.Clear;
  Self.Get_PASCAL.VAR_.Clear;
  Self.Get_PASCAL.LOWINIT.Clear;
  Self.Get_PASCAL.CODE.Clear;
  Self.Get_PASCAL.FINISH.Clear;
  Self.Get_PASCAL.FCTSSP.Clear;
  Self.Get_PASCAL.LIBRARY_.Clear;

  if Self.Get_GENRE <> 'S' then
  begin
    InfFile := TIniFile.Create(pRep_FichiersInf + Self.Get_FICHIER + '.inf');
    if InfFile.SectionExists('CONFIG') then
    begin
      //ADBASIC
      if InfFile.ReadBool('CONFIG','INCLUDE',false)
			then Read_Section(Self.Get_ADBASIC,nil,'INCLUDE','INC',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','IMPORT',false)
			then Read_Section(Self.Get_ADBASIC,nil,'IMPORT','IMP',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','VAR',false)
			then Read_Section(Self.Get_ADBASIC,nil,'VAR','VAR',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','LOWINIT',false)
			then Read_Section(Self.Get_ADBASIC,nil,'LOWINIT','LI',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','CODE',false)
			then Read_Section(Self.Get_ADBASIC,nil,'CODE','C',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','FCT',false) or
         InfFile.ReadBool('CONFIG','SSP',false)
			then Read_Section(Self.Get_ADBASIC,nil,'FCTSSP','F',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','LIBRARY',false)
			then Read_Section(Self.Get_ADBASIC,nil,'LIBRARY','L',pNum_fonction,InfoCanaux);
      if InfFile.ReadBool('CONFIG','FINISH',false)
			then Read_Section(Self.Get_ADBASIC,nil,'FINISH','F',pNum_fonction,InfoCanaux);
		end;
		InfFile.Free;
		//PASCAL
		InfFile := TIniFile.Create(pRep_FichiersInf + Self.Get_FICHIER + '.pnf');
		if InfFile.SectionExists('CONFIG') then
		begin
			if InfFile.ReadBool('CONFIG','INCLUDE',false)
			then Read_Section(nil,Self.Get_PASCAL,'INCLUDE','INC',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','IMPORT',false)
			then Read_Section(nil,Self.Get_PASCAL,'IMPORT','IMP',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','VAR',false)
			then Read_Section(nil,Self.Get_PASCAL,'VAR','VAR',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','LOWINIT',false)
			then Read_Section(nil,Self.Get_PASCAL,'LOWINIT','LI',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','CODE',false)
			then Read_Section(nil,Self.Get_PASCAL,'CODE','C',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','FCT',false) or
				 InfFile.ReadBool('CONFIG','SSP',false)
			then Read_Section(nil,Self.Get_PASCAL,'FCTSSP','F',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','LIBRARY',false)
			then Read_Section(nil,Self.Get_PASCAL,'LIBRARY','L',pNum_fonction,InfoCanaux);
			if InfFile.ReadBool('CONFIG','FINISH',false)
			then Read_Section(nil,Self.Get_PASCAL,'FINISH','F',pNum_fonction,InfoCanaux);
		end;
		InfFile.Free;
		if Self.Get_FICHIER = 'Transfert' then
		begin
			//ANode := Self;
			//repeat
			//	ANode := ANode.ParentNode;
			//until ANode.NodeName = 'ROOT';
			//InfoCanaux := (ANode as IXMLROOTType).RendreListeInfoCanaux;

			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := 'REM ******** Début transfert données vers PC';
			for i := 0 to Self.FSORTIE.Count - 1 do
			begin
        indexCanal := InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM);
				RF := InfoCanaux.RappFreq[indexCanal];
				TailleTampon := InfoCanaux.TailleTampon[indexCanal];
				numCanal := InfoCanaux.NumCanal[indexCanal];

				AVAR := Self.Get_ADBASIC.VAR_.Add;
				AVAR.TEXT := 'REM ******** Variables pour transfert de : ' +  Self.FSORTIE[i].NOM;
				//AVAR := Self.Get_ADBASIC.VAR_.Add;
				//AVAR.TEXT := '#DEFINE DIM_TAMPON_' + Self.FSORTIE[i].NOM + ' ' + TailleTampon;
				AVAR := Self.Get_ADBASIC.VAR_.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then AVAR.TEXT := '#DEFINE ' + Self.FSORTIE[i].NOM + '_TAB ' + 'DATA_' + numCanal
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             AVAR.TEXT := '#DEFINE ' + S + '_TAB ' + 'DATA_' + numCanal;
           end else
           begin
             AVAR.TEXT := '#DEFINE ' + Self.FSORTIE[i].NOM + '_TAB ' + 'DATA_' + numCanal;
             AVAR := Self.Get_ADBASIC.VAR_.Add;
             AVAR.TEXT := 'DIM ' + Self.FSORTIE[i].NOM + '_INDEX AS LONG';
           end;
        end;

				AVAR := Self.Get_ADBASIC.VAR_.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then AVAR.TEXT := 'DIM ' + Self.FSORTIE[i].NOM + '_TAB[' + TailleTampon + '] AS FLOAT AS FIFO'
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             AVAR.TEXT := 'DIM ' + S + '_TAB[' + TailleTampon + '] AS FLOAT AS FIFO';
           end else AVAR.TEXT := 'DIM ' + Self.FSORTIE[i].NOM + '_TAB[' + TailleTampon + '] AS FLOAT AS FIFO';
        end;

				//Self.FSORTIE[i].NOM + '] AS FLOAT AS FIFO';
				AVAR := Self.Get_ADBASIC.VAR_.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then AVAR.TEXT := 'DIM TRANSFERT_' + Self.FSORTIE[i].NOM + ' AS LONG'
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             AVAR.TEXT := 'DIM TRANSFERT_' + S + ' AS LONG';
           end else AVAR.TEXT := 'DIM TRANSFERT_' + Self.FSORTIE[i].NOM + ' AS LONG';
        end;

				ALOWINIT := Self.Get_ADBASIC.LOWINIT.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then ALOWINIT.TEXT:= 'TRANSFERT_'+ Self.FSORTIE[i].NOM + ' = ' + RF
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             ALOWINIT.TEXT:= 'TRANSFERT_'+ S + ' = ' + RF;
           end else ALOWINIT.TEXT:= 'TRANSFERT_'+ Self.FSORTIE[i].NOM + ' = ' + RF;
        end;

				ALOWINIT := Self.Get_ADBASIC.LOWINIT.Add;
				ALOWINIT.TEXT := 'FIFO_CLEAR(' + numCanal + ')';

				ACODE := Self.Get_ADBASIC.CODE.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then ACODE.TEXT := 'IF (TRANSFERT_' + Self.FSORTIE[i].NOM + ' = ' + RF + ') THEN'
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             ACODE.TEXT := 'IF (TRANSFERT_' + S + ' = ' + RF + ') THEN';
           end else ACODE.TEXT := 'IF (TRANSFERT_' + Self.FSORTIE[i].NOM + ' = ' + RF + ') THEN';
        end;


				ACODE := Self.Get_ADBASIC.CODE.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then ACODE.TEXT := '   TRANSFERT_'+ Self.FSORTIE[i].NOM + ' = 0'
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             ACODE.TEXT := '   TRANSFERT_'+ S + ' = 0';
           end else ACODE.TEXT := '   TRANSFERT_'+ Self.FSORTIE[i].NOM + ' = 0';
        end;

				ACODE := Self.Get_ADBASIC.CODE.Add;
				ACODE.TEXT := '   IF (FIFO_EMPTY(' + numCanal + ') = 0) THEN';

				ACODE := Self.Get_ADBASIC.CODE.Add;
				ACODE.TEXT := '      PAR_' + numCanal + ' = PAR_' + numCanal + ' + 1';

				ACODE := Self.Get_ADBASIC.CODE.Add;
				ACODE.TEXT := '      FIFO_CLEAR(' + numCanal + ')';

				ACODE := Self.Get_ADBASIC.CODE.Add;
				ACODE.TEXT := '   ENDIF';

				ACODE := Self.Get_ADBASIC.CODE.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then ACODE.TEXT := '   ' + Self.FSORTIE[i].NOM + '_TAB =' + Self.FSORTIE[i].NOM
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             ACODE.TEXT := '   ' + S + '_TAB =' + Self.FSORTIE[i].NOM;
           end else
           begin
             ACODE.TEXT := '   FOR ' + Self.FSORTIE[i].NOM + '_INDEX = 1 TO ';
             ACODE.TEXT := ACODE.TEXT + InfoCanaux.ArraySizeOrElementNum[indexCanal];
             ACODE := Self.Get_ADBASIC.CODE.Add;
             ACODE.TEXT := '       ' + Self.FSORTIE[i].NOM + '_TAB =' + Self.FSORTIE[i].NOM + '[' + Self.FSORTIE[i].NOM + '_INDEX]';
             ACODE := Self.Get_ADBASIC.CODE.Add;
             ACODE.TEXT := '   NEXT ' + Self.FSORTIE[i].NOM + '_INDEX';
           end;
        end;

				ACODE := Self.Get_ADBASIC.CODE.Add;
				ACODE.TEXT := 'ENDIF';

				ACODE := Self.Get_ADBASIC.CODE.Add;
        if InfoCanaux.ISArray[indexCanal] = '0'
        then ACODE.TEXT := 'INC(TRANSFERT_' + Self.FSORTIE[i].NOM + ')'
        else begin
           if pos('[',Self.FSORTIE[i].NOM) <> 0 then
           begin
             S := Self.FSORTIE[i].NOM;
             delete(S,pos('[',S),1);delete(S,pos(']',S),1);
             ACODE.TEXT := 'INC(TRANSFERT_' + S + ')';
           end else ACODE.TEXT := 'INC(TRANSFERT_' + Self.FSORTIE[i].NOM + ')';
        end;

			end;
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := 'REM ******** Fin transfert données vers PC';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '';

			//ListeCanauxTrsfrtLocal.Free;
			//ListeCanauxTrsfrtGlobal.Free;
			//InfoCanaux.Free;

      //Recuperation ST node
      ANode := Self;
			repeat
				ANode := ANode.ParentNode;
			until ANode.NodeName = 'ST';
			STNode := (ANode as IXMLSTType);

      //Recuperation liste canaux trsfrt
      ListeCanauxTrsfrt := TStringList.Create;
      ListeCanauxTrsfrt.CaseSensitive := false;
      ListeCanauxTrsfrt.Sorted := true;
      STNode.RendreListeCanauxTransfertKeithleyPC(ListeCanauxTrsfrt);
      STNode.RendreListeCanauxTransfertPCKeithley(ListeCanauxTrsfrt);

      //Suppression des canaux en enreg et visu si plus trsfrés ds cette ST
      AListeCanauxEnreg := STNode.LISTECANAUXENREG;
      AListeCanauxVisu := STNode.LISTECANAUXVISU;
      if AListeCanauxEnreg.Count > 0 then
      begin
        n := 0 ;
        repeat
          if not ListeCanauxTrsfrt.Find(AListeCanauxEnreg[n].NOMCANAL,i)
          then AListeCanauxEnreg.Delete(n)
          else inc(n);
        until AListeCanauxEnreg.Count = n;
      end;
      if AListeCanauxVisu.Count > 0 then
      begin
        n := 0 ;
        repeat
          if not ListeCanauxTrsfrt.Find(AListeCanauxVisu[n].NOMCANAL,i)
          then AListeCanauxVisu.Delete(n)
          else inc(n);
        until AListeCanauxVisu.Count = n;
      end;
      //Effacer les courbes des canaux plus trsfrés
      AlisteGraphes := STNode.GRAPHES;
      for i := 0 to AListeGraphes.Count - 1 do
      begin
        AListeCourbes := STNode.GRAPHES[i].COURBES;
        if AListeCourbes.Count > 0 then
        begin
          n := 0;
          repeat
            if not ListeCanauxTrsfrt.Find(AListeCourbes[n].NOMCANALORDO,j)
            then AListeCourbes.Delete(n)
            else begin
              if AlisteGraphes[i].GENRE = 'Y=f(X)' then
              begin
                if not ListeCanauxTrsfrt.Find(AListeCourbes[n].NOMCANALABSC,j)
                then AListeCourbes.Delete(n)
                else inc(n);
              end else inc(n);
            end;
          until AListeCourbes.Count = n;
        end;
      end;
      //Effacer les grpahes vides
      if AlisteGraphes.Count > 0 then
      begin
        n := 0 ;
        repeat
          if AlisteGraphes[n].COURBES.Count = 0
          then AlisteGraphes.Delete(n)
          else inc(n);
        until AlisteGraphes.Count = n;
      end;
      
      ListeCanauxTrsfrt.Free;

		end;
		
    if Self.Get_FICHIER = 'Transfert_Ice' then
		begin

			ANode := Self;
			repeat
				ANode :=  ANode.ParentNode;
			until ANode.NodeName = 'ROOT';
			RootNode := (ANode as IXMLROOTType);

			numPSerie := strtoint(Self.FPARAM[0].NOM);
			APSerie := nil;
			if RootNode.PSERIE.Count > 0 then
			begin
				for i := 0 to RootNode.PSERIE.Count - 1 do
				begin
          if RootNode.PSERIE[i].NUMERO = numPserie
          then if RootNode.PSERIE[i].SYSTEME = 'ICE' then
               begin
                 APSerie := RootNode.PSERIE[i];
                 break;
               end;
        end;
			end;
      RFTemp := round(RootNode.EXPERIENCE.FEG / APSerie.FREQUENCE);
      RF := floattostr(RFTemp);

      AVAR := Self.Get_ADBASIC.VAR_.Add;
      AVAR.TEXT := 'REM ******** Variables pour cadence transfert vers PC Ice : ';
      AVAR := Self.Get_ADBASIC.VAR_.Add;
      AVAR.TEXT := 'DIM Envoie_PC_Ice_' + Self.FPARAM[0].NOM + ' AS SHORT';

      ALOWINIT := Self.Get_ADBASIC.LOWINIT.Add;
      ALOWINIT.TEXT:= 'Envoie_PC_Ice_'+ Self.FPARAM[0].NOM + ' = ' + RF;

      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := 'REM ******** Début transfert données vers PC Ice';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := 'IF(Envoie_PC_Ice_'+ Self.FPARAM[0].NOM + ' = ' + RF + ') THEN';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := '   Envoie_PC_Ice_'+ Self.FPARAM[0].NOM + ' = 0';
      for i := 0 to Self.FSORTIE.Count - 1 do
      begin
        numCanal := InfoCanaux.NumCanal[InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM)];
        ACODE := Self.Get_ADBASIC.CODE.Add;
        ACODE.TEXT := '   Call_ConvIEEE754SendICE(' + Self.FPARAM[0].NOM + ',' + numCanal + ',' + Self.FSORTIE[i].NOM + ')';
      end;
      ACODE := Self.Get_ADBASIC.CODE.Add;
      if SystemType = 'ADWINPRO'
      then ACODE.TEXT := '   IF(write_fifo(1,' + inttostr(numPSerie) + ',10)=0) THEN';
      if SystemType = 'ADWINGOLD'
      then ACODE.TEXT := '   IF(write_fifo('+inttostr(numPSerie) + ',10)=0) THEN';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      if SystemType = 'ADWINPRO'
      then ACODE.TEXT := '      IF(write_fifo(1,' + inttostr(numPSerie) + ',13)=0) THEN';
      if SystemType = 'ADWINGOLD'
      then ACODE.TEXT := '   IF(write_fifo('+inttostr(numPSerie) + ',13)=0) THEN';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := '      ENDIF';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := '   ENDIF';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := 'ENDIF';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := 'INC(Envoie_PC_Ice_'+ Self.FPARAM[0].NOM + ')';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := 'REM ******** Fin transfert données vers PC Ice';
      ACODE := Self.Get_ADBASIC.CODE.Add;
      ACODE.TEXT := '';
		end;


    
	end else
	begin
		//Recup liste des canaux
		//ANode := Self;
		//Repeat
		//	ANode := ANode.ParentNode;
		//until ANode.NodeName = 'ROOT';
		//InfoCanaux := (ANode as IXMLROOTType).RendreListeInfoCanaux;

		//ADBASIC ...

		//PASCAL
		AVAR := Self.Get_PASCAL.VAR_.Add;
		AVAR.TEXT := '     Stim_' + inttostr(pNum_fonction) + ': TStimuli;';

		ALOWINIT  := Self.Get_PASCAL.LOWINIT.Add;
		S := Self.Get_FICHIER;
		ALOWINIT.TEXT := 'Stim_' + inttostr(pNum_fonction) + ' := TStimuli.Create(''' + S + ''');';

		AFINISH  := Self.Get_PASCAL.FINISH.Add;
		AFINISH.TEXT := 'IF Stim_' + inttostr(pNum_fonction) + ' <> nil THEN ';
		AFINISH.TEXT := AFINISH.TEXT + 'Stim_' + inttostr(pNum_fonction) + '.FreeValues;';

		ACODE := Self.Get_ADBASIC.CODE.Add;
		ACODE.TEXT := 'REM ******** Début recupération données du PC (Stimuli)';
		for i := 0 to Self.FSORTIE.Count - 1 do
		begin
			RF := InfoCanaux.RappFreq[InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM)];
			floatORint := InfoCanaux.floatORint[InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM)];
			numCanal := InfoCanaux.NumCanal[InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM)];
			TailleTampon := InfoCanaux.TailleTampon[InfoCanaux.Nom.IndexOf(Self.FSORTIE[i].NOM)];

			//ADBASIC
			AVAR := Self.Get_ADBASIC.VAR_.Add;
			AVAR.TEXT := 'REM ******** Variables pour génération de : ' +  Self.FSORTIE[i].NOM;
			AVAR := Self.Get_ADBASIC.VAR_.Add;
			AVAR.TEXT := '#DEFINE ' + Self.FSORTIE[i].NOM + '_tab DATA_' + numCanal;

			AVAR := Self.Get_ADBASIC.VAR_.Add;
			AVAR.TEXT := 'DIM ' + Self.FSORTIE[i].NOM + '_tab[' + TailleTampon + '] AS FLOAT AS FIFO';

			AVAR := Self.Get_ADBASIC.VAR_.Add;
			AVAR.TEXT := 'DIM Transfert_' + Self.FSORTIE[i].NOM + ' AS LONG';

			ALOWINIT  := Self.Get_ADBASIC.LOWINIT.Add;
			ALOWINIT.TEXT := 'Transfert_' + Self.FSORTIE[i].NOM + ' = ' + RF;

			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := 'IF (Transfert_' + Self.FSORTIE[i].NOM + ' = ' + RF + ') THEN';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '   Transfert_' + Self.FSORTIE[i].NOM + ' = 0';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '   IF (FIFO_FULL(' + numCanal + ') = 0) THEN';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '      PAR_' + numCanal + ' = PAR_' + numCanal + ' + 1';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '      FIFO_CLEAR(' + numCanal + ')';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '   ELSE';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '      ' + Self.FSORTIE[i].NOM + ' = ' + Self.FSORTIE[i].NOM + '_tab';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := '   ENDIF';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := 'ENDIF';
			ACODE := Self.Get_ADBASIC.CODE.Add;
			ACODE.TEXT := 'INC(Transfert_' + Self.FSORTIE[i].NOM + ')';

			//PASCAL
			AVAR := Self.Get_PASCAL.VAR_.Add;
			AVAR.TEXT := '     Transfert_' + Self.FSORTIE[i].NOM + ': INTEGER;';

			ALOWINIT  := Self.Get_PASCAL.LOWINIT.Add;
			ALOWINIT.TEXT := 'Transfert_' + Self.FSORTIE[i].NOM + ' := ' + RF + ';';

			ACODE := Self.Get_PASCAL.CODE.Add;
			S := 'IF (Transfert_' + Self.FSORTIE[i].NOM + ' = ' + RF + ') THEN';
			ACODE.TEXT := S;

			ACODE := Self.Get_PASCAL.CODE.Add;
			ACODE.TEXT := 'BEGIN';

			ACODE := Self.Get_PASCAL.CODE.Add;
			S := '  Transfert_' + Self.FSORTIE[i].NOM + ' := 0;';
			ACODE.TEXT := S;

			ACODE := Self.Get_PASCAL.CODE.Add;
			if floatORint = 'int'
			then S := '  ' + Self.FSORTIE[i].NOM + ' := trunc(Stim_' + inttostr(pNum_Fonction)
			else S := '  ' + Self.FSORTIE[i].NOM + ' := (Stim_' + inttostr(pNum_Fonction);
			S := S + '.GetValue(''' + Self.FSORTIE[i].NOM + '''));';
			ACODE.TEXT := S;

			ACODE := Self.Get_PASCAL.CODE.Add;
			ACODE.TEXT := 'END;';

			ACODE := Self.Get_PASCAL.CODE.Add;
			ACODE.TEXT := 'Inc(Transfert_' + Self.FSORTIE[i].NOM + ');';
		end;
		ACODE := Self.Get_ADBASIC.CODE.Add;
		ACODE.TEXT := 'REM ******** Fin recupération données du PC (Stimuli)';
		ACODE := Self.Get_ADBASIC.CODE.Add;
		ACODE.TEXT := '';

		//InfoCanaux.Free;
	end;

end;

{ TXMLFONCTIONTypeList }

function TXMLFONCTIONTypeList.Add: IXMLFONCTIONType;
begin
	Result := AddItem(-1) as IXMLFONCTIONType;
end;

function TXMLFONCTIONTypeList.Insert(const Index: Integer): IXMLFONCTIONType;
begin
  Result := AddItem(Index) as IXMLFONCTIONType;
end;

function TXMLFONCTIONTypeList.Get_Item(Index: Integer): IXMLFONCTIONType;
begin
  Result := List[Index] as IXMLFONCTIONType;
end;

{ TXMLENTREEType }

function TXMLENTREEType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLENTREEType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

{ TXMLENTREETypeList }

function TXMLENTREETypeList.Add: IXMLENTREEType;
begin
  Result := AddItem(-1) as IXMLENTREEType;
end;

function TXMLENTREETypeList.Insert(const Index: Integer): IXMLENTREEType;
begin
  Result := AddItem(Index) as IXMLENTREEType;
end;
function TXMLENTREETypeList.Get_Item(Index: Integer): IXMLENTREEType;
begin
  Result := List[Index] as IXMLENTREEType;
end;

{ TXMLSORTIEType }

function TXMLSORTIEType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLSORTIEType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

{ TXMLSORTIETypeList }

function TXMLSORTIETypeList.Add: IXMLSORTIEType;
begin
  Result := Self.AddItem(-1) as IXMLSORTIEType;
end;

function TXMLSORTIETypeList.Insert(const Index: Integer): IXMLSORTIEType;
begin
  Result := AddItem(Index) as IXMLSORTIEType;
end;
function TXMLSORTIETypeList.Get_Item(Index: Integer): IXMLSORTIEType;
begin
  Result := List[Index] as IXMLSORTIEType;
end;

{ TXMLPARAMType }

function TXMLPARAMType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLPARAMType.Set_NOM(Value: WideString);
begin
  SetAttribute('NOM', Value);
end;

{ TXMLPARAMTypeList }

function TXMLPARAMTypeList.Add: IXMLPARAMType;
begin
  Result := AddItem(-1) as IXMLPARAMType;
end;

function TXMLPARAMTypeList.Insert(const Index: Integer): IXMLPARAMType;
begin
  Result := AddItem(Index) as IXMLPARAMType;
end;
function TXMLPARAMTypeList.Get_Item(Index: Integer): IXMLPARAMType;
begin
  Result := List[Index] as IXMLPARAMType;
end;

{ TXMLADBASICType }

procedure TXMLADBASICType.AfterConstruction;
begin
  RegisterChildNode('INCLUDE', TXMLINCLUDEType);
  RegisterChildNode('IMPORT', TXMLIMPORTType);
  RegisterChildNode('VAR', TXMLVARType);
  RegisterChildNode('LOWINIT', TXMLLOWINITType);
  RegisterChildNode('CODE', TXMLCODEType);
  RegisterChildNode('FINISH', TXMLFINISHType);
  RegisterChildNode('FCTSSP', TXMLFCTSSPType);
  RegisterChildNode('LIBRARY', TXMLLIBRARYType);
  FINCLUDE := CreateCollection(TXMLINCLUDETypeList, IXMLINCLUDEType, 'INCLUDE') as IXMLINCLUDETypeList;
  FIMPORT := CreateCollection(TXMLIMPORTTypeList, IXMLIMPORTType, 'IMPORT') as IXMLIMPORTTypeList;
  FVAR_ := CreateCollection(TXMLVARTypeList, IXMLVARType, 'VAR') as IXMLVARTypeList;
  FLOWINIT := CreateCollection(TXMLLOWINITTypeList, IXMLLOWINITType, 'LOWINIT') as IXMLLOWINITTypeList;
  FCODE := CreateCollection(TXMLCODETypeList, IXMLCODEType, 'CODE') as IXMLCODETypeList;
  FFINISH := CreateCollection(TXMLFINISHTypeList, IXMLFINISHType, 'FINISH') as IXMLFINISHTypeList;
  FFCTSSP := CreateCollection(TXMLFCTSSPTypeList, IXMLFCTSSPType, 'FCTSSP') as IXMLFCTSSPTypeList;
  FLIBRARY_ := CreateCollection(TXMLLIBRARYTypeList, IXMLLIBRARYType, 'LIBRARY') as IXMLLIBRARYTypeList;
  inherited;
end;

function TXMLADBASICType.Get_INCLUDE: IXMLINCLUDETypeList;
begin
  Result := FINCLUDE;
end;

function TXMLADBASICType.Get_IMPORT: IXMLIMPORTTypeList;
begin
  Result := FIMPORT;
end;

function TXMLADBASICType.Get_VAR_: IXMLVARTypeList;
begin
  Result := FVAR_;
end;

function TXMLADBASICType.Get_LOWINIT: IXMLLOWINITTypeList;
begin
  Result := FLOWINIT;
end;

function TXMLADBASICType.Get_CODE: IXMLCODETypeList;
begin
  Result := FCODE;
end;

function TXMLADBASICType.Get_FINISH: IXMLFINISHTypeList;
begin
  Result := FFINISH;
end;

function TXMLADBASICType.Get_FCTSSP: IXMLFCTSSPTypeList;
begin
  Result := FFCTSSP;
end;

function TXMLADBASICType.Get_LIBRARY_: IXMLLIBRARYTypeList;
begin
  Result := FLIBRARY_;
end;

{ TXMLINCLUDEType }

function TXMLINCLUDEType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLINCLUDEType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLINCLUDETypeList }

function TXMLINCLUDETypeList.Add: IXMLINCLUDEType;
begin
  Result := AddItem(-1) as IXMLINCLUDEType;
end;

function TXMLINCLUDETypeList.Insert(const Index: Integer): IXMLINCLUDEType;
begin
  Result := AddItem(Index) as IXMLINCLUDEType;
end;
function TXMLINCLUDETypeList.Get_Item(Index: Integer): IXMLINCLUDEType;
begin
  Result := List[Index] as IXMLINCLUDEType;
end;

{ TXMLIMPORTType }

function TXMLIMPORTType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLIMPORTType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLIMPORTTypeList }

function TXMLIMPORTTypeList.Add: IXMLIMPORTType;
begin
  Result := AddItem(-1) as IXMLIMPORTType;
end;

function TXMLIMPORTTypeList.Insert(const Index: Integer): IXMLIMPORTType;
begin
  Result := AddItem(Index) as IXMLIMPORTType;
end;
function TXMLIMPORTTypeList.Get_Item(Index: Integer): IXMLIMPORTType;
begin
  Result := List[Index] as IXMLIMPORTType;
end;

{ TXMLVARType }

function TXMLVARType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLVARType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLVARTypeList }

function TXMLVARTypeList.Add: IXMLVARType;
begin
  Result := AddItem(-1) as IXMLVARType;
end;

function TXMLVARTypeList.Insert(const Index: Integer): IXMLVARType;
begin
  Result := AddItem(Index) as IXMLVARType;
end;
function TXMLVARTypeList.Get_Item(Index: Integer): IXMLVARType;
begin
  Result := List[Index] as IXMLVARType;
end;

{ TXMLLOWINITType }

function TXMLLOWINITType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLLOWINITType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLLOWINITTypeList }

function TXMLLOWINITTypeList.Add: IXMLLOWINITType;
begin
  Result := AddItem(-1) as IXMLLOWINITType;
end;

function TXMLLOWINITTypeList.Insert(const Index: Integer): IXMLLOWINITType;
begin
  Result := AddItem(Index) as IXMLLOWINITType;
end;
function TXMLLOWINITTypeList.Get_Item(Index: Integer): IXMLLOWINITType;
begin
  Result := List[Index] as IXMLLOWINITType;
end;

{ TXMLCODEType }

function TXMLCODEType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLCODEType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLCODETypeList }

function TXMLCODETypeList.Add: IXMLCODEType;
begin
  Result := AddItem(-1) as IXMLCODEType;
end;

function TXMLCODETypeList.Insert(const Index: Integer): IXMLCODEType;
begin
  Result := AddItem(Index) as IXMLCODEType;
end;
function TXMLCODETypeList.Get_Item(Index: Integer): IXMLCODEType;
begin
  Result := List[Index] as IXMLCODEType;
end;

{ TXMLFINISHType }

function TXMLFINISHType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLFINISHType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLFINISHTypeList }

function TXMLFINISHTypeList.Add: IXMLFINISHType;
begin
  Result := AddItem(-1) as IXMLFINISHType;
end;

function TXMLFINISHTypeList.Insert(const Index: Integer): IXMLFINISHType;
begin
  Result := AddItem(Index) as IXMLFINISHType;
end;
function TXMLFINISHTypeList.Get_Item(Index: Integer): IXMLFINISHType;
begin
  Result := List[Index] as IXMLFINISHType;
end;

{ TXMLFCTSSPType }

function TXMLFCTSSPType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLFCTSSPType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLFCTSSPTypeList }

function TXMLFCTSSPTypeList.Add: IXMLFCTSSPType;
begin
  Result := AddItem(-1) as IXMLFCTSSPType;
end;

function TXMLFCTSSPTypeList.Insert(const Index: Integer): IXMLFCTSSPType;
begin
  Result := AddItem(Index) as IXMLFCTSSPType;
end;
function TXMLFCTSSPTypeList.Get_Item(Index: Integer): IXMLFCTSSPType;
begin
  Result := List[Index] as IXMLFCTSSPType;
end;

{ TXMLLIBRARYType }

function TXMLLIBRARYType.Get_TEXT: WideString;
begin
  Result := AttributeNodes['TEXT'].Text;
end;

procedure TXMLLIBRARYType.Set_TEXT(Value: WideString);
begin
  SetAttribute('TEXT', Value);
end;

{ TXMLLIBRARYTypeList }

function TXMLLIBRARYTypeList.Add: IXMLLIBRARYType;
begin
  Result := AddItem(-1) as IXMLLIBRARYType;
end;

function TXMLLIBRARYTypeList.Insert(const Index: Integer): IXMLLIBRARYType;
begin
  Result := AddItem(Index) as IXMLLIBRARYType;
end;
function TXMLLIBRARYTypeList.Get_Item(Index: Integer): IXMLLIBRARYType;
begin
  Result := List[Index] as IXMLLIBRARYType;
end;

{ TXMLPASCALType }

procedure TXMLPASCALType.AfterConstruction;
begin
  RegisterChildNode('INCLUDE', TXMLINCLUDEType);
  RegisterChildNode('IMPORT', TXMLIMPORTType);
  RegisterChildNode('VAR', TXMLVARType);
  RegisterChildNode('LOWINIT', TXMLLOWINITType);
  RegisterChildNode('CODE', TXMLCODEType);
  RegisterChildNode('FINISH', TXMLFINISHType);
  RegisterChildNode('FCTSSP', TXMLFCTSSPType);
  RegisterChildNode('LIBRARY', TXMLLIBRARYType);
  FINCLUDE := CreateCollection(TXMLINCLUDETypeList, IXMLINCLUDEType, 'INCLUDE') as IXMLINCLUDETypeList;
  FIMPORT := CreateCollection(TXMLIMPORTTypeList, IXMLIMPORTType, 'IMPORT') as IXMLIMPORTTypeList;
  FVAR_ := CreateCollection(TXMLVARTypeList, IXMLVARType, 'VAR') as IXMLVARTypeList;
  FLOWINIT := CreateCollection(TXMLLOWINITTypeList, IXMLLOWINITType, 'LOWINIT') as IXMLLOWINITTypeList;
  FCODE := CreateCollection(TXMLCODETypeList, IXMLCODEType, 'CODE') as IXMLCODETypeList;
  FFINISH := CreateCollection(TXMLFINISHTypeList, IXMLFINISHType, 'FINISH') as IXMLFINISHTypeList;
  FFCTSSP := CreateCollection(TXMLFCTSSPTypeList, IXMLFCTSSPType, 'FCTSSP') as IXMLFCTSSPTypeList;
  FLIBRARY_ := CreateCollection(TXMLLIBRARYTypeList, IXMLLIBRARYType, 'LIBRARY') as IXMLLIBRARYTypeList;
  inherited;
end;

function TXMLPASCALType.Get_INCLUDE: IXMLINCLUDETypeList;
begin
  Result := FINCLUDE;
end;

function TXMLPASCALType.Get_IMPORT: IXMLIMPORTTypeList;
begin
  Result := FIMPORT;
end;

function TXMLPASCALType.Get_VAR_: IXMLVARTypeList;
begin
  Result := FVAR_;
end;

function TXMLPASCALType.Get_LOWINIT: IXMLLOWINITTypeList;
begin
  Result := FLOWINIT;
end;

function TXMLPASCALType.Get_CODE: IXMLCODETypeList;
begin
  Result := FCODE;
end;

function TXMLPASCALType.Get_FINISH: IXMLFINISHTypeList;
begin
  Result := FFINISH;
end;

function TXMLPASCALType.Get_FCTSSP: IXMLFCTSSPTypeList;
begin
  Result := FFCTSSP;
end;

function TXMLPASCALType.Get_LIBRARY_: IXMLLIBRARYTypeList;
begin
  Result := FLIBRARY_;
end;

{ TXMLESSAIType }

function TXMLESSAIType.Get_NOMST: WideString;
begin
  Result := AttributeNodes['NOMST'].Text;
end;

function TXMLESSAIType.Get_MODEDEM: WideString;
begin
  Result := AttributeNodes['MODEDEM'].Text;
end;

function TXMLESSAIType.Get_ETAT: WideString;
begin
  Result := AttributeNodes['ETAT'].Text;
end;

procedure TXMLESSAIType.Set_NOMST(Value: WideString);
begin
  SetAttribute('NOMST', Value);
end;

procedure TXMLESSAIType.Set_MODEDEM(Value: WideString);
begin
  SetAttribute('MODEDEM', Value);
end;

procedure TXMLESSAIType.Set_ETAT(Value: WideString);
begin
  SetAttribute('ETAT', Value);
end;

{ TXMLESSAISTypeList }

function TXMLESSAISTypeList.Add: IXMLESSAIType;
begin
  Result := AddItem(-1) as IXMLESSAIType;
end;

function TXMLESSAISTypeList.Insert(const Index: Integer): IXMLESSAIType;
begin
  Result := AddItem(Index) as IXMLESSAIType;
end;

function TXMLESSAISTypeList.Get_Item(Index: Integer): IXMLESSAIType;
begin
  Result := List[Index] as IXMLESSAIType;
end;

{ TXMLSESSIONType }

function TXMLSESSIONType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

function TXMLSESSIONType.Get_ESSAIS : IXMLESSAISTypeList;
begin
  Result := FESSAIS;
end;

procedure TXMLSESSIONType.Set_NOM(Value : WideString);
begin
  SetAttribute('NOM', Value);
end;

procedure TXMLSESSIONType.AfterConstruction;
begin
  RegisterChildNode('ESSAI', TXMLESSAIType);
  FESSAIS := CreateCollection(TXMLESSAISTypeList, IXMLESSAIType, 'ESSAI') as IXMLESSAISTypeList;
end;

procedure TXMLSESSIONType.ChangeSTName(OldName,NewName : string);
var i : integer;
begin
  for i := 0 to Self.FESSAIS.Count - 1 do
  begin
    if Self.FESSAIS[i].NOMST = OldName
    then Self.FESSAIS[i].NOMST := NewName;
  end;
end;

function  TXMLSESSIONType.PercentDone : integer;
var i : integer;
begin
  Result := 0;
  if(Self.FESSAIS.Count > 0) then
  begin
    for i := 0 to Self.FESSAIS.Count - 1 do
    begin
      if Self.FESSAIS[i].ETAT = 'EFFECTUE'
      then inc(Result);
    end;
    Result := trunc(100.0*Result/Self.FESSAIS.Count);
  end;
end;

{ TXMLSESSIONSTypeList }

function TXMLSESSIONSTypeList.Add: IXMLSESSIONType;
begin
  Result := AddItem(-1) as IXMLSESSIONType;
end;

function TXMLSESSIONSTypeList.Insert(const Index: Integer): IXMLSESSIONType;
begin
  Result := AddItem(Index) as IXMLSESSIONType;
end;

function TXMLSESSIONSTypeList.Get_Item(Index: Integer): IXMLSESSIONType;
begin
  Result := List[Index] as IXMLSESSIONType;
end;

function TXMLSESSIONSTypeList.IndexOf(Value : WideString) : integer;
var i : integer;
begin
  Result := -1;
  for i := 0 to Self.Count - 1 do
  begin
    if Self.Get_Item(i).NOM = Value then
    begin
      Result := i;
      break;
    end;
  end;
end;

procedure TXMLSESSIONSTypeList.ChangeSTName(OldName,NewName : string);
var i : integer;
begin
  for i := 0 to Self.Count - 1
  do Self.Get_Item(i).ChangeSTName(OldName,NewName);
end;

{ TXMLATTRIBUTType }

function TXMLATTRIBUTType.Get_NOM: WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

function TXMLATTRIBUTType.Get_VALEUR: WideString;
begin
  Result := AttributeNodes['VALEUR'].Text;
end;

procedure TXMLATTRIBUTType.Set_NOM(Value : WideString);
begin
  SetAttribute('NOM', Value);
end;

procedure TXMLATTRIBUTType.Set_VALEUR(Value : WideString);
begin
  SetAttribute('VALEUR', Value);
end;

{ TXMLATTRIBUTSTypeList }

function TXMLATTRIBUTSTypeList.Add: IXMLATTRIBUTType;
begin
  Result := AddItem(-1) as IXMLATTRIBUTType;
end;

function TXMLATTRIBUTSTypeList.Insert(const Index: Integer): IXMLATTRIBUTType;
begin
  Result := AddItem(Index) as IXMLATTRIBUTType;
end;

function TXMLATTRIBUTSTypeList.Get_Item(Index: Integer): IXMLATTRIBUTType;
begin
  Result := List[Index] as IXMLATTRIBUTType;
end;

{ TXMLSUJETType }

function TXMLSUJETType.Get_NOM : WideString;
begin
  Result := AttributeNodes['NOM'].Text;
end;

procedure TXMLSUJETType.Set_NOM(Value : WideString);
begin
  SetAttribute('NOM', Value);
end;

function TXMLSUJETType.Get_PARAMSFILEPATH : WideString;
begin
  Result := AttributeNodes['PARAMSFILEPATH'].Text;
end;

procedure TXMLSUJETType.Set_PARAMSFILEPATH(Value : WideString);
begin
  SetAttribute('PARAMSFILEPATH', Value);
end;

function TXMLSUJETType.Get_SESSIONS : IXMLSESSIONSTypeList;
begin
  Result := FSESSIONS;
end;

function TXMLSUJETType.Get_ATTRIBUTS : IXMLATTRIBUTSTypeList;
begin
  Result := FATTRIBUTS;
end;

procedure TXMLSUJETType.AfterConstruction;
begin
  RegisterChildNode('SESSION', TXMLSESSIONType);
  FSESSIONS := CreateCollection(TXMLSESSIONSTypeList, IXMLSESSIONType, 'SESSION') as IXMLSESSIONSTypeList;
  RegisterChildNode('ATTRIBUT', TXMLATTRIBUTType);
  FATTRIBUTS := CreateCollection(TXMLATTRIBUTSTypeList, IXMLATTRIBUTType, 'ATTRIBUT') as IXMLATTRIBUTSTypeList;
end;

{ TXMLSUJETSTypeList }

function TXMLSUJETSTypeList.Add: IXMLSUJETType;
begin
  Result := AddItem(-1) as IXMLSUJETType;
end;

function TXMLSUJETSTypeList.Insert(const Index: Integer): IXMLSUJETType;
begin
  Result := AddItem(Index) as IXMLSUJETType;
end;

function TXMLSUJETSTypeList.Get_Item(Index: Integer): IXMLSUJETType;
begin
  Result := List[Index] as IXMLSUJETType;
end;

procedure TXMLSUJETSTypeList.Delete(Index: Integer);
begin
  DeleteFile(Self.Get_Item(index).PARAMSFILEPATH);
  inherited;
end;

{ TXMLFORMATNOMFICHIERSSAVEType }

function TXMLFORMATNOMFICHIERSSAVEType.Use_NOMCANAL: Integer;
begin
  Result := AttributeNodes['UseNOMCANAL'].NodeValue;
end;

function TXMLFORMATNOMFICHIERSSAVEType.Use_NOMST: Integer;
begin
  Result := AttributeNodes['UseNOMST'].NodeValue;
end;

function TXMLFORMATNOMFICHIERSSAVEType.Use_NOMSESSION: Integer;
begin
  Result := AttributeNodes['UseNOMSESSION'].NodeValue;
end;

function TXMLFORMATNOMFICHIERSSAVEType.Use_NUMSESSION: Integer;
begin
  Result := AttributeNodes['UseNUMSESSION'].NodeValue;
end;

function TXMLFORMATNOMFICHIERSSAVEType.Use_NUMESSAI: Integer;
begin
  Result := AttributeNodes['UseNUMESSAI'].NodeValue;
end;

procedure TXMLFORMATNOMFICHIERSSAVEType.Set_UseNOMCANAL(Value: Integer);
begin
  SetAttribute('UseNOMCANAL', Value);
end;

procedure TXMLFORMATNOMFICHIERSSAVEType.Set_UseNOMST(Value: Integer);
begin
  SetAttribute('UseNOMST', Value);
end;

procedure TXMLFORMATNOMFICHIERSSAVEType.Set_UseNOMSESSION(Value: Integer);
begin
  SetAttribute('UseNOMSESSION', Value);
end;

procedure TXMLFORMATNOMFICHIERSSAVEType.Set_UseNUMSESSION(Value: Integer);
begin
  SetAttribute('UseNUMSESSION', Value);
end;

procedure TXMLFORMATNOMFICHIERSSAVEType.Set_UseNUMESSAI(Value: Integer);
begin
  SetAttribute('UseNUMESSAI', Value);
end;

end.

