diff --git a/Notice d'utilisation des signaux_complexes_GL_V5.2.pdf b/Notice d'utilisation des signaux_complexes_GL_V5.3.pdf similarity index 73% rename from Notice d'utilisation des signaux_complexes_GL_V5.2.pdf rename to Notice d'utilisation des signaux_complexes_GL_V5.3.pdf index 6535445..597e8c7 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V5.2.pdf and b/Notice d'utilisation des signaux_complexes_GL_V5.3.pdf differ diff --git a/Signaux_complexes_GL - Copie.cfg b/Signaux_complexes_GL - Copie.cfg deleted file mode 100644 index 69e7fa7..0000000 --- a/Signaux_complexes_GL - Copie.cfg +++ /dev/null @@ -1,35 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" --LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" diff --git a/Signaux_complexes_GL - Copie.dof b/Signaux_complexes_GL - Copie.dof deleted file mode 100644 index 5573344..0000000 --- a/Signaux_complexes_GL - Copie.dof +++ /dev/null @@ -1,135 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=1 -UnsafeCode=1 -UnsafeCast=1 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;VclSmp;vclshlctrls -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=5 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1036 -CodePage=1252 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.5 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= -[HistoryLists\hlUnitAliases] -Count=1 -Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/Signaux_complexes_GL - Copie.dpr b/Signaux_complexes_GL - Copie.dpr deleted file mode 100644 index f8f710d..0000000 --- a/Signaux_complexes_GL - Copie.dpr +++ /dev/null @@ -1,36 +0,0 @@ -program Signaux_complexes_GL; - -uses - Forms, - UnitPrinc in 'UnitPrinc.pas' {FormPrinc}, - UnitDebug in 'UnitDebug.pas' {FormDebug}, - verif_version in 'verif_version.pas' {FormVersion}, - UnitPilote in 'UnitPilote.pas' {FormPilote}, - UnitSimule in 'UnitSimule.pas' {FormSimulation}, - UnitTCO in 'UnitTCO.pas' {FormTCO}, - UnitConfig in 'UnitConfig.pas' {FormConfig}, - UnitConfigTCO in 'UnitConfigTCO.pas' {FormConfigTCO}, - UnitSR in 'UnitSR.pas' {FormSR}, - Unit_Pilote_aig in 'Unit_Pilote_aig.pas' {FormAig}, - UnitConfigCellTCO in 'UnitConfigCellTCO.pas' {FormConfCellTCO}, - UnitCDF in 'UnitCDF.pas' {FormCDF}, - Unitplace in 'Unitplace.pas' {FormPlace}; - -{$R *.res} - -begin - Application.Initialize; - Application.CreateForm(TFormPrinc, FormPrinc); - Application.CreateForm(TFormDebug, FormDebug); - Application.CreateForm(TFormPilote, FormPilote); - Application.CreateForm(TFormSimulation, FormSimulation); - Application.CreateForm(TFormConfig, FormConfig); - Application.CreateForm(TFormConfigTCO, FormConfigTCO); - Application.CreateForm(TFormVersion, FormVersion); - Application.CreateForm(TFormSR, FormSR); - Application.CreateForm(TFormAig, FormAig); - Application.CreateForm(TFormConfCellTCO, FormConfCellTCO); - Application.CreateForm(TFormCDF, FormCDF); - Application.CreateForm(TFormPlace, FormPlace); - Application.Run; -end. diff --git a/Signaux_complexes_GL - Copie.res b/Signaux_complexes_GL - Copie.res deleted file mode 100644 index e60a7bf..0000000 Binary files a/Signaux_complexes_GL - Copie.res and /dev/null differ diff --git a/Signaux_complexes_GL.dpr b/Signaux_complexes_GL.dpr index f8f710d..4b17209 100644 --- a/Signaux_complexes_GL.dpr +++ b/Signaux_complexes_GL.dpr @@ -21,16 +21,16 @@ uses begin Application.Initialize; Application.CreateForm(TFormPrinc, FormPrinc); - Application.CreateForm(TFormDebug, FormDebug); + Application.CreateForm(TFormVersion, FormVersion); Application.CreateForm(TFormPilote, FormPilote); Application.CreateForm(TFormSimulation, FormSimulation); Application.CreateForm(TFormConfig, FormConfig); Application.CreateForm(TFormConfigTCO, FormConfigTCO); - Application.CreateForm(TFormVersion, FormVersion); Application.CreateForm(TFormSR, FormSR); Application.CreateForm(TFormAig, FormAig); Application.CreateForm(TFormConfCellTCO, FormConfCellTCO); Application.CreateForm(TFormCDF, FormCDF); Application.CreateForm(TFormPlace, FormPlace); + Application.CreateForm(TFormDebug, FormDebug); Application.Run; end. diff --git a/UnitCDF - Copie.dcu b/UnitCDF - Copie.dcu deleted file mode 100644 index 7d3d366..0000000 Binary files a/UnitCDF - Copie.dcu and /dev/null differ diff --git a/UnitCDF - Copie.dfm b/UnitCDF - Copie.dfm deleted file mode 100644 index 860606b..0000000 --- a/UnitCDF - Copie.dfm +++ /dev/null @@ -1,396 +0,0 @@ -object FormCDF: TFormCDF - Left = 368 - Top = 141 - BorderStyle = bsDialog - Caption = 'Configuration du d'#233'codeur CDF' - ClientHeight = 466 - ClientWidth = 341 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - OnActivate = FormActivate - PixelsPerInch = 96 - TextHeight = 13 - object Label20: TLabel - Left = 16 - Top = 48 - Width = 184 - Height = 26 - Caption = - 'Tables d'#39'aspects du signal en fonction du motif envoy'#233' au d'#233'code' + - 'ur CDF' - WordWrap = True - end - object Label1: TLabel - Left = 8 - Top = 176 - Width = 32 - Height = 13 - Caption = 'Label1' - end - object Label2: TLabel - Left = 8 - Top = 200 - Width = 32 - Height = 13 - Caption = 'Label2' - end - object Label3: TLabel - Left = 8 - Top = 224 - Width = 32 - Height = 13 - Caption = 'Label3' - end - object Label4: TLabel - Left = 8 - Top = 248 - Width = 32 - Height = 13 - Caption = 'Label4' - end - object Label5: TLabel - Left = 8 - Top = 272 - Width = 32 - Height = 13 - Caption = 'Label5' - end - object Label6: TLabel - Left = 8 - Top = 296 - Width = 32 - Height = 13 - Caption = 'Label6' - end - object Label7: TLabel - Left = 8 - Top = 320 - Width = 32 - Height = 13 - Caption = 'Label7' - end - object Label8: TLabel - Left = 8 - Top = 344 - Width = 32 - Height = 13 - Caption = 'Label8' - end - object Label9: TLabel - Left = 8 - Top = 368 - Width = 32 - Height = 13 - Caption = 'Label9' - end - object Label10: TLabel - Left = 8 - Top = 392 - Width = 38 - Height = 13 - Caption = 'Label10' - end - object Label11: TLabel - Left = 184 - Top = 200 - Width = 38 - Height = 13 - Caption = 'Label11' - end - object Label12: TLabel - Left = 184 - Top = 224 - Width = 38 - Height = 13 - Caption = 'Label12' - end - object Label13: TLabel - Left = 184 - Top = 248 - Width = 38 - Height = 13 - Caption = 'Label13' - end - object Label14: TLabel - Left = 184 - Top = 272 - Width = 38 - Height = 13 - Caption = 'Label14' - end - object Label15: TLabel - Left = 184 - Top = 296 - Width = 38 - Height = 13 - Caption = 'Label15' - end - object Label16: TLabel - Left = 184 - Top = 320 - Width = 38 - Height = 13 - Caption = 'Label16' - end - object Label17: TLabel - Left = 184 - Top = 344 - Width = 38 - Height = 13 - Caption = 'Label17' - end - object Label18: TLabel - Left = 184 - Top = 368 - Width = 38 - Height = 13 - Caption = 'Label18' - end - object Label19: TLabel - Left = 184 - Top = 392 - Width = 38 - Height = 13 - Caption = 'Label19' - end - object ImageDigi: TImage - Left = 240 - Top = 16 - Width = 57 - Height = 97 - end - object Shape1: TShape - Left = 168 - Top = 152 - Width = 2 - Height = 273 - end - object Label21: TLabel - Left = 120 - Top = 152 - Width = 29 - Height = 13 - Caption = 'Motif' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label22: TLabel - Left = 296 - Top = 176 - Width = 29 - Height = 13 - Caption = 'Motif' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label23: TLabel - Left = 16 - Top = 104 - Width = 205 - Height = 13 - Caption = 'Nombre d'#39'adresses occup'#233'es par le signal :' - end - object LabelTitre: TLabel - Left = 16 - Top = 8 - Width = 63 - Height = 19 - Caption = 'Adresse' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object Label24: TLabel - Left = 56 - Top = 124 - Width = 24 - Height = 13 - Caption = '1 '#224' 4' - end - object Button1: TButton - Left = 128 - Top = 432 - Width = 75 - Height = 25 - Caption = 'Ok' - TabOrder = 0 - OnClick = Button1Click - end - object Edit1: TEdit - Left = 120 - Top = 176 - Width = 25 - Height = 21 - TabOrder = 1 - OnChange = Edit1Change - end - object Edit2: TEdit - Left = 120 - Top = 200 - Width = 25 - Height = 21 - TabOrder = 2 - OnChange = Edit2Change - end - object Edit3: TEdit - Left = 120 - Top = 224 - Width = 25 - Height = 21 - TabOrder = 3 - OnChange = Edit3Change - end - object Edit4: TEdit - Left = 120 - Top = 248 - Width = 25 - Height = 21 - TabOrder = 4 - OnChange = Edit4Change - end - object Edit5: TEdit - Left = 120 - Top = 272 - Width = 25 - Height = 21 - TabOrder = 5 - OnChange = Edit5Change - end - object Edit6: TEdit - Left = 120 - Top = 296 - Width = 25 - Height = 21 - TabOrder = 6 - OnChange = Edit6Change - end - object Edit7: TEdit - Left = 120 - Top = 320 - Width = 25 - Height = 21 - TabOrder = 7 - OnChange = Edit7Change - end - object Edit8: TEdit - Left = 120 - Top = 344 - Width = 25 - Height = 21 - TabOrder = 8 - OnChange = Edit8Change - end - object Edit9: TEdit - Left = 120 - Top = 368 - Width = 25 - Height = 21 - TabOrder = 9 - OnChange = Edit9Change - end - object Edit10: TEdit - Left = 120 - Top = 392 - Width = 25 - Height = 21 - TabOrder = 10 - OnChange = Edit10Change - end - object Edit11: TEdit - Left = 296 - Top = 200 - Width = 25 - Height = 21 - TabOrder = 11 - OnChange = Edit11Change - end - object Edit12: TEdit - Left = 296 - Top = 224 - Width = 25 - Height = 21 - TabOrder = 12 - OnChange = Edit12Change - end - object Edit13: TEdit - Left = 296 - Top = 248 - Width = 25 - Height = 21 - TabOrder = 13 - OnChange = Edit13Change - end - object Edit14: TEdit - Left = 296 - Top = 272 - Width = 25 - Height = 21 - TabOrder = 14 - OnChange = Edit14Change - end - object Edit15: TEdit - Left = 296 - Top = 296 - Width = 25 - Height = 21 - TabOrder = 15 - OnChange = Edit15Change - end - object Edit16: TEdit - Left = 296 - Top = 320 - Width = 25 - Height = 21 - TabOrder = 16 - OnChange = Edit16Change - end - object Edit17: TEdit - Left = 296 - Top = 344 - Width = 25 - Height = 21 - TabOrder = 17 - OnChange = Edit17Change - end - object Edit18: TEdit - Left = 296 - Top = 368 - Width = 25 - Height = 21 - TabOrder = 18 - OnChange = Edit18Change - end - object Edit19: TEdit - Left = 296 - Top = 392 - Width = 25 - Height = 21 - TabOrder = 19 - OnChange = Edit19Change - end - object EditNAdresses: TEdit - Left = 16 - Top = 120 - Width = 25 - Height = 21 - TabOrder = 20 - Text = '1' - OnChange = EditNAdressesChange - end -end diff --git a/UnitCDF - Copie.pas b/UnitCDF - Copie.pas deleted file mode 100644 index 65feb15..0000000 --- a/UnitCDF - Copie.pas +++ /dev/null @@ -1,383 +0,0 @@ -unit UnitCDF; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, ExtCtrls , unitconfig, UnitPrinc; - -type - TFormCDF = class(TForm) - Button1: TButton; - Label20: TLabel; - Label1: TLabel; - Label2: TLabel; - Label3: TLabel; - Label4: TLabel; - Label5: TLabel; - Label6: TLabel; - Label7: TLabel; - Label8: TLabel; - Label9: TLabel; - Label10: TLabel; - Label11: TLabel; - Label12: TLabel; - Label13: TLabel; - Label14: TLabel; - Label15: TLabel; - Label16: TLabel; - Label17: TLabel; - Label18: TLabel; - Label19: TLabel; - ImageDigi: TImage; - Shape1: TShape; - Label21: TLabel; - Label22: TLabel; - Edit1: TEdit; - Edit2: TEdit; - Edit3: TEdit; - Edit4: TEdit; - Edit5: TEdit; - Edit6: TEdit; - Edit7: TEdit; - Edit8: TEdit; - Edit9: TEdit; - Edit10: TEdit; - Edit11: TEdit; - Edit12: TEdit; - Edit13: TEdit; - Edit14: TEdit; - Edit15: TEdit; - Edit16: TEdit; - Edit17: TEdit; - Edit18: TEdit; - Edit19: TEdit; - Label23: TLabel; - EditNAdresses: TEdit; - LabelTitre: TLabel; - Label24: TLabel; - procedure Button1Click(Sender: TObject); - procedure FormActivate(Sender: TObject); - procedure Edit1Change(Sender: TObject); - procedure Edit2Change(Sender: TObject); - procedure Edit3Change(Sender: TObject); - procedure Edit4Change(Sender: TObject); - procedure Edit5Change(Sender: TObject); - procedure Edit6Change(Sender: TObject); - procedure Edit7Change(Sender: TObject); - procedure Edit8Change(Sender: TObject); - procedure Edit9Change(Sender: TObject); - procedure Edit10Change(Sender: TObject); - procedure Edit11Change(Sender: TObject); - procedure Edit12Change(Sender: TObject); - procedure Edit13Change(Sender: TObject); - procedure Edit14Change(Sender: TObject); - procedure Edit15Change(Sender: TObject); - procedure Edit16Change(Sender: TObject); - procedure Edit18Change(Sender: TObject); - procedure Edit19Change(Sender: TObject); - procedure Edit17Change(Sender: TObject); - procedure EditNAdressesChange(Sender: TObject); - private - { Déclarations privées } - public - { Déclarations publiques } - end; - -var - FormCDF: TFormCDF; - Adresse,Index : integer; - -implementation - -{$R *.dfm} - -procedure TFormCDF.Button1Click(Sender: TObject); -begin - close; -end; - -procedure TFormCDF.FormActivate(Sender: TObject); -var erreur : integer; -begin - Val(FormConfig.EditAdrSig.text,Adresse,erreur); - index:=index_feu(Adresse); - LabelTitre.caption:='Adresse du signal: '+intToSTR(adresse); - erreur:=feux[index].decodeur; - if erreur=5 then - begin - caption:='Configuration du décodeur Digikeijs'; - label20.caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur Digikeijs'; - label24.Caption:='1 à 5'; - end; - if erreur=2 then - begin - caption:='Configuration du décodeur CDF'; - label20.Caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur CDF'; - label24.Caption:='1 à 4'; - end; - - Label1.caption:=etats[1]; - Label2.caption:=etats[2]; - Label3.caption:=etats[3]; - Label4.caption:=etats[4]; - Label5.caption:=etats[5]; - Label6.caption:=etats[6]; - Label7.caption:=etats[7]; - Label8.caption:=etats[8]; - Label9.caption:=etats[9]; - Label10.caption:=etats[10]; - Label11.caption:=etats[11]; - Label12.caption:=etats[12]; - Label13.caption:=etats[13]; - Label14.caption:=etats[14]; - Label15.caption:=etats[15]; - Label16.caption:=etats[16]; - Label17.caption:=etats[17]; - Label18.caption:=etats[18]; - Label19.caption:=etats[19]; - - ImageDigi.Picture:=FormConfig.ImageSignal.Picture; - with ImageDigi.Picture do - begin - Bitmap.TransparentMode:=tmAuto; - Bitmap.TransparentColor:=clblue; - end; - ImageDigi.Transparent:=true; - - Edit1.Text:=intToSTR(Feux[index].SR[1].sortie1); // carré - Edit2.Text:=intToSTR(Feux[index].SR[2].sortie1); // sémaphore - Edit3.Text:=intToSTR(Feux[index].SR[3].sortie1); // sémaphore cli - Edit4.Text:=intToSTR(Feux[index].SR[4].sortie1); - Edit5.Text:=intToSTR(Feux[index].SR[5].sortie1); - Edit6.Text:=intToSTR(Feux[index].SR[6].sortie1); - Edit7.Text:=intToSTR(Feux[index].SR[7].sortie1); - Edit8.Text:=intToSTR(Feux[index].SR[8].sortie1); - Edit9.Text:=intToSTR(Feux[index].SR[9].sortie1); - Edit10.Text:=intToSTR(Feux[index].SR[10].sortie1); - Edit11.Text:=intToSTR(Feux[index].SR[11].sortie1); - Edit12.Text:=intToSTR(Feux[index].SR[12].sortie1); - Edit13.Text:=intToSTR(Feux[index].SR[13].sortie1); - Edit14.Text:=intToSTR(Feux[index].SR[14].sortie1); - Edit15.Text:=intToSTR(Feux[index].SR[15].sortie1); - Edit16.Text:=intToSTR(Feux[index].SR[16].sortie1); - Edit17.Text:=intToSTR(Feux[index].SR[17].sortie1); - Edit18.Text:=intToSTR(Feux[index].SR[18].sortie1); - Edit19.Text:=intToSTR(Feux[index].SR[19].sortie1); - - editNadresses.text:=intToSTR(feux[index].NA); -end; - -procedure Maj_DB; -var s : string; -begin - s:=encode_sig_feux(index); - formconfig.RichSig.Lines[index-1]:=s; - aff_champs_sig_feux(index); -end; - -procedure TFormCDF.Edit1Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit1.Text,Feux[index].SR[1].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit2Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit2.Text,Feux[index].SR[2].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit3Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit3.Text,Feux[index].SR[3].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit4Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit4.Text,Feux[index].SR[4].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit5Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit5.Text,Feux[index].SR[5].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit6Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit6.Text,Feux[index].SR[6].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit7Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit7.Text,Feux[index].SR[7].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit8Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit8.Text,Feux[index].SR[8].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit9Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit9.Text,Feux[index].SR[9].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit10Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit10.Text,Feux[index].SR[10].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit11Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit11.Text,Feux[index].SR[11].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit12Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit12.Text,Feux[index].SR[12].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit13Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit13.Text,Feux[index].SR[13].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit14Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit14.Text,Feux[index].SR[14].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit15Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit15.Text,Feux[index].SR[15].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit16Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit16.Text,Feux[index].SR[16].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit17Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit17.Text,Feux[index].SR[17].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit18Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit18.Text,Feux[index].SR[18].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.Edit19Change(Sender: TObject); -var erreur : integer; -begin - if index<>0 then - begin - val(Edit19.Text,Feux[index].SR[19].sortie1,erreur); - Maj_DB; - end; -end; - -procedure TFormCDF.EditNAdressesChange(Sender: TObject); -var erreur,i : integer; -begin - if index<>0 then - begin - val(EditNAdresses.Text,i,erreur); - if (i>0) and (i<6) then - begin - Feux[index].Na:=i; - Maj_DB; - end; - end; -end; - -end. diff --git a/UnitCDF.dcu b/UnitCDF.dcu index c2e4a03..15e6f68 100644 Binary files a/UnitCDF.dcu and b/UnitCDF.dcu differ diff --git a/UnitCDF.pas b/UnitCDF.pas index e530d27..65feb15 100644 --- a/UnitCDF.pas +++ b/UnitCDF.pas @@ -103,6 +103,19 @@ begin Val(FormConfig.EditAdrSig.text,Adresse,erreur); index:=index_feu(Adresse); LabelTitre.caption:='Adresse du signal: '+intToSTR(adresse); + erreur:=feux[index].decodeur; + if erreur=5 then + begin + caption:='Configuration du décodeur Digikeijs'; + label20.caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur Digikeijs'; + label24.Caption:='1 à 5'; + end; + if erreur=2 then + begin + caption:='Configuration du décodeur CDF'; + label20.Caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur CDF'; + label24.Caption:='1 à 4'; + end; Label1.caption:=etats[1]; Label2.caption:=etats[2]; @@ -359,7 +372,7 @@ begin if index<>0 then begin val(EditNAdresses.Text,i,erreur); - if (i>0) and (i<5) then + if (i>0) and (i<6) then begin Feux[index].Na:=i; Maj_DB; diff --git a/UnitConfig - Copie.dcu b/UnitConfig - Copie.dcu deleted file mode 100644 index 98755f7..0000000 Binary files a/UnitConfig - Copie.dcu and /dev/null differ diff --git a/UnitConfig - Copie.dfm b/UnitConfig - Copie.dfm deleted file mode 100644 index 93e09e7..0000000 --- a/UnitConfig - Copie.dfm +++ /dev/null @@ -1,4548 +0,0 @@ -object FormConfig: TFormConfig - Left = 253 - Top = 95 - Hint = 'Modifie la configuration selon les s'#233'lections choisies' - BorderStyle = bsDialog - Caption = 'Configuration g'#233'n'#233'rale' - ClientHeight = 552 - ClientWidth = 901 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - OldCreateOrder = False - Position = poScreenCenter - OnActivate = FormActivate - OnClose = FormClose - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object LabelInfo: TLabel - Left = 649 - Top = 416 - Width = 29 - Height = 16 - Caption = '- -' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -13 - Font.Name = 'Arial Narrow' - Font.Style = [] - ParentFont = False - end - object Image1: TImage - Left = 648 - Top = 128 - Width = 249 - Height = 177 - Picture.Data = { - 0A544A504547496D6167659A700000FFD8FFE000104A46494600010101006000 - 600000FFFE003C43524541544F523A2067642D6A7065672076312E3020287573 - 696E6720494A47204A50454720763632292C207175616C697479203D2039300A - 00FFDB0043000201010201010202020202020202030503030303030604040305 - 070607070706070708090B0908080A0807070A0D0A0A0B0C0C0C0C07090E0F0D - 0C0E0B0C0C0CFFDB004301020202030303060303060C0807080C0C0C0C0C0C0C - 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C - 0C0C0C0C0C0C0C0C0C0C0CFFC000110800B400FA03012200021101031101FFC4 - 001F0000010501010101010100000000000000000102030405060708090A0BFF - C400B5100002010303020403050504040000017D010203000411051221314106 - 13516107227114328191A1082342B1C11552D1F02433627282090A161718191A - 25262728292A3435363738393A434445464748494A535455565758595A636465 - 666768696A737475767778797A838485868788898A92939495969798999AA2A3 - A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8 - D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F010003010101 - 0101010101010000000000000102030405060708090A0BFFC400B51100020102 - 0404030407050404000102770001020311040521310612415107617113223281 - 08144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A - 35363738393A434445464748494A535455565758595A636465666768696A7374 - 75767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9 - AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5 - E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00F6609F28 - 14A1702A5F2B28BED4F58706BF63B9F94B5A9E05FB54FEDF7E0CFD98BC6B63E1 - 5D622D56F356D434D9B56B85B24461A7DA44923EF7DC46E67F29D5507271938E - 33E7BFB497C61F09C3F0847C4EF03F86AE3E2678DEE6C65D33C3D0DA1926D2F4 - 684ED93FB52EE25FF5F2832324300FDDFCB2198905623EA3FB697EC79E09FDA2 - 7C09A96A1ACE9E2DFC4D6DA5CB6163ADDB3797776D1C990518F2B247F3B7CAE0 - E3736D2A4935F8E3F013C57E3CF837F1635883C27ACF972785C5E6A1A858CB79 - E4DAEA70596E7B85D84ED6631A3B0C7CE003B482057C1711D4C43AEE936B95D9 - AB7657DFE6D9F6590D1C3BA3ED127CCB7BF99F437C17FF0082BD7C44F06F8266 - F86FE3EF1778FF004DF0A8998ABF86EE868D7FA797FBE92A42B1F9F177DAE095 - E42F0401DA4FFB2FDAF8EBE1E4FF00103C1BF10AC7C51A248CCE26BB8A64BC69 - 3201472371F303100EE0A4672428E6BC6BFE0A85AA5BFC69BFF04FC44F0FC135 - F689AA68496F73A8C71EF4826F3246486775E1660AC46D639F94E381537EC7FF - 00B74F84FF00668F1AEBDA6C3A0F896E3E1AF89ADED659AC0DCC7717BA65F7D9 - E34BA963DC5564467F300048628B0E4E4115F331E6E5E687DC7D24A2AF662F88 - BE227F6AE856275286EF546BC9E78A6BA689609E154588A793759632C87CC3B9 - 268D95004C64B9D9EFDFF04B6D357C1DFB7EFC19D58EA9E5E91797CF2DF26A68 - 2CE6974A786E60BC7EA639A23109D18AB64EC73B140207CDD71A9FF6824DA3D8 - FF00A6697717C6E2CA378375CAB728AC801CA332150CA321B626725148FA013C - 0F7BFF0004C9FD9ABC51F10BC6D6EDA0FC5BF8A3A1DCF873C05E19B91E5EA5A5 - E9F7B1182FF5CBA8BEF401AD8CB6D6EAFB59CCF2C980A8A5AA6ECB953D5F4335 - 1EC6C7FC12EBF6B3B8D13F693B4F006A9E75AAEBD149A74B6F701A3922B98636 - 9226656E4310AE9EFBFE95FA49E2ADCBE16D47692185B4841F43B4F3D0D7E23F - FC13A7C61E24F18FED8DF0C7C3FF006A5D4157584FB34F771F9D73A5C71A3C8E - F04D912C615118EC0E10E39535FACDE22F89FA9784EE6E74DFF849341F11DA49 - 1496EC5889AEADEE3692B1B3DB01E57CA19B12C440087337391F5996660E1809 - C2AAF77549FAADBBEFF99F3399E0D3C6C2517AE8DFC99E8BA1E8B6FA6D905B78 - 63B78E43E6948D022EF6E59B03B92724F52493EF56DADBE9D6B17C19E2AB8D67 - C27A7DF4D64DB6E23E44254952095276EE231C646189C11C03915B9697B0EA24 - 88A45665E590F0EBF553C8FC457A94AA45C138F63CF9D36A4FD4F37F87E638BE - 31F8D34DB8B3B75BA98C774B24518DB35B12C17CC381962E5F8F9BA3735E9DE1 - C81603711C6D36D42AC11DB72C590785E720719C741DAA8E95079D25D961CC77 - 5228E31C616B53C3B1EEBDBE3C9C141FA1AD32B4E3CBAF57F8DD91983E64DF92 - FC2C5EF2F9EF404C03EFC558F230697C9C8FEA2BDE3C6E52B797C534C78FFF00 - 555AF2B07F0E2B90F8C9737F67A05AAE9BA9DC68D70D74AFF69816195880AC3C - B314AAC24466652DB7691B47CEB9ACEA54508F33F2FC5D8BA74DC9D933C3BC76 - DE6FECEFF142D556391ED5FC4A634650EB9FB55EB2F07BE477FEA2BC7F4BFF00 - 82617C21F8CBF0F3C35E205B5D63C337FA96916B7772DA45E848E777854B3797 - 2ABAAEE249C2803AF15D27C6FF001B7C44F86FA2F8A2E2EBC25A7F8CBC37AC41 - 746E27F0F492457D652CE192590DAC9B8B445DF790ACE532F9936E02C7FB03FC - 704F8CDF0134CB792EB4B3AD787E03A64D6369725AE043022A24CD1B7CCBB942 - F2328B9EB9381F332A387AF5FD9555ADB66BB76FBFA1EFC2B57A541D5A6F4BF4 - 7DFBFDDD4F25F8F1FF000490F877F0F7E16EA9E22F0DEB9E20B6D63C376771A9 - 192E5E29D6F446858465511020246370CF539071C78F7ECDFF0003BC53FB407C - 27F889E19B8F121F0FF817C23A55D78A7FB36D74E8B6EB1790A79896C5C2AE23 - 53E5BBA316C130B0439C8FBE7E38DA7DAFE05F8D23E0EFD12EF1E9CC0E33FD05 - 7C97FB05EB9A6E907C5174DAE87B7F195BEB9E1AFECCDE0F9139D32DA4B798A7 - DE51232CF0E4F0CFE50193D38F1597E1E9E22114AD16B5D5AFBF53B30B8EAF53 - 0F3937769AB5F5F53BBF8F9A541FB387C18F84FE27FED9F1A78AA1F146991CDA - B5A6B3AEDDDD5ACF18B384A20B78D910450ACF2C81140CF96A18902BE77F087E - D61E28F09DEF899B42F0ADBE8F3788A1B6F3ADAC50C3268F1C324D2AF92AE8DF - BB91EE1988704EC2AAACA3691F497ED95E30B8F09FEC25FB38788AD5566963D3 - ED2D1D18FCB2C771A3F952A13FED47BD73DB39AE13C63FB5EF807E25FC31F116 - A76B6B30F1B6ADE2F9AF21B496DCB470599B0B7B2F25E6040283C913284DD878 - A3240C607899D51B627DD5BA8FE48F5B29ACDD0F79ECDFE67BC7ECB7A96A167E - 17B3BDD72E56DECADF556934D9AE36431AE96CEAF6CDBB81B446D8DC793B393C - 57D6F0F85AF2F7E1CC3E38F11789BC2BF087E1ADD00D67E29F179612EB208DCA - DA7E9E1925B8565E55D99038219164539AFC06F8A5F18BC41E2C9AD2CF53BEB8 - B8B6D2605B2B4B790FEEED228FE5540BD323B9EA7D7A0AD8F875FB48CD7CF61A - 1F8DB57D5EFB43B38BECBA6CF3DC4971FD840B16DB12B121606624B228C67E60 - 01CE63079957A149D1A2F96EF7EBA7636C465B4AB4D54AAAF6E9D0FD9ABBFDA3 - FF0065196FBEC775FB4C7C609AEF38FB7D878420B7D3D4E472226B36936E403C - 927DEBACD77E0E78913E193FC48F863E3AF0E7ED19F0E347266D41F45B6165E2 - 3D26318662F6AA4ACA555492B88E5C6488C819AFCA73FB3EF89B50D21753D22D - A1D7B49954490DE58CE8EB2A9E410370393EC0E7B135D7FEC49FB66F8CBF605F - DA174DF18787A7BC85ACE658759D25DDA38B56B50DFBCB7953D7192AC7947018 - 74C542C66214B9A35257D1BBB6EF6DAE9972C1D06B97917DD6DF73F45FE1F7C4 - AD0FE2B787E3D4B41D421BEB57018EDE248F23A32F507F4EB5E67F1CB48D79BC - 510F88B446934E9A2B98EDF56892EDFF00D32D536C48E91056577550088C8058 - 9EAA496307EDF363A4FEC9DFB6668BE36F87BB21F87BF1A342B6F1CE8F6F18F2 - EDD7ED3F35CDB851C2AB1DB2851C279E00C6D18EDAE35A87C43A03EA969E635A - DE2FDAA167653B94A8618DBD00CF43C8C1F515F472CC219961796AAB496F6FC1 - AFB8F06182960311CF4DFBAFFA68E7343F1ED8E97A65BE9BE20B4BBF0D6A51C1 - 1C5FE913B5C5BCDB50007CEE32C4F04B60163C126A8DEDC789A1BD9921965112 - BB2A0F291B0A0F1C9193F535D76B7A0D9F8A34AB9B4BEB58AF2D26DC1A390707 - 390483D4120E323079C7B578FDDFEC5FA7BDD48D6FE34F1FD9DBB3931411EAC7 - 640B9E107CBD00E07D2BA70B56BAA514D732B269DECFE7D0CB134E9BA8DA6E2E - FDAFFA9F52227C8B9A72A61454823CA85FE21D29CAB8FAFD2BE9E4F53E5CC1F8 - 81A3C7E20F09DCE9F33C91C37E8D6F23C67E655656048F719C8F7AFCAAFF0082 - 88FEC0FA5DCFC65B1D53E145BE9DA5EA9A96971DC78A3C2736AA9672E91A90DD - 15C4F686EE506E2C2E8A1B88DD1DBCB170D130528547EB1F8A5CA410A7FCF473 - 91EC0579CFC41F855E18F8C3349A6F8ABC3FA3F88AC63B48C245A85A24E2262F - 2E4A161946F7520FBD7CC66D83589A8ADA493B7FE4B7FD0FA0CAB18F0F06FA35 - 7FC6C7E567817FE09C777E13F85DAC788BC75F103C23E09B5BA86286C2CE2F37 - 56B9D5F3201298DA01F65C44A392F3819600726B6FE09FC35FD9C3C3FACDADA6 - A7378BBE236A91DD19534B544B48F5011A6F653E4C8BB632AAC38BBC8E4E3A57 - D41F1ABFE08E1E11F881AF2EA9E15F12EB1E1692344B76B2BA53A9593458D823 - 5DCCB246A14003E66C76C62BC0BE0CFF00C12DFF00E321345F07F8824D37C557 - 4CB7D757B6926AB3E996F0AC0AA12390C76EF2E779F315918092329FEAF764FC - B4B2EC4297235BBB5FFE1BFC8FA48E61425073E6D95EDFD7F99E8FE3BFF82E20 - F865E1EBDF0FFC15F86361FB3F6A8AA161BDD134DD364B864383FBC965B76BCC - 95E43ADDF707E615F17FC43B6F899FB40FC478F5EF157FC24DE2EF1178B2E088 - AFEEE299EE7509490001BC65C92CA06D279603B8AF7EFDAABC3967FB2C7ED9F0 - 69AFA0F84593C3B6E6EA5BBD2B44F32669AE22FB5A3C82EA5904CD1B3A22C929 - 24AA31237649FAFBF66CD17C59FB516A5E07D534ED33C53AFDF683E2BB6D4D2C - 2C239EEA33A6ED475956D631E5C691A4AA9B82800C4C3764E2B86541D1ADEC1D - 92BD9BEDDFEE3AA35F9E97B68ABE97472FFF0004DCFF0082482FC14BC97C5DF1 - 5B4FD2F52D7AFE036D61A1BEDBA874C46C179663CA34CC06D0AB95552F924B61 - 7ECDD7BC37A7F85345BAB4D2EC6CF4BB34D1AF02C16702C11A0C274550056DFC - 59BED4BE0CC7A7CDE29F0AF8C3414B8B958A06BFD29EDE2B966046C499F10B3E - 327CBF3048403B558E14E1EA9E33D17C6B1EA16B637BE65E43A55D8B8B3914DA - 5F40ACABCB45326F407B3346573EBD2BED68C7094E84E961E49EAACEE9B774BA - FDFA23E46ACF1352B46AD74D68FC96EFFE00FB3F0FDBDDDA43710BCB6B712448 - 4CF030567E060BAE0A3F1FDE071DB1D6926B6B98B6FDB2DE3BE8D7959EDD3122 - 7FC0324FE28C49CFDD159BE03D4B5BD3BC19A4B6AB602F646B64334967283342 - 48CED28C1436DCED055B242E719AE8B4EF10D8EB32F976F708D70ADB5A09018A - 607D363004E3D46455C250714BE17D9FF567F22674E49B6B55E5FD5FEF393F87 - 3E256F15C5AF4DA3EA36B7D058EB1359B452AB66268D630D1B37DF570DBB3BC3 - 11D31C1AEE3C10D25CC9A97996EF6B22C88BB5983071B01CA90795E71C80783C - 573FE1FF000B5A5CDE6B6CD03413FF006948C25899A2990B244C70E30D863C91 - 9C1F4C715D078623D4B4DB9D40AAC7A9C2B2A0209586E40F2C1F411B1E7A1F2F - EA6B6CBE4D38C9EDAEDF3E9BFDD733C76D25E9FA1D01872D9A0C3934DD3F57B5 - D4EE1A18D9A3B955DCD6F3218E651EBB5B048FF68657D09AB861E3A7E95F4119 - A6AF1678CE2D6E5336F5CEFC4CF05DE78CBC2F35AE9D796BA76A05488A79ED7E - D11AE4824150C8C036304AB0383DC818EB7C8C1A468703A1A9A91538F2CB61C6 - 6E2EE8F977C67AA78BBE11C6F75E25F06EA13D8C243B6ADE1B2753B6840FE278 - B6ACF1803D51946492DC64F88E85FB35781FE31CF6BA87847C651FF6569B79F6 - 9B64D3ADE15D474B2771F2D6E0E2E238C336424808C9E3B1AFD1044F2A4565E0 - A11CF4AF907E247EC97E15D7755F3A3B7D43C3FE20D3CB1875CD267363A88E48 - 2CEEB9127FB4640F9E80815E3E330FEF462FDE5ABD747A5B66ADE5A7E27A984A - C92725EEBD36D575E8FF0047D5E8799F8FBC6FF10BC1FAC78B3C1B1DB43F1134 - 98F407BA96E6E268EC357B58655923DC3AC771E5E0EE040761CA91F747CEFF00 - F04EFF0087FA07ED33ACF8B3C1DA969661D5EC0DEEBB6DAEDA5DB477D69B2DD2 - 3840451F3471CF1C6D96623748A300B06AEE3E25786BE2DFC32FDA75AF2EAEF5 - 2F8896ABE1BBDF3D34A68AC6EAFF004E1BE34F3E0385774964495963DC4A8EBF - 7B15FF00E09EFF0006BC7B69E0BF106A1E07F0C4DE20F12EA73DC456F6D1697A - 81D4EC1D62222B8865B5864DD1B348434330113F94BBB2335F3F88AF0F6D1F6F - 7514DDD4BB69B3FC376CF730F49FB17ECAD7925671EFE6BFE024745FB5F6B967 - E34FF82507C0BD42D248E54B1D4F4FD3E6D9C7952C76B730C88476C3478FA60F - 422BE39F855E1D5D4E3BC9DB6EE9AF6708A3B0F3769FE607E35FA45E17FF0082 - 2BFED3DF153E04E9BE11D53C2DA1F83FC176F716BAACCDAE5CC5A7C715DC1018 - 04CC0CBE7AE63C6FC200CCA0ED073BA2F0FF00FC122FE0BFECF0D19F895FB5A7 - C2DD125B47324BA678514EBD2839C9F9630B206CFF007C3F3D8D7978CC7D3AB3 - 528DDFBA96DA5D2B1E96130B3A51717D5B7F267867FC17FF00F663F047ECC5F1 - 4BE1AF85FC27A2E9FA2EB5E1DF87BA3A78AAE2D90A9D67529BCD792790671E66 - 029DC06487C1276AE3F34FC4578F35C470C7F2B49D48F4AFD1AFF83817F6A2F0 - 87ED73FB5F6A5E2EF00DF5E6ADE1B934ED36C85DCF6725A996482DDA373B2401 - 82EEC60B019AFCEF9BC6574DE18BAD0F6C0D6726A316A0ACC999239238E48885 - 6ECAE241B87731A7A73E6C60BD0F4B999F577FC12ABE385EFC35F892BE11BEB9 - B893C37E260D6D0073BA2B4BA6FBA39E02CBCA91D37943EB5E9DFB637C3EBFF0 - 27C55B36D4354D435ABBBED320336A57F299AE6FDE35F2BCC91CF2CCC8B193F5 - C57C1BA378F2F3C3FA7BC76BFBAB8C868A70C43DBB0390C873F7811907B1AFB1 - 75FF00DB7D7F6C9F865E1F875AF0F9D2FC6BE177686F6FED48FB0EA904883E70 - A4EF8E5DF1825794E490470A08C5A95C6ECD1F66FF00C144249356FF00825DFE - C4DAE6E669E1D035AD34C87A858A7B7445FC0262B4BF625F10B78C7F65EB3691 - B75C5BCF756CFF0079881BB2B9C8F4230013DBA722A87ED98A353FF82237EC8F - 75F785AEA7E22B2CFB1BB90FFEC959BFF04F5D7E3D2BF67D5B7B9323473EBAF6 - 90E264608D228FE0C8645E0E49CE7271DC57A5954946AFBDE7F91E766316E969 - DD1EFF00A49FB5D942DCE2401BEB9E7FCFE353344DB8E3CCC678C74AAFE1619D - 16DFEEE7CA4CE06D19DAB9FF003F4AB8E30C7EE75EEF83F88AFA5C0BFDCC7D11 - E2627F8B2F565A6D7FC59E1A9F17DA2DAEB1663FE5E74F9FF7B1A8EED195DCEC - 7FBB1A607A9AD2D1BE24E91AA6E59266D3E68F1E6C578BE51873D03364A06FF6 - 4B6E1DC03C574623C81506A3A1DAEB2ABF6AB7867F2FEE33AE5A33EAADD54FB8 - 20D7BB2A3561FC39DFCA5AFE3BFE67CEFB483F8A3F77F96C721E36F1D69F6FA9 - 450CD24D1C36FE62BCE6DD9E3CFCBC295C9EA083C7627903359DE19D66D3C43A - AEA5716338BAB78C44AB2A2B796CB83C86230C0B6EE5491C1A8FC5BF03E6B28D - A4D22EF51B7B7F3CCFE5C32B3143B8B1F9460B939C6496C8E0A919CF9ADAF8B7 - 45D1BC6775711DE69363AB5C2F98D73672C50DC4990546F0C0B4921238002A1C - 119E08AF9AC463AAD3C45AB46DADFD74B68D2FD3D4F76861613A17A6EFA5BD35 - BEABFE0AF99ECC8BBA1B8F518C7D42822BE7FF008D571A87C3CFDB7FE1C78934 - 6BCD2B4E97C4D1DFF87EE5F50B27B9B6674B58E685E5F2E44745DA64432296D8 - 36B32B2AFCBDDFC35F891AA1F05E91797DAA697AACD756705C5C99D45BEF91E2 - 563E5CD1028DBB04AAEC66231CF7AB17DFB277C52F8C7E28F08F89B5DF86DABE - 8BA4F85B5CBBBC6935E6B6D1ED6EEC2748ADC82D79346AE1ECDAE2320E0166CE - 00C1A55B30A16837249DEFF8A7D3C8AA385A8E535157D2DF83FD4FCE9FF82AE7 - 8FBC75E15FDB33C4D21B68740BE934CB18F526D1EEDAEE3319B458F1E73451B8 - 89D33B91940CB10770009EF7E057FC147AFBE3C7ECEFE17F82B1F8AA1F85F75A - 4AB43F61D3E1FB0E99E30B8762566B9922C3BCE72AA11CB20DA0469D87D37E3C - F861A7FC0397E3E7C4EF1A7C50F84FAAF88BC41F0875BF05F87F41D17C49FDBD - AC5D5C4D63F64B67945BC4F179CD016591BCDC17909030723F15AD3ECB05B4D3 - 3497906AD63750B5B04E136FEF3CC278C89158445791C6FEE057CCE32A46AD79 - D485ED776763E9307074E846125AA48FD6AFD9DFE36F8D7F621F8ADA7683E32B - A8FC49F0BFC6B20D3FC51E1B7D43ED5A76AD61215599FCACEE8678C3EF8A5011 - C3A603101C57B7FC31D52E3E14FED5BE3EF833AB6A126AADE099359D2747BBBA - C35C3411B703BE0491469215FBA190FAD7C61A7FED3FE1BFDABBC01E0CF26E48 - F1969B770C5AC58496CD1B3EF015A646C6C68DA45CE03646EC1515F4AFC4EBA9 - 752FF82FAFC4C64DDB1358D7D5C2F4F92C6E5727F103B8ABCB6A4E35E37EAD5F - CF52730A717465E8FF0023EB1F0943E778634D931F33DA44C7F1406ADEA7E1DB - 3D62D7CABBB786EA31C2AC89BB67D0F51F85677C3BD4E6BCF0769AE1AD6F952D - 61490DB931B23F9484AE18907191CEE1F4CD6F5BDE43733F97B8C72B748DD4A3 - 1FA03D7F0C8AFB184E2E093DBCCF939464A4DA389F0F786F5ED33C43AFC90EA5 - 6ED6FF006958AD2DEE6269A3F29628F8660E195B2CC370FE100107031DB7804D - C5D595E3DE5B456975F69DAF14571E7C6308982AFB5490410795041C8E7A9A1A - 1E5351D755BA2DF8DA3D8C109FE64D6F7844F9ADA87B5C2FFE8A4ABCAE9C60E3 - 6DB5D3A75FEB433CC2A39295FCBF42D6A1A45BEAD0F977104770AA772875CED6 - F553D8FB8E6AA7F65DFE98736773F6A8874B7BD624FE13005FFEFB0E4FA8EB5B - 4211FF00D6A511F3E95EECA317AF5EE7931BA31A2D7E012AC3751CBA7DC390AA - 97185590F6092025189F40777A815A0D0E3A8C7D7B54F359A5C44D1C8AB24720 - C3A30CAB0F423A1ACEFF00846DF4D19D36E1AD57B4120335BE3D02E4141E8119 - 40F43D2A79A715AEBF9FF97E41CA9EDA13345B7EBDB15E27F109ADF469AFEF2E - 2486DED6D5E632CB83B2345624B1EF85C1E31C9E9D2BD91B5B6D387FC4CAD5AC - F1F7A743E75B7E2E00280772EAA07A9EB5C8787B5AD0FC33F113C51E39F10C29 - A97857E0D68F3F8F2F6D9986CD4AF232134AB52791896E49743D336A99C8635E - 56698C8D18AABD55F4F376B1E9E5B85759BA5DEDFA9E55F1C75FF863FB09C5A5 - 78ABE2E785D3C79F18356D303E81F0E669CC367A0D8C8C1D6E35B619DF248CAA - E2D082A36852A48F353E73F8ABFF0005D2FDA27C7B64D61A678D2DFC07A228DB - 6FA5784F4D834BB7B44EC91BAAB4E001FF004D6BE6DF8A1E3BF167ED15F103C5 - FE3CD7A6BCD6F5ABF965D6F5CBEC164803380CE7B244995451F75542A8C002BC - 4EF3C75ACDF4866D3F4B87EC39CA1BB98C734CBEA17F873DB7738F4AF83A9375 - 26EA54D5BEA7DCD1A51A7054E1B23D63E297ED01E2FF008BF78F71E2CF157893 - C51331CEFD5F539EF981F6F359B15C4CDADED1D781E95912EB71DE6976B711C9 - F3DC2132C2410F6AE1994C6D918246DCE46410473DAB32EB58C1EBC52B1A16BC - 47AE2C42691B695442C41E84019AF15B3F0C2CB62970C1A38DB2598AFCB90718 - 1EBDB8F7AEEBC69ACE34AB9F9BEFA6CEBEBC7F5AE6E1D566B8F09DADAB4D33DB - DACEDE5C4CC4A445B2720741939CE3AF14D225C8A71786F2A1820618CE09F98F - F9FAD7B2FC1AD00695E0A86E86337B712AF078C22C78FD59ABCB6C67690AA80C - CCC76AA8E49F6AFA1F4DD174DD13E1B78420D3EF9F50125B4B35C486DDA1D933 - 49FBC8C0639608C0AEEE036DC8029C9590A326D9F787ED1B746FFF00E080FF00 - B38C91A34D35BF8FF58D3D114649324B78C140F7C0AE07F663F105C7C39FD9FA - 7BB96CC2CDA4F8A374D1C9959C32C1BC031E012A32D904E4EEE31B70C7ED11E2 - D96FFF00E080DF09EC6DA465B8D2BE2CDFAEE46C3266DAE64C823A1F987D0D79 - 37ECF1F1EB5AD53F6789B47D726BAD5F6EB36BA7D9DF4E91C50C710B49CAC265 - 003BC8A2263B79243027A739C25C916FD4551733B79A3EDBFD9DFE2C45F15FC3 - 12DC2C7676CD6EE1638A09A79B29D0317921883F2083E56F5071F39AEF1D0063 - FBC8D79E854923F1AE2FE054F0F8A3E16E936F7D343A85D5BC3B8B799BDCFEF2 - 451206E082769F9800460F7AEA4F872653F26ADAD22FF0AA946551E809524FD4 - 926BE9F2DA927878BDF43C1C6462AAB47A481D3F4A7AA73EBED595FF00097476 - 43FE26167A96960725E683CC8547A99622E883DDD96B534CBDB6D62D45C59DC5 - BDDDB938F360904887FE04A48AFAEE64DE87C9F2B451F191F23C1FAB37A59CDD - B3FC07B57CCFFB42FECFBE15F187827589F59D16CE49A1B0B89E0BC84F917116 - C42E0874C1EA070723AF06BE96F8889FF1426A9DF741E5F0339DC42FF5AF94FF - 00E0A43FB5669FFB2C7C21B496E34B9358BEF13CD36996B6FE67950AA988F9B2 - 48F8246148C2819627B004D795984E0AF2A9B25D7E67760E139351A6DDEFFE47 - 1BF13BE2C5E7FC13FBE057877E17F872EAFADFE226A9A45BEB5E25D7B5094497 - FE1582E638E7B6D2EC1F005A3985A3B89A58F12833471071E5316F9B6D7F6909 - BE200921BC6B7F135BDAAE4FDAA275961463CBC6E401F331E64DAC493F7B915D - E6AFF11A1FF8295FC48F1B7C42D2756B3D1F5CF185E5F5F6ABE183A818A6B1DF - 978AD4B10AB73684AC4AAC420FBBB941422BCFBC57F0E359F87CAADAF787F57D - 3E69976DB4D345E5C49CE5B2483BB701C0561C8CF2073F9DBE596FAB3EFF0096 - CAC69E9F17877C4516E5BABAD0AEA4521D2746B9B71D30A8C32C7B7CCFB00CF4 - 039AF09F1FFECEBADDF6B5A96BD676F69E20B1BCBD90ADD6952A5D2819C2A7CA - 72CD8033B030072326AE78CBE3C3782BC68BA69D33CEB5B708D39F30C72CCAD8 - 24C47955E38CB0619078E2BB4F037EC4DE2ED76CAD7C51F067C47178E747B898 - 091B49BCFECFD7B4C126DDF15C5B96C96031911BB93B73B429A4BDD7A3FBFF00 - CC528CBA1A1FB0FF0080A6B4F1469724B6B716F36A1E21B4B25F3A228D88E45D - E3040E8CE01F75F6AFB53C5FE28D1FC3BFF05AFF008B7AA5EEBBA25BC8DE2BF1 - 1D8496979706DEE1039B8891A3DCBB6505815DA84B0C0C800827CCFE13EA9E24 - B4FDA07E1BF84F5AD325B1B893C4563676F06A76A7CDD33CCB9890344080396F - 9892ADB8E7A5770DE11F06FC5DFF0082A0FC594F1168F75E23D423D675FBAD42 - DA440D6F2CF15DB9FB541B3E70E8FF00BC1CA019E2B6C3549FB78B4B5D3CD7F9 - FE06189B7B1929763EA8F809E37B1D52D5B498E4DD3320BAB7995C3C77881235 - 93611FC71B140EA7040910E3078F49FB325CB796EAB223E32A572A7F0AF04F84 - 9F0AF43D43C1DBB4BD6AF346D734BBC379A55CBDFCCD1432C90A91E644EC6275 - 667954A005B6123200E3D03C39E2EF175CF8625BB86D74ED6B51D3E616D7BA63 - C66D6F2D6752BBD3218C720DAC1D4E230E8CAC3A815F4984C55A8A525D1EDAFE - 1BFE07CF62282955728BB7AE858F8657571E238B53BE8E46B36BA9ADEE05B91E - 6C51EFB2B76D872013824FDD23823A6315DDF82629D4EA3E72C6ADF695C7979D - AC3CA8F9E7A679E3F53D6BCABF67CF895FDA1A0CB1EA5A56A5A5C82686DD5CD9 - 4F242E5618D013208F0B9C00093B4F627A57B3785E3FDFEA0BDC4EA0FF00DFA4 - AEFCA2A46718496FADFF0013933384A0E49F97E85D11739C52F927DAAC08368E - FC75A7345FE457D0DCF10ABE591DA93CAC1FBBF855B68700FD29AF167FCF4A77 - 029F9783C706BE1EFF00828A7ED91E05FD9C3E0A7ED09F0EAF27BBFF0084DFE2 - 9DCF85DECAD6CE0DEA2D2CE479E492790E1635382A1012C5981DBB72C3EEA68B - 9AFC96FF0082CE7EC01E3AF1BFC50F8AFF0018BC370C7AC7857C276BA0DEF88A - 269BCBBBD345DC6D651491C6DFEBA1DF6803143BD5A61F2155671F37C4F6FABC - 5BFE6FD19F41C3AFFDA24BCBF547CBBF0E75CD0BE30EA1716ED72B1496D63792 - C504B288F337D965F281C9C32B485539E85C67039AE5352BB749995B706CF20F - 07E86BC32DFC4179E1FD563BAB39E4B6B8B763B2443C8EC7EA08E3D0835EA9F0 - BBE3D3788F528ED754B1B3B8B82A5419230D1DC01C95F5463CF438FA74AF8D8D - BA9F612BF43535CD574C86C6D56CE6BE92FB0E7501340B1C31C99F9444C18990 - 6CDBB8B05C3640040CD73B75AC7DEC56C7C5CB9D2D05BDD695A7DC69EA5CC730 - 79C491CA480CAC83195C7CCA412412B901738AF3F9F522D9E6B5E546674EFA65 - BDD58ACB7DBDE37F99514E323D7FCFA52695E15B2D6AEE4B5D36E23B3B999711 - C176DBA0B93D76EEC655B8C8CE727D2B16C3C52D244B6F32B371B6361DBEB597 - E28D63FB2E3DCBF7F385E7BD73734E333A3962E27A8FC2ED2B5AF056B53B4DA3 - B5ADE03B6398C45F62E0E5A37E460E71953FD6BD4358D5649AD2CE4B8CEE58D9 - C9273DC7FF005EB8BFD8B3F6A2D5BE1E78DAC6CF5F65D4349BC7547F346707B0 - 6F53D8370C09EBE9EC5FB704A74CD3F4FD616D748B6B7BF92E61B696C0102E6D - B28D0492924E662A5C31000CA74E335A3A9CCCCF91A3D87411FF00096FFC10AA - FB5398EE8742F8CFE4267F8449A6313FAC82B96FD80E3B76F016B5A6CEB1C82D - FC59A7DC1431BB3BC4CA490A4E22C65390C73F771F2EE0777E16DC797FF06F4F - 8D6CDBFD649F196DAE109EE4E9F6A08FC326B9DFF827C5C6A975E15F17DE58BF - 99A5E9FA8690DA9C610B794185DAACCD8FE1565552082079809C2A961A42EEE9 - 18D4B5B5F23EACF1F5A5F7C379EDBC45E1B8868763A5DCB596A30C912B450DB4 - F223873147BF72AC8724AB8386E0004E3D13FE124F1AA7CBFF00088F8667C71E - 62EBD322C9FED05C700F5C76A6E9D7DA2F8BB58D734937961AAC1A944EEF046F - E679D06C8924639180BF38049EE78AF2AFF8573F193C3BFF0012FD2754D3E6D2 - 6C7FD1ECA4942891E04F9632DFBA3C95009E4F35E9518F227283934DBF85F54F - EED4F3EA4B99F2C924D25F12F23EA74B1D6B4CE60BEB3D4917A25DC5E44C7FED - AC436FE1E57E3546FED6C6EAF7ED1AA7876F2CEEBA1BEB3432B9F612DB9F3C0F - 52CAA2B7A2D7AC8BAC724C2DE46E152E54C0CC7D83E377D5722B4563FF003E95 - F7124A5B3BFE27C4F335BFF91C078AB17FE0FBCFEC7F112EA491C90A496D7023 - BA31E654C02CBB2453FF005D198F5E3BD792FED27A3E93F10FE06EB9A7F89BC3 - D63ACE9975107DADB6E2385B700241B82BA380C70F182C3B11D6BDCFE2EE8D69 - AC787EDFED36B6F70DF6A863579230CF18DE18ED6EAB9DBD411EB5F3FF00C76D - 0BFE118F056A86DF52D4A387ED16F1A5B4D37DA166CDC47C03206907CB93F2B8 - 0003C57958F8FBB3BF45FD6E7A3837AC12EAFF00CBB1F941FB5E7C1BD3FE047F - C149FE2E7813C0BAB4DE10D37C13E33D7F4CF0FDCC97B2F99691D9CD702DE113 - E7CCDEDE5244AE49259D4B13C9AFAD3C05F1E61FDA9BF61192F64D53CDF13787 - E08E2D5AC96E70F23C52C59BA685481B5D36B6EDBB433380460D788FFC167B43 - D217FE0A5DF1B24B6B4812F2E3C6BAEDC3BC670B216D4A40AEC31839F98F6CE7 - 249AF16FD9EFC17FDA1E2D9353658DBFB26232E4B00C19888C60673FC67240C0 - E338C8CFC23A6A4933EEF9ADA1E87F1D74BB3BDF85DA8DCDC411C93D922B5BCA - 47CF1333A8F94F5E73C8E86BCEBF661F8A7ABFECEBE39D1FE25697ABA2AE8FAD - 43A7EA3A4A5C18E6D42DA48DA46575E8D132C722E4E76B853D715F627C34FD82 - BE2D7ED19A1DBC9E1DF84FE39F1468F7855E3B987439DEC651D41F38A888AF71 - 96C1C7B57CF973FF0004F8F15689757175E228BC23E07B792795C0D7BC516167 - E4217254797E7349C2E380A4F1D0D115195C4E5CACFD3FF0DE8DA5FED0FF00B7 - 5FECF3E2AD0759B6D63C3371A826B779A925EF9D05A5969AF05EDCB39DCCB16C - B7462C9F2E1B391B98E7C2FF00E0989F1CA0F8F3FF00053AF899E2BFDDD9E95F - 64D675C9AEA67090DBC32DE44A0B3B602F32E727B035F3E683FB49F84BF643FD - 97FC59F0C7E0FCD71E25F89FF159C693E26F17D9DB491431E97942BA5E9A8C04 - CFE749BBCC95954C802AAAEDFBDEEDFF0004F7FF008274C5F0B561D5FC59690C - DE309ACFCEBCB2BBD3EDF52B6D20CCF135B5B98E456C5CAA46F24841055678C7 - 03E66ECCAE8CD57528ABF2BF438B32A90F60E3376E6D0FAF7E06F83EDBE2A69D - AA78B17519E4B5F105E4D2E9B22DB40616B6F930CA1E2DCD1B4A26646241D8C8 - 5481B6B67C5BF0EBC55E074B8D5B41D6BEC91A40CB7D2DBC0F752B4414E2616B - 23E25993939F372CB940BCA95E675DF88DAFF82FC4674B8B5BD275CD69905CC7 - A5DBF872E649E3B7DDB4EE68AE0AC2A5810AF200090C06EDA71B7E1DF8BFF132 - F85CC72F82B47D3DF67FA1DE5DEB43C80C73832C48AF2F1C12A339E9B876F6FE - AB8771E4B352EE95F5F95D2FC0F0FEB35AFCD74E3E6FA7CEC3FF0067EF8BAB3E - 9B32C71D8EA10DC3C6B6EF05DC70CB7402004C713B65DBA0281B703C63D3D9FC - 13E3AD365BFD42DAE276D2EFBCC566B4D410DACD10F2D0721B8FC89EBEB5C87C - 3CD074CD03C056BE1DB811EA76B0DBA4371F68815A2BC7E4C8ED19CA80CCCC76 - F20671D3AF67F0CFC35A443A4DEE8F6F676B269565324B0DB36258AD59D72511 - 49223C7DE0A0003CCC800115D781C3E228B8C7993F55FE5F9BBFA1CB8CC452AA - 9C92B7A33AF681A33F32B03DA831FB7B56245F0DA2D1D7FE24B7FA868BDC471C - 9E75BE7D4C526474E38200F4CF3486F7C4DA2498B8D3ECF5AB7E865B193C8B80 - 075631C876B13D95587D457B1F58947F8916BCD6ABFCFF0003C9F6717F04BEFD - 3FE07E26E343F351E5607E95856BF14F4596FBECB7571368F7854B791A940D6A - 71FEF37C9CF61BB279C0C574617CE89645656471B9181CABAFA83DEB68558CD7 - BACCE5171D245578F3FD2BE12FF829F7EDF1E0FF00D9C7C33F1CFE17DFDBDFEA - 5E24F8AFE1AF0CDBD98B578CC1A69B3BEBBBA77B925B7216468B622A9DC1F71D - A304FDE7B0927D6BF263FE0B17FF0004D3F187C40F8D9F127E29F8366B7D634D - D27C3D6BE2BF10D85C4BE4DCD94018593BDBE7E59954C28ECB9575126155EBC5 - E234FEAA9F9AFD4F7387ADF5977ECFF43F353C27F0CAD7C4FE2FB159AF9AEB47 - 5BB8BFB516D87977B15AB3A89648D4EE0C554923193903E539ACB8113C0DE2FB - AB4942E74DBA916325B3BF6B90AE18750700861C1ACF1ACDC68B789716F3496F - 7109F95D1B04763FE4D74DA3FC406F88314763AB5BC46660441729F2927B023B - 67DB8ED8AF8B8EDE67D93DF4363C49AF5AF8C7C1B25C5ACF1C8F0ED95E10DF3C - 673B5B23AE39383E95C686C0FC0D59D6B408F4C8924F255668A4D8CE18FEF01C - F51D0118C71EA2AA2727F5ADB733D8B1A5AF9BAA43F5CD3B55D56CC5BEAD6D73 - A7C77D71736AA965334ACA6C6613C6E6400101B3124B1E1B23F7B9EAA08AA599 - 1F746CCAC3A106923D264D42292E1BF7877EC6FC856728DDDCD23B1A5E08F184 - 3A1CAFF6A4976EDF97628DC0FA73FCEBD97C41F19ACBE307C06D334B9353B78F - 54D26E92596C6662920E76B1889E1D4862D8524AE4E46315E2F63E07B8D4DA28 - ED639AE2EA7216386242F248DE800E49AFB0BF63BFD92BC2DFB2688FE337ED11 - 0FD8749F0FA7DB7C3DE0B970352F14DF291E547244798EDD5B0CFBC7601C053B - 5E7979751B9773D3BF6C1BE6FD943FE097BF08FE13DD2B5BF8A3C617D3FC40D6 - 6CCFCB25A24D1B5BDA0917A863130CA9E4340C0F22B88FF826B78635FF001EF8 - 6358D264D2AE23F06F89B5ED363D57593284DA2CC4D22DA46ADFEB1A569D7715 - E630A87F8857CFBFB457C7FF00187EDC3FB45EA5E2AD694DC6BDE27BA0B6D688 - FB62B48BA470A963858D1001B98F0AA598E4B13F7CFECE9F0A7C79FB2A78434E - F0FEA10F877C45A4F87C5C4F6FE4EB634FB78A5725A79A559A240EC43940D2B3 - 796870768C29D693D5A5D9EDF71CD5B44969BA3DE3E10FECCAD65E31BCFF0084 - 5FC59AF6832DE299E0DAD15C0573B41F34BAEE9A145880557214191FE66C8C7A - D2FC0EF8AC146DD7BE165C2E38965D0AF84920FEF36D3B727A9C719E95F377C3 - 9FF828D7857E146B9BFC53A1EB1677B1C662FB2E977D61ABB2CA71B46639C1FB - A720BAF19E171C9F648FFE0A37E01BE8D665D0FE29C8B30DE1FF00E114BC7DC0 - F39DC0E0E7D4706A31D53D9D771C34B963E4DAD7AE9EA183A6E7493AEAF2F357 - F4FC0F6C6844919560195860A9E73F5AE3F5BD6D7C29AA4D1C9E17F135B58C6D - 98EFF4545BA81C103E66B6858CDBB39073038E3EF1EDDBF97851C53D22FDE0FA - F1EF5FA5D68F3E9B1F9EC64A3AB573C8354F8D1A0F8F746863F0EF89F46F115D - 5BDFA2C962EC20BE8982BE448980F1E003C18739183EDF0EFF00C15E7E18F8D7 - E256A9E0ABEF0C5C7886C7ED3BB43BAB44FF00906ABCCEBB6492646DD1B48DE5 - C5992301B00020820FD15F0CBC9F8A3E35F88F7BACE9163E225BAF1CDE69F6B6 - F736A9244905AA4CAA58BE55407918EEE58E7E519C01F3AFFC154FE1C7C60F01 - DAF86751F872BA93F84A19925BAB4D2EEA4B8920D4C48ED0AC76B233B796B1AA - 91E52E19B797500201F278AAD3AB425CEAFD34F27A6F7FCCFA7C251852AD1507 - 6EBAF9AF97E47CE7F0EBFE0A3BAAFC1FBF7F86DF1C3E1B7867E28587836E25D1 - 2E1B50B686E756D3BC891A29104CC1D25F2F695054A12147EF0F5AFA7BF6AFFD - 943E17F807E08D97C4AF85BA443A6691E228AC99BECD7B2C96CD0CD89229238E - 4DC577861BB2FF00294501465ABE69F0B7C44FD98BF6A6D51E6F8A5A7F8AFE10 - FC50D4A690EB5AEE9533C9A56A77B231134D2412097C969198B3A048914B37CE - 3191D478B35FF8A7FB27586BBFB3D6A979A4F897C03A79175A75FDCD81174B66 - D309E19E1915F0A1A4600A3F98AA647556E057CB72EBA687D2F4D4EA3FE0B47F - B447C44F0BEA7F06FC31A4F8EBC61A5F8517E1278508D1EDB57B88AC11DF48B7 - 766112B6DCB6E3BB8E71EB5F0CFC31F87579F10F48F166A10EA16F02784ECEDE - FEE2291DBCD9D26BD82D3318008255EE109DC4003D4F07EC8FF82D2D89D4FC6F - F0DA3546F32CBE12F835B77738D12D09FC839AF8CFE095EDDDB78EE6B286668E - 1D5ED5AD6EE30389A359239C29FA490C6DC7F76B7A4B4D4897747D2FFF0004FA - F85DAD5DFC506D4F4196E9B5286C5E7B61A3FD925D662500A3C9145732216E18 - 3108EAC54750B9AFD19F811F111BC23A3B586A5A829D46DE532DE9D42D1F4AB8 - 84CA58869D2E1C7EF642AEBB96E664629B50801547CCFF00F04A1F82BE19F1F4 - BAADC6B5A3DBDF5C5958B18A60EF14D6C4DD32EE49232AF1B6171B948207422B - DF3C6DE1793C1FFB68782FC27A1EB97B34DE23D0EE2711F886793598912DD6EF - CA84F9C5A56899A493EFBB11962B835EDD3A3569E194E9BDDADBCD9E157A94AA - E25D3A8AF657FB91DBDBFC69F0BE9BF19B5ED3F509A18753D42DED2578E69021 - DA88E026E936863F31608A58E2424020E4F7FF00DBBA6C76FBDAF7FB342AEF54 - B86F248503248593195C77008F7AF86FE347C3CD474CFDB0FC3B0DFE93E1CD0E - 3D43565D164BDF0EA3AC49703ECE4CA914AC7685037007A3BC9C9040AFBE3E0B - FC13B1F86FE28B7D3EDF49D275A56D3A59273711ADBB5C490C90289CC20341E7 - 1F35F2C89106DDC91815D997D6AD3BC1AD9EFEACE3C7D1A34ED35BB5B7A235BC - 1FF09FC41E28B813DF5C1D374523EE344D06A379F43C8813DCA79879C08F873E - ADA16936BE16D322B1B3D3FEC5690E76AC0A194927249C65D989249661924924 - 927358E91586923EEEBDE172BDD7E7B545EFC7EF6D501E39215BD319AD5D324D - 5AEED966B1B8D1FC416EDF2878D8DBB7FDF69E6239F60A83DEBDEA7151F5FBFF - 00E18F06A49CBD3EE34E0BB8669762C8BE6373B0F0FF00F7C9E7F4A97663FBDF - 8D71DE35F8F3E15F8729E5F8AB51B3F0F4CC3F7706A17300F3C8EC0872A3FE06 - 57AD78D685FF000547F85FAB5F341147E2C8FE42F1B5A68F73329C1DB8036796 - 7E6CAE7904E3A8C35635F32A1424A356695FFAF91B50CBB115A2E54E2DA5FD7C - FE47D217FA65BEAD6A60BAB786EA163CC73462443F83022B9897E0FD8E9ECF26 - 8977A97876666F308B29CF9123F669226CABE3818E303818E2BC2BE23FFC1452 - FF00C30F6D71A3F817571A6F9C52697C4F3DB692B3AE323CB68E495C375214C2 - 49E7818AB1E1DFDA27E357C5B8A47D03C2FE1BD06DFECAF3A4B75A36AD781DC1 - C79692C82D9198EE5232A01F9BB2935C32CEB0139349F335FCAAFF00735FE68E - E8E4B8D8479A568A7DDDBEFB9EDD12F8B3C3C8AB71158F88ADC02AB2C58B3BB6 - 3D77329FDD9F4C2E0FD6BE16FF008293FF00C14E7C33F03BC49F127C0F1E83A8 - 6A9AD78DBE1ECFE0DBF8A793EC874479AE56E619DC6D7DE7CA3B820C7DF52580 - 209F2FD1B56F8CFF0014BFE0A39A9785DBE206B5E1DD69B50962329924582DE5 - FB190C9F6786711A2840C84C2E0E470E71CF1BFB747FC127FE25788BE23F8935 - DBBD5B43B8D62DBC21AA78D6FAEA5D76EAF975A874C16CB7090B4D009A298453 - 215499E456F2FF00D6A920579B9963275A83508CB953D5BB69FADFE67A996E0A - 146B2739479ADB2BFF00C358FCED8FE1C4FE2596E27D26EADB506B77DD2DACBF - B898A93D4024AB0EDD460F6E4565D9DB5EF83755F2EEACEE6DDA3625034679E7 - 839E9F9546DAE5D683A80B8B499EDE7889DAC9D467A8F7F706BA8F0D7C4F93C6 - C16C356B784994ED4B841B406EDB97A0CFA8C0CF6AF015ADA9F40C5D4BC49A6F - 8A3C3B3059A386F9537189FE562CA7391D8E4038039E6BD4FF00638FD933C35F - B41783BC75E29F18F8F1FC0BE19F87E96325FDC47A4BEA124AB752491A615581 - 186455E15892E3818AF1FF0010F87974DB49B30C7BA07DEB2EDF9B04818CFA77 - 1F8D7D0DFB10EED47F640FDA834F5E77F86F4ABE03FEB85EB3FF005ADE1AEE67 - 3D8D69EC3F634F870AC24D4BE327C429D3FE79A5BE9D6B263D98472A8FCCD513 - FB637C09F04C4E9E10FD9E74D9D55B227F10F8867BC2C7B13115653F81AF94E4 - B48834885BF7DB9B01871C7A1FF3D2BE80FD9AFF00635D23E387EC5FF19BE26D - C6BD796BA9FC337B14B7D26DA042B742E254532C9236485DBE600AAB92533BB1 - C198A954938C16BABFBB50938C1734DF65F7BB1D643FF0543F1A2CCBA7F817C2 - 9F0E3C08F707C985F40F0E8FB4E4F002972CACC738E13AD64F867F65DF8CDFB5 - 5F8E5B54D62C75CB8BCBA6025D6BC4F2496F0C6A0F014480B955CF091A363200 - 5008A77ECDFF0000FC27E35F17F836DEFB528DBFB4EE754D3EFB48B75F2EEA05 - 86C0DCDBDD9903173BE577419181F67032C32A3E9DF10FECD375F01F5DB5BAB1 - F8897FFF0008CDC6A3F6092DB5AD38DD4D6BBF705669D084DB9EBE698D79C672 - 4648D37CBCF2F87CADE44CAA24F963BF99A7F0DFF62FF0EFECD7F0BF58BAD3EF - E1D67C5924416E7569A200B8DCA4C100DC7CA46C637292E58F2595401A1E06F8 - 33258259DC78AB4BD1BC7BA95D1896E8EBD792DE240F80024237F97B02825559 - 1C6319EED5D45A6913476B247AF5BFDAAD5668A2F32C94A433F2197E62C50E40 - 27113B82B820915B6DF1A341D7FC596B169CCCD1E9F3416E418C288595423A8F - F75CB29C67054F7E2AA5528549FEEF651F4D7F5328C6B463EFEEDFE076DA145A - 3F82916D747B33E129264DE90E981B4FC24647DF7B72AAE41652016206781D6B - 2EEFC33A65F5D493491DECB24CE5D9DAEEE09724E493F3F7AD1D5BC41A6AE98B - 7135F5A40AAA76379A30325793CF7207739C7E15CABE95E229D8BC7A1F8DA68D - CEE5923F0FDEB2480F465222C107A835D198E15CAB5E11BE8B6B1860710A34AD - 37D59F6F5EDE43A6D94971733436F6F029796695C2471A8EA598F007B9ACAB6B - 8D43C5B22ADAFDA349D34B0DD75247B6EEE07FD32461FBB53FDF906E3CE1002B - 257CBBF073FE0A9FF0E7E377C71D07C3234DF15DE6A5AC5E8B7D32696DE14D3E - D672098F119937EF240512B82416C8F2D4915F40EAD7DE33F04E99757CBAD68B - AB5BD8C2F3B43AC6912D94C5514B1DD776CED0A9C0EA203CD7D83C642A2BC355 - E5FD7E47C94B093A6ED5347E7FD7E67947C2FF000EC3F0DF48D0ADECDA49D752 - 9757D5A6799CB3492BDC427713D4FCB391C924F724D7CEDFF054CFDB9BC45FB3 - 55F782F4FD1FC33637B1C939D5DB52D4609A4B34913CC816DD4C6E83CCC33B1C - B640319039C8F6CF851F15AE3C7BE1FF00095E47E13D6A6D3E3D2AED449A75E5 - BDEB32F9D0C6CE54B44FB730646D462C1B81C7373E317C66F8790F812FF4ED62 - ED4F1FE9BA46ABA6CF1CF32323AA8304D182CA5CAFCC14A8CE73819AF07DB43E - A295ECDFEAEFD4F6FD9CFEB8E4E3CC974F456E87E6EDAFEC9BF0C3F6FEF186A7 - E2DF04FC5ED2BC2FE3CF175EDC6A5A87837C61079622BCB891A4952DEEA3C19A - 3DEE4A6C85D82EDDDF3022BBFD77F6A8D53C3BF02AE3E00FC4EF01CC7E22F836 - 28F4787C5515CC326FB6B799658436E412188C4A14323B07CC6C541626BE3EFD - B33C2B63E0EFDAFF00E2769BA7E96747D1ED7C57AA0D2AD1206B65B5B43752B5 - AF968402B1F9262298E0A15238C57DBDF0F3E39F807FE0A09F077C35A0C76F71 - 27ED45AD5BE9FE17820FB25D37F6F325D4481C48AA6DC33C6A2466728570EB9D - A1457CCBD357A9F4DBEC47FF000536B05F117C7DF05D9150CB1FC2BF085B3F7E - 1BC39627FF0066AF857E0EE9D259FC6486178DB7C026490019DA4020FEB5F657 - FC153FE2C69117ED6BE25BEF0E32EB5E1DF0DC5A7784F4EB98E4DB1DE43A6585 - BE9D1DC83CFCB235A09063FBE2BE40F84739D57E38A4E4C8A970679D93CC2777 - 05C027F8B07D6BA2927A194DE87E8CFF00C1273C3ED73A6EA9A85C6A16B60B0E - 9F39124F12342BFE9CF82C4ED7181DD64439EE4715D77C56F8C7A2783FFE0A25 - F0EF579B5DD2F54B5B0F0F3DB4B77A64ADA9ADBBF997800640E5831320CA6F63 - 8C73CE2BC1FF0062CF855E01F1B594D378E35BD6B43F2ED9EE21BF8ED5BECCB2 - 79E546E79619615014E0960A323EF135E957BE0EB5D03F6EFF0084F69E11F137 - 843C7D6D3E9137D8E60B15ADA921AE3F713BDA7980BEDC6196307951B08193EC - C6759D18C61156BAD6FADFA688F1654E8FB794A6DDECF4B74EBAEC6E7ED47F14 - 2DBC67F1BBC1F7D670DF18ECBC4CBAA3CED6C6D94A88635DB890E6327CB0403C - 05C9AFA8349F8E1F14B51F1DC0DE1FF0678574F55B0B94177AB6A171730EDF36 - 00C4AC71C5F30654FE3C1DC483C0CFC9FF00B5D78BF678C1A7B9D2ACEC924F1C - DA4BF6AB2BE86EE1DB1DACE8D0A01B65619190C2309F2E090DB54FE857C09BDD - 0FC4DE2DD2FC41A0C2B0D8EB5A4DD4F138B77B332A34B6FCB44C1486F9472573 - 83C1C1193034EBCE4D42A72F7B2F37DFB118E9D1A708CA54F9BB5DE9B2EDDCE5 - ECFC13F1FF00C75A69B8BFF1DE8FA12CC418A2F0F69505BC40739CC971E7CBDC - 60A9EDEF54DFFE09E9278BF576BCF1678EFC5BAE4D2A9497CCD66E5A3953FB8D - 1E44641E0E3681903A62BE8C9340B3965693C948E66396961262909F76521BF5 - A7AE9B736FC437D27A05B88C4CABF88DAE7F1627EB5EAFF64C64EF5A739FFDBC - D7E0AC7951CE2A455A8C630F48FEAEE7837857FE09BBE03F03B79DA3A7D8AF32 - 1BCCFB2A15F73C624DC78E4C84703E5AF8F7E25FEC4DAC78DFFE0A4DADF86F46 - F176BDA0DDDD4075C6D4F4FD935CDBA4704188D54BC21801204CB7CDB703F7A4 - 923F4F96E6F201FBCB459BB036F28CB7B957DA07D371FA9AF21B8D1ADED3F6EB - B0D5A7D1F4FB28E4F045C08F549DE486EDA5FB7461E0DAD88DE321D583F24321 - 0A7048AE5C665B8383A708C2DCD249EF7B7AB3AF0799E2E7CF394EFCB16D7A9D - 87866C34DF04C10DAE97AC7F6549811A45AB58AC7E7B77209586491C9EA448C3 - 9E9C8AE864BED5AD79BAD316E94FFCB4B2B8566FA94976607B2B39F6AD978D67 - B665655923997E60795753FA115927C17616EBFE871CDA6B751F6295A04CFA98 - D4F96C7FDE535EF429A82E58688F0A5539DF34F73F367E0EEA31DF7FC167BC45 - 33A9B78D7C577C999B74647FA24D80437DD3920638EDC64E4F71FF000582FDB5 - B40FD97FE20695A59B78F5BD735CF00F88F41BBB04B83049656DAA8B6862B876 - DAC18036F291181B9B67254106B84F8136335C7FC164FC5D12AC5A848BE2DD5D - 08BB608B3E2C6E73BCAA103201E898CF6AA5FF00059FFD81A1F8D1F1AFC0DAAE - 8090F85FC49E25D2F54B6B9123AC9A5DD1D36D7ED510411A892391D5A442C536 - 9DB19DB90C4FCFE2399E0EAF2FF37EA8FA2C3F2AC652727F67F43F25F4FF0086 - 69E38BF9E1D17548CDFC41A75B5BC4F2CCCA39628EB90C579241038E79C1C54F - 13787354F0B78A64B9934D92DE191C4A04617CA462016505491B43640F503A0A - C57D526B49A3B88249619948923746DAE87A8C11D0D751E17F8BDA86A720B5D5 - 923BAB791B63CBB36BA8F52070DF9035F351B5B53E95F91666F1769FE22F0FB4 - 17529B5D45A22A564520391D0838C7381C7AD7BBFF00C13ADBEDBF0B7F692B06 - E049F0BEFAEFA7786446FF00D9ABC2BC53E1A5D32DEE5552368F06646D837290 - 3B375C633C74AF74FF0082606ED4358F8DDA6FFD053E11F882003D4ED848ADE9 - DCCE7B58F9875FB6F2F5090A9FE23823BF26BE9AFF00826BFC4A834CF85DFB47 - F81EEDE4487C5DF0F25D42D9563670F736132C8A0ED0768F2E598EE38036F5E4 - 57CDB771FDA76B7F79335DA7EC8DE3E4F877F1CA192697C9B7D7348D5BC3D396 - 38522FF4EB9B45DDEC249A33FF0001AAC3C9C6A292F4FBF4FD49AD0E6A6D7CFE - ED4FA3BF67FF0084FA5F8C34EF0CCD27DBECAFEEBC6969A4CB7D617925BDD241 - 71A748C888FF003227EF222721093961C8E2BD97E206BDE22F00FC16F145C1F1 - E787FC55E1B8E092CE74D72C9EDF53B492452B1FD9E68C1496E01C11B9436E52 - 32A412BE6BFB3569B6D359E8B7122B47756DE3FF000BA47711B98A78A3923BF4 - 708C385E550E4FF741F5AF59FDAB3E1343A67C18F126B13EB16775336A365A8C - F67A8C4BF688D8CF6E1BECD2311E629F9C32229230C4E3219AA29C29A9455BFA - B18B7CD51C5FF5D7F5352E7E2AF83756F05EA3A0DE4571A2EBD61A6456FA743A - 822A24327961631BC31842B7C8CAFB89C2920A9C83E0BF133E19FF00C209F19F - 44D2F4E93C45A2E9BAB7F6734D3DE88D27B8334AE1E48F61DB24188DD91A41B8 - E067D4FAB7ECB5ADEBDF1274FF008D10DAB5D0D36F24BD6566B117492DB2B4C8 - AA57036900150C18005B9E14579AFED4FE36D43C4DE2FF000FDE4B058D9FF61A - 436369E4337EFA3B7895D1DC1EAC3ED0CA76F0304738CD79BCB6B58EC5D4FD2E - FD937E01F85F41F0658DFC9A6A6A9E20D1EF2EEC5F50BD76B9749209DA21244A - E4A4259151B11FDD2C46E6EA7DA9E172E7E57EBE95F977ADF81BF6EAD57C2B78 - 7C23A0F89974B8EE64FB5C5A2DAE9D78F0DDB849645545324AAA6396161B4630 - E08279AF3A97E14FED98256F36C7E3B09327781A05F8E7BF021C7E55F4986E22 - A54A0A10A6BCF5B6A7875B239559B9CA7F87FC1380F84DFB4743E24F1E7C19FB - 2E9FA569BAEF837527177AAE9F6C96AD7B119216B68DFCA4C3BC2164FDE90D23 - 79D825B62D7D936DF1BBE3378A3C5DF127C1EDAC78CA55F07E8F7336B12AE9B6 - BFD9B6D11B576DB24F2A99519D46546159CEFDBD067466FF00823FC7FB336A9E - 18D77C1BE13F0AFC415F0A78965D6EED752D6E6B5BAD734F138960B3920B856B - 35648C0899B3893258852401E8DFB2AFED35A3FED39E1DF8EDE24D3743B9D075 - AF15BDB5A34372F086B98C99CC488EB8F30C51C9B4B103236D793530F5694D29 - 371DFCB6BBFF00807A5F58A5562E51B4BF1DD9C4783BF65EB6F2BC2EFE23D6FC - 4BA5C7A6F852C9A3812DAEDAD2D656332C98DA7CA5CBA3163B572770EB93567E - 287C00F01C1616F79A6FF67EB567A1697AC6A375334B14A63963B36580FCAB90 - CAC5DBE6E7E41DD457D19AFC91693AC9B9BCB85B1B18F4CB5B759643B149F36E - 656F98E00C09579FF6BD8D796FC53F8F3F063EC3343AF78B3C13A93EC6DF612D - DDADEBDD3904052A1DB1F79865F006EE4819AE8587C324A7369CB4DEEFD7BFE4 - 72CABE25B718A696BD95FF0023F28AF7E2AF827E3C78634DB3F8A30F88F4EF10 - E8F17D96C3C51A25BC57935D5A86262B7BDB79248FCCF283154951C304DAACAC - 1411DCFECC5FB4A7C39FD90BC4BAD5C7C3E9B5F4F126B9A44FA21F166BB64B1D - ED9437055268F4CB581A4F2659620F19B87769024AEA8232C5AABFFC145BC3BE - 1283C79669F0BFC0EBE1B5D244897CD14A5DAF8CAA8C8EB1B31558B663853C97 - CE0FDEAF2BFD9A7C23AB7817E29E9FE3CD7BCBD174FF0007DCC57BE4EDB6FB65 - E33128A2286575DE412090C0A85C920806B92B24B4D19DD464E4AFAAF23A0F8C - 9F107C31AE2DD5A2DF7D96DCC7E5279EAAA73FC276025B00E0E76D79BFC0145B - EF8C962D1C8A47933F43C8FDD9AF66D67F648F86C15E6F127C6CF87D14FB0B79 - 5A2699A8EB370C40E1772411401BB7FAEDA3D4D67FC33F83DE11F845E206D4AC - 3C69E10F172DEC2F6F6A2D8DD5ADFD83928C5DA09D231CAABC7C348B87638DDB - 4D453A8B99234A917C973EB2FF00827A7C32F8E07E1FFF00C265F0E754F0943A - 74A27B0FB16B3B9BCCF2E61B87C91961BD943062E9F748CFADAF8B3A078DBE28 - FEDE9F09F4FF008A5E05F0CE8F71783CB921D22E43DB6B302CCCCF2C98919811 - 9230CDBB038AF5CFD943C49FB3ADA7C1FF000869573E27D3FC29E26B1115E6A1 - 35F5A5DA19AE4FCD2C7E7BE53C92CCC76A4A801C101718A77C754F0C78D3FE0A - 75F0374DF0378B1B5C812CCBDCDE43A91D5A1B233CD208634965697E622272D1 - 9276AEC385DC09FA0A74FF007295F4BAEA9ADD74DD1F3B2A9FBF93B747D1A7B7 - 7BEA791FED216DE0DF873E05F13F867428FEC771A1F8F2C6F22B6820676B1B73 - 0DD2281230C005D70159F2719AFD34F035D35DFC46D2DDBCC0CFA7DD6E1D5724 - DB9E4FA8C57C3BFF000504F84D7DE14FD98FC51A85D43A3CACBE3B815B518ED7 - ECF7975279F322C45773B4806377DE50A1B80D86C7D99F0666D72F35FD0EF751 - F0DEB1A743169ACEF3C8D6D2C532C8916D286295CF38276B056C0E456D9738C2 - 6EFF00D6ACE7CC3DE847E7F923D91507E14E58C0C7BFE95135F436FA7C979319 - ADACE152EF3CF0BC312281924B3800003927B53FC4D751F847E1F6A9E29BCF9F - 43D1616B8BB9ED48BA68D557790238CB3B36DE42A82C72300E467D878BA2B792 - FBD1E3470D55ED17F712797F5AF2AF859F0AACB40FDAA7E29F8AE2B7924BCD71 - 74EB59AE594058CA59C00DBA1DD93F2AC3231C007CD519254E3E62F19FFC1C5D - FB3BE9F21B4D0478FF00C5734CE2247D3F4716A9F31DBB83DC3A30EA48F933C7 - 4AD2FD873FE0A516DF10FE1AEB1A84D1EA1E23BA8F5D9E3BC9A7B9585E266556 - 4D8BE5FF00ABF2FCB5193CB24841208C79B89CCB0EEA422E5A277FC2CBA75BFE - 07A987CAF12A9CDA8EAD592F9DDFE47DACDA0DA87668E25B776392D0130B31F7 - 2A467F1CD1FD9F7512FEEAED9813F76E230E07B02BB4FE2DBBFC737C15E376F8 - 87E0CD3F56B4B59AC22D533B3CEDB23201BB2700E0F2B8EA383DAA2F8C365E30 - B2F829A3EB9E1FF13681E1DBA1E2BB1D0AF9D7434D59EEA0BDD56CEC51D0CEFB - 2092159E4728639433003700093D188CC68D2A4AB24DA7D8E6C3E5F56AD574AF - 66BBFF00C03F38FF00664B991BFE0B3FE2F668CC922F8C7C400AC7DF1677A38D - C47A77EDEFC57A7FFC165FF68ED27E03DCFC23D4DA1FED0D6AC352D52ED74C97 - 75B3CB692E9B35A3486428708259E2E80EFDAC07DD35F3858FC59F17FECAFF00 - F0551F8CDABF862CEF3C69E24F09EA1E3190DE186DADE4474B1BF85F5168B625 - BFEE41FB4989061846E8AA30A1ACFF00C14BB4EF097ED59FB447863C1B6BA97C - 70F08F8CE6B9D3B48D374BF8AB697D26A16B04F06A32DF48CD2EF0D1FDAADECC - AED9C2E6EAE0C71B05213E76A666FD9CA8C17C4EFE9ADCFA5A796AF6B1AD37F0 - AB7E07E6AF867E0669DF1175C5D1F4EF100D375699765947A8C3FE8F76E3A47E - 6A728E7F8414218F190700E1F8EBE16789FC19AF3B6A161FBC8422C8D149E621 - 28A173D8F20679C54DE34B7B8D2F56B88B7347359DC3C0DB491B5E372A483F55 - EB57F48F8E5E20D6EFFCAD6E6FED48E3C2892E17FD2197DDFABF1DDB24FAD795 - 193FB47AF249FC22683E3DB1BBD07EC3AD34D6D38DD123F965E39148E3247208 - CE3A7402BDD3FE0920AD79FB4A78874DEADABF81B5CB2C7A936E1BFF0064AF1A - F137859224926B74536D76A1DBE507A659483D460FA57B2FFC11BDD9BF6F1F0D - AF3E5CDA66A91CBEC86CA5CE7F215D14CC6A6C7CDF631EF82127FE788AC785FE - CBADDABF649D1BE98615BD69E5C6D1AE7F758D9BBD1738CFBE0735CFEAFF00B8 - B866FEEBE7E9CD268A5A9F58683A3789F507B59341BABCB3D3EC6EEC6E6F8C57 - 86350E6E8C36F318778F38A4B200BB412BE61E80B1AFADFF0069BF8970F8D3E0 - E789BC13ABE9BA8C9E28D16D4D86A37F6BE6DCFD9E485C911CF2CE90C85C3460 - 36D8A44E58EF04E2BE38D37C4DAE693E176486F5AC92FA654BA8ACEE5E38EE62 - 4B859610E323715711B818215943019191F567863F686BEF17783EC3C3DE259B - ED1A97887C2379ACCD37D8C02F3FDAEE6DC4FB555362CF6F1412339043BAB4CC - 73231A9955942328AD992E9464D49EE8E6FF00E09A53EB2AB7D63E1A9219355B - 8D1EEDEF6D43C07ED96E55CC8AEEE0EC382AC3A67691900E4737FB57E937AB61 - F0EBC4579A5AAC5E22D2E48A2BC5B5F216F96210461865882CAA55491B73C1C6 - 4F3C7FEC75AEE9FADFC41D763D4AD2D6F2DF50F0EDE69304324584B26F2418A7 - 0C394D8C1DB78E540CFA0153C5171E268BE15787D357B8D4AEB48D2EE6E6C74E - 4B98CCB6F6CDBB122C4F80DD153208C0E0E6B9797DFB9B736963F487FE098DFB - 7FD9BFC545F879A97C41B596FF00C456F06A3A25E6A9A535BDAEAD782D2086E6 - CE66DDBE29235B7844723BFEF70C02E4857FD10FEDBF1A7FD0034493FDB4D664 - DADEE3F71D0D7E1AFC3BBAF11F8FFF00690F09EA5E26F07F84AFA6BAF0F34D6A - FAF491CD6F0DA94B4315D212A5B72A4242AEEDCA1E400AE79FAB113E20D8A2C3 - 05F7C22B58211B23863D4F5444854701428BDC0007000E062B4860EACB64CCA5 - 88A6B767D75E28F0C5AF8BBC3B79A56A11CAD65A8C0D6F388E5689CA30C1C3A9 - 0CA7DC10457C77E14FF825B6977D6FE28B6F087C44F8BBF0DEC23D59EDA3B7B3 - D5A19AD2E9A35556936ED12BA86CA82D203F21E3B9FA0BC4DE1FF09F803C177F - 736FFF0009578621B181D834173776A9031E9B5E66FB38218F00B6DE8067815C - 9FECDFF1364F1BFC28D1354F117C4AD3F49F126B0AD712E99149650ADBB3FEF3 - CA30485A4DE036E6CEC7058864560D9FAEC6D3A356B45565B26F75E9AEDDCF94 - C2D4AF4E94A545BD5A5B7CF4DFB1F287C57FF821B7C44D58CD269BF143C2FE32 - 661C2789F4DB8B39587A19636B8CFD768AF86BF697FD807E2A7ECBB7571278AB - C1BA8693A6AB958F52B36379A5CB93C6DB94CAA93D924DAF8ED5FBA9F0EBC59A - 87C4AD26F2FB40F1526A76765772D8C86FFC3D25B06963628E11B29B9432B0DC - 1586548CD748C9E3010C90CD1784F5186652922133DB8914F552A448181F7FCB - B571CF27C34D7351BAFC51D14F39C4425CB56CFF0007FD7C8FE6C7C37F10B56F - 0A4E2D24692F2C738304ADF347FEE1EDF4E47B77A7789342B6BF125E59A308E4 - 2588230D193EB5FABDFF00054FFD81BC03A67C09D7FE2159FC33D27C27E25D32 - 5B5C5E681AAF97632F9B731C4DE65AF9688490E465114827249AFCF5D1FE1E5B - 792AE5BCCFBD91B703E515E2E2B0B528CBD9CBF53DDC2E2A9D687B489E576BA3 - 47A7D9C724CA599865549E4FF9F5AAD3788AFB4997CCB5DB6E776D1B073F9D45 - F13F55BCD0BE22DD5ADB95589821F2D9430CE39E7AFEB5D67C0AF05C1F15BC4B - 6763AAC170D6F34E5196CEEA2B491F0858012CC1A34C903E660463B6715C328D - B5676AEC8C2D37C6DAE4A7F737D711EDEA518A85FAD773F0F7E366A3E07BA171 - FDAFA8C9A90561138214C6A54A9DAC3E6E412A493D1B18E6BE8AF877F087E1A5 - 96A1A0EADA0F82F53D2EF7C25E3AD12D357B7F13EAC9AB5B6A1653CCE8D902DA - 188A8911436637575901040460FF00A05F163FE0947F093C5FE0CF1559F85F51 - D4BC2C6EA1903697697BE5D8DCEA7106F29E68E41925248C0548CA280D270C18 - 6DDA8D1A937FBA7E7BDBF130AF5E9D2FE2AFC2E7CAFF000C3FE09B5FB587ED35 - F0EB439A2F08DF2F84B5058B5BD34EB1E2DB586CD84D0B7977490B4EEC19A295 - B9F2F387AFB59345FDA43C17E33B1F07FC49BCF10CDA95E784B529FC0FA7FC24 - BB7863D3EF607B38E0975295628435AC2D2A26FB8F347EF3E62F9E7BCFD91FF6 - E6B3F867FF0004E3F0878866D25B525F087842DA17B2370B672CBF6689E38E18 - 9D8C9BDD8C6918DCA9F330EB9CD779E27FDB33C27F0E3E3059F89BE2169BAA78 - 7FC43A7E917BA3E976BA44777AEC77B6B3CD673CEC7CAB550ACB25B42A18B050 - 0B752462651C472F34AF6239A8F372C6D738DBFF0015DB0F892BE35D7B54D42D - BC693F8DF56F0B6A773752DD59DA1D253C357456C16190ADB84FB4C70CDE5A8F - 304AE1CF2F93C6E81E288FF67DF84BE30F186B9E03F86FA1C7A0FC3BF096A167 - 67A55D0FECB9AC45D5E473DEDE4AB6DBA2BDDCC4C8AB0B0091A2F98E7257B99B - F69DF03EB7F1E25F137857E03FC45BCF1A6B1672C97979AA68B1E9EBABDA9896 - D24112CD70C124646843CC2257686028588205719F1F3E38EAD6625D26E3E07F - C33D121D620B5D0AD175AF115ADABD84789951CC9040B22C6F1A36E567010403 - 192F8A98D3AD7E68C5E9F9EFE88A7529BF764D7F5A1F9897FF00B36F80FC3FFB - 40DF5BDCFC42BEBAD43C59752EA7E1EB2D2FC29A6DD69915A4B26F8A3B7D5351 - 9E36BA3123842628583046DACFC9AEFECBC43F0D3F620F1C37873C3B1EB1AE69 - 7E2290C136A7178922BA0AD081B2630FF674263318725A06C160E02CA386AF31 - FDA9BF66C7F84DE25D7BC3777E2EF01DFF00816F353FED8D074ED22CE3BFBAFB - 4799819360D1005166914492B46655442501C2AFAA693E178BC51F0EFC27E249 - 2CF54F895A9F876D67BD92DEF6E2CB47859A18716FE6234AF717516CB6759117 - CA92411B21941CBAD4BDD95E4691D62944FD00FD95BC4963E28F043D9DB3DE59 - 6B9A1EAB77A36A3736EAB70AD358B157B74C1DE17748241850C55C960075F6BF - 1678AB4AD7FE09C7E1BBABCB78EFEE3C5D61A8ACBA3DBADC283657F0DF8132BC - 91F97248B62F13658847209240207E7C7FC1327C67A77C16F85DAB697E236F19 - 6B7E30F895E21BBD6F53D62DA07B601E7220C22AC9E6AC81D24762A8A497C0DC - AAA6BAEF8EFF00B7D6A57DFDA3A0E89E0D856F2E2D62B886F6EEF62867825BDB - 68A6672157CC611A4CC321577300C0950B9EDA98BA4F0FEC7EEB5FA773CF8E16 - AAC47B5E9AEFFD7F5D8F2CFD9BF57D07E33FFC1567E28DE4B6571AAF873C73A8 - 78BE2B98E229311697B677F1B48AD1391222C736F2D1B1C804A93C676BF6F4F8 - F1E0FF00863F09BC13AA49E34F1EF8CBC65A7FC51F0E5EF8A2FF00C44935C7D8 - AD74FB7BCB36B64BCFB2C10C8A8279DC2A658B4B231248663F35FC18F8D7ABFE - CF7F1D2FBC631EB3A7E83A969379334D79788CD6D18789D2547552A59583B0C1 - 3DF90699FF000508FDAAEE3F69FF00D8F6F34FD3FE207FC24FA1784758B06934 - A44B78E1B3693ED016541E4C72BA02EEB906455322A9604A83872FBEAFDBCB73 - AD5ED6F33E50FDB9BE1F37C1EFDA53E206898CC30EB173756A7040782E2433C4 - 412391B640B91C12A715E1DF69965789FF008A340873DC03C7E5D2BECFF06DEF - 867FE0A25F07BC3FE0BF126B163E1BF8CFE0BB45D37C3DAB5FBEDB5F15582FDC - B39A4EA268FA29E49CEE018B381E27E38FD853E2BFC39D764D3F52F87FE2A322 - B6C1259E9EF79049FEEC908743F9D54A9EA5C65D0C0F067C5BB61A79B3D6232A - AB81149147BC11DC3639FC877AF7EFF827BE98BF03FE1AFC62F8D975F269FE19 - D0AE3C35E1D95C6DFB66AB7BB523D99E498D36961D42CB9EC6B9FF00837FF04D - 2F186AF07FC249F101A1F85FE05D3C892FF58D7C8B790275DB140C43B487A004 - 2827A64FCA6AFED87FB4DE8BF12B46D03E1DFC3AD3EE344F84FE052E74C8261B - 6E759BA6C89350B91C7EF1B736D046543B13B4B145AA7A132D4F054411DB22FF - 00754AFE9593E2118F339E39ADC9ED9A081376DF9D770C306E08EF8E9D3A1E45 - 62EBD0F9DBBE99A25B1513E8ED2BC63FD99E0AB51F66B3B8FED4B278CC9736C9 - 2ADB8DB6EE5E32DCACBC10197E600903EF57AD7817E20AF863C4BE33BEF155E4 - 6DE28D7A236D7536B16F23DD7D9C1B7F2208D540863468C105780AB144A981F2 - 9F03F0E06D4BE1868ED1C68CD6F6D196F9B9FF0052BCFD32BF5E6BA7F87FE3DF - 105BEB9AB69FE1F592F26BCB5B8B0BAB44B72CD716F260BAB05C171F2860093C - AF4ED594F71C7627FD99A04B3F89D0C0D7B0E8F1C2C1A296E9E18A3891771C1F - 3BF767238C36771C639C576FFB473EA5E1AD074CB15B8D4751D17CC62B23432C - 76B05C3990EE12E3CA264019C22724649279AF30F8256706ABF16743B0D5352B - 8B4D324D42149E45BC5B76B642E06FF3581085786CF6C57D49FB49793AF7EC97 - 756E9A84DAA4B6DE30751704C4D1CF12473246D94033210492DB4039F7CD44AE - 9AB0CF11F1CE90DE048BC39A83EED58DE698B78D696D76EAD0A324ADB5F2A769 - DB1EF21430DB8C915DD693FB4569F36956AF36816AD33C4ACE4DD124B1033FC1 - 5DE7C3EF0F785F52BDF8177DAF6A9A6D9C933496FAA3493C2C6158A29D6112AE - 18A2BB02A378C30FBA33927E93B5B3F024B6D1B342DB99413E4445A2CE3F8488 - B057D08EA2B1A951DF634A713E82FDB23E1BF87F59FD9ABC51A4DFC3E266B5D6 - E04D3847A5CF34CF1C9348B1C72794C5A3DB1B3090E57A21C738AEDFC23F0863 - F0878274DF0FD9EBBA96A5A5E976B1DADAA6A76D6772BE546A163DDB6042C768 - 03713938C924924F53723CD963FEEC32A1FAB123F903F991E95711016E47E95F - A04A9AE772F2B1F03ED64A0A070B1FC1982DAC66B786CB40B786793CE9174D86 - 7D27CC72412C7ECF28F9C900EEEBD33576C741D561DC60B8D76C63591908FED4 - 5BDF33048C817114C4038E9B81AEC235E5477A759C6AB180AA7E7666000EA589 - 3FD68E44B6279DBD0F967FE0A8EBAB4DFB1178AAD6E2E1E6825BAD3D5BCFB48D - 243FE99163E68E418E7FE9973EDD6BF32C7863EC3A4190AB7CAB20C7F77E5E7F - 515FAADFF053CDBA9FEC89A9E5D9ADE6D574E58801F7BFD21497F7CE300F65C9 - FE222BF3C75BF0C5C6B3A1496F636FE64DE55CCDB4B05F9521323B7246005563 - CFA57878EBCEA29BDADA1EF602D0A4E0B7BEBEA7C1BF1FAD9EDFE25DFC8BF7A1 - 0AFF008735EB9FB1969125E6B9A79DFAA5BC77174567934F8619AE4DBBC38991 - 166FDDE5E2675F9BB12464802B87F8D7E0AD5BC4DE35D5350B3B192E2DE588C6 - A5194B6E03046DCE7A8F4AF5EFD8E34AB7B0BEB54D7350B6F0EC30932C975A81 - 9228A275B76DA1CA4333ED660172B1B1E7819E478B286E8F7148F50FDA5BC316 - BA4FC2B8EDFC0EB1C3E176D4E3D4AFEEE5D7BFB4F55BF9608A458D2711C30456 - C882566089E639704BC8764613E91F8ABE0D3E28F12378B3C2F69691E8FA8585 - D4369A2F8C14EBB60BE4A194DDACB26F95988803471C8772EE2AC5A32517CA2E - 7E36C9F18FC31E22F877A7EA9F10AF75AF0F698FA5E8BAC69B65791681E29B79 - 711CED25A38091B4B148C4CB2AC5958436D8F6A463DC3F663F86FAE7C43FD947 - E1DDE4DE2FB186CF505103D958E9CF0DD5B4663B9B7129956E544D2125530F1E - 06EEE179E395B975669ADFFCCF03F843FF00050F9BC2FF0009BC2BE133378574 - 4D274DD645EB5EDFD9C5325F189609638583B2ED8967904982082634078C83F5 - B7C49BEF8F5E1CF006ABE30F166A43C2FE14D16D05C5C5CDAE976DA608977752 - 5B9F98B22AE382580EA6BE5BF0C7FC13A63F889F1B7E257C3FF107897C2BA545 - E0FD434BD516F350BF4F31A0BB89CCC6168A366793CB440C8005570BB81DB5FA - 76DF113C3FA57C38B7F01CDA8F877C49A3C3631E9434A934B94CED6C91AC681C - CF341BF0A8BCAA16CE0E735D11C5495A2DBB69DFF468E7A9878BF79257F45FA9 - F949ACFED859FB55C269FF0015B58B3BB25659A6BE105A1DCC1C9578E468C862 - 99E3A9504F415F612FFC13A74FF187C39B7F881A7DC43AF7F6BE836FABD8E98D - 66EB3DF192133450B19640A9231755666185C939E39ECB4BD17E1FFC2BF146BD - E2FF0010787CDA5E5F451C1787518E2D1C5DBA6F2B752B9B378DA46DC434C650 - A0B64004927B6F167EDB5E15B58E592E6E34BF0959B010A346B71ACDAF2A3684 - 367322AEE5E4663620F50320D72D4A8AF7F3EDB9D5084ADA76EE7E6EEA9F0F7E - 335BCB63A2E9BE0AF09D9B4978CBA9E9B69A72FEE2D4C8A5C348CE33F2B9766C - 08A38CA317259847DC49F10BC55FB34DA40B1DD781FC496ECE74AFB2697E22D3 - F55F14C72CED78C9776ED03DDFD9D6289204633C24096E079615CABAFB57C43F - DA53C0FF0013EE3C41A6DE78EB45D36D64944204DE08179672DA410BDDB5BCE6 - F239BC962D6E92AEF88A130606F902D707F137F6BBF87FF06FE217FC2117D6FA - DBEA715C84B1BC8753FF00843B4081CC61E06636CD708B957E240910CB9FBABF - 30D232DD2D7B6DA13CBB391E9DF097C15F1035FF001BF82F55BFD3BC752D9DBE - A96923EADE25D3E5875092C6E6C259FC9D49F647992D6E2DCC44C84362E90316 - 5118AFA7BF673D5345F08E9FAADAB789344BE9219AD2DE386DAFA1BFB88922D3 - EDA160F0C26471B9A36254820F247079F89743F88BA9FF00656A1A7EA1A4F81F - C3B757FAE69B6CBAB59DEDD7882F07DAACAF4A4B6B7F792CBF37EE9536429971 - 7129014A864F54D07E25F89FE04FC3CBAD574FF1343A0C76DA6BDB2437B77656 - D6A26505949DD0C804859DCAF98E8C1A4C061804E752EDEA5C6D63E6EF077ECC - F2FED35FB6278C3C23A45AAB5A6A3E27BD92782451144D631CECF2218DD7A88D - 72A8547CC141031C6D7EDB5FF04C7D07E00FFC13B35CD11A6F06DBFC6CB18A0F - 105FE9566F135D6A3A7DBCCEB2C9688D1A4E8BE59323A2008CD0B8009518E416 - 2F1458B789755864F105BEA9AB3CD3ADCDADC496B7370F2E1891328CAEF63F33 - 007827E56191599FB44FC38F1D7ED1DE36D37C5BA1D8F847C3AB6F636561A55A - EBFAC4D72BA5E9F6D6CF0881895CC924B248F2C8CCAADE63B67926B49F3AAA9C - 7AA220A2E9B52EE7E6F5E5A27D8B77972BAED25BF72C700727231D873ED5DEF8 - 3BF6E1F8A9F0EB43FB0E8BF113C5D6F63020D907DB1A68E15E802F99BB68F618 - 15EF1FB447ECE7E34F005E58EBFE22B9F871AE6A175A447696F1697A85CC3379 - 085A34706E11BCD2376D2C1F3803278AF8EBC71E19BEF0C6AD25ADD43F659594 - 318FCC56CA9CE3A1231D7BD7546A49A21C5266D7C44FDA27C45F16AFD2E7C51A - EEBDE24BA8B2626D46F5E61167FB81890BFF000102A5F0AE953788FC3179AD49 - 6F247A6D94E2DF3190EEEFB771E3B000AF3DF70C7438F3C5B5FB5DC470C7B649 - A46088A187CC49C01E95EF1F04FC252D97C2FD4345D466861BCB8BF3730D9C37 - 51CB3483CA55C9446240C8C73CF5A4E4F61D91E6F73E28D15AC658E383578EF3 - 04C6CC23F2F3E8CB8DDF883F9D63CFA87DA59B103B2ED009C7B0F6C57B047FB3 - 3F8B2EA48E6D3B4BBC8CC4C1926F3043E5B0E41058820F715D5F833E0878825F - 1E7DB3C55AFDD2DD5F5BCB0DCDFDBDF7DBB54B7FDD0447C3BA172B8500798385 - C640A7EF2576174637816D193E0CDAE15F74D6A30BDF203A1E7D7915E9BFB327 - 8217429B4EF11586A925F4724F358DDA0824B5BAD3DDACE6640EB8276B61C874 - 62AC14F23070787FC3F6BA5E8935DF8C2C752D6B4FB142F756DE62D94FAC46A1 - 9A40B260AA33EDC67E6C13CE7AD7A17ECCBF027C1BFF0009E6B9A65BE8B1C725 - D69911CFF6F5CEB11582B48CD37D9F305BAC73A88B0D2B34EA239B09B99C38AA - 89DF4338C95B53C23E10F875BC41F1934CB3589526B9B989510289464B2ED5DA - C181CF1F2907A8073DFE97F8E1E19B8F0E7ECBDE2AD1AF9BF7BA3EA314C3CD8C - 79922398B6392077CB80BC6DC6DC118C78E7C40F0A59785BF6CE4F0EF87A48E5 - 86096C5567E6E5A277487703F30DD8661C139C6066BE8FFDAC3E1B78BADFE197 - 8E34FD4E3F0D5EC3A7E95A65CCB3E9FE7D8BDB037B300441286121380ADF3A85 - 5C101B9A950E68F3F6B04A694947B9E14FE19B8D27E1FF0082BC59A2E9F7D79A - C6A177E458C36914E646BA8CEE8063CB2B26589CAC4FBB181B41193C2EA5FB71 - 4E750B8FB769F711DEF98DF685F36F06D933F30C7DA4639CD7D45FB28E87378A - BE16FC3D81B4FD6E0B7F0AF8C975692F7ECB27D916DE24F34279DFEAC3193CA0 - 54FCC43E471CD7C07F1C2286D7E3578C238D19638F5BBD551C0C013B81DAB595 - 18593D2FFD7EA4C6ACAED33FA563E20D345BC68BA858B36F4EB709B9BE71938C - F73CD6A5A4E977FEA64498772AC187E95E0D04DABEB024B8BFF1ED8E817D771A - E45DF86BC892152DBC2317650CCBC8C851CE4F238AE9749BAF0BC3A15D69D2F8 - DA059A38E276D663D580B867B89A440A91EFFB3E4B28500C0C49906724835F46 - B1D564F4A6FE6EC7CCCB054E3BCF5F467A478B7C67A4FC3FB09AEB5ABC8F4FB7 - B7B692EDDE50DC471825C800124F070A32CC4600278AF1ABEFF8293FC1D5F076 - 8FAC5AF8B7ED9A5EB969737904E9673DBB3416E1CC876CEB1B00DE54C01C7CC2 - 09B1F74B0DDD27F675F0D69BAE5B6A967A6EB5A85F5A09560BDBB5B680979230 - 8FC8856525C29DCC1318690F3920B47EC6DE119F5AD5AFBC41A4E87AB26B51A5 - AC3A747A622C16A05BBC1B50B1242F92F2A7EEC46162665DACA140E3C557C5CD - 38C52B75FF002EDA9D586A38483529B6DF4D2DF3F97E879BFEDD5F1534EF8CFF - 00B1E47A96866C753D0EFB5DB0F22FECB54B6BDB7B80B2C81B6BC0EE8D878CA9 - 01B2086CE31839BFB25FECE7A0EB7FB2F6BFAC6B1A4DB5D5E6BD36A16905CCA9 - B9E0B516E21210E78CB19B247D3A55CFDBDBE1BC7F08BF651D1F44D1DA1B5F0F - 58EB16504165145E5AC2155F6851D028DA400A0718CE4E49F60F877E101E05FD - 967C2561E5F9771FD8ED3CA3D1E64F39FF00F1E7C7E15C38E9D4E48BA97E6EBF - E5A6E7760E34F99FB2B72F4FF83E67E196BF7D69E14F156AFA2EA17D630EA5A6 - 5F4D6F7104970A8E8CAE41E09CF38AEBFE1AEB17DA15A5D6ADA05E3DBEA562AF - 34535BBAEF50217DDB5BA64AE467DEBCAFFE0A55E188F47FDB43E264516369BA - 4B9618FE29208E46FF00C79CD7A2FEC3DF0DF4DF14695A2E8BA8798D6FAAEB90 - 46638D824972ECB1EC8518FDD691F081806605B211C80A7939934EFB58EF71B3 - 4D1EFDF0034BD4BE247C4BF0D78D2E3E227883537D36E7C3F77E25F0EEA77173 - E5D85AC97004F348E646824846C766C7CAAA58B05DC0554FD99FC69E34BBF873 - A2E87E0DD305F6A1E1FD5AED750BCBCB7B1BCB30BB4B431DB0998162B8958EC6 - 00F98BD8823CAAFF00E3BC7E36175E1BF87D7DA6E83A14D0DB88E4834CB98F53 - F2158C1E5493B090EF56320133166505C46C8ACCA7DAFF0066B8A4F85BE3BF12 - 5BE977DA7E9F63E13F10C3A9033DC08D238E4B49E38A188481434C0C9B0EE1F3 - 6D63CE0570EF16AC6F2D1EACF40F825F0BF54F1FFEDDD63FF0995ADE785FFB6B - C212DF5841A7CF6F1BDE436D3881164642E50B42EFB82346C47A29E6C7C54FD9 - EFE28FC60F8EBF15BC25A3FC52F105CD9F86EE34BB8D2ADB53D5EF63922FB642 - D7660B710BAC4AA8CA533229013196E589DEF881F1964F0AFEDB1F056EA6D235 - 45BDB0B6D4745B9B4816D2FE468AE2D992DD116C679DE461247B8A955241C0CE - 491E81F013E387857C35FB53FC62B8D7BC40BA45CEBABA20B6FEDA80E97712F9 - 164CB28F2650AF128908015F92369CB7DE3ECD3C251E5507BDF7D9DADD8F1EA6 - 2AB2939ADADB6FADD1F2BEA9F04BC57E10FDA33E1F7C31D5216BF97C51AE9D1E - 5B8B59E08D2D65478A594A4891A4B232C6CB316729F3700B95047D8BFB53FF00 - C12DE6F81BA0FDB06AD6B7927FC25BA8697A7DE5F5EB08F59B1F2ADA6B3712B8 - 9024CA5EF12566609E65BAA054196AE5749D5FC37F12FF006FBF875AC43A8432 - 697378C1AE2D354B7B2B8BA9229A6821B688C6A8426D79090CCEAC0EC003264B - 57D8FF00B60FECD31F86FE0F6B5A7EADE3CF1C34163AEDDF886D9EF67B2B3B4B - 39B51BD325D46B10B6173E5667B82B1A4E71B8F2531BBC6853849C979B5F73D0 - F61B924BA689FDEB53F1C7E36FC24B7F879F062E97C5DE2AD43C2F6BE3DD6ACA - F17C44D126AB63E1CBAB54D4A08ACEE45A949639EEA090C81BCA21163DACCC4B - F97CC7C42F817A2FC1EF85D6775E32F8A5A845AC58EA70E97A3369FA4B5E5BDF - 4915BC170927DAA69E2F214473C663223917E51C8C135F417FC14F34FD3F46F8 - 71F0CF5ED2EEAC7414B6B18AC353F105F4116B5E1E8818D847637FA701297776 - 0ECB3FD99CC6514647253E5EFDAFBC391D97EC69630CF6579A4FD9FC4D2CF6B0 - 5CDDFDA207CE9F6DFF001E4E4E5ACB68060EE2168B3EA7B274D464A2B6B2FC91 - 85393945B7DDFE67BB7C15F0578AAD758F0668763AF785350D0FC077A2F92E23 - D5EDEE66768768B49DDA08D23F2A28E5B948621BF699642EC4305AF61F879F18 - 3C4DF06F4ED763F10787AC2EA2D362FED1B486F750FECC478A3749A76C48CC1C - 11122AE028CE4019233F3F7C17F157D8BC6DE04D3759D427F10E9BA9E948F636 - B3465974A6DC4BC4DF383E5882D86DDA7E53B7E423E61EE07C6979E11FD9EBE2 - F6B9E245908D05EEA422DAF6DECD6FEE1EE1EDFCA86411C9E5A8598795D5385D - A9950C3292946AEDA0F4953DCF8E3E2AFED65F1735CD35B5ED07C49A2C769329 - BA1636BA3DA09A0899C8DCA2584B950782413820E0B0E6BC6356FDBA3E2F3339 - FF0084E35CB7DDD45B48B6DFFA2C2D7710FC6ED3AEB43D51B56B85BABABAB630 - DB43A8C03559A25F3176C725C490EE70AA58F500900F04F1B1FB4869DF01BE33 - 780BC2775E08D4B56F0D7C486B2B4B6D720BBD345B681712ADAAABB2B20CC4E6 - 65DBBC828C1B7391CBD1ECA4EED16AA2564D1E43E12FDABFC65ADDE6A6BAEEB1 - 26BD69F6379A78F57D40C92305C01E43484B79A376422F040248E323B58353D2 - 7C79E168F50B786CB528E152424B107F29C73B594F43FCC7B5780F893C197DE1 - 2F105C69BA959DC595EDBB18E48A54C143D7F11DC11C104115BBE0696FBC357A - B716323445C6D910FDC997D1877FE63DAA7A6869A6E75DA9FED15E24D160682C - F4FF000DD946A3681169AA0E07D49AE7EDBE30F89AE2EDA78EE63B395B86305B - C684FAF2067BD4DE21D3C6ACAD34719567E5E3C7DDCFA7B7BD57D37C35242BBA - E15608C6097738502B3BBEA5DA3BA417DE32F116B4BB6EB55BFB856FE1927665 - FC89AA724CD691AC97175E5F395E7073EDEB57754D66DED2D9A2B1856593A19E - 55F97FE02BFE39AE3A6692F6EDA4964692461C92739E6A772B5B1E93E16FDA07 - 53F09E9CB6D6BAA6AB3479E52E27F3A2FA04604015B3A77ED5B7966EBE769F14 - C579530B98190FA8C0207E55E77E04F86FAF7C48D5BEC1E1FD1757D72F76190C - 1A75949752851D5B646A4E07AE2B63C6BF0A358F864D1C3AAD8FD8EEA662803C - 88F2C6C02E54C609D87E75FBDCF3D2AA3269E8C9924F73D5BE1FFC5AF0FF0089 - 35CFED6B8D3F51B1D45583B5CCB6F1CF0CE4306C39C867E473C1E2BD53C73FB4 - 8EB5F123C21A968CB7D610DBEAF0DBDB5CBC21EDD658E079258E2DAED8442F26 - 4840061471F7B773773FB21782E2D52DECF4BD73C53AC5C5C68971AAAB5D4B1A - 431C296125C292D1A875225409B0060413CE700FB07ECADFB1CFC2DF125CDCD9 - F883C1975AF6A5A7696D35D06D6EEDD279C4AA36C680478254E03162A0E72010 - 71A46B54B72F46652A70DDF424FD9A7F683B1F861F0BAF7C23AB5B4EF6F34CD7 - 96F77664336F68E38CA39F30298F0808C65837B74F867E3AD85C37C6FF00191F - B3DC2E75CBDE190EE1FE90FD7DEBF483E13FC2BF82BE0CF0E78B7557F87B269F - 6BA0191A5D527D2E2B986C632F1A8625669652BBA2936B6CCFEF08C5705E29F0 - CF80755F136A57574D3C97373752CB2B996CBE7767258FFAFEE49AA956D9CBB1 - 11A69EC8FD53FD97BC7DA97C4BFD9EFC1BE21D52456D4B56D1EDEE6E5A30555E - 42BF33633C67AFD4D75F2F8774FD68FF00A669F6379890B8F3EDD24C10D907E6 - 079079CD1457D9D1D69C6FD91F175F4AB2B7765497E1F689AB3DD5BCDA65AAC3 - 1C8A1561530E094472D9420E7271907A281EB99B4EF045AFDA2E2382EB54B48E - DE408AB15EC841DD1A312771273CFE1818C73928AE4B5A31F57FA9D5CCFDFF00 - F0AFD0F05FF8290688F1FC1AD1ACE4BFBEB8B5B8F1258C6D1CAC8DD44A33BB6E - EE87B9AF68F891214F0B246BF2C71DBC88AA070004C0FD28A2BCDCDB75F33D2C - A7E197A9F807FF000552B7583F6D7F8A3B06DF9ED7BFAD95B13FA9AF4CFD81EF - 1B4BF1AFC3BDAA926DF1CE9080C83715FDFC073F51814515C54FE1F97E87A953 - 75EA790FC30B249758D77EF27D8746B578B61DB82D752B367D725D8FE5E95F48 - 786EE85B78CAC7C4135B69B797D71A0D8DCCC92D840B6F2B34B736EC0C488A80 - 18C63800E4EECEEC105158D959FF005D4A937747D71FF0506F835A07837F64DF - 837AFE9316A5617F278B7478E409AB5DB467CD8A62E515A53E536777316CFBC7 - DB1E3FF01FE0F687E284D4AE3548EFB516BAD3ECEFA412DFCEB9925D3D2E8825 - 1D4B2893202B12304E7279A28AEBC47C76E965F9238F08DBA4DF9BFCCCFF0085 - BE02D27C0BE39F19FF0063D8C3A70D2FC33AC49008C6E2A91C0BBA3DCD965595 - 0BC6ECA43ED91F6B23618755FF00048AD7ACBE27783B52F104DE1CF0D697793F - 8BF488825858EC4897ECAEA554B977C36DDC41620B33375268A2B8701FC59AF3 - 7F923BF19FEEF07E4BFF004A6715FF000559B0B5F0B7C3BF04C86CED350B3F12 - 5FDAE997B67730A88DA2FB3120AC91EC995964449011270CA78DACEADF217C7C - F164DAE7C10B0F0A8861B4D0FC1325C2E9B6F1348DFBC79912499DA466667641 - 1A750AA90C4AAAA1714515D4FE146503D334BD426F87D17C2EBED3E6B8F3BC47 - A2C33DCACB3C92468C751685B626EC0052250548233938CF35CB7C48F1DDCEAD - FB3B9B336B636F1DF6AD25D398632A5424F38112F3811EE3BB6E3860318000A2 - 8ACEA7C6553F84F12B3B15D47548A172CAB21C12B8CF4CD5111F972EDC9C1E28 - A282A47E93F80FF667F06FED8DFB2F7C4EF1278BB498E3F107803E1968BAC68F - A869C7ECF3453C3FDBD9DFD55D6516F0AB86072235C152011F9F1A3E8B0C76E3 - 1BBE5E073451584762A5F11721D1A16D46163BB3F7873D0D71DF192F24D13518 - DA17639936ED73B940C761DA8A2B396E694CE6B4FF00114D7C63478E10188CED - 07FC6B5347D1E0BAF1024722B347904AE719F6E39E7DB9A28A8347B1EC565A87 - 88BE0EF8125BBF08F8DBC71E154D540FB55B691AD4D6704FB49DBB96320B6373 - 6324E326B85BEF106ADAE5BADE6A9AC6A5AB4D6F2A4CAD7D209D999700167237 - 9E00182718028A2B334E87DF9FB347872D757F8A3AD79D18FF0044F00AA44100 - 4D9BD630C780393B9B9FF68D7AE7C1676F107C766D4266F2EE353B6B99AE3CB0 - 3123A35BCF939C9CB348C092738C6304668A2B78F4F4397B9E79E209E5BBF85D - F136CCCD2C70C7E13D58111B6DDE12E92450474C033C9C631D3B806BE42F8EDF - 10FC4769F1BFC65143E22D7A1863D72F51238EFA4548D45C38000CF000E31451 - 56BE1899FDA67FFFD9} - Stretch = True - end - object Label11: TLabel - Left = 648 - Top = 32 - Width = 244 - Height = 31 - Caption = 'Signaux complexes GL' - Font.Charset = ANSI_CHARSET - Font.Color = clWindowText - Font.Height = -27 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold, fsItalic] - ParentFont = False - end - object ImageAig: TImage - Left = 744 - Top = 480 - Width = 137 - Height = 57 - Picture.Data = { - 07544269746D6170E6200000424DE62000000000000036040000280000008800 - 0000360000000100080000000000B01C0000C30E0000C30E0000000100000001 - 0000000000000800000010000000180000002100000029000000310000003900 - 0000420000004A000000520000005A000000630000006B0000007B0000008400 - 00008C0000009C000000BD000000C6000000D6000000DE000000E7000000FF00 - 0000A5080000AD080000B5080000BD080000C6080000A5000800C60008000008 - 0800840808008C080800A5080800AD080800B5080800C6080800CE080800E708 - 080094100800AD10080094081000B508100094101000FF8C8C00EF948C00F794 - 8C00FF948C00F78C9400CE949400D6949400DE949400E7949400EF949400F794 - 9400FF9494009C9C9400AD9C9400B59C9400BD9C9400C69C9400DE9C9400E79C - 9400F79C9400FF9C9400A5A5940094949C00B5949C00BD949C00CE949C00D694 - 9C00DE949C00E7949C00EF949C00F7949C00FF949C00949C9C009C9C9C00A59C - 9C00AD9C9C00B59C9C00BD9C9C00C69C9C00CE9C9C00D69C9C00DE9C9C00E79C - 9C00F79C9C00FF9C9C009CA59C00A5A59C00ADA59C00BDA59C00C6A59C009C9C - A500A59CA500AD9CA500B59CA500BD9CA500C69CA50094A5A5009CA5A500A5A5 - A500ADA5A500C6A5A500A5A5AD00E7CEC600FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E1717171717171717174E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E17171717171717171739 - 5B4F4F60606060605F4E4E4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E - 4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E - 4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E - 4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4E4F4F4F5B4F521717 - 1717171717171700000000000000010100000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000031717171717171717170000000000000000010000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000031717171717171717174E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E521717171717171717174E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E531717 - 171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E521717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E531717171717171717174E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E521717171717171717174E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E521717 - 171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E5217171717171717171701010000000000000001010000004E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E000000000000000000000000000000000000000103030303030303030303 - 0303030303030303030404040407171717171717171717010101000000000001 - 01010000000000000000000000000000000000000000000000004E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E00000000000017171717171717171717 - 171717171717171717171717171717171717171717171717171717171717174E - 4E4E4E4E4E4E4E4E4E4E4E4E4E00000000000000000000000000000000000000 - 000000000001010000000000004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E000000 - 0117171717171717171717171717171717171717171717171717171717171717 - 171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E0000000001000000000000000000001F00010000004E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E0000000000171717171717171717171717171717171717 - 1717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E000000 - 000000010000000000000000000000014E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E00000000171717171717 - 17171717171717171717171717171717171717171717174E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000000000000000000101000000004E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E030300001717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717171717171717171717171717174E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 0001000000000000000000004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E000001031717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000010000000000001F00014E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E020303041717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 17174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E00000000 - 01000100000000004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E0000000308171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 17171717171717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E00000000000001000000004E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0304031717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000001F00000000 - 00004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 17171717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E0000000000000000004E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E4E4E171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717171717171717171717171717171717174E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000001F00000000004E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E4E4E17171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000 - 000000000000004E4E4E4E4E4E4E4E4E4E4E4E4E4E1717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 17171717171717171717171717171717171717171717171717174E4E4E4E4E4E - 4E4E4E4E4E4E4E4E4E4E4E0000001F000000004E4E4E4E4E4E4E4E4E4E171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E000000000000000000 - 4E4E4E4E17171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E - 4E4E4E01000001000000004E1717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717171717171717171717171717171717174E - 4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E0000014E171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 17171717171717171717174E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E1717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717174E4E4E4E4E4E4E4E - 4E4E171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717174E4E4E4E4E4E17171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 1717171717171717171717171717171717171717171717171717171717171717 - 171717171717171717171717171717171717} - Visible = False - end - object ImageTJD: TImage - Left = 744 - Top = 416 - Width = 137 - Height = 57 - Picture.Data = { - 07544269746D6170DE0F0000424DDE0F00000000000076000000280000008800 - 00003A0000000100040000000000680F0000C30E0000C30E0000100000001000 - 000011010000801F1F0098A2A000A2A29F00C5313100BD9E9D00A5A9A500B9A3 - A700EB040000F7000000FF000000FF080000F01A1F00F5928F00E79A9B00FB98 - 9800AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA33AAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA533333AAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5353 - 333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAA5333333333333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAA00033333333533333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAA000000003333333333353333AAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAA33300000000033333333333333333AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA533333333000000003333333333333 - 3333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5333333333333000000000 - 33333333533333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA53333333333333 - 3330000000003333333333333333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA333333 - 333333333333333300000000033333333535553333333AAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - A5333333333333333333333333330000000000333333333333333333333AAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAA0003333333333333333333333333333300000000000333333333333 - 3333333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAA00003333333333333333333333333333330000000000 - 0033333333333333333333333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA000033333333333333333333333333333 - 3333000000000000333333333355555533333333333333AAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA000033333333333333333 - 3333333333333333330000000000003333333333333333333333333333333333 - 33AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA000033333 - 3333333333333333333333333333333300000000000000033333333333333333 - 333333333333333333333333333333333333333AAAAAAAAAAAAAAAAAAAAAAAAA - AAA0003333333333333333333333333333333333333333000000000000000000 - 03333333333333333333333333333333333333333333333AAAAAAAAAAAAAAAAA - AAAAAAAAAAAAA000003333333333333333333333333333333333333333333330 - 0000000000000000000033333333333333333333333333333333333AAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAA0003333333333333333333333333333333333 - 333333333333333330000000000000000000000000000000033333333333333A - AAAAAAAA00000000000000000000000000000000033333333333333333333333 - 3333333333333333333333333333333333330000000000000000000000000000 - 0000000AAAAAAAAA000000000000000000000000000000000000033333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 300000000000000AAAAAAAAA5333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 33333333333333333333333AAAAAAAAA53333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333AAAAAAAAA533333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 333333333333333333333333333333333333333AAAAAAAAA5333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 33333333333333333333333333333333333333333333333AAAAAAAAA53333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333AAAAAAAAA - 5333333333333333333333333333333333333333333333333333333333333333 - 333333333333333333333333333333333333333333333333333333333333333A - AAAAAAAA53333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333AAAAAAAAA000000000000003333333333333333333333333333333333 - 3333333333333333333333333333333333333333330000000000000000000000 - 000000000000000AAAAAAAAA0000000000000000000000000000000000033333 - 33333333333333333333333333333333333333333333333333333300000AAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA53333333333333000000000000000000 - 0000000000000033333333333333333333333333333333333333333333333333 - 300000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA533333333333333333333333 - 3333333333300000000000000000000033333333333333333333333333333333 - 333333333333300000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5555555555555555 - 5555555555553333333333333333330000000000000000000333333333333333 - 3333333333333333333333333000AAAAAAAAAAAAAAAAAAAAAAAAAAAA33333333 - 3333333333333333333333333333333333333333333333330000000000000003 - 3333333333333333333333333333333333330000AAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAA33333333333333335555533333333333333 - 3000000000000333333333333333333333333333333333330000AAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA333333333353333 - 3333333333333330000000000003333333333333333333333333333333330000 - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAA3333333333355555533333333300000000000033333333333333333333333 - 333333300000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAA3333333533333333333333000000000003333333333 - 3333333333333333333000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3333335555553333333330000000 - 00033333333333333333333333333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA33333333333333 - 3333330000000003333333333333333333333AAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - 333333355533333333300000000033333333333333335AAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAA33333333333333333000000000333333333335AAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAA333333555333333330000000033333335AAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3333333333333333300000000 - 0335AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA333333553333 - 333300000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - 33333333333333333000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAA3333333553333330AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAA3333333335AAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA33333AAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3AAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAA} - Visible = False - end - object ImageTri: TImage - Left = 744 - Top = 344 - Width = 137 - Height = 65 - Picture.Data = { - 07544269746D617076120000424D761200000000000076000000280000008900 - 000040000000010004000000000000120000120B0000120B0000100000001000 - 000000000000A5A5A500CECECE00FF000000FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333111111033333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333111111111103333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333331111111111 - 1111120333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3311111111111111111000033333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333311111111111111110000000003333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333111111111111111110000000001110333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333111111111111111110000000011 - 1111111033333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333331111111111111111 - 1000000000111111111111103333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333111111 - 1111111111111000000000111111111111111110333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333111111111111111111110000000001111111111111111111111033333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333311111111111111111111100000000001111111111111111111 - 1111111103333000000033333333333333333333333333333333333333333333 - 3333333333333333333333311111111111111111111110000000000011111111 - 1111111111111111111110000333300000003333333333333333333333333333 - 3333333333333333333333333333311111111111111111111111111000000000 - 0001111111111111111111111111111110000000033330000000333333333333 - 3333333333333333333333333333333333311111111111111111111111111111 - 1000000000000111111111111111111111111111111110000000033333333000 - 0000333333333333333333333333333333333331111111111111111111111111 - 1111111111100000000000011111111111111111111111111111111110000000 - 0333333333333000000033333111111111111111111111111111111111111111 - 1111111111111111110000000000000001111111111111111111111111111111 - 1111100000000333333333333333300000003333301111111111111111111111 - 1111111111111111111111110000000000000000000111111111111111111111 - 1111111111111111100000000333333333333333333330000000333330111111 - 1111111111111111111111111111100000000000000000000011111111111111 - 1111111111111111111111111111000000000333333333333333333333333000 - 0000333330111111111111110000000000000000000000000000000011111111 - 1111111111111111111111111111111111111111000000000333333333333333 - 3333333333333000000033333000000000000000000000000000000000000111 - 1111111111111111111111111111111111111111111111111110000000000000 - 0000000000000000000000000033300000003333300000000000000011111111 - 1111111111111111111111111111111111111111111111111111111111111000 - 0000000000000000000000000000000000000000003330000000333330111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111110333000 - 0000333330111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111110333000000033333011111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111033300000003333301111111111111111111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111111111111111111103330000000333330111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111110333000 - 0000333330111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111110333000000033333011111111111111111111111111111111111111 - 1111111111111111111111111111111111111111111111111111111111111111 - 1111111111111111111111111033300000003333300000000000000011111111 - 1111111111111111111111111111111111111111111111111111111111111000 - 0000000000000000000000000000000000000000003330000000333330000000 - 0000000000000000000000000000011111111111111111111111111111111111 - 1111111111111111111000000000000000000000000000000000000000333000 - 0000333330111111111111110000000000000000000000000000000011111111 - 1111111111111111111111111111111111111111000000000333333333333333 - 3333333333333000000033333011111111111111111111111111111111111000 - 0000000000000000001111111111111111111111111111111111111111110000 - 0000033333333333333333333333300000003333301111111111111111111111 - 1111111111111111111111110000000000000000000111111111111111111111 - 1111111111111111100000000333333333333333333330000000333330111111 - 1111111111111111111111111111111111111111111111111100000000000000 - 0111111111111111111111111111111111111000000003333333333333333000 - 0000333333333333333333333333333333333331111111111111111111111111 - 1111111111100000000000011111111111111111111111111111111110000000 - 0333333333333000000033333333333333333333333333333333333333333333 - 3331111111111111111111111111111110000000000001111111111111111111 - 1111111111111000000003333333300000003333333333333333333333333333 - 3333333333333333333333333333311111111111111111111111111000000000 - 0001111111111111111111111111111110000000033330000000333333333333 - 3333333333333333333333333333333333333333333333333333333111111111 - 1111111111111000000000001111111111111111111111111111100003333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333311111111111111111111100000000001111111111111111111 - 1111111103333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333331111111111111111111100000000 - 0111111111111111111111103333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333111111 - 1111111111111000000000111111111111111110333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333111111111111111110000000001111111111111033333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333111111111111111110000000011 - 1111111033333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333331111111 - 1111111111000000000111033333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333311111111111111110000000003333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333111111111111111110000333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333331111111111 - 1111120333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333311111111110333333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333111111033333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333000 - 0000333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333000000033333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333300000003333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333330000000333333333333 - 3333333333333333333333333333333333333333333333333333333333333333 - 3333333333333333333333333333333333333333333333333333333333333000 - 0000} - Visible = False - end - object Label20: TLabel - Left = 648 - Top = 312 - Width = 221 - Height = 39 - Caption = - 'Les param'#232'tres en vert doivent '#234'tre valid'#233's en appuyant sur la t' + - 'ouche ENTREE apr'#232's leur introduction/modification' - WordWrap = True - end - object Label40: TLabel - Left = 656 - Top = 496 - Width = 222 - Height = 39 - Caption = - 'Les actionneurs ne sont utilisables qu'#39'en mode RUN avec CDM Rail' + - '. Les d'#233'tecteurs sont utilisables en mode autonome.' - Visible = False - WordWrap = True - end - object ButtonAppliquerEtFermer: TButton - Left = 240 - Top = 520 - Width = 201 - Height = 25 - Hint = 'Enregistre la configuration et ferme la fen'#234'tre' - Caption = 'Enregistre la configuration et Fermer' - ParentShowHint = False - ShowHint = True - TabOrder = 0 - OnClick = ButtonAppliquerEtFermerClick - end - object Button2: TButton - Left = 8 - Top = 520 - Width = 201 - Height = 25 - Hint = 'Ferme la fen'#234'tre sans enregistrer la configuration' - Caption = 'Fermer sans enregistrer la configuration' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = Button2Click - end - object PageControl: TPageControl - Left = 8 - Top = 8 - Width = 633 - Height = 505 - ActivePage = TabSheetAct - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - TabOrder = 2 - OnChange = PageControlChange - object TabSheetCDM: TTabSheet - Caption = 'CDM Rail' - object Label36: TLabel - Left = 24 - Top = 456 - Width = 369 - Height = 13 - Caption = - 'Param'#232'tres de connexion et d'#39#233'change avec CDM rail et param'#232'tres' + - ' g'#233'n'#233'raux' - WordWrap = True - end - object GroupBox1: TGroupBox - Left = 16 - Top = 8 - Width = 273 - Height = 81 - Caption = 'CDM Rail' - TabOrder = 0 - object Label1: TLabel - Left = 14 - Top = 26 - Width = 150 - Height = 13 - Caption = 'Adresse IP du serveur CDM rail ' - end - object Label2: TLabel - Left = 14 - Top = 50 - Width = 115 - Height = 13 - Caption = 'Port du serveur CDM rail' - end - object EditAdrIPCDM: TEdit - Left = 176 - Top = 24 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditAdrIPCDM' - end - object EditPortCDM: TEdit - Left = 176 - Top = 48 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditPortCDM' - end - end - object GroupBox5: TGroupBox - Left = 16 - Top = 96 - Width = 273 - Height = 193 - Caption = 'Au d'#233'marrage de Signaux_Complexes ' - TabOrder = 1 - object Label13: TLabel - Left = 8 - Top = 144 - Width = 242 - Height = 13 - Caption = 'Nom du fichier LAY '#224' utiliser au d'#233'marrage de CDM' - end - object CheckVerifVersion: TCheckBox - Left = 8 - Top = 48 - Width = 249 - Height = 17 - Caption = 'V'#233'rifications de nouvelle version au d'#233'marrage' - TabOrder = 0 - end - object CheckInfoVersion: TCheckBox - Left = 8 - Top = 64 - Width = 241 - Height = 17 - Caption = 'Information sur la version actuelle' - TabOrder = 1 - end - object CheckLanceCDM: TCheckBox - Left = 8 - Top = 120 - Width = 241 - Height = 25 - Caption = 'Lancer et connecter CDM Rail au d'#233'marrage' - TabOrder = 2 - WordWrap = True - end - object CheckAvecTCO: TCheckBox - Left = 8 - Top = 80 - Width = 89 - Height = 17 - Hint = 'Affiche le TCO au d'#233'marrage' - Caption = 'Avec TCO' - ParentShowHint = False - ShowHint = True - TabOrder = 3 - end - object CheckFenEt: TCheckBox - Left = 8 - Top = 24 - Width = 249 - Height = 17 - Hint = 'Taille de la fen'#234'tre maximalis'#233'e' - Caption = 'Fen'#234'tre '#233'tendue' - ParentShowHint = False - ShowHint = True - TabOrder = 4 - end - object CheckBandeauTCO: TCheckBox - Left = 8 - Top = 96 - Width = 129 - Height = 17 - Hint = 'Masque le bandeau de param'#233'trage du TCO au d'#233'marrage' - Caption = 'Bandeau TCO masqu'#233 - ParentShowHint = False - ShowHint = True - TabOrder = 5 - end - object EditLAY: TEdit - Left = 8 - Top = 160 - Width = 249 - Height = 21 - Hint = 'Nom du LAY avec .lay' - ParentShowHint = False - ShowHint = True - TabOrder = 6 - Text = 'Nom du fichier LAY avec .lay' - end - end - object GroupBox6: TGroupBox - Left = 312 - Top = 8 - Width = 281 - Height = 169 - Caption = 'Au d'#233'marrage de CDM Rail : serveur' - TabOrder = 2 - object RadioButton4: TRadioButton - Left = 8 - Top = 16 - Width = 185 - Height = 17 - Caption = 'Ne pas d'#233'marrer de serveur' - TabOrder = 0 - end - object RadioButton5: TRadioButton - Left = 8 - Top = 32 - Width = 225 - Height = 17 - Caption = 'XpressNet (lenz.roco)' - TabOrder = 1 - end - object RadioButton6: TRadioButton - Left = 8 - Top = 48 - Width = 217 - Height = 17 - Caption = 'P50X intellibox' - TabOrder = 2 - end - object RadioButton7: TRadioButton - Left = 8 - Top = 64 - Width = 249 - Height = 17 - Caption = 'Sprog' - TabOrder = 3 - end - object RadioButton8: TRadioButton - Left = 8 - Top = 80 - Width = 113 - Height = 17 - Caption = 'HSI88/HSI88-USB' - TabOrder = 4 - end - object RadioButton9: TRadioButton - Left = 8 - Top = 96 - Width = 193 - Height = 17 - Caption = 'ECOS ESU' - TabOrder = 5 - end - object RadioButton10: TRadioButton - Left = 8 - Top = 128 - Width = 233 - Height = 17 - Caption = 'FIS88 FeedBack (S88/S88N)' - TabOrder = 6 - end - object RadioButton11: TRadioButton - Left = 8 - Top = 112 - Width = 209 - Height = 17 - Caption = 'RS2PC (Rs FeedBack interface)' - TabOrder = 7 - end - object RadioButton12: TRadioButton - Left = 8 - Top = 144 - Width = 209 - Height = 17 - Caption = 'DCC++' - TabOrder = 8 - end - end - object GroupBox7: TGroupBox - Left = 312 - Top = 184 - Width = 281 - Height = 113 - Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ' - TabOrder = 3 - object RadioButton13: TRadioButton - Left = 8 - Top = 24 - Width = 97 - Height = 17 - Caption = 'Automatique' - TabOrder = 0 - end - object RadioButton14: TRadioButton - Left = 8 - Top = 40 - Width = 217 - Height = 17 - Caption = 'LI-USB' - TabOrder = 1 - end - object RadioButton15: TRadioButton - Left = 8 - Top = 56 - Width = 217 - Height = 17 - Caption = 'LI-101F' - TabOrder = 2 - end - object RadioButton16: TRadioButton - Left = 8 - Top = 72 - Width = 217 - Height = 17 - Caption = 'LI-100F' - TabOrder = 3 - end - object RadioButton17: TRadioButton - Left = 8 - Top = 88 - Width = 209 - Height = 17 - Caption = 'LI-100' - TabOrder = 4 - end - object RadioButton18: TRadioButton - Left = 152 - Top = 24 - Width = 113 - Height = 17 - Caption = 'Genli' - TabOrder = 5 - end - end - object GroupBox8: TGroupBox - Left = 16 - Top = 296 - Width = 273 - Height = 145 - Caption = 'Services CommIP CDM Rail' - TabOrder = 4 - object Label6: TLabel - Left = 8 - Top = 26 - Width = 215 - Height = 13 - Caption = 'Liste des '#233'v'#232'nements demand'#233's '#224' CDM Rail:' - end - object CheckBoxServAig: TCheckBox - Left = 8 - Top = 48 - Width = 113 - Height = 17 - Caption = 'Aiguillages' - TabOrder = 0 - end - object CheckBoxServDet: TCheckBox - Left = 8 - Top = 64 - Width = 89 - Height = 17 - Caption = 'D'#233'tecteurs' - TabOrder = 1 - end - object CheckBoxServAct: TCheckBox - Left = 8 - Top = 80 - Width = 81 - Height = 17 - Caption = 'Actionneurs' - TabOrder = 2 - end - object CheckServPosTrains: TCheckBox - Left = 8 - Top = 96 - Width = 145 - Height = 17 - Caption = 'Position trains (non utilis'#233')' - TabOrder = 3 - end - object CheckBoxSrvSig: TCheckBox - Left = 8 - Top = 112 - Width = 113 - Height = 17 - Caption = 'Signaux (non utilis'#233')' - TabOrder = 4 - end - end - object GroupBox15: TGroupBox - Left = 312 - Top = 304 - Width = 281 - Height = 137 - Caption = 'Divers' - TabOrder = 5 - object Label31: TLabel - Left = 8 - Top = 24 - Width = 204 - Height = 13 - Caption = 'Seuil du nombre de d'#233'tecteurs trop distants' - end - object Label41: TLabel - Left = 8 - Top = 68 - Width = 188 - Height = 13 - Caption = 'Taille de la fonte de la fen'#234'tre principale' - end - object Label44: TLabel - Left = 8 - Top = 45 - Width = 223 - Height = 13 - Caption = 'Nombre de cantons pr'#233'sence train avant signal' - end - object Label55: TLabel - Left = 8 - Top = 90 - Width = 32 - Height = 13 - Caption = 'Debug' - end - object EditNbDetDist: TEdit - Left = 240 - Top = 20 - Width = 25 - Height = 21 - ParentShowHint = False - ShowHint = False - TabOrder = 0 - Text = 'EditNbDetDist' - end - object EditFonte: TEdit - Left = 240 - Top = 64 - Width = 25 - Height = 21 - ParentShowHint = False - ShowHint = False - TabOrder = 1 - end - object EditNbCantons: TEdit - Left = 240 - Top = 41 - Width = 25 - Height = 21 - Hint = - 'Nombre de cantons pr'#233'sence train avant un signal pour le d'#233'clar' + - 'er verrouill'#233 - ParentShowHint = False - ShowHint = True - TabOrder = 2 - Text = 'EditNbCantons' - end - object EditDebug: TEdit - Left = 240 - Top = 88 - Width = 25 - Height = 21 - Hint = - 'Mode d'#233'bug au d'#233'marrage (0=sans ; 1=Log d'#233'marrage ; 2=D'#233'marrage ' + - 'par '#233'tape)' - ParentShowHint = False - ShowHint = True - TabOrder = 3 - end - end - end - object TabSheetAutonome: TTabSheet - Caption = 'Mode autonome' - ImageIndex = 1 - object Label9: TLabel - Left = 16 - Top = 456 - Width = 294 - Height = 13 - Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail' - WordWrap = True - end - object GroupBox2: TGroupBox - Left = 8 - Top = 8 - Width = 297 - Height = 113 - Caption = 'Acc'#232's USB/S'#233'rie '#224' l'#39'interface vers la centrale' - TabOrder = 0 - object Label3: TLabel - Left = 16 - Top = 24 - Width = 142 - Height = 13 - Caption = '1. Protocole s'#233'rie USB / COM' - end - object Label4: TLabel - Left = 16 - Top = 45 - Width = 138 - Height = 26 - Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)' - WordWrap = True - end - object Label5: TLabel - Left = 16 - Top = 75 - Width = 152 - Height = 26 - Caption = - '3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 100 m' + - 's)' - WordWrap = True - end - object EditcomUSB: TEdit - Left = 168 - Top = 22 - Width = 118 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditcomUSB' - end - object EditTempoOctetUSB: TEdit - Left = 232 - Top = 48 - Width = 49 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditTempoOctetUSB' - end - object EditTempoReponse: TEdit - Left = 232 - Top = 80 - Width = 49 - Height = 21 - TabStop = False - TabOrder = 2 - Text = 'EditTempoReponse' - end - end - object GroupBox4: TGroupBox - Left = 8 - Top = 128 - Width = 297 - Height = 65 - Caption = '4. Ent'#234'te des trames XpressNet vers l'#39'interface' - TabOrder = 1 - object RadioButton1: TRadioButton - Left = 8 - Top = 24 - Width = 225 - Height = 17 - Caption = '0 : Sans ent'#234'te (interfaces s'#233'rie)' - TabOrder = 0 - end - object RadioButton2: TRadioButton - Left = 8 - Top = 40 - Width = 225 - Height = 17 - Caption = '1 : Ent'#234'te FF FE (interfaces natives USB)' - TabOrder = 1 - end - end - object GroupBox3: TGroupBox - Left = 8 - Top = 200 - Width = 297 - Height = 73 - Caption = 'Acc'#232's Ethernet '#224' l'#39'interface' - TabOrder = 2 - object Label7: TLabel - Left = 14 - Top = 24 - Width = 95 - Height = 13 - Caption = 'Adresse IP interface' - end - object Label8: TLabel - Left = 14 - Top = 50 - Width = 82 - Height = 13 - Caption = 'Port de l'#39'interface' - end - object EditIPLenz: TEdit - Left = 176 - Top = 24 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditIPLenz' - end - object EditportLenz: TEdit - Left = 176 - Top = 48 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditportLenz' - end - end - object Memo1: TMemo - Left = 312 - Top = 8 - Width = 297 - Height = 81 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Lines.Strings = ( - '1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet.' - 'Attention de COM1 '#224' 30 - Si le port de l'#39'interface USB>30, il ' - 'faut le changer manuellement dans le gestionnaire des ' - 'p'#233'riph'#233'riques. Si COMX : Signaux complexes d'#233'tecte le' - 'port automatiquement (mais le d'#233'marrage est plus long)') - ReadOnly = True - TabOrder = 3 - end - object Memo2: TMemo - Left = 312 - Top = 96 - Width = 297 - Height = 97 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Lines.Strings = ( - '2. Valeur de temporisation entre deux octets transf'#233'r'#233's '#224' ' - 'l'#39'interface. Elle peut '#234'tre nulle. ' - 'Pour les interfaces s'#233'rie sans protocole (0) comme le ' - 'GENLI, il est conseill'#233' de la positionner '#224' une valeur de ' - 'l'#39'ordre de 30 (ms). ' - 'Pour les interfaces avec protocole mat'#233'riel RTS-CTS (2) ' - 'cette variable est ignor'#233'e.') - ReadOnly = True - TabOrder = 4 - end - object Memo3: TMemo - Left = 312 - Top = 200 - Width = 297 - Height = 89 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Lines.Strings = ( - '3. Valeur maximale par tranche de 100 ms qui d'#233'finit le temps ' - 'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's ' - 'une trame qui lui est transf'#233'r'#233'e. ' - 'Cette valeur est '#224' tester en fonction de votre interface. ' - 'En cas de d'#233'passement de la valeur, un message '#171' pas de ' - 'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.') - ReadOnly = True - TabOrder = 5 - end - object Memo4: TMemo - Left = 312 - Top = 296 - Width = 297 - Height = 57 - BevelInner = bvLowered - BevelKind = bkFlat - BorderStyle = bsNone - Lines.Strings = ( - '4. Pour l'#39'utilisation d'#39'interfaces s'#233'rie (GENLI), cette valeur ' - 'doit '#234'tre '#224' 0. Pour les interfaces utilisant nativement de ' - 'l'#39'USB, cette valeur doit '#234'tre '#224' 1. ') - ReadOnly = True - TabOrder = 6 - end - object GroupBox9: TGroupBox - Left = 8 - Top = 280 - Width = 297 - Height = 161 - Caption = 'Au d'#233'marrage de signaux complexes en mode autonome' - TabOrder = 7 - object Label32: TLabel - Left = 14 - Top = 42 - Width = 200 - Height = 13 - Caption = 'Temporisation de s'#233'quencement d'#39'init (ms)' - end - object CheckBoxInitAig: TCheckBox - Left = 16 - Top = 16 - Width = 257 - Height = 25 - Hint = 'Initialisation des aiguillages au d'#233'marrage' - Caption = 'Initialisation des aiguillages ' - ParentShowHint = False - ShowHint = True - TabOrder = 0 - WordWrap = True - end - object EditTempoAig: TEdit - Left = 224 - Top = 38 - Width = 41 - Height = 21 - Hint = 'Temporisation entre la commande de deux aiguillages' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - Text = 'EditTempoAig' - end - object CheckPosAig: TCheckBox - Left = 16 - Top = 64 - Width = 257 - Height = 17 - Caption = 'Demande positions des aiguillages '#224' la centrale' - TabOrder = 2 - end - object CheckBoxDemarUSB: TCheckBox - Left = 16 - Top = 80 - Width = 273 - Height = 17 - Hint = 'Connecte l'#39'interface XpressNet en COM ou USB au d'#233'marrage' - Caption = 'Connexion de l'#39'interface en COM ou USB' - ParentShowHint = False - ShowHint = True - TabOrder = 3 - end - object CheckBoxDemarEth: TCheckBox - Left = 16 - Top = 96 - Width = 265 - Height = 17 - Hint = 'Connecte l'#39'interface XpressNet en Ethernet ou Wifi au d'#233'marrage' - Caption = 'Connexion de l'#39'interface en Ethernet' - ParentShowHint = False - ShowHint = True - TabOrder = 4 - end - object CheckRoulage: TCheckBox - Left = 16 - Top = 120 - Width = 169 - Height = 17 - Caption = 'Option roulage des trains' - TabOrder = 5 - end - end - object GroupBox22: TGroupBox - Left = 312 - Top = 376 - Width = 297 - Height = 65 - Caption = 'Protocole de connexion '#224' la centrale ou '#224' l'#39'interface' - TabOrder = 8 - object RadioButtonDCC: TRadioButton - Left = 8 - Top = 40 - Width = 113 - Height = 17 - Hint = 'Protocole DCC++ vers la centrale/interface' - Caption = 'DCC++ (Arduino)' - ParentShowHint = False - ShowHint = True - TabOrder = 0 - end - object RadioButtonXpress: TRadioButton - Left = 8 - Top = 20 - Width = 257 - Height = 17 - Hint = 'Protocole Xpressnet vers la centrale/interface' - Caption = 'XpressNet (Lenz, Digikeijs, Roco, OpenDCC ...)' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - end - end - end - object TabSheetAig: TTabSheet - Caption = 'Aiguillages' - ImageIndex = 2 - object Label12: TLabel - Left = 0 - Top = 8 - Width = 468 - Height = 13 - Caption = - 'Liste de mod'#233'lisation des aiguillages - cliquez sur une ligne po' + - 'ur afficher la description de l'#39'aiguillage' - end - object Label28: TLabel - Left = 88 - Top = 208 - Width = 52 - Height = 13 - Caption = 'LabelTJD1' - end - object GroupBox11: TGroupBox - Left = 328 - Top = 32 - Width = 289 - Height = 417 - Caption = 'Description de l'#39'aiguillage' - TabOrder = 0 - object LabelAdresse: TLabel - Left = 5 - Top = 20 - Width = 196 - Height = 19 - Caption = 'Description de l'#39'aiguillage' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object GroupBox10: TGroupBox - Left = 8 - Top = 80 - Width = 177 - Height = 73 - Caption = 'Vitesse de franchissement d'#233'vi'#233' :' - TabOrder = 0 - object RadioButtonsans: TRadioButton - Left = 24 - Top = 16 - Width = 57 - Height = 17 - Caption = 'sans' - TabOrder = 0 - OnClick = RadioButtonsansClick - end - object RadioButton30kmh: TRadioButton - Left = 24 - Top = 32 - Width = 73 - Height = 17 - Caption = '30 km/h' - TabOrder = 1 - OnClick = RadioButton30kmhClick - end - object RadioButton60kmh: TRadioButton - Left = 24 - Top = 48 - Width = 73 - Height = 17 - Caption = '60 km/h' - TabOrder = 2 - OnClick = RadioButton60kmhClick - end - end - object CheckInverse: TCheckBox - Left = 16 - Top = 277 - Width = 137 - Height = 17 - Hint = 'Cocher si l'#39'aiguillage est invers'#233' dans CDM rail' - Caption = 'Inversion du pilotage' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = CheckInverseClick - end - object EditAdrAig: TEdit - Left = 208 - Top = 20 - Width = 33 - Height = 21 - TabOrder = 2 - OnChange = EditAdrAigChange - end - object ComboBoxAig: TComboBox - Left = 8 - Top = 48 - Width = 145 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 3 - OnChange = ComboBoxAigChange - Items.Strings = ( - 'Aiguillage simple' - 'TJD' - 'TJS' - 'Aiguillage triple' - 'Croisement') - end - object GroupBox16: TGroupBox - Left = 8 - Top = 160 - Width = 273 - Height = 113 - Caption = 'Repr'#233'sentation' - TabOrder = 4 - object LabelHG: TLabel - Left = 10 - Top = 21 - Width = 9 - Height = 16 - Caption = 'D' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object LabelBG: TLabel - Left = 10 - Top = 45 - Width = 9 - Height = 16 - Caption = 'P' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object ImageAffiche: TImage - Left = 72 - Top = 16 - Width = 137 - Height = 57 - end - object LabelHD: TLabel - Left = 217 - Top = 25 - Width = 9 - Height = 16 - Caption = 'S' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object LabelBD: TLabel - Left = 217 - Top = 49 - Width = 9 - Height = 16 - Caption = 'D' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object Label18: TLabel - Left = 212 - Top = 73 - Width = 16 - Height = 16 - Caption = 'S2' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object LabelTJD1: TLabel - Left = 80 - Top = 76 - Width = 52 - Height = 13 - Caption = 'LabelTJD1' - end - object LabelTJD2: TLabel - Left = 176 - Top = 76 - Width = 52 - Height = 13 - Caption = 'LabelTJD1' - end - object LabelL: TLabel - Left = 18 - Top = 69 - Width = 8 - Height = 16 - Caption = 'L' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - Visible = False - end - object Edit_HG: TEdit - Left = 24 - Top = 20 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 0 - OnChange = Edit_HGChange - end - object EditPointe_BG: TEdit - Left = 24 - Top = 44 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnChange = EditPointe_BGChange - end - object EditP1: TEdit - Left = 88 - Top = 28 - Width = 33 - Height = 21 - Color = clLime - TabOrder = 2 - OnKeyPress = EditP1KeyPress - end - object EditP2: TEdit - Left = 88 - Top = 48 - Width = 33 - Height = 21 - Color = clLime - TabOrder = 3 - OnKeyPress = EditP2KeyPress - end - object EditP3: TEdit - Left = 160 - Top = 22 - Width = 33 - Height = 21 - Color = clLime - TabOrder = 4 - OnKeyPress = EditP3KeyPress - end - object EditP4: TEdit - Left = 160 - Top = 44 - Width = 33 - Height = 21 - Color = clLime - TabOrder = 5 - OnKeyPress = EditP4KeyPress - end - object EditDevie_HD: TEdit - Left = 232 - Top = 20 - Width = 33 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 6 - OnChange = EditDevie_HDChange - end - object EditDroit_BD: TEdit - Left = 232 - Top = 44 - Width = 33 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 7 - OnChange = EditDroit_BDChange - end - object EditDevieS2: TEdit - Left = 232 - Top = 68 - Width = 33 - Height = 21 - Color = clLime - TabOrder = 8 - OnKeyPress = EditDevieS2KeyPress - end - object EditL: TEdit - Left = 32 - Top = 68 - Width = 33 - Height = 21 - TabOrder = 9 - Visible = False - OnChange = EditLChange - end - end - object ButtonRestaureAig: TButton - Left = 200 - Top = 48 - Width = 75 - Height = 25 - Hint = - 'Restaure la configuration de l'#39'aiguillage d'#39'avant sa modificatio' + - 'n' - Caption = 'Restaurer' - ParentShowHint = False - ShowHint = True - TabOrder = 5 - OnClick = ButtonRestaureAigClick - end - object EditAigTriple: TEdit - Left = 248 - Top = 20 - Width = 33 - Height = 21 - TabOrder = 6 - Visible = False - OnChange = EditAigTripleChange - end - object GroupBox21: TGroupBox - Left = 8 - Top = 304 - Width = 273 - Height = 97 - Caption = 'Initialisation de l'#39'aiguillage en mode autonome' - TabOrder = 7 - object Label37: TLabel - Left = 8 - Top = 26 - Width = 66 - Height = 13 - Caption = 'D'#233'vi'#233' ou droit' - end - object Label38: TLabel - Left = 8 - Top = 50 - Width = 129 - Height = 13 - Caption = 'Temporisation (1/10'#232'me s)' - end - object EditTempo10: TEdit - Left = 160 - Top = 48 - Width = 41 - Height = 21 - TabOrder = 0 - OnChange = EditTempo10Change - end - object ComboBoxDD: TComboBox - Left = 160 - Top = 24 - Width = 97 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 1 - OnChange = ComboBoxDDChange - Items.Strings = ( - 'D'#233'vi'#233 - 'Droit' - 'Non positionn'#233) - end - end - object GroupBoxEtatTJD: TGroupBox - Left = 192 - Top = 80 - Width = 89 - Height = 73 - Caption = 'Type TJD' - TabOrder = 8 - object RadioButtonTJD2: TRadioButton - Left = 8 - Top = 24 - Width = 65 - Height = 17 - Hint = 'TJD '#224' 1 moteur' - Caption = '2 '#233'tats' - ParentShowHint = False - ShowHint = True - TabOrder = 0 - OnClick = RadioButtonTJD2Click - end - object RadioButtonTJD4: TRadioButton - Left = 8 - Top = 40 - Width = 65 - Height = 17 - Hint = 'TJD '#224' 2 moteurs' - Caption = '4 '#233'tats' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = RadioButtonTJD4Click - end - end - end - object RichAig: TRichEdit - Left = 0 - Top = 56 - Width = 321 - Height = 369 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - HideSelection = False - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 1 - WordWrap = False - OnKeyDown = RichAigKeyDown - OnMouseDown = RichAigMouseDown - end - object ButtonNouvAig: TButton - Left = 0 - Top = 32 - Width = 65 - Height = 17 - Caption = 'Nouveau' - TabOrder = 2 - OnClick = ButtonNouvAigClick - end - object BoutSupAig: TButton - Left = 72 - Top = 32 - Width = 65 - Height = 17 - Caption = 'Supprime' - TabOrder = 3 - OnClick = BoutSupAigClick - end - object ButtonAjSup: TButton - Left = 144 - Top = 32 - Width = 121 - Height = 17 - Caption = 'Ajoute l'#39'aig supprim'#233 - TabOrder = 4 - OnClick = ButtonAjSupClick - end - end - object TabSheetBranches: TTabSheet - Caption = 'Branches' - ImageIndex = 3 - object Label14: TLabel - Left = 0 - Top = 8 - Width = 508 - Height = 13 - Caption = - 'Liste de mod'#233'lisation des branches - Cliquer sur une ligne pour ' + - 'la modifier - Valider la ligne apr'#232's modification' - end - object Label34: TLabel - Left = 472 - Top = 192 - Width = 136 - Height = 26 - Caption = 'Tapez CTRL-Z pour annuler une modification r'#233'cente' - WordWrap = True - end - object LabelNumBranche: TLabel - Left = 8 - Top = 448 - Width = 56 - Height = 13 - Caption = 'Branche n'#176' ' - end - object GroupBox20: TGroupBox - Left = 464 - Top = 24 - Width = 153 - Height = 161 - Caption = 'Commandes' - TabOrder = 0 - object LabelResult: TLabel - Left = 11 - Top = 112 - Width = 3 - Height = 13 - Caption = '-' - end - object ButtonValLigne: TButton - Left = 8 - Top = 24 - Width = 137 - Height = 33 - Hint = - 'V'#233'rifie la syntaxe de chaque ligne et valide les lignes correcte' + - 's' - Caption = 'Valider les modifications' - ParentShowHint = False - ShowHint = True - TabOrder = 0 - WordWrap = True - OnClick = ButtonValLigneClick - end - object ButtonVerifConfig: TButton - Left = 8 - Top = 64 - Width = 137 - Height = 33 - Hint = 'V'#233'rification de la coh'#233'rence de l'#39'ensemble de la configuration' - Caption = 'V'#233'rification de la coh'#233'rence' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - WordWrap = True - OnClick = ButtonVerifConfigClick - end - end - object RichBranche: TRichEdit - Left = 0 - Top = 24 - Width = 457 - Height = 417 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clGreen - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Lines.Strings = ( - 'RichBranche') - ParentFont = False - ScrollBars = ssBoth - TabOrder = 1 - WordWrap = False - OnKeyDown = RichBrancheKeyDown - OnMouseDown = RichBrancheMouseDown - end - object Memo5: TMemo - Left = 464 - Top = 232 - Width = 153 - Height = 209 - Lines.Strings = ( - 'Une ligne doit commencer par ' - 'un aiguillage (ou un buttoir) et ' - 'se terminer par un aiguillage ' - '(ou un buttoir). Il n'#39'est pas ' - 'n'#233'cessaire d'#39'avoir un ' - 'd'#233'tecteur dans une ligne.' - '' - 'Un aiguillage peut se retrouver ' - #224' plusieurs endroits de cette ' - 'section, mais pas un d'#233'tecteur. ' - '' - 'Tous les aiguillages d'#233'clar'#233's ' - 'doivent appara'#238'tre au moins ' - 'une fois dans les branches.' - '') - ReadOnly = True - TabOrder = 2 - end - end - object TabSheetSig: TTabSheet - Caption = 'Signaux' - ImageIndex = 4 - object Label15: TLabel - Left = 0 - Top = 8 - Width = 434 - Height = 13 - Caption = - 'Liste de mod'#233'lisation des signaux - cliquez sur une ligne pour a' + - 'fficher la description du signal' - end - object Label35: TLabel - Left = 40 - Top = 444 - Width = 201 - Height = 13 - Caption = 'Temporisation entre deux commandes (ms)' - end - object GroupBox12: TGroupBox - Left = 336 - Top = 32 - Width = 281 - Height = 425 - Caption = 'Description du signal' - TabOrder = 0 - object ImageSignal: TImage - Left = 8 - Top = 48 - Width = 81 - Height = 105 - end - object LabelAdrSig: TLabel - Left = 13 - Top = 20 - Width = 166 - Height = 19 - Caption = 'Description du signal ' - Font.Charset = ANSI_CHARSET - Font.Color = clBlack - Font.Height = -16 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object LabelDec: TLabel - Left = 92 - Top = 52 - Width = 53 - Height = 13 - Caption = 'D'#233'codeur: ' - end - object LabelDetAss: TLabel - Left = 88 - Top = 104 - Width = 86 - Height = 13 - Caption = 'D'#233'tecteur associ'#233 - end - object LabelElSuiv: TLabel - Left = 184 - Top = 104 - Width = 75 - Height = 13 - Caption = 'Element suivant' - end - object Label17: TLabel - Left = 8 - Top = 288 - Width = 228 - Height = 26 - Caption = - 'Conditions suppl'#233'mentaires d'#39'affichage du carr'#233' par les aiguilla' + - 'ges :' - WordWrap = True - end - object Label24: TLabel - Left = 104 - Top = 120 - Width = 8 - Height = 13 - Caption = '1' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBackground - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label25: TLabel - Left = 104 - Top = 144 - Width = 8 - Height = 13 - Caption = '2' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBackground - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label26: TLabel - Left = 104 - Top = 168 - Width = 8 - Height = 13 - Caption = '3' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBackground - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label27: TLabel - Left = 104 - Top = 192 - Width = 8 - Height = 13 - Caption = '4' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBackground - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold] - ParentFont = False - end - object Label33: TLabel - Left = 104 - Top = 76 - Width = 36 - Height = 13 - Caption = 'Aspect:' - end - object LabelUni: TLabel - Left = 8 - Top = 184 - Width = 72 - Height = 13 - Caption = 'Spec Unisemaf' - Visible = False - end - object Label43: TLabel - Left = 40 - Top = 160 - Width = 38 - Height = 16 - Caption = 'Voies:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -13 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - end - object MemoCarre: TMemo - Left = 8 - Top = 320 - Width = 265 - Height = 89 - ScrollBars = ssBoth - TabOrder = 12 - WordWrap = False - OnChange = MemoCarreChange - end - object ComboBoxDec: TComboBox - Left = 144 - Top = 48 - Width = 129 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 1 - OnChange = ComboBoxDecChange - end - object EditDet1: TEdit - Left = 120 - Top = 120 - Width = 41 - Height = 21 - TabOrder = 3 - OnChange = EditDet1Change - end - object EditSuiv1: TEdit - Left = 184 - Top = 120 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 4 - OnChange = EditSuiv1Change - end - object EditDet2: TEdit - Left = 120 - Top = 144 - Width = 41 - Height = 21 - TabOrder = 5 - OnChange = EditDet2Change - end - object EditSuiv2: TEdit - Left = 184 - Top = 144 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 6 - OnChange = EditSuiv2Change - end - object EditDet3: TEdit - Left = 120 - Top = 168 - Width = 41 - Height = 21 - TabOrder = 7 - OnChange = EditDet3Change - end - object EditSuiv3: TEdit - Left = 184 - Top = 168 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 8 - OnChange = EditSuiv3Change - end - object EditDet4: TEdit - Left = 120 - Top = 192 - Width = 41 - Height = 21 - TabOrder = 9 - OnChange = EditDet4Change - end - object EditSuiv4: TEdit - Left = 184 - Top = 192 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 10 - OnChange = EditSuiv4Change - end - object CheckVerrouCarre: TCheckBox - Left = 120 - Top = 216 - Width = 145 - Height = 17 - Hint = - 'Passe le feu au carr'#233' ci aucun train n'#39'est pr'#233'sent 3 cantons ava' + - 'nt le signal' - Caption = 'Verrouillable au carr'#233 - ParentShowHint = False - ShowHint = True - TabOrder = 11 - OnClick = CheckVerrouCarreClick - end - object EditAdrSig: TEdit - Left = 184 - Top = 18 - Width = 33 - Height = 21 - TabOrder = 0 - OnChange = EditAdrSigChange - end - object ComboBoxAsp: TComboBox - Left = 144 - Top = 72 - Width = 129 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 2 - OnChange = ComboBoxAspChange - Items.Strings = ( - '2 feux' - '3 feux' - '4 feux' - '5 feux' - '7 feux' - '9 feux' - 'Directionnel 2 feux' - 'Directionnel 3 feux' - 'Directionnel 4 feux' - 'Directionnel 5 feux' - 'Directionnel 6 feux') - end - object EditSpecUni: TEdit - Left = 8 - Top = 200 - Width = 33 - Height = 21 - TabOrder = 14 - Visible = False - OnChange = EditSpecUniChange - end - object Buttonrestaure: TButton - Left = 8 - Top = 224 - Width = 75 - Height = 25 - Hint = 'Restaure la configuration du feu d'#39'avant sa modification' - Caption = 'Restaurer' - ParentShowHint = False - ShowHint = True - TabOrder = 13 - OnClick = ButtonrestaureClick - end - object CheckBoxFB: TCheckBox - Left = 120 - Top = 264 - Width = 153 - Height = 17 - Caption = 'Avec demande feu blanc' - TabOrder = 15 - OnClick = CheckBoxFBClick - end - object ButtonConfigSR: TButton - Left = 8 - Top = 256 - Width = 75 - Height = 25 - Caption = 'Configuration' - TabOrder = 16 - Visible = False - OnClick = ButtonConfigSRClick - end - object CheckFVC: TCheckBox - Left = 120 - Top = 232 - Width = 145 - Height = 17 - Hint = 'Remplace le feu vert par un feu vert clignotant' - Caption = 'Feu vert clignotant' - ParentShowHint = False - ShowHint = True - TabOrder = 17 - OnClick = CheckFVCClick - end - object CheckFRC: TCheckBox - Left = 120 - Top = 248 - Width = 145 - Height = 17 - Hint = 'Remplace le s'#233'maphore par un feu rouge clignotant' - Caption = 'Feu rouge clignotant' - ParentShowHint = False - ShowHint = True - TabOrder = 18 - OnClick = CheckFRCClick - end - end - object RichSig: TRichEdit - Left = 0 - Top = 56 - Width = 329 - Height = 345 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - HideSelection = False - Lines.Strings = ( - 'RichSig') - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 1 - WordWrap = False - OnKeyDown = RichSigKeyDown - OnMouseDown = RichSigMouseDown - end - object ButtonNouvFeu: TButton - Left = 0 - Top = 32 - Width = 65 - Height = 17 - Caption = 'Nouveau' - TabOrder = 2 - OnClick = ButtonNouvFeuClick - end - object ButtonSupFeu: TButton - Left = 72 - Top = 32 - Width = 65 - Height = 17 - Caption = 'Supprime' - TabOrder = 3 - OnClick = ButtonSupFeuClick - end - object ButtonInsFeu: TButton - Left = 144 - Top = 32 - Width = 145 - Height = 17 - Caption = 'Ajouter le feu supprim'#233 - TabOrder = 4 - OnClick = ButtonInsFeuClick - end - object CheckBoxRazSignaux: TCheckBox - Left = 0 - Top = 402 - Width = 169 - Height = 17 - Hint = 'Envoie un 0 apr'#232's chaque commande sur un signal aux d'#233'codeurs' - Caption = 'Raz signaux apr'#232's commande' - ParentShowHint = False - ShowHint = True - TabOrder = 5 - end - object EditTempoFeu: TEdit - Left = 0 - Top = 440 - Width = 33 - Height = 21 - TabOrder = 6 - OnChange = EditTempoFeuChange - end - end - object TabSheetAct: TTabSheet - Caption = 'Actionneurs/D'#233'tecteurs' - ImageIndex = 5 - object Label16: TLabel - Left = 0 - Top = 8 - Width = 459 - Height = 13 - Caption = - 'Liste de mod'#233'lisation des actionneurs - cliquez sur une ligne po' + - 'ur afficher la description de l'#39'action' - end - object GroupBox13: TGroupBox - Left = 352 - Top = 32 - Width = 257 - Height = 441 - Caption = 'Description de l'#39'action' - TabOrder = 0 - object GroupBoxPN: TGroupBox - Left = 0 - Top = 24 - Width = 233 - Height = 401 - Caption = 'Action gestion passage '#224' niveau' - ParentShowHint = False - ShowHint = False - TabOrder = 2 - object Label21: TLabel - Left = 8 - Top = 20 - Width = 100 - Height = 13 - Caption = 'Adresse de fermeture' - end - object Label22: TLabel - Left = 8 - Top = 44 - Width = 94 - Height = 13 - Caption = 'Adresse d'#39'ouverture' - end - object Label23: TLabel - Left = 8 - Top = 116 - Width = 30 - Height = 13 - Caption = 'Voie 1' - end - object LabelV2: TLabel - Left = 8 - Top = 140 - Width = 30 - Height = 13 - Caption = 'Voie 2' - end - object LabelV3: TLabel - Left = 8 - Top = 164 - Width = 30 - Height = 13 - Caption = 'Voie 3' - end - object Shape1: TShape - Left = 64 - Top = 105 - Width = 137 - Height = 2 - end - object Label39: TLabel - Left = 8 - Top = 188 - Width = 30 - Height = 13 - Caption = 'Voie 4' - end - object Label45: TLabel - Left = 64 - Top = 216 - Width = 54 - Height = 13 - Caption = 'Zone ferme' - end - object Label46: TLabel - Left = 152 - Top = 216 - Width = 55 - Height = 13 - Caption = 'Zone ouvre' - end - object Label47: TLabel - Left = 8 - Top = 244 - Width = 30 - Height = 13 - Caption = 'Voie 1' - end - object Label48: TLabel - Left = 8 - Top = 268 - Width = 30 - Height = 13 - Caption = 'Voie 2' - end - object Label49: TLabel - Left = 8 - Top = 292 - Width = 30 - Height = 13 - Caption = 'Voie 3' - end - object Label50: TLabel - Left = 8 - Top = 316 - Width = 30 - Height = 13 - Caption = 'Voie 4' - end - object Shape2: TShape - Left = 64 - Top = 233 - Width = 150 - Height = 2 - end - object EditAdrFerme: TEdit - Left = 120 - Top = 16 - Width = 41 - Height = 21 - TabOrder = 0 - OnChange = EditAdrFermeChange - end - object EditAdrOuvre: TEdit - Left = 120 - Top = 40 - Width = 41 - Height = 21 - TabOrder = 1 - OnChange = EditAdrOuvreChange - end - object EditCmdFerme: TEdit - Left = 168 - Top = 16 - Width = 25 - Height = 21 - Hint = 'Commande de fermeture (0 '#224' 2)' - ParentShowHint = False - ShowHint = True - TabOrder = 2 - OnChange = EditCmdFermeChange - end - object EditCdeOuvre: TEdit - Left = 168 - Top = 40 - Width = 25 - Height = 21 - Hint = 'Commande d'#39'ouverture (0 '#224' 2)' - ParentShowHint = False - ShowHint = True - TabOrder = 3 - OnChange = EditCdeOuvreChange - end - object EditV1F: TEdit - Left = 64 - Top = 112 - Width = 41 - Height = 21 - Hint = 'Actionneur 1 fermeture' - ParentShowHint = False - ShowHint = True - TabOrder = 4 - OnChange = EditV1FChange - end - object StaticText1: TStaticText - Left = 64 - Top = 88 - Width = 49 - Height = 17 - Caption = 'Act ferme' - TabOrder = 5 - end - object StaticText2: TStaticText - Left = 152 - Top = 88 - Width = 50 - Height = 17 - Caption = 'Act ouvre' - TabOrder = 6 - end - object EditV2F: TEdit - Left = 64 - Top = 136 - Width = 41 - Height = 21 - TabOrder = 7 - OnChange = EditV2FChange - end - object EditV3F: TEdit - Left = 64 - Top = 160 - Width = 41 - Height = 21 - TabOrder = 8 - OnChange = EditV3FChange - end - object EditV1O: TEdit - Left = 152 - Top = 112 - Width = 41 - Height = 21 - Hint = 'Actionneur 1 ouverture' - ParentShowHint = False - ShowHint = True - TabOrder = 9 - OnChange = EditV1OChange - end - object EditV2O: TEdit - Left = 152 - Top = 136 - Width = 41 - Height = 21 - TabOrder = 10 - OnChange = EditV2OChange - end - object EditV3O: TEdit - Left = 152 - Top = 160 - Width = 41 - Height = 21 - TabOrder = 11 - OnChange = EditV3OChange - end - object EditV4F: TEdit - Left = 64 - Top = 184 - Width = 41 - Height = 21 - TabOrder = 12 - OnChange = EditV4FChange - end - object EditV4O: TEdit - Left = 152 - Top = 184 - Width = 41 - Height = 21 - TabOrder = 13 - OnChange = EditV4OChange - end - object EditZdet1V1F: TEdit - Left = 64 - Top = 240 - Width = 33 - Height = 21 - TabOrder = 14 - OnChange = EditZdet1V1FChange - end - object EditZdet1V1O: TEdit - Left = 152 - Top = 240 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 1 zone d'#39'ouverture' - TabOrder = 15 - OnChange = EditZdet1V1OChange - end - object EditZdet2V1F: TEdit - Left = 96 - Top = 240 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone de fermeture' - TabOrder = 16 - OnChange = EditZdet2V1FChange - end - object EditZdet2V1O: TEdit - Left = 184 - Top = 240 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone d'#39'ouverture' - TabOrder = 17 - OnChange = EditZdet2V1OChange - end - object EditZdet1V2F: TEdit - Left = 64 - Top = 264 - Width = 33 - Height = 21 - TabOrder = 18 - OnChange = EditZdet1V2FChange - end - object EditZdet2V2F: TEdit - Left = 96 - Top = 264 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone de fermeture' - TabOrder = 19 - OnChange = EditZdet2V2FChange - end - object EditZdet1V2O: TEdit - Left = 152 - Top = 264 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 1 zone d'#39'ouverture' - TabOrder = 20 - OnChange = EditZdet1V2OChange - end - object EditZdet2V2O: TEdit - Left = 184 - Top = 264 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone d'#39'ouverture' - TabOrder = 21 - OnChange = EditZdet2V2OChange - end - object EditZdet1V3F: TEdit - Left = 64 - Top = 288 - Width = 33 - Height = 21 - TabOrder = 22 - OnChange = EditZdet1V3FChange - end - object EditZdet2V3F: TEdit - Left = 96 - Top = 288 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone de fermeture' - TabOrder = 23 - OnChange = EditZdet2V3FChange - end - object EditZdet1V3O: TEdit - Left = 152 - Top = 288 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 1 zone d'#39'ouverture' - TabOrder = 24 - OnChange = EditZdet1V3OChange - end - object EditZdet2V3O: TEdit - Left = 184 - Top = 288 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone d'#39'ouverture' - TabOrder = 25 - OnChange = EditZdet2V3OChange - end - object EditZdet1V4F: TEdit - Left = 64 - Top = 312 - Width = 33 - Height = 21 - TabOrder = 26 - OnChange = EditZdet1V4FChange - end - object EditZdet2V4F: TEdit - Left = 96 - Top = 312 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone de fermeture' - TabOrder = 27 - OnChange = EditZdet2V4FChange - end - object EditZdet1V4O: TEdit - Left = 152 - Top = 312 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 1 zone d'#39'ouverture' - TabOrder = 28 - OnChange = EditZdet1V4OChange - end - object EditZdet2V4O: TEdit - Left = 184 - Top = 312 - Width = 33 - Height = 21 - Hint = 'D'#233'tecteur 2 zone d'#39'ouverture' - TabOrder = 29 - OnChange = EditZdet2V4OChange - end - object Button1: TButton - Left = 200 - Top = 16 - Width = 27 - Height = 21 - Hint = 'Test de fermeture (mode CDM ou connect'#233' '#224' l'#39'interface)' - Caption = 'test' - ParentShowHint = False - ShowHint = True - TabOrder = 30 - OnClick = Button1Click - end - object Button3: TButton - Left = 200 - Top = 40 - Width = 27 - Height = 21 - Hint = 'Test d'#39'ouverture (mode CDM ou connect'#233' '#224' l'#39'interface)' - Caption = 'test' - ParentShowHint = False - ShowHint = True - TabOrder = 31 - OnClick = Button3Click - end - object CheckPnPulse: TCheckBox - Left = 8 - Top = 64 - Width = 97 - Height = 17 - Hint = - 'Sortie impulsionnelle ou continue (attention peut d'#233'truire les m' + - 'oteurs '#224' bobine)' - Caption = 'Impulsionnel' - ParentShowHint = False - ShowHint = True - TabOrder = 32 - OnClick = CheckPnPulseClick - end - end - object GroupBoxRadio: TGroupBox - Left = 8 - Top = 16 - Width = 225 - Height = 73 - Caption = 'Type d'#39'action' - TabOrder = 0 - object RadioButtonLoc: TRadioButton - Left = 24 - Top = 16 - Width = 193 - Height = 17 - Caption = 'Fonction F pour locomotive' - TabOrder = 0 - OnClick = RadioButtonLocClick - end - object RadioButtonAccess: TRadioButton - Left = 24 - Top = 32 - Width = 161 - Height = 17 - Caption = 'Accessoire' - TabOrder = 1 - OnClick = RadioButtonAccessClick - end - object RadioButtonSon: TRadioButton - Left = 24 - Top = 48 - Width = 161 - Height = 17 - Caption = 'Son' - TabOrder = 2 - OnClick = RadioButtonSonClick - end - end - object GroupBoxAct: TGroupBox - Left = 8 - Top = 84 - Width = 233 - Height = 341 - Caption = 'Action fonction de locomotive ' - TabOrder = 1 - object GroupBox18: TGroupBox - Left = 8 - Top = 16 - Width = 217 - Height = 153 - Caption = 'D'#233'clencheur ' - TabOrder = 0 - object LabelActionneur: TLabel - Left = 8 - Top = 96 - Width = 54 - Height = 26 - Caption = 'Actionneur D'#233'tecteurZ' - WordWrap = True - end - object Label30: TLabel - Left = 168 - Top = 104 - Width = 6 - Height = 13 - Caption = #224 - end - object LabelTrain: TLabel - Left = 16 - Top = 126 - Width = 49 - Height = 13 - Caption = 'Train D'#233'cl' - end - object EditAct: TEdit - Left = 72 - Top = 100 - Width = 41 - Height = 21 - ParentShowHint = False - ShowHint = True - TabOrder = 0 - OnChange = EditActChange - end - object EditEtatActionneur: TEdit - Left = 184 - Top = 100 - Width = 17 - Height = 21 - TabOrder = 1 - OnChange = EditEtatActionneurChange - end - object EditTrainDecl: TEdit - Left = 72 - Top = 124 - Width = 129 - Height = 21 - Hint = - 'Train d'#233'clencheur pour lequel la condition s'#39'applique (mettre X ' + - 'pour tous les trains) - d'#233'clenchement par actionneur uniquement' - ParentShowHint = False - ShowHint = True - TabOrder = 2 - OnChange = EditTrainDeclChange - end - object RadioGroup1: TRadioGroup - Left = 8 - Top = 16 - Width = 193 - Height = 73 - Caption = 'Type de d'#233'clenchement' - TabOrder = 3 - end - object RadioButtonActDet: TRadioButton - Left = 32 - Top = 32 - Width = 161 - Height = 17 - Caption = 'Actionneur/D'#233'tecteur' - TabOrder = 4 - OnClick = RadioButtonActDetClick - end - object RadioButtonZones: TRadioButton - Left = 32 - Top = 48 - Width = 161 - Height = 17 - Caption = 'Zones de d'#233'tection' - TabOrder = 5 - OnClick = RadioButtonZonesClick - end - object EditAct2: TEdit - Left = 120 - Top = 100 - Width = 41 - Height = 21 - TabOrder = 6 - OnChange = EditAct2Change - end - object RadioButtonAig: TRadioButton - Left = 32 - Top = 64 - Width = 145 - Height = 17 - Caption = 'Ev'#232'nement aiguillage' - TabOrder = 7 - OnClick = RadioButtonAigClick - end - end - object GroupBox19: TGroupBox - Left = 8 - Top = 176 - Width = 217 - Height = 129 - Caption = 'Destinataire de l'#39'action ' - TabOrder = 1 - object LabelTempo: TLabel - Left = 48 - Top = 44 - Width = 55 - Height = 13 - Caption = 'Tempo (ms)' - end - object LabelFonction: TLabel - Left = 24 - Top = 18 - Width = 80 - Height = 13 - Alignment = taRightJustify - BiDiMode = bdLeftToRight - Caption = 'Action : Fonction' - ParentBiDiMode = False - end - object Labela: TLabel - Left = 144 - Top = 20 - Width = 6 - Height = 13 - Caption = #224 - end - object LabelNomSon: TLabel - Left = 16 - Top = 32 - Width = 91 - Height = 13 - Caption = 'Nom du fichier son:' - end - object SpeedButtonJoue: TSpeedButton - Left = 56 - Top = 88 - Width = 41 - Height = 33 - Hint = 'Joue le son' - Flat = True - Glyph.Data = { - 4E010000424D4E010000000000003E0000002800000022000000220000000100 - 010000000000100100000000000000000000020000000000000000000000FFFF - FF00FFFFFFFFC0000000FFFFFFFFC0000000FFFFFFFFC0000000C0000000C000 - 0000800000004000000000000000000000001FFFFFFE000000003FFFFFFF0000 - 00003FFFFFFF000000003FFFFFFF000000003FF8FFFF000000003FF03FFF0000 - 00003FF00FFF000000003FF303FF000000003FF3C0FF000000003FF3F07F0000 - 00003FF3FC7F000000003FF3FC7F000000003FF3E07F000000003FF381FF0000 - 00003FF207FF000000003FF01FFF000000003FF07FFF000000003FF9FFFF0000 - 00003FFFFFFF000000003FFFFFFF000000003FFFFFFF000000001FFFFFFE0000 - 000000000000000000008000000040000000C0000000C0000000FFFFFFFFC000 - 0000FFFFFFFFC0000000FFFFFFFFC0000000} - ParentShowHint = False - ShowHint = True - OnClick = SpeedButtonJoueClick - end - object SpeedButtonCharger: TSpeedButton - Left = 120 - Top = 88 - Width = 25 - Height = 34 - Hint = 'Ouvre un fichier son WAV' - Flat = True - Glyph.Data = { - BA060000424DBA06000000000000360400002800000019000000170000000100 - 0800000000008402000000000000000000000001000000000000000000000000 - 80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA - A6000020400000206000002080000020A0000020C0000020E000004000000040 - 20000040400000406000004080000040A0000040C0000040E000006000000060 - 20000060400000606000006080000060A0000060C0000060E000008000000080 - 20000080400000806000008080000080A0000080C0000080E00000A0000000A0 - 200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0 - 200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0 - 200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000 - 20004000400040006000400080004000A0004000C0004000E000402000004020 - 20004020400040206000402080004020A0004020C0004020E000404000004040 - 20004040400040406000404080004040A0004040C0004040E000406000004060 - 20004060400040606000406080004060A0004060C0004060E000408000004080 - 20004080400040806000408080004080A0004080C0004080E00040A0000040A0 - 200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0 - 200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0 - 200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000 - 20008000400080006000800080008000A0008000C0008000E000802000008020 - 20008020400080206000802080008020A0008020C0008020E000804000008040 - 20008040400080406000804080008040A0008040C0008040E000806000008060 - 20008060400080606000806080008060A0008060C0008060E000808000008080 - 20008080400080806000808080008080A0008080C0008080E00080A0000080A0 - 200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0 - 200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0 - 200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000 - 2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020 - 2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040 - 2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060 - 2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080 - 2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0 - 2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0 - 2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000 - FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0A0A00FFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF272727271C120A00FFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFF000000FF27BF7F77776F2727271D130A0000FFFFFF - FFFFFFFFFFFFFF000000FF26F6BFBFBF7F7F7F77776F2F27271D130A0000FFFF - FFFFFF000000FF2F6FF6BFBFBFBFBF7F7F7F7F7F7F6F2F2F270AFFFFFFFFFF00 - 0000FF2727F6BFBFBFBFBFBF7F7F7F7F7F7F7F7F7726FFFFFFFFFF000000FF27 - 6FF6BFBFBFBFBFBFBF7F7F7F7F7F7F7F7F2F00FFFFFFFF000000FF27BF6FF6BF - BFBFBFBFBFBF7F7F7F7F7F7F7F771CFFFFFFFF000000FF27BF27F6BFBFBFBFBF - BFBFBF7F7F7F7F7F7FBF2F00FFFFFF000000FF27BF2FF6BFBFBFBFBFBFBFBFBF - 7F7F7F7F7FBF7713FFFFFF000000FF277F376FF6BFBFBFBFBFBFBFBFBF7F7F7F - 7F7FBF2F00FFFF000000FF277F3727F6BFBFBFBFBFBFBFBFBFBF7F7F7F7FBF77 - 0AFFFF000000FF277F372F27276FF6F6F6F6F6BFBFBFBFBF7F7F7FBF2700FF00 - 0000FF277F37373737372F2F27276F77BFBFBFBFBFBFBFBF6F0AFF000000FF27 - 7F373737373737373737372F2F276F6F7777777F7F1DFF000000FF277F373737 - 3737373737373737373737372F6F2F272727FF000000FF277F37373737373737 - 3737373737373737377FBF270A0AFF000000FF277F373737373737377FBFBFBF - BFBFBFBFBFF6270AFFFFFF000000FF277F373737373737372666272727272727 - 272752FFFFFFFF000000FF27BFBFBFBFBFBFBFBF25FFFFFFFFFFFFFFFFFFFFFF - FFFFFF000000FF266F2727272727276F13FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 - 0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000} - ParentShowHint = False - ShowHint = True - OnClick = SpeedButtonChargerClick - end - object Label42: TLabel - Left = 16 - Top = 68 - Width = 49 - Height = 13 - Caption = 'Train Dest' - end - object EditTempo: TEdit - Left = 112 - Top = 38 - Width = 33 - Height = 21 - TabOrder = 0 - OnChange = EditTempoChange - end - object CheckRAZ: TCheckBox - Left = 32 - Top = 48 - Width = 145 - Height = 17 - Caption = 'Remise '#224' 0 apr'#232's pilotage' - TabOrder = 1 - OnClick = CheckRAZClick - end - object EditFonctionAccess: TEdit - Left = 112 - Top = 14 - Width = 25 - Height = 21 - Hint = 'Num'#233'ro de fonction du d'#233'codeur du train (0 '#224' 12 ou 28)' - ParentShowHint = False - ShowHint = True - TabOrder = 2 - OnChange = EditFonctionAccessChange - end - object EditEtatFoncSortie: TEdit - Left = 160 - Top = 14 - Width = 25 - Height = 21 - TabOrder = 3 - OnChange = EditEtatFoncSortieChange - end - object EditSon: TEdit - Left = 32 - Top = 64 - Width = 161 - Height = 21 - TabOrder = 4 - OnChange = EditSonChange - end - object EditTrainDest: TEdit - Left = 72 - Top = 64 - Width = 129 - Height = 21 - Hint = 'Train destinataire de la fonction F' - ParentShowHint = False - ShowHint = True - TabOrder = 5 - OnChange = EditTrainDestChange - end - end - object ButtonTestAct: TButton - Left = 64 - Top = 306 - Width = 89 - Height = 20 - Hint = 'Test de l'#39'actionneur/d'#233'tecteur en mode RUN' - Caption = 'Test actionneur' - ParentShowHint = False - ShowHint = True - TabOrder = 2 - OnClick = ButtonTestActClick - end - end - end - object GroupBox14: TGroupBox - Left = 0 - Top = 32 - Width = 345 - Height = 185 - Caption = 'Actionneurs/d'#233'tecteurs locomotives ou accessoires' - TabOrder = 1 - object ButtonNouvAcc: TButton - Left = 8 - Top = 24 - Width = 65 - Height = 17 - Caption = 'Nouveau' - TabOrder = 0 - OnClick = ButtonNouvAccClick - end - object ButtonSupAcc: TButton - Left = 80 - Top = 24 - Width = 65 - Height = 17 - Hint = 'Supprime l'#39'actionneur cliqu'#233' (en jaune)' - Caption = 'Supprime' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = ButtonSupAccClick - end - object RichAct: TRichEdit - Left = 8 - Top = 48 - Width = 329 - Height = 129 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 2 - WordWrap = False - OnMouseDown = RichActMouseDown - end - end - object GroupBox17: TGroupBox - Left = 0 - Top = 224 - Width = 345 - Height = 193 - Caption = 'Actionneurs passage '#224' niveau' - TabOrder = 2 - object ButtonNouvPN: TButton - Left = 8 - Top = 24 - Width = 65 - Height = 17 - Caption = 'Nouveau' - TabOrder = 0 - OnClick = ButtonNouvPNClick - end - object ButtonSupPN: TButton - Left = 80 - Top = 24 - Width = 65 - Height = 17 - Hint = 'Supprime l'#39'actionneur cliqu'#233' (en jaune)' - Caption = 'Supprime' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = ButtonSupPNClick - end - object RichPN: TRichEdit - Left = 8 - Top = 48 - Width = 329 - Height = 137 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clYellow - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 2 - WordWrap = False - OnMouseDown = RichPNMouseDown - end - end - end - object TabSheetDccpp: TTabSheet - Caption = 'DCC++' - ImageIndex = 6 - ParentShowHint = False - ShowHint = False - object Label10: TLabel - Left = 16 - Top = 33 - Width = 317 - Height = 13 - Caption = 'Liste des commandes envoy'#233'es '#224' l'#39'interface DCC++ '#224' la connexion' - end - object Image2: TImage - Left = 248 - Top = 408 - Width = 105 - Height = 65 - Picture.Data = { - 0A544A504547496D6167654A0F0000FFD8FFE000104A46494600010101006000 - 600000FFDB004300020101020101020202020202020203050303030303060404 - 0305070607070706070708090B0908080A0807070A0D0A0A0B0C0C0C0C07090E - 0F0D0C0E0B0C0C0CFFDB004301020202030303060303060C0807080C0C0C0C0C - 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C - 0C0C0C0C0C0C0C0C0C0C0C0C0CFFC00011080041006203012200021101031101 - FFC4001F0000010501010101010100000000000000000102030405060708090A - 0BFFC400B5100002010303020403050504040000017D01020300041105122131 - 410613516107227114328191A1082342B1C11552D1F02433627282090A161718 - 191A25262728292A3435363738393A434445464748494A535455565758595A63 - 6465666768696A737475767778797A838485868788898A92939495969798999A - A2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6 - D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301 - 01010101010101010000000000000102030405060708090A0BFFC400B5110002 - 0102040403040705040400010277000102031104052131061241510761711322 - 328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728 - 292A35363738393A434445464748494A535455565758595A636465666768696A - 737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7 - A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3 - E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00FDFC - A28A2800A28A2800AF857F6B1FF828BEB7F137C69E22F87BF0375DBBD3E7F0CC - 7729ABF8BB4FD1ADB5363776FB44F6D60D7D245A704B47921FB6DD5CCA6384CD - 0DBA4724F316B7F60F1778B755FDB87C55A9F837C1BA9EA1A37C28D16EA5D3BC - 5DE2ED3AE1EDEEBC457113949F45D2674219151D5A3BCBF8C83110F6D6EC2E44 - D358F8F7FC14CBE01E8DF0D6C3C1FAFE929359E83E19D3A0B1D37C3963A4D9CF - A6F872CF498AEAEE7B9B3B7B97FB140574E3720446CEE4BDC59E92E1156CC86D - E945735A471E32A4D53728EDD7BDBCBF4F331BF63AFF008299789BC3DE22D4AC - BE27EA2FE29F86F04F6B6CBF10927B3BE8742B8B8792287EDF7B616D6B653D94 - F244DE5DE416F12C01E049C6E91DE2FD04AFCA1F881E14D2BE265CBEA12F8834 - DF187883489BCBBCB5F0A6A1A9FC4FD66E143EC981BA6B73A7584D146F3BC36E - F6296C6666865916D2F2FA3B8F7CFD9BFF006A8D2BF6559DB487D4B53D47F67A - 6BCB7B2D1B58D5096BBF86DF6A4492C6DAF252CC27D0EE629626B3BF0EC2DF78 - B69D86CCC5A55A6A5AC159F6FEBFA7EA7261B17283E5AB2BAEFF00E7E5F97F87 - 6FB8A8A28AE43D70A28A2800A28A2800A28A2800AF08FDB6F57D435CD5FE14FC - 398B56D43C3FA27C57F154BA0EBBA8D85C3DADF3D943A4EA1A83D9DB5C210F6F - 2DC9B2589A542B22C26E3CA78A6314A9EEF5CBFC65F837E1FF008F9F0EEFBC2F - E26B496EF4CBE31CA1A09E4B6BAB39E2916582EADE78CAC905C432A24B14D1B2 - BC72468EAC1941AA8BB3D48A89B8D93FEBFE0EC6C7847C25A57803C2BA6683A1 - 69B61A2E89A2DAC563A7E9F636E96F6B636F12048E18A34015234450AAAA0000 - 000002BE50FF0082BAF8B67BDF8596DE0AB6F095AEB53EB9A5EAB776FAA6A7E0 - DBCD72CACEF3ECA6CAD2CADEE21C4763A95E4F7C2382E257DAAAB32EC769115B - D37E0F7C6ED7BE16FC40B2F857F16B508AE3C4579BD7C25E2E68A3B5B4F1EC08 - A58C4EA816383578A352D35B20549D15AE6D94462E2DECBE797BCF883FB4778D - EF75CD5F4FF1FF008B7C0F6FAEDDCF03F8135DB0FECAB89ADAE17FB364B45BF9 - AD0BDBDAC48933CD1C73BCFA907689A386DA359B6A31B4B99F43931B3E6A7ECE - 2B591D1EAFE2DF15F8A7549EE2CFC57FB49DD86959E18B4BF00695A2C2A85895 - 03FB62C3CE040C0DC6407BF06B3BF646B7F0CF83FE28CBE15F10FC38F891737F - AE5DDDFC3692F758D5AC2EB42B4D35ACA7D76C747BAD3E3BF6888834E9162568 - ADA545F39D448A269D46EBEBBE14D24B0D63E227ED19E10110FDF4DAF6937F67 - 656C7D1EF65D38D9FE22623DF835E53E05BFD53E347C60BDD23E10F8D35CD7BC - 723C5D79AD5D6B17AF697BA27826D21B07F0F43AC5F7970AFDAEFAEAD2DE496C - AD124549524867915624667D22B46B65F71C952A2538CAF777DAF7D3AD936F5F - EB63E98FD896C64F849F127E28FC20D3B54BDD6FC17F0DAE74D7F0EC97539B99 - B4082F6D4CC743799B2F20B50892C7E612E96D7D6B192422B37D0F5C3FECF5FB - 3E7877F667F86F0F86BC3A97B323CF25FEA3A96A139BAD4B5CBE94EE9EFAF273 - CCD712B72CE700615542A2AA2F715CD5249CAE8F4E841C29A8BFF86F2F96C145 - 14541B051451400515CE78D754F17585E40BE1DD13C39AADBB21333EA5ADCDA7 - BA36780AB1DA4E1863B965FA77AC5FF848BE287FD09FE02FFC2C2EFF00F95940 - 1DED15C17FC245F143FE84FF00017FE16177FF00CACA3FE122F8A1FF00427F80 - BFF0B0BBFF00E565005BFDA03F67FF00097ED43F09358F03F8E347835CF0E6B7 - 1849EDE4255E37560F1CD13AE1A29A3755749108647556520806BE63F86FF0B5 - BE0AFC44B5F86DE26F1B78BFE1EF8A751629E14F13E89A8C51685E39B74CB35B - A697771CFA5D96AC8A0B4F6F6F6D109D435CDB6D413DBD97D23FF0917C50FF00 - A13FC05FF8585DFF00F2B2B0FE24784BC57F193C197BE1BF17FC2EF84DE2BF0F - 6A4AAB77A5EB1E219AFACAE82B06024865D2991C06008C838201AB8CDAD3A18D - 4A3193E6B6A789FC4DF899F18FC4FF0011F58F81BE09F14F8335EF17DFE9E3FB - 67C61A6E9171A749F0C2CA60152E6EE23713C373A8CD1177B6851E02640B2B42 - 2DD59ABE82FD96BF65CF07FEC77F0634AF02F822C25B4D274D40649EE2533DEE - A53EC546B9B994F32CCC11416380AA888A15111170BE157C3EF117C08F0743E1 - DF03FC25F83FE0DF0FDBBB491699A1EBB2E9D671331CB32C30E94A8093C92073 - 5D1FFC245F143FE84FF017FE16177FFCACA73A97565B134A872CB9E4EEFA792E - CBF57D7D2C8EF68AE0BFE122F8A1FF00427F80BFF0B0BBFF00E5651FF0917C50 - FF00A13FC05FF8585DFF00F2B2B33A0EF68AE0BFE122F8A1FF00427F80BFF0B0 - BBFF00E5656CF82F54F185F6A132F88B43F0DE976AB1E62934ED767BF91DF23E - 56492D200AB8C9C86273C63B800E928A28A00FC46FF82747FC11F3E13FFC14D3 - C53FB4878DFE275F78EA6F10691F1A3C43A3452E9DAD9B747815A29C170C8E59 - F7CF27CD9E9B4638E7D5FC33F012EBFE0891FF000549FD9EBC09F0DFC75E38D7 - 3E0FFED0A756D2B54F09F8835017B1697796B1C256EED982AAC64BDCDBE7E42E - 5639833B078C4597FB32F83BF6EAFF00827778D3E35687E02FD99FC37E3FF0DF - 8E7E25EB3E2FB4D5EF3C6BA65A19E2B991123291B5DA3AA3470A381222B82E41 - 03181EADF007F64DFDA67F6DAFDBE7E1D7C72FDA73C37E0FF863E1DF82B05F7F - C225E0BD1F508F51BAB8BEBA8D524B9B89A29254DBF2C6F9120F9ADA15F280F3 - 1E4F4E751DDF34938DB6BF91F3B4684128FB3A6D54BEF66BAEB77DAC7837EC9D - FF0004D2F057FC1623F68AFDA83C73F1B3C49F10F56D67C1FF0016757F0968F1 - D8EB7F66B6D3F4DB59310411A18DB6AAAB05C038C2838DC5D9BEACF827FF0004 - 63F841FF0004C6B9F16FC5EF86775E356F17E85E14D522B5FED8D596F6D4030F - 99931F96B921A24EFEB5E2BE00F849FB69FF00C1357F680F8E767F093E07F837 - E32F823E2A78F2FF00C7565ABCBE29B4D327B4FB6396FB3491CF71136E45D8A4 - 842A486218860ABEF5FB38FC5DFDAFFF00699F156BBE08F8E3FB3E7877E13F80 - FC41E1DD42D24F10E9FE29B1D56782E248C471A0822BA918821DCE76E06C1923 - 3515273E925CBDAEBF235A1428A779537ED2EF5B3DEEF5B9F197FC129FFE0889 - F09BFE0A4BFB097837E37FC58F11FC53D7BE2178FAE755B9D62FBFE1243FE912 - 43AA5DDAAB65E36624A408496624B16E83007DABF05FF64FFD9D3FE0801F07FE - 227C487F11F8AF40F08F881B4AB7D76FF5996E359103453CD0DA88E2B781A51B - A4BE656215872A4E02935F31FEC61A6FFC140FFE09ADFB3A68BF04BC37FB3478 - 0BE23683E07B9BE8EC7C470F8DEC6D63D512E2F67BA322A4D7314A177CEE177C - 51B6D0B9504127EDCFD80FE31FED1DF1B5BC630FED11F04F40F84F6FA7AD89D0 - 058EBF69AC0D5CB9B8FB4EF10CF2F97E56CB62376DDDE71C6769C4E227377BCA - F1BED75B1781A3463CAE34DA9DB7717BDB5D4F977FE09EBFF070AFC39F8EFF00 - B4578F3C17E3BF889A6893C4DF107FB13E13C169E19D4627D634C9E5115A195D - 61658DDDD90137062233960A39153F689FF8390BE0FF00843F6D8F849A2F85BE - 2769F27C2BB3B8F105A7C54B99BC29AA1B8D2E586D42E9AB16EB71236EBB122B - 18124181962AB863F63FEC7DFB05E93FB237C45F8C7E23B6D6EE35F9FE2F78CE - E3C6334573671C4349925CFEE236049655CF0C706A5F8E1FB0A68FF1B3F6C5F8 - 21F17A6D5A4D3AEBE0B7F6EF93A545651BC1ACFF006A59ADAB79AE4829E505DE - B80724F6EB50E7479DBB3B5BF4F437853C62A29392E6BAE9D2FF00E2EDFE47C7 - 9FB6AFC77F83FF00B557C7EF82DE32D57C53AADCFC18F13F852E7508352B3B7B - BB791D5A4B858DD2178BCD42D2C71A9CC60E1467819117813E11FEC5BF12BC6B - A4787747F1978F6E756D72F22B1B3848BB8C4B348E1517735B055CB10324802B - E94FDB47F67BF8807F688F87FF00157E1BF87745F18DD7856C6E74ABAF0FDEDC - C768AE92AC8165569195081E6BE41604154C0605B6E241F15FF69EB49D258BF6 - 6CF05C72C6C195D7C4160ACA477044FC1AFB6C363BFD8A94685571B46D6F6B08 - 59DDEF192BBE9ADECCFC2734C86D9DE32AE61845514EAA926F095AB3943920BD - DA94E6A295D34A2D37177BDEF61FFB6BFC10D67F669F88CFFB457C2F548B51D3 - 173E33D0DA5F2AD75DB2E3CC9BD1640002DC1C955900DE8C25E67E0EE9BA87FC - 156BE372FC40F1459BD8FC18F02DE35BE83E1D9DD59B58BC50ACD2DDAA921B01 - 94B29CA60AC6378F399FBCFDA83E077C4DFDB3BE3AE9DE0BD5B4DB9F097C0DD1 - 655BDD4AED750B76B9F154B1B2958C24523491C793F2870A06D691B2E2255A43 - F65FF19FEC69FB4E45E2AF837E1D7D7FE1D78C182789FC2505F5BDA9D35D7A5D - 5A1B89113232488F7633B93E54643171D0C5535858C25523F58E57CB2BAF763F - CAE57B29DAF66FE14F96E9B56F6B1D9557966D3AD4F0D53FB3BDAC5D4A767EFD - 5D6F5634F979A5494B95CD2D2725CEA3249F37D73451457C51FB785145140051 - 4514005145140051451400514514005145140051451401FFD9} - Transparent = True - end - object Label19: TLabel - Left = 8 - Top = 8 - Width = 276 - Height = 13 - Caption = 'Configuration de l'#39'interface DCC++ pour le mode autonome' - end - object RichCdeDccpp: TRichEdit - Left = 8 - Top = 48 - Width = 577 - Height = 241 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clAqua - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnChange = RichCdeDccppChange - end - object GroupBox23: TGroupBox - Left = 8 - Top = 328 - Width = 577 - Height = 81 - Caption = 'Options' - TabOrder = 1 - object Label29: TLabel - Left = 72 - Top = 44 - Width = 312 - Height = 13 - Caption = - 'Adresse de base '#224' ajouter aux d'#233'tecteurs renvoy'#233's par la central' + - 'e' - end - object CheckEnvAigDccpp: TCheckBox - Left = 8 - Top = 16 - Width = 369 - Height = 25 - Caption = - 'Envoyer la liste des aiguillages '#224' l'#39'interface DCC++ '#224' la connex' + - 'ion' - TabOrder = 0 - OnClick = CheckEnvAigDccppClick - end - object EditBase: TEdit - Left = 8 - Top = 40 - Width = 57 - Height = 21 - TabOrder = 1 - Text = '513' - OnChange = EditBaseChange - end - end - object ButtonEnv: TButton - Left = 8 - Top = 296 - Width = 129 - Height = 25 - Hint = 'Envoi les commandes si l'#39'interface DCC++ est connect'#233'e' - Caption = 'Envoyer les commandes' - ParentShowHint = False - ShowHint = True - TabOrder = 2 - OnClick = ButtonEnvClick - end - end - object TabSheetTrains: TTabSheet - Caption = 'Trains' - ImageIndex = 7 - object Label54: TLabel - Left = 16 - Top = 8 - Width = 392 - Height = 13 - Caption = - 'Liste des trains d'#233'clar'#233's du r'#233'seau - Pour utilisation en mode a' + - 'utonome uniquement' - end - object LabelInfVitesse: TLabel - Left = 320 - Top = 240 - Width = 256 - Height = 26 - Caption = - 'Les param'#232'tres de vitesse ne sont utilis'#233's que dans le mode roul' + - 'age' - WordWrap = True - end - object RichEditTrains: TRichEdit - Left = 8 - Top = 64 - Width = 289 - Height = 385 - Color = clBlack - Font.Charset = DEFAULT_CHARSET - Font.Color = clAqua - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentFont = False - ReadOnly = True - TabOrder = 0 - OnMouseDown = RichEditTrainsMouseDown - end - object GroupBox24: TGroupBox - Left = 312 - Top = 64 - Width = 297 - Height = 161 - Caption = 'Trains' - TabOrder = 1 - object Label51: TLabel - Left = 16 - Top = 48 - Width = 38 - Height = 13 - Caption = 'Adresse' - end - object Label52: TLabel - Left = 16 - Top = 120 - Width = 80 - Height = 13 - Caption = 'Vitesse maximale' - end - object Label53: TLabel - Left = 16 - Top = 24 - Width = 22 - Height = 13 - Caption = 'Nom' - end - object Label56: TLabel - Left = 16 - Top = 72 - Width = 115 - Height = 13 - Caption = 'Vitesse '#224' l'#39'avertissement' - end - object Label57: TLabel - Left = 16 - Top = 96 - Width = 79 - Height = 13 - Caption = 'Vitesse nominale' - end - object EditNomTrain: TEdit - Left = 136 - Top = 24 - Width = 145 - Height = 21 - TabOrder = 0 - OnChange = EditNomTrainChange - end - object EditAdresseTrain: TEdit - Left = 136 - Top = 48 - Width = 65 - Height = 21 - Hint = 'Adresse du d'#233'codeur du train' - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnChange = EditAdresseTrainChange - end - object EditVitesseMaxi: TEdit - Left = 136 - Top = 120 - Width = 65 - Height = 21 - TabOrder = 2 - OnChange = EditVitesseMaxiChange - end - object EditVitRalenti: TEdit - Left = 136 - Top = 72 - Width = 65 - Height = 21 - TabOrder = 3 - OnChange = EditVitRalentiChange - end - object EditVitNom: TEdit - Left = 136 - Top = 96 - Width = 65 - Height = 21 - TabOrder = 4 - OnChange = EditVitNomChange - end - end - object ButtonNT: TButton - Left = 0 - Top = 32 - Width = 73 - Height = 17 - Caption = 'Nouveau' - TabOrder = 2 - OnClick = ButtonNTClick - end - object ButtonSupprime: TButton - Left = 88 - Top = 32 - Width = 75 - Height = 17 - Caption = 'Supprime' - TabOrder = 3 - OnClick = ButtonSupprimeClick - end - end - end - object ButtonEnregistre: TButton - Left = 472 - Top = 520 - Width = 169 - Height = 25 - Hint = 'Enregistre la configuration sans fermer la fen'#234'tre' - Caption = 'Enregistre la configuration' - ParentShowHint = False - ShowHint = True - TabOrder = 3 - OnClick = ButtonEnregistreClick - end - object OpenDialogSon: TOpenDialog - Left = 668 - Top = 468 - end -end diff --git a/UnitConfig - Copie.pas b/UnitConfig - Copie.pas deleted file mode 100644 index 28a7801..0000000 --- a/UnitConfig - Copie.pas +++ /dev/null @@ -1,9232 +0,0 @@ -Unit UnitConfig; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ,StrUtils, Unitprinc, - MMSystem, Buttons ; - -type - TFormConfig = class(TForm) - ButtonAppliquerEtFermer: TButton; - LabelInfo: TLabel; - Image1: TImage; - PageControl: TPageControl; - TabSheetCDM: TTabSheet; - TabSheetAutonome: TTabSheet; - GroupBox1: TGroupBox; - Label1: TLabel; - Label2: TLabel; - EditAdrIPCDM: TEdit; - EditPortCDM: TEdit; - GroupBox5: TGroupBox; - CheckVerifVersion: TCheckBox; - CheckInfoVersion: TCheckBox; - CheckLanceCDM: TCheckBox; - CheckAvecTCO: TCheckBox; - GroupBox6: TGroupBox; - RadioButton4: TRadioButton; - RadioButton5: TRadioButton; - RadioButton6: TRadioButton; - RadioButton7: TRadioButton; - RadioButton8: TRadioButton; - RadioButton9: TRadioButton; - RadioButton10: TRadioButton; - RadioButton11: TRadioButton; - RadioButton12: TRadioButton; - GroupBox7: TGroupBox; - RadioButton13: TRadioButton; - RadioButton14: TRadioButton; - RadioButton15: TRadioButton; - RadioButton16: TRadioButton; - RadioButton17: TRadioButton; - RadioButton18: TRadioButton; - GroupBox2: TGroupBox; - Label3: TLabel; - Label4: TLabel; - Label5: TLabel; - EditcomUSB: TEdit; - EditTempoOctetUSB: TEdit; - EditTempoReponse: TEdit; - GroupBox4: TGroupBox; - RadioButton1: TRadioButton; - RadioButton2: TRadioButton; - GroupBox3: TGroupBox; - Label7: TLabel; - Label8: TLabel; - EditIPLenz: TEdit; - EditportLenz: TEdit; - GroupBox8: TGroupBox; - CheckBoxServAig: TCheckBox; - CheckBoxServDet: TCheckBox; - CheckBoxServAct: TCheckBox; - CheckServPosTrains: TCheckBox; - Label6: TLabel; - Label9: TLabel; - Label11: TLabel; - TabSheetAig: TTabSheet; - Label12: TLabel; - TabSheetBranches: TTabSheet; - Label14: TLabel; - TabSheetSig: TTabSheet; - Label15: TLabel; - TabSheetAct: TTabSheet; - Label16: TLabel; - CheckBoxSrvSig: TCheckBox; - Memo1: TMemo; - Memo2: TMemo; - Memo3: TMemo; - Memo4: TMemo; - GroupBox9: TGroupBox; - GroupBox11: TGroupBox; - LabelAdresse: TLabel; - GroupBox10: TGroupBox; - RadioButtonsans: TRadioButton; - RadioButton30kmh: TRadioButton; - RadioButton60kmh: TRadioButton; - ImageAig: TImage; - ImageTJD: TImage; - ImageTri: TImage; - GroupBox12: TGroupBox; - ImageSignal: TImage; - LabelAdrSig: TLabel; - GroupBox13: TGroupBox; - LabelDec: TLabel; - LabelDetAss: TLabel; - LabelElSuiv: TLabel; - GroupBoxRadio: TGroupBox; - RadioButtonLoc: TRadioButton; - GroupBoxAct: TGroupBox; - GroupBoxPN: TGroupBox; - Label21: TLabel; - EditAdrFerme: TEdit; - Label22: TLabel; - EditAdrOuvre: TEdit; - EditCmdFerme: TEdit; - EditCdeOuvre: TEdit; - Label23: TLabel; - LabelV2: TLabel; - LabelV3: TLabel; - EditV1F: TEdit; - Shape1: TShape; - StaticText1: TStaticText; - StaticText2: TStaticText; - EditV2F: TEdit; - EditV3F: TEdit; - EditV1O: TEdit; - EditV2O: TEdit; - EditV3O: TEdit; - Label17: TLabel; - MemoCarre: TMemo; - RichAig: TRichEdit; - ComboBoxDec: TComboBox; - RichSig: TRichEdit; - EditDet1: TEdit; - EditSuiv1: TEdit; - Label24: TLabel; - Label25: TLabel; - EditDet2: TEdit; - EditSuiv2: TEdit; - Label26: TLabel; - EditDet3: TEdit; - EditSuiv3: TEdit; - Label27: TLabel; - EditDet4: TEdit; - EditSuiv4: TEdit; - CheckVerrouCarre: TCheckBox; - Label28: TLabel; - CheckInverse: TCheckBox; - RadioButtonAccess: TRadioButton; - CheckFenEt: TCheckBox; - GroupBox15: TGroupBox; - EditNbDetDist: TEdit; - Label31: TLabel; - CheckBoxInitAig: TCheckBox; - EditAdrSig: TEdit; - Label32: TLabel; - EditTempoAig: TEdit; - EditAdrAig: TEdit; - ComboBoxAig: TComboBox; - GroupBox16: TGroupBox; - LabelHG: TLabel; - Edit_HG: TEdit; - LabelBG: TLabel; - EditPointe_BG: TEdit; - ImageAffiche: TImage; - EditP1: TEdit; - EditP2: TEdit; - EditP3: TEdit; - EditP4: TEdit; - LabelHD: TLabel; - EditDevie_HD: TEdit; - LabelBD: TLabel; - EditDroit_BD: TEdit; - Label18: TLabel; - EditDevieS2: TEdit; - LabelTJD1: TLabel; - LabelTJD2: TLabel; - Label33: TLabel; - ComboBoxAsp: TComboBox; - EditSpecUni: TEdit; - LabelUni: TLabel; - Buttonrestaure: TButton; - GroupBox14: TGroupBox; - ButtonNouvAcc: TButton; - ButtonSupAcc: TButton; - RichAct: TRichEdit; - GroupBox17: TGroupBox; - ButtonNouvPN: TButton; - ButtonSupPN: TButton; - RichPN: TRichEdit; - ButtonNouvFeu: TButton; - ButtonSupFeu: TButton; - ButtonInsFeu: TButton; - GroupBox18: TGroupBox; - EditAct: TEdit; - LabelActionneur: TLabel; - EditEtatActionneur: TEdit; - Label30: TLabel; - LabelTrain: TLabel; - EditTrainDecl: TEdit; - GroupBox19: TGroupBox; - LabelTempo: TLabel; - EditTempo: TEdit; - CheckRAZ: TCheckBox; - LabelFonction: TLabel; - EditFonctionAccess: TEdit; - Labela: TLabel; - EditEtatFoncSortie: TEdit; - ButtonNouvAig: TButton; - BoutSupAig: TButton; - ButtonAjSup: TButton; - ButtonRestaureAig: TButton; - GroupBox20: TGroupBox; - ButtonValLigne: TButton; - RichBranche: TRichEdit; - ButtonVerifConfig: TButton; - LabelResult: TLabel; - Label34: TLabel; - EditAigTriple: TEdit; - GroupBox21: TGroupBox; - Label37: TLabel; - Label38: TLabel; - EditTempo10: TEdit; - Label39: TLabel; - EditV4F: TEdit; - EditV4O: TEdit; - Label41: TLabel; - EditFonte: TEdit; - ComboBoxDD: TComboBox; - LabelL: TLabel; - EditL: TEdit; - CheckBoxFB: TCheckBox; - Label20: TLabel; - ButtonConfigSR: TButton; - GroupBoxEtatTJD: TGroupBox; - RadioButtonTJD2: TRadioButton; - RadioButtonTJD4: TRadioButton; - RadioButtonSon: TRadioButton; - EditSon: TEdit; - LabelNomSon: TLabel; - SpeedButtonJoue: TSpeedButton; - CheckBoxRazSignaux: TCheckBox; - EditTempoFeu: TEdit; - Label35: TLabel; - Label36: TLabel; - ButtonTestAct: TButton; - RadioGroup1: TRadioGroup; - RadioButtonActDet: TRadioButton; - RadioButtonZones: TRadioButton; - EditAct2: TEdit; - OpenDialogSon: TOpenDialog; - SpeedButtonCharger: TSpeedButton; - LabelNumBranche: TLabel; - EditTrainDest: TEdit; - Label42: TLabel; - Label43: TLabel; - CheckBandeauTCO: TCheckBox; - EditNbCantons: TEdit; - Label44: TLabel; - CheckPosAig: TCheckBox; - ButtonEnregistre: TButton; - Label45: TLabel; - Label46: TLabel; - Label47: TLabel; - Label48: TLabel; - Label49: TLabel; - Label50: TLabel; - Shape2: TShape; - EditZdet1V1F: TEdit; - EditZdet1V1O: TEdit; - EditZdet2V1F: TEdit; - EditZdet2V1O: TEdit; - EditZdet1V2F: TEdit; - EditZdet2V2F: TEdit; - EditZdet1V2O: TEdit; - EditZdet2V2O: TEdit; - EditZdet1V3F: TEdit; - EditZdet2V3F: TEdit; - EditZdet1V3O: TEdit; - EditZdet2V3O: TEdit; - EditZdet1V4F: TEdit; - EditZdet2V4F: TEdit; - EditZdet1V4O: TEdit; - EditZdet2V4O: TEdit; - CheckBoxDemarUSB: TCheckBox; - CheckBoxDemarEth: TCheckBox; - Memo5: TMemo; - EditLAY: TEdit; - Label13: TLabel; - Button1: TButton; - Button3: TButton; - CheckPnPulse: TCheckBox; - CheckFVC: TCheckBox; - CheckFRC: TCheckBox; - Label40: TLabel; - RadioButtonAig: TRadioButton; - GroupBox22: TGroupBox; - RadioButtonDCC: TRadioButton; - RadioButtonXpress: TRadioButton; - TabSheetDccpp: TTabSheet; - RichCdeDccpp: TRichEdit; - Label10: TLabel; - RichEditTrains: TRichEdit; - GroupBox24: TGroupBox; - EditNomTrain: TEdit; - EditAdresseTrain: TEdit; - EditVitesseMaxi: TEdit; - Label51: TLabel; - Label52: TLabel; - Label53: TLabel; - ButtonNT: TButton; - ButtonSupprime: TButton; - GroupBox23: TGroupBox; - CheckEnvAigDccpp: TCheckBox; - Image2: TImage; - ButtonEnv: TButton; - Label19: TLabel; - EditBase: TEdit; - Label29: TLabel; - TabSheetTrains: TTabSheet; - Label54: TLabel; - Label55: TLabel; - EditDebug: TEdit; - Label56: TLabel; - EditVitRalenti: TEdit; - Label57: TLabel; - EditVitNom: TEdit; - LabelInfVitesse: TLabel; - CheckRoulage: TCheckBox; - procedure ButtonAppliquerEtFermerClick(Sender: TObject); - procedure FormActivate(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure RichAigMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure RadioButtonsansClick(Sender: TObject); - procedure RadioButton30kmhClick(Sender: TObject); - procedure RadioButton60kmhClick(Sender: TObject); - procedure ComboBoxDecChange(Sender: TObject); - procedure RichSigMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure CheckVerrouCarreClick(Sender: TObject); - procedure EditActChange(Sender: TObject); - procedure RichActMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure EditEtatActionneurChange(Sender: TObject); - procedure EditTrainDeclChange(Sender: TObject); - procedure EditFonctionAccessChange(Sender: TObject); - procedure EditEtatFoncSortieChange(Sender: TObject); - procedure EditTempoChange(Sender: TObject); - procedure CheckRAZClick(Sender: TObject); - procedure CheckInverseClick(Sender: TObject); - procedure ComboBoxAspChange(Sender: TObject); - procedure ButtonrestaureClick(Sender: TObject); - procedure RadioButtonLocClick(Sender: TObject); - procedure RadioButtonAccessClick(Sender: TObject); - procedure RichPNMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure EditAdrFermeChange(Sender: TObject); - procedure EditCmdFermeChange(Sender: TObject); - procedure EditAdrOuvreChange(Sender: TObject); - procedure EditCdeOuvreChange(Sender: TObject); - procedure EditV1FChange(Sender: TObject); - procedure EditV1OChange(Sender: TObject); - procedure EditV2FChange(Sender: TObject); - procedure EditV2OChange(Sender: TObject); - procedure EditV3FChange(Sender: TObject); - procedure EditV3OChange(Sender: TObject); - procedure ButtonNouvAccClick(Sender: TObject); - procedure ButtonNouvPNClick(Sender: TObject); - procedure ButtonSupAccClick(Sender: TObject); - procedure ButtonSupPNClick(Sender: TObject); - procedure ButtonNouvFeuClick(Sender: TObject); - procedure ButtonSupFeuClick(Sender: TObject); - procedure ButtonInsFeuClick(Sender: TObject); - procedure ButtonNouvAigClick(Sender: TObject); - procedure BoutSupAigClick(Sender: TObject); - procedure ButtonAjSupClick(Sender: TObject); - procedure ButtonRestaureAigClick(Sender: TObject); - procedure ComboBoxAigChange(Sender: TObject); - procedure ButtonValLigneClick(Sender: TObject); - procedure RichBrancheMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure ButtonVerifConfigClick(Sender: TObject); - procedure MemoCarreChange(Sender: TObject); - procedure CheckInvInitClick(Sender: TObject); - procedure EditV4FChange(Sender: TObject); - procedure EditV4OChange(Sender: TObject); - procedure ComboBoxDDChange(Sender: TObject); - procedure EditLChange(Sender: TObject); - procedure CheckBoxFBClick(Sender: TObject); - procedure Button2Click(Sender: TObject); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure EditP3KeyPress(Sender: TObject; var Key: Char); - procedure EditP4KeyPress(Sender: TObject; var Key: Char); - procedure EditP1KeyPress(Sender: TObject; var Key: Char); - procedure EditP2KeyPress(Sender: TObject; var Key: Char); - procedure EditDevieS2KeyPress(Sender: TObject; var Key: Char); - procedure ButtonConfigSRClick(Sender: TObject); - procedure EditDet1Change(Sender: TObject); - procedure EditSuiv1Change(Sender: TObject); - procedure EditAdrSigChange(Sender: TObject); - procedure EditDet2Change(Sender: TObject); - procedure EditSuiv2Change(Sender: TObject); - procedure EditDet3Change(Sender: TObject); - procedure EditSuiv3Change(Sender: TObject); - procedure EditDet4Change(Sender: TObject); - procedure EditSuiv4Change(Sender: TObject); - procedure EditSpecUniChange(Sender: TObject); - procedure EditAdrAigChange(Sender: TObject); - procedure EditAigTripleChange(Sender: TObject); - procedure EditPointe_BGChange(Sender: TObject); - procedure EditDroit_BDChange(Sender: TObject); - procedure EditDevie_HDChange(Sender: TObject); - procedure EditTempo10Change(Sender: TObject); - procedure Edit_HGChange(Sender: TObject); - procedure PageControlChange(Sender: TObject); - procedure RadioButtonTJD2Click(Sender: TObject); - procedure RadioButtonTJD4Click(Sender: TObject); - procedure RadioButtonSonClick(Sender: TObject); - procedure EditSonChange(Sender: TObject); - procedure SpeedButtonJoueClick(Sender: TObject); - procedure EditTempoFeuChange(Sender: TObject); - procedure ButtonTestActClick(Sender: TObject); - procedure RadioButtonActDetClick(Sender: TObject); - procedure RadioButtonZonesClick(Sender: TObject); - procedure EditAct2Change(Sender: TObject); - procedure SpeedButtonChargerClick(Sender: TObject); - procedure RichBrancheKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure EditTrainDestChange(Sender: TObject); - procedure RichAigKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure RichSigKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); - procedure ButtonEnregistreClick(Sender: TObject); - procedure EditZdet1V1FChange(Sender: TObject); - procedure EditZdet2V1FChange(Sender: TObject); - procedure EditZdet1V1OChange(Sender: TObject); - procedure EditZdet2V1OChange(Sender: TObject); - procedure EditZdet1V2FChange(Sender: TObject); - procedure EditZdet2V2FChange(Sender: TObject); - procedure EditZdet1V2OChange(Sender: TObject); - procedure EditZdet2V2OChange(Sender: TObject); - procedure EditZdet1V3FChange(Sender: TObject); - procedure EditZdet2V3FChange(Sender: TObject); - procedure EditZdet1V3OChange(Sender: TObject); - procedure EditZdet2V3OChange(Sender: TObject); - procedure EditZdet1V4FChange(Sender: TObject); - procedure EditZdet2V4FChange(Sender: TObject); - procedure EditZdet1V4OChange(Sender: TObject); - procedure EditZdet2V4OChange(Sender: TObject); - procedure Button1Click(Sender: TObject); - procedure Button3Click(Sender: TObject); - procedure CheckPnPulseClick(Sender: TObject); - procedure CheckFVCClick(Sender: TObject); - procedure CheckFRCClick(Sender: TObject); - procedure RadioButtonAigClick(Sender: TObject); - procedure ButtonEnvClick(Sender: TObject); - procedure EditBaseChange(Sender: TObject); - procedure RichCdeDccppChange(Sender: TObject); - procedure CheckEnvAigDccppClick(Sender: TObject); - procedure RichEditTrainsMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - procedure ButtonSupprimeClick(Sender: TObject); - procedure EditNomTrainChange(Sender: TObject); - procedure EditAdresseTrainChange(Sender: TObject); - procedure EditVitesseMaxiChange(Sender: TObject); - procedure ButtonNTClick(Sender: TObject); - procedure EditVitNomChange(Sender: TObject); - procedure EditVitRalentiChange(Sender: TObject); - private - { Déclarations privées } - public - { Déclarations publiques } - end; - -const -// variables du fichier de configuration -NomConfig='ConfigGenerale.cfg'; -Debug_ch='Debug'; -Avec_roulage_ch='Avec_roulage'; -nb_det_dist_ch='nb_det_dist'; -IpV4_PC_ch='IpV4_PC'; -retro_ch='retro'; -Init_aig_ch='Init_Aig'; -LAY_ch='Lay'; -Maxcom_ch='MaxCom'; -Init_dem_aig_ch='Init_Dem_Aig'; -Init_dem_interfaceUSBCOM_ch='Init_demUSBCOM'; -Init_dem_interfaceEth_ch='Init_demETH'; -IPV4_INTERFACE_ch='Ipv4_interface'; -PROTOCOLE_SERIE_ch='Protocole_serie'; -INTER_CAR_ch='Inter_car'; -Tempo_maxi_ch='Tempo_maxi'; -Entete_ch='Entete'; -TCO_ch='TCO'; -MasqueBandeauTCO_ch='MasqueBandeauTCO'; -CDM_ch='CDM'; -Serveur_interface_ch='Serveur_interface'; -fenetre_ch='Fenetre'; -Tempo_aig_ch='Tempo_Aig'; -Nb_cantons_Sig_ch='Nb_cantons_Sig'; -Tempo_Feu_ch='Tempo_Feu'; -Algo_Unisemaf_ch='Alg_Unisemaf'; -NOTIF_VERSION_ch='notif_version'; -verif_version_ch='verif_version'; -Fonte_ch='Fonte'; -Protocole_ch='Protocole'; -Raz_signaux_ch='RazSignaux'; -EnvAigDccpp_ch='EnvAigDccpp'; -AdrBaseDetDccpp_ch='AdrBaseDetDccpp'; - -// sections de config -section_aig_ch='[section_aig]'; -section_sig_ch='[section_sig]'; -section_act_ch='[section_act]'; -section_branches_ch='[section_branches]'; -section_dccpp_ch='[section_dcc++]'; -section_initpp_ch='[init_dcc++]'; -section_trains_ch='[section_trains]'; -section_placement_ch='[section_placement]'; - - -var - FormConfig: TFormConfig; - AdresseIPCDM,AdresseIP,PortCom,recuCDM,residuCDM,trainsauve : string; - - portCDM,TempoOctet,TimoutMaxInterface,Valeur_entete,PortInterface,prot_serie,NumPort,debug, - LigneCliqueePN,AncLigneCliqueePN,clicMemo,Nb_cantons_Sig,protocole,Port,clicListeTrain, - ligneclicAig,AncLigneClicAig,ligneClicSig,AncligneClicSig,EnvAigDccpp,AdrBaseDetDccpp, - ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Adressefeuclic,NumTrameCDM : integer; - - ack_cdm,clicliste,affevt,config_modifie,clicproprietes,confasauver,trouve_MaxPort, - modif_branches,ConfigPrete,trouve_section_dccpp,trouve_section_trains : boolean; - fichier : text; - -function config_com(s : string) : boolean; -function envoi_CDM(s : string) : boolean; -procedure connecte_CDM; -function place_id(s : string) : string; -procedure decodeAig(s : string;var adr : integer;var B : char); -function sauve_config : boolean; -procedure lit_config; -Procedure aff_champs_sig_feux(index : integer); -procedure decode_ligne_feux(chaine_signal : string;i : integer); -function verif_coherence : boolean; -function compile_branche(s : string;i : integer) : boolean; -function encode_sig_feux(i : integer): string; - -implementation - -uses UnitDebug,UnitTCO, UnitSR, UnitCDF; - -{$R *.dfm} - -// envoi d'une chaîne à CDM par socket, puis attend l'ack ou le nack -function envoi_CDM(s : string) : boolean; -var temps : integer; -begin - if CDM_connecte=false then begin envoi_CDM:=false;exit;end; - if traceTrames then afficheDebug(s,clLime); - Formprinc.ClientSocketCDM.Socket.SendText(s); - // attend l'ack - ackCDM:=false;nackCDM:=false; - temps:=0; - repeat - inc(temps);Sleep(100); - Application.processMessages; - until ferme or ackCDM or nackCDM or (temps>30); // CDM répond < 1s - - if not(ackCDM) or nack then - begin - Affiche('Pas de réponse de CDM Rail',clRed); - end; - - envoi_CDM:=ackCDM; -end; - -// insère l'id pour le serveur CDM dans une chaîne -function place_id(s : string) : string; -begin - delete(s,5,2); - insert(id_cdm,s,5); - place_id:=s; -end; - -procedure Maj_Hint_feu(i : integer); -var s : string; -begin - // ne pas supprimer le @ espace et = qui sert de marqueur pour identifier le feu - s:='@='+inttostr(feux[i].Adresse)+' Decodeur='+intToSTR(feux[i].Decodeur)+' Adresse détecteur associé='+intToSTR(feux[i].Adr_det1)+ - ' Adresse élement suivant='+intToSTR(feux[i].Adr_el_suiv1); - if feux[i].Btype_suiv1=aig then s:=s+' (aig)'; - feux[i].Img.Hint:=s; -end; - -// demande les services Com-IP à CDM -function services_CDM : boolean; -var s,ss : string; - i : integer; -begin - //s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;'); - s:=place_id('C-C-00-0002-RQSERV-RTSIM|xxx|xx|'); - i:=0; - if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end; - if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end; - if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end; - if Srvc_PosTrain then begin s:=s+'SRV=TSXY;';inc(i);end ; - if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end; - - // insère le nombre de paramètres - ss:=format('%.*d',[2,i]) ; - delete(s,30,2); - insert(ss,s,30); - // insère la longueur des paramètres - i:=length(s)-29; - ss:=format('%.*d',[3,i]) ; - delete(s,26,3); - insert(ss,s,26); - - envoi_CDM(s); - sleep(100); - - if ack_cdm then - begin - s:='Services acceptés: '; - if Srvc_Aig then s:=s+'- aiguillages '; - if Srvc_Act then s:=s+'- actionneurs '; - if Srvc_Det then s:=s+'- détecteurs '; - if Srvc_PosTrain then s:=s+'- position des trains '; - if Srvc_sig then s:=s+'- état des signaux '; - Affiche(s,clYellow); - end; - services_CDM:=ack_cdm; - ack_cdm:=false; -end; - -procedure connecte_CDM; -var s : string; - i : integer; -begin - // déconnexion de l'ancienne liaison éventuelle - Formprinc.ClientSocketCDM.Close; - - if (AdresseIPCDM<>'0') then - begin - if(ProcessRunning('CDR')) then - begin - // ouverture du socket CDM - with Formprinc do - begin - ClientSocketCDM.port:=portCDM; - ClientSocketCDM.Address:=AdresseIPCDM; - ClientSocketCDM.Open; - end; - i:=0; - repeat - Sleep(50); - inc(i); - Application.processMessages; - until (i>10) or CDM_connecte ; - //if i>10 then affiche('Timeout',clred); - if not(CDM_connecte) then begin Affiche('Socket CDM non connecté',clOrange);exit;end; - - // connexion à CDM rail - recuCDM:=''; - s:='C-C-00-0001-CMDGEN-_CNCT|000|'; - envoi_cdm(s); - if ack_cdm then - begin - ack_cdm:=false; - Id_CDM:=copy(recuCDM,5,2); // récupère l'ID reçu de CDM, à utiliser dans toutes les futures trames - recucdm:=''; - s:='Connecté au serveur CDM rail avec l''ID='+Id_CDM; - - Affiche(s,clYellow); - AfficheDebug(s,clyellow); - CDM_connecte:=true; - - // demande des services - services_CDM; - // demande la description des trains - s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|'); - ntrains_cdm:=0; - envoi_CDM(s); - sleep(10); - Application.ProcessMessages; - end; - end; - //else Affiche('CDM Rail non lancé',clOrange); - end - else - begin - if adresseIPCDM='0' then Affiche('La connexion à CDM n''est pas demandée car l''adresse IP est nulle dans '+NomConfig,cyan); - end; -end; - -// teste si une adresse IP V4 est ok -function Ipok(s : string) : boolean; -var i,k,octet,erreur : integer; -begin - for k:=1 to 3 do - begin - i:=pos('.',s); - if i=0 then begin IpOK:=false;exit;end; - val(copy(s,1,i-1),octet,erreur);if (erreur<>0) or (octet>255) then begin IpOK:=false;exit;end; - delete(s,1,i); - end; - val(s,octet,erreur);if (erreur<>0) or (octet>255) then begin IpOK:=false;exit;end; - ipOK:=true; -end; - -// vérifie si la config de la com série/usb est ok -function config_com(s : string) : boolean; -var sa : string; - i,erreur,vitesse : integer; -begin - sa:=s; - prot_serie:=-1; - // trouver la vitesse - i:=pos(':',s); - if i<>0 then - begin - delete(s,1,i); - val(s,vitesse,i); - if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and - (vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) then - begin - Affiche('Vitesse COM ('+intToSTR(vitesse)+') incorrecte',clred); - result:=false; - exit; - end; - end - else - begin - result:=false; - exit; - end; - - // supprimer la dernier paramètre - i:=pos(',',s); - if i<>0 then - begin - delete(s,1,i); - i:=pos(',',s); - if i<>0 then - begin - delete(s,1,i); - i:=pos(',',s); - if i<>0 then - begin - delete(s,1,i); - i:=pos(',',s); - if i<>0 then - begin - delete(s,1,i); - Val(s,prot_serie,erreur); - end; - end; - end; - end; - - i:=pos(':',sa); - val(copy(sa,4,i-1),Numport,erreur); - config_com:=not( (copy(sa,1,3)<>'COM') or (NumPort>MaxPortCom) or (prot_serie=-1) or (prot_serie>4) or (i=0) ); -end; - -// transforme l'aiguillage de la base de données aiguillage en texte -function encode_aig(index : integer): string; -var s : string; - c : char; - tjdC,tjsC,triC,croi : boolean; -begin - if index=0 then exit; - s:=IntToSTR(aiguillage[index].Adresse); - tjdC:=aiguillage[index].modele=tjd; - tjsC:=aiguillage[index].modele=tjs; - triC:=aiguillage[index].modele=triple; - croi:=aiguillage[index].modele=crois; - if tjdC then s:=s+'TJD'; - if tjsC then s:=s+'TJS'; - if croi then s:=s+'CROI'; - if triC then begin s:=s+'TRI,';s:=s+intToSTR(aiguillage[index].AdrTriple);end; - s:=s+','; - // aiguillage normal ou triple - if not(tjdC) and not(tjsC) and not(croi) then - begin - // P - s:=s+'P';s:=s+intToSTR(aiguillage[index].Apointe); - c:=aiguillage[index].APointeB ; - if (c<>'Z') and (c<>#0) then s:=s+c; - //if c=#0 then s:=s+'Z'; - // D - s:=s+',D';s:=s+intToSTR(aiguillage[index].Adroit); - c:=aiguillage[index].ADroitB ; - if (c<>'Z') and (c<>#0) then s:=s+c; - //if c=#0 then s:=s+'Z'; - // S - s:=s+',S';s:=s+intToSTR(aiguillage[index].Adevie); - c:=aiguillage[index].AdevieB ; - if (c<>'Z') and (c<>#0) then s:=s+c; - //if c=#0 then s:=s+'Z'; - // S2 aiguillage triple - if triC then - begin - s:=s+',S2-'; - s:=s+intToSTR(aiguillage[index].Adevie2); - c:=aiguillage[index].Adevie2B ; - if (c<>'Z') and (c<>#0) then s:=s+c; - //if c=#0 then s:=s+'Z'; - end; - end; - - // tjd 2/4 états ou tjs - if (tjdC or tjsC) then - begin - s:=s+'D('+intToSTR(aiguillage[index].Adroit); - c:=aiguillage[index].AdroitB;if c<>'Z' then s:=s+c; - s:=s+','+intToSTR(aiguillage[index].DDroit)+aiguillage[index].DDroitB+'),'; - s:=s+'S('+intToSTR(aiguillage[index].Adevie); - c:=aiguillage[index].AdevieB;if c<>'Z' then s:=s+c; - s:=s+','+intToSTR(aiguillage[index].DDevie)+aiguillage[index].DDevieB+')'; - end; - - if croi then - begin - s:=s+'D('+intToSTR(aiguillage[index].Adroit); - c:=aiguillage[index].AdroitB;if c<>'Z' then s:=s+c; - s:=s+','+intToSTR(aiguillage[index].DDroit)+aiguillage[index].DDroitB+'),'; - s:=s+'S('+intToSTR(aiguillage[index].Adevie); - c:=aiguillage[index].AdevieB;if c<>'Z' then s:=s+c; - s:=s+','+intToSTR(aiguillage[index].DDevie)+aiguillage[index].DDevieB+')'; - end; - - if tjsC then - begin - s:=s+',L'+intToSTR(aiguillage[index].Tjsint)+aiguillage[index].TjsintB; - end; - - // vitesse de franchissement et inversion - if not(croi) then - begin - if aiguillage[index].vitesse=0 then s:=s+',V0'; - if aiguillage[index].vitesse=30 then s:=s+',V30'; - if aiguillage[index].vitesse=60 then s:=s+',V60'; - if aiguillage[index].inversionCDM=1 then s:=s+',I1' else s:=s+',I0'; - end; - - // valeur d'initialisation - if not(croi) then - begin - s:=s+',INIT('; - s:=s+IntToSTR(aiguillage[index].posInit)+','; - s:=s+IntToSTR(aiguillage[index].temps)+')'; - end; - - if tjdC then - begin - if aiguillage[index].EtatTJD=2 then s:=s+',E2' else s:=s+',E4'; - end; - - encode_aig:=s; -end; - -// renvoie un A si BT est un aiguillage (aig, tjd, tjs tri) -function TypeEl_to_char(BT : TEquipement) : string; -begin - case BT of // 1=détecteur 2=aig ou TJD ou TJS 4=tri - det : TypeEl_to_char:=''; - aig,tjd,tjs,triple : TypeEl_to_char:='A'; - end; -end; - -function TypeElAIg_to_char(adr : integer;c : char) : string; -var s: string; -begin - if (adr=0) and (c<>'D') and (c<>'S') and (c<>'P') then s:='Buttoir'; - - if adr<>0 then - begin - if c='P' then s:='pointe de l''aiguillage '+IntToSTR(adr) else - if c='S' then s:='position déviée de l''aiguillage '+IntToSTR(adr) else - if c='D' then s:='position droite de l''aiguillage '+IntToSTR(adr) else - if (c<>'D') and (c<>'S') and (c<>'P') then s:='détecteur '+IntToSTR(adr) else - s:='erreur'; - end; - TypeElAIg_to_char:=s; -end; - -// transforme le signal du tableau feux[] en texte -function encode_sig_feux(i : integer): string; -var s : string; - adresse,aspect,j,k,NfeuxDir,CondCarre,nc : integer; -begin - // adresse - adresse:=feux[i].adresse; - if affevt then Affiche('Encode_sig_feux('+IntToSTR(i)+') : adresse='+IntToSTR(adresse),clyellow); - - if adresse=0 then begin encode_sig_feux:='';exit;end; - - s:=IntToSTR(adresse)+','; - // forme - D=directionnel ajouter 10 - aspect:=feux[i].aspect; - if aspect<10 then s:=s+IntToSTR(aspect)+',' else s:=s+'D'+intToSTR(aspect-10)+','; - - // bouton feu blanc, n'existe pas pour un feu directionnel (aspect>10) - if aspect<10 then begin if feux[i].feublanc then s:=s+'1,' else s:=s+'0,';end; - - // décodeur - s:=s+IntToSTR(feux[i].decodeur)+','; - - // detecteur et élement suivant (4 maxi) - if aspect<10 then - begin - s:=s+'('+IntToSTR(feux[i].Adr_det1)+','+TypeEl_To_char(feux[i].Btype_suiv1)+IntToSTR(feux[i].Adr_el_suiv1); - j:=feux[i].Adr_det2; - if j<>0 then s:=s+','+IntToSTR(feux[i].Adr_det2)+','+TypeEl_To_char(feux[i].Btype_suiv2)+IntToSTR(feux[i].Adr_el_suiv2); - j:=feux[i].Adr_det3; - if j<>0 then s:=s+','+IntToSTR(feux[i].Adr_det3)+','+TypeEl_To_char(feux[i].Btype_suiv3)+IntToSTR(feux[i].Adr_el_suiv3); - j:=feux[i].Adr_det4; - if j<>0 then s:=s+','+IntToSTR(feux[i].Adr_det4)+','+TypeEl_To_char(feux[i].Btype_suiv4)+IntToSTR(feux[i].Adr_el_suiv4); - s:=s+'),'; - - //verrouillage au carré - if feux[i].verrouCarre then s:=s+'1' else s:=s+'0'; - // feu vert cli - if feux[i].checkFV then s:=s+',FVC1' else s:=s+',FVC0'; - // feu rouge cli - if feux[i].checkFR then s:=s+',FRC1' else s:=s+',FRC0'; - - // si unisemaf, paramètre supplémentaire - if (feux[i].decodeur=6) then s:=s+',U'+intToSTR(feux[i].unisemaf); - - // conditions supplémentaires pour le carré - for nc:=1 to 6 do - begin - CondCarre:=Length(feux[i].condcarre[nc]); // nombre de conditions (nombre de parenthèses ex 3 pour (A21S,A6D)(A30S,A20D)(A1D,A2S,A3D) - dec(condcarre); - if condCarre>0 then - begin - s:=s+',('; - for k:=1 to condcarre do - begin - s:=s+'A'+IntToSTR(feux[i].condcarre[nc][k].Adresse)+feux[i].condcarre[nc][k].PosAig; - if k1 then - begin - // adresse de feu - val(s,adresse,erreur); - if adresse=0 then begin affiche('Erreur 671 ligne '+s,clred);exit;end; - Delete(s,1,j); - feux[i].adresse:=adresse; - j:=pos(',',s); - if j>1 then - begin - sa:=copy(s,1,j-1); - if sa[1]='D' then - // feu directionnel ------------------------------------------ - begin - delete(sa,1,1); - j:=pos(',',s); - val(sa,l,erreur); // nombre de feux du signal directionnel - if l>6 then - begin - Affiche('Erreur 672 ligne '+chaine_signal+' 6 feux maximum pour un panneau directionnel',clred); - exit; - end; - feux[i].aspect:=l+10;Delete(s,1,j); - // décodeur - val(s,adr,erreur); - Feux[i].decodeur:=adr; - if (adr>NbDecodeur-1) then Affiche('Erreur 673 ligne '+chaine_signal+' : erreur décodeur inconnu',clred); - j:=pos(',',s);Delete(s,1,j); - // liste des aiguillages - k:=1; // numéro de feu directionnel - repeat - // boucle de direction - delete(s,1,1); // supprimer ( ou le , - j:=1; // Nombre de descriptions d'aiguillages dans le feu - repeat - if s[1]<>'A' then begin Affiche('Erreur 674 ligne '+chaine_signal,clred);exit;end; - delete(s,1,1); - val(s,adr,erreur); // adresse - c:=#0; - if erreur<>0 then c:=s[erreur]; // type - setlength(feux[i].AigDirection[k],j+1); // augmenter le tableau dynamique - feux[i].AigDirection[k][j].PosAig:=c; - feux[i].AigDirection[k][j].Adresse:=adr; - - delete(s,1,erreur); // supprime jusque S - //Affiche(s,clLime); - if s[1]=',' then delete(s,1,1); - inc(j); - until s[1]=')'; - delete(s,1,1); - inc(k); - until length(s)<1; - dec(k); - if k<>l+1 then - begin - Affiche('Erreur 675 ligne '+chaine_signal,clred); - Affiche('Nombre incorrect de description des aiguillages: '+intToSTR(k)+' pour '+intToSTR(l)+' feux directionnels',clred); - end; - end - else - // feu de signalisation--------------------------------- - begin - val(sa,asp,erreur); //aspect - feux[i].aspect:=asp;Delete(s,1,j); - if (asp=0) or (asp=6) or (asp>9) then - Affiche('Erreur 676: configuration aspect ('+intToSTR(asp)+') signal incorrect à la ligne '+chaine_signal,clRed); - j:=pos(',',s); - if j>1 then begin Feux[i].FeuBlanc:=(copy(s,1,j-1))='1';delete(s,1,j);end; - j:=pos(',',s); - val(s,Feux[i].decodeur,erreur); - - if (Feux[i].decodeur>NbDecodeur-1) then Affiche('Erreur 677 Ligne '+chaine_signal+' : erreur décodeur inconnu',clred); - if j<>0 then delete(s,1,j); - feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0; - feux[i].Btype_Suiv1:=rien;feux[i].Btype_Suiv2:=rien;feux[i].Btype_Suiv3:=rien;feux[i].Btype_Suiv4:=rien; - feux[i].Adr_det1:=0;feux[i].Adr_det2:=0;feux[i].Adr_det3:=0;feux[i].Adr_det4:=0; - // éléments optionnels des voies supplémentaires - if j<>0 then - begin - sa:=s; - multiple:=s[1]='('; - if multiple then - begin - delete(s,1,1); - j:=0; - repeat - k:=pos(',',s); - if k>1 then - begin - val(s,adr,erreur); // extraire l'adresse - Delete(s,1,k); - if Adr>NbMemZone then - begin - Affiche('Erreur 677A : ligne '+chaine_signal+' : adresse détecteur trop grand',clred); - Adr:=NbMemZone; - end; - end; - inc(j); - if (j=1) then feux[i].Adr_det1:=adr; - if (j=2) then feux[i].Adr_det2:=adr; - if (j=3) then feux[i].Adr_det3:=adr; - if (j=4) then feux[i].Adr_det4:=adr; - //type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri - if s[1]='A' then - begin - if (j=1) then feux[i].Btype_Suiv1:=aig; - if (j=2) then feux[i].Btype_Suiv2:=aig; - if (j=3) then feux[i].Btype_Suiv3:=aig; - if (j=4) then feux[i].Btype_Suiv4:=aig; - delete(s,1,1); - end - else - begin // détecteur - if (j=1) then feux[i].Btype_Suiv1:=det; - if (j=2) then feux[i].Btype_Suiv2:=det; - if (j=3) then feux[i].Btype_Suiv3:=det; - if (j=4) then feux[i].Btype_Suiv4:=det; - end; - Val(s,adr,erreur); - if (j=1) then feux[i].Adr_el_suiv1:=Adr; - if (j=2) then feux[i].Adr_el_suiv2:=Adr; - if (j=3) then feux[i].Adr_el_suiv3:=Adr; - if (j=4) then feux[i].Adr_el_suiv4:=Adr; - delete(s,1,erreur-1); - if s[1]=',' then delete(s,1,1); - fini:=s[1]=')'; - until (fini) or (j>4); - end; - end; - if (j>4) or (not(multiple)) then - begin - Affiche('Erreur 678: fichier de configuration ligne erronnée : '+chaine_signal,clred); - closefile(fichier); - exit; - end; - - k:=pos(',',s); - delete(s,1,k); - //Affiche('s='+s,clyellow); - if length(s)=0 then begin Affiche('Erreur 679: fichier de configuration ligne erronnée : '+chaine_signal,clred); closefile(fichier);exit;end; - feux[i].VerrouCarre:=s[1]='1'; - delete(s,1,1); - if length(s)>0 then if s[1]=',' then delete(s,1,1); - if copy(s,1,3)='FVC' then - begin - delete(s,1,3); - if length(s)>0 then begin feux[i].checkFV:=s[1]='1';delete(s,1,1);end; - end; - if length(s)>0 then if s[1]=',' then delete(s,1,1); - if copy(s,1,3)='FRC' then - begin - delete(s,1,3); - if length(s)>0 then begin feux[i].checkFR:=s[1]='1';delete(s,1,1);end; - end; - - - if length(s)>0 then if s[1]=',' then delete(s,1,1); - if length(s)>0 then if s[1]='U' then delete(s,1,1); - - // si décodeur UniSemaf (6) champ supplémentaire U - if (Feux[i].decodeur=6) then - begin - Val(s,k,erreur); - delete(s,1,erreur); - if k=0 then - begin - if Feux[i].decodeur=6 then begin Affiche('Erreur 680 Ligne '+chaine_signal,clred);Affiche('Manque définition décodeur UniSemaf',clred);end; - end - else - begin - Feux[i].UniSemaf:=k; - if Feux[i].decodeur=6 then - begin - erreur:=verif_UniSemaf(adresse,k); - if erreur=1 then begin Affiche('Erreur 681 Ligne '+chaine_signal,clred);Affiche('Erreur code Unisemaf',clred);end; - if erreur=2 then - begin - Affiche('Erreur 682 Ligne '+chaine_signal,clred);Affiche('Erreur cohérence aspect signal ('+intToSTR(asp)+') et code Unisemaf ('+intToSTR(k)+')',clred); - end; - end; - end; - end; - end; - - // voir si conditions supplémentaires de carré - l:=1; // nombre de parenthèses - repeat - t:=pos('(',s); - if t=1 then - begin - //Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow); - k:=pos(')',s); - sa:=copy(s,t+1,k-t); // contient l'intérieur des parenthèses sans les parenthèses - delete(s,1,k+1);//Affiche(s,clYellow); - - // boucle dans la parenthèse - bd:=0; - repeat - inc(bd); - setlength(feux[i].condCarre[l],bd+1); // une condition en plus - k:=pos(',',sa); - if k<>0 then - chaine:=copy(sa,1,k-1) - else - chaine:=sa; - - if chaine[1]='A' then - begin - delete(chaine,1,1); - val(chaine,adresse,erreur); - feux[i].condCarre[l][bd].Adresse:=adresse; - if erreur<>0 then feux[i].condCarre[l][bd].PosAig:=chaine[erreur] else - Affiche('Erreur 683 Définition du signal '+IntToSTR(feux[i].adresse)+': Manque D ou S dans les conditions de carré des aiguillages',clred); - end; - - k:=pos(',',sa);if k<>0 then delete(sa,1,k); - until k=0; - inc(l); - end; - until t<>1; - if length(s)>1 then if s[1]=',' then delete(s,1,1); - - // champ SR - if length(s)>2 then - if copy(s,1,2)='SR' then - begin - delete(s,1,3); - for l:=1 to 8 do - begin - k:=pos(',',s); - val(s,j,erreur); - delete(s,1,k); - feux[i].SR[l].sortie1:=j; - - k:=pos(',',s); - val(s,j,erreur); - delete(s,1,k); - feux[i].SR[l].sortie0:=j; - end; - end; - - // champ motif - if length(s)>3 then - if copy(s,1,3)='MOT' then - begin - delete(s,1,4); - for l:=1 to 19 do - begin - k:=pos(',',s); - val(s,j,erreur); - delete(s,1,k); - feux[i].SR[l].sortie1:=j; - end; - j:=pos('NA',s); - if j<>1 then affiche('Manque paramètre NA dans ligne '+chaine_signal,clred) - else - begin - delete(s,1,2); - val(s,j,erreur); - if (j<0) or (j>5) then - begin - j:=5;affiche('Paramètre NA incorrect dans ligne '+chaine_signal,clred) - end; - feux[i].na:=j; - end; - end; - end; - end; -end; - -// transforme l'actionneur type loco ou actionneur ou son du tableau en texte -// paramètre d'entrée : index -function encode_act_loc_son(i : integer): string; -var s : string; - adresse : integer; -begin - // adresse - adresse:=Tablo_Actionneur[i].adresse; - - // type actionneur - case Tablo_Actionneur[i].typdeclenche of - 0 : - begin - s:=IntToSTR(adresse); if tablo_actionneur[i].det then s:=s+'Z'; - end; - // type mémoire de zone - 1 : - begin - s:='Mem['+IntToSTR(adresse)+','+IntToSTR(Tablo_Actionneur[i].adresse2)+']'; - end; - // type aiguillage - 2 : - begin - s:='A'+IntToSTR(adresse); - end; - end; - - if Tablo_Actionneur[i].loco then - s:=s+','+IntToSTR(Tablo_Actionneur[i].Etat)+','+Tablo_Actionneur[i].trainDecl+',F'+ - IntToSTR(Tablo_Actionneur[i].fonction)+','+intToSTR(Tablo_Actionneur[i].tempo)+ - ','+Tablo_Actionneur[i].trainDest; - - if Tablo_Actionneur[i].act then - begin - s:=s+','+IntToSTR(Tablo_Actionneur[i].Etat)+','+Tablo_Actionneur[i].trainDecl+ - ',A'+IntToSTR(Tablo_Actionneur[i].accessoire)+','+intToSTR(Tablo_Actionneur[i].sortie)+','; - if Tablo_Actionneur[i].Raz then s:=s+'Z' else s:=s+'S'; - end; - - if Tablo_Actionneur[i].son then - s:=s+','+IntToSTR(Tablo_Actionneur[i].Etat)+','+Tablo_Actionneur[i].trainDecl+',"'+Tablo_Actionneur[i].FichierSon+'"'; - - encode_act_loc_son:=s; -end; - -// encode l'actionneur PN du tableau en texte -function encode_act_pn(i : integer) : string; -var s : string; - voie,NbVoies : integer; -begin - with formconfig do - begin - NbVoies:=Tablo_PN[i].NbVoies; - s:=''; - - // par actionneur - if tablo_PN[i].Voie[1].ActFerme<>0 then - begin - for voie:=1 to NbVoies do - begin - s:=s+'('+intToSTR(tablo_PN[i].Voie[voie].ActFerme)+','+intToSTR(tablo_PN[i].Voie[voie].ActOuvre)+')'; - if voie'' then writeln(fichierN,s); - end; - - writeln(fichierN,'/------------'); - // actionneurs PN - for i:=1 to NbrePN do - begin - s:=encode_act_pn(i); - if s<>'' then if s<>'' then writeln(fichierN,s); - end; - writeln(fichierN,'0'); - - writeln(fichierN,'/------------'); - writeln(fichierN,section_dccpp_ch); - writeln(fichierN,EnvAigDccpp_ch+'=',EnvAigDccpp); - writeln(fichierN,AdrBaseDetDccpp_ch+'=',AdrBaseDetDccpp); - - writeln(fichierN,section_initpp_ch); - // commandes DCC++ - i:=1; - repeat - s:=CdeDccpp[i]; - inc(i); - if s<>'' then writeln(fichierN,s); - until (s='') or (i>MaxCdeDccpp); - writeln(fichierN,'0'); - - // trains - writeln(fichierN,'/------------'); - writeln(fichierN,section_trains_ch); - for i:=1 to ntrains do - begin - writeln(fichierN,Train_tablo(i)); - end; - writeln(fichierN,'0'); - - // placement des trains - writeln(fichierN,'/------------'); - writeln(fichierN,section_placement_ch); - for i:=1 to 6 do - writeln(fichierN,placement[i].train,',',placement[i].detecteur); - writeln(fichierN,'0'); - - closefile(fichierN); - -end; - -procedure lit_config; - -var s,sa,SOrigine: string; - c : char; - tec,tjdC,tjsC,s2,triC,debugConfig,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,trouve_protocole, - trouve_sec_init,trouve_init_aig,trouve_lay,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR, - trouve_Tempo_maxi,trouve_Entete,trouve_tco,trouve_cdm,trouve_Serveur_interface,trouve_fenetre,trouve_MasqueTCO, - trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig,trouve_raz,trouve_section_aig, - trouve_section_branche,trouve_section_sig,trouve_section_act,trouve_tempo_feu, - trouve_algo_uni,croi,trouve_Nb_cantons_Sig,trouve_dem_aig,trouve_demcnxCOMUSB,trouve_demcnxEth : boolean; - virgule,i_detect,i,erreur,aig2,detect,offset,j,position, - ComptEl,Compt_IT,Num_Element,k,modele,adr,adr2,erreur2,l,t,Nligne,postriple,itl, - postjd,postjs,nv,it,Num_Champ,asp,adraig,poscroi : integer; - - function lit_ligne : string ; - var esp,l1,l2 : integer; - begin - repeat - readln(fichier,s); - sOrigine:=s; - s:=uppercase(s); - if length(s)>0 then c:=s[1]; - until ((c<>'/') and (s<>'')) or eof(fichier) ; - // supprime les espaces éventuels sauf entre les guillements - esp:=0; - repeat - l1:=pos('"',s);l2:=posEx('"',s,l1+1); - esp:=posEx(' ',s,Esp+1); - if (esp<>0) and (espl2) then delete(s,esp,1); - until esp=0; - lit_ligne:=s; - if debug=1 then affiche(s,clLime); - end; - -procedure compile_signaux; -begin - //Affiche('Définition des signaux',clyellow); - i:=1;Nligne:=1; - NbreFeux:=0; - repeat - inc(Nligne); - s:=lit_ligne; - //affiche(s,clyellow); - if s<>'0' then - begin - inc(NbreFeux); - decode_ligne_feux(s,i);inc(i); - end; - until (s='0') or eof(fichier); -end; - -procedure compile_branches; -begin - // branches - NDetecteurs:=0; - Nligne:=1; - i_detect:=1; - i:=1; - //Affiche('Définition des branches',clyellow); - - repeat - s:=lit_ligne; - if s<>'0' then - begin - branche[i]:=s; - j:=1;offset:=1; - inc(Nligne); - compile_branche(s,i); - inc(i); - end; - until (s='0') or eof(fichier) or (i>=MaxBranches); - if i>MaxBranches then Affiche('Nombre maximal de branches atteint',clRed); - NbreBranches:=i-1; -end; - -procedure compile_actionneurs; -var i : integer; -begin - // raz des actionneurs - for i:=1 to maxTablo_act do - begin - Tablo_actionneur[i].trainDecl:=''; - Tablo_actionneur[i].trainDest:=''; - Tablo_actionneur[i].etat:=0; - Tablo_actionneur[i].adresse:=0; - Tablo_actionneur[i].adresse2:=0; - Tablo_Actionneur[i].typdeclenche:=0; - Tablo_actionneur[i].accessoire:=0; - Tablo_actionneur[i].sortie:=0; - Tablo_actionneur[i].fichierSon:=''; - Tablo_actionneur[i].det:=false; - Tablo_actionneur[i].loco:=false; - Tablo_actionneur[i].act:=false; - Tablo_actionneur[i].son:=false; - end; - - //Affiche('Définition des actionneurs/détecteurs',clyellow); - maxTablo_act:=1; - NbrePN:=0;Nligne:=1; - - // définition des actionneurs - repeat - s:=lit_ligne; - if (s<>'0') and (s<>'') then - begin - //Affiche(s,clyellow); - sa:=s; sOrigine:=s; - - if s[1]='A' then - begin - Tablo_actionneur[maxtablo_act].typdeclenche:=2; // type aiguillage - Delete(sa,1,1); - val(sa,j,erreur); - Tablo_actionneur[maxtablo_act].adresse:=j; - delete(sa,1,erreur); - s:=sa; - end; - - i:=pos('MEM[',sOrigine); - if i>0 then - begin - Tablo_actionneur[maxtablo_act].typdeclenche:=1; // type mémoire de zone - Delete(sa,1,4); - val(sa,j,erreur); - Tablo_actionneur[maxtablo_act].adresse:=j; - i:=pos(',',sa);delete(sa,1,i); - val(sa,j,erreur); - i:=pos(',',sa); - Tablo_actionneur[maxtablo_act].adresse2:=j; - Tablo_actionneur[maxTablo_act].det:=true; - delete(sa,1,i); - s:=sa; // mémo s - end; - - if length(sOrigine)>1 then - begin - if (sOrigine[1]<>'(') and (sorigine[1]<>'A') and (pos('MEM[',sOrigine)=0) then // si pas détecteur de PN - begin - Tablo_actionneur[maxtablo_act].typdeclenche:=0; // type actionneur - val(sa,j,erreur); - Tablo_actionneur[maxtablo_act].adresse:=j; - if erreur<>0 then Tablo_actionneur[maxTablo_act].det:=sa[erreur]='Z' - else Affiche('Erreur actionneur '+sOrigine,clred); - delete(sa,1,erreur); - s:=sa; - end; - end; - - // vérifier si F ou A ou " au 4eme champ - i:=pos(',',sa); - if i>0 then delete(sa,1,i) else s:='0'; - i:=pos(',',sa); - if i>0 then delete(sa,1,i) else s:='0'; - - inc(Nligne); - - if length(sa)>1 then if (sa[1]='"') then - // -----------------son - begin - Tablo_actionneur[maxtablo_act].act:=false; - Tablo_actionneur[maxtablo_act].son:=true; - Tablo_actionneur[maxtablo_act].loco:=false; - i:=pos(',',s); - if i<>0 then - begin - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].etat:=j; - Delete(s,1,erreur); - - i:=pos(',',s); - Tablo_actionneur[maxTablo_act].trainDecl:=copy(s,1,i-1); - Delete(s,1,i); - - i:=pos('"',s);if i<>0 then Delete(s,i,1); - i:=pos('"',s);if i<>0 then Delete(s,i,1); - Tablo_actionneur[maxTablo_act].fichierSon:=s; - inc(maxTablo_act); - end; - end; - - if length(sa)>1 then if (sa[1]='A') then - // -----------------accessoire - begin - Tablo_actionneur[maxtablo_act].act:=true; - Tablo_actionneur[maxtablo_act].son:=false; - Tablo_actionneur[maxtablo_act].loco:=false; - - i:=pos(',',s); - if i<>0 then - begin - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].etat:=j; - Delete(s,1,erreur); - - i:=pos(',',s); - Tablo_actionneur[maxTablo_act].trainDecl:=copy(s,1,i-1); - Delete(s,1,i); - - i:=pos('A',s); - if i<>0 then - begin - Delete(s,1,1); - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].Accessoire:=j; - - i:=pos(',',s); - if i<>0 then - begin - Delete(S,1,i); - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].sortie:=j; - end; - - i:=pos(',',s); - if i<>0 then - begin - Delete(S,1,i); - Tablo_actionneur[maxTablo_act].RAZ:=s[1]='Z'; - inc(maxTablo_act); - end; - - end; - s:='';i:=0; - end; - end; - - if length(sa)>1 then if (sa[1]='F') then - // -----------------fonction loco - begin - Tablo_actionneur[maxtablo_act].act:=false; - Tablo_actionneur[maxtablo_act].loco:=true; - Tablo_actionneur[maxtablo_act].son:=false; - - // 815,1,CC406526,F2,450 - i:=pos(',',s); - if i<>0 then - begin - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].etat:=j; - Delete(s,1,erreur); - - i:=pos(',',s); - Tablo_actionneur[maxTablo_act].trainDecl:=copy(s,1,i-1); - Delete(s,1,i); - - i:=pos('F',s); - if i<>0 then - begin - Delete(s,1,1); - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].Fonction:=j; - - i:=pos(',',s);// champ tempo - if i<>0 then - begin - Delete(S,1,i); - val(s,j,erreur); - Tablo_actionneur[maxTablo_act].Tempo:=j; - i:=pos(',',s); // champ train dest - if i=0 then tablo_actionneur[maxTablo_act].TrainDest:=tablo_actionneur[maxTablo_act].TrainDecl - else - begin - tablo_actionneur[maxTablo_act].TrainDest:=copy(s,i+1,length(s)-i); - end; - inc(maxTablo_act); - end; - end; - s:='';i:=0; - end; - end; - - // Passage à niveau - if (pos('PN',s)<>0) then - begin - inc(NbrePN); - NbreVoies:=0; - repeat - inc(NbreVoies); - Delete(s,1,1); // supprime ( - // déterminer si il y a un - avant le ) - j:=pos(')',s); - i:=pos('-',s); - if (i0) then - begin - // zone de détection - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].detZ1F:=j; - delete(s,1,erreur); - - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].detZ2F:=j; - delete(s,1,erreur); - - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].detZ1O:=j; - delete(s,1,erreur); - - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].detZ2O:=j; - end - else - begin - // actionneurs - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].ActFerme:=j; - // Affiche('Ferme='+intToSTR(j),clyellow); - i:=pos(',',s); - Delete(S,1,i); - val(s,j,erreur); - Tablo_PN[NbrePN].voie[NbreVoies].ActOuvre:=j; - // Affiche('Ouvre='+intToSTR(j),clyellow); - end; - - i:=pos(')',s);Delete(S,1,i); - i:=pos(',',s);Delete(S,1,i); - Tablo_PN[NbrePN].voie[NbreVoies].PresTrain:=false; - until (copy(s,1,2)='PN') or (NbreVoies=10); - - Tablo_PN[NbrePN].NbVoies:=NbreVoies; - Delete(s,1,3); // Supprime PN( - val(s,j,erreur); - Tablo_PN[NbrePN].Adresseferme:=j; - Delete(s,1,erreur-1); - if s[1]=',' then delete(s,1,1); - if s[1]='+' then Tablo_PN[NbrePN].CommandeFerme:=2 - else - if s[1]='-' then Tablo_PN[NbrePN].CommandeFerme:=1 - else - begin - // nouvelle syntaxe - val(s,j,erreur); - Tablo_PN[NbrePN].CommandeFerme:=j; - end; - j:=pos(',',s); - Delete(s,1,j); // supprime séparateurs - - val(s,j,erreur); - Tablo_PN[NbrePN].AdresseOuvre:=j; - Delete(s,1,erreur-1); - if s[1]=',' then delete(s,1,1); - if s[1]='+' then Tablo_PN[NbrePN].CommandeOuvre:=2 - else - if s[1]='-' then Tablo_PN[NbrePN].CommandeOuvre:=1 - else - begin - // nouvelle syntaxe - val(s,j,erreur); - Tablo_PN[NbrePN].CommandeOuvre:=j; - end; - j:=pos(')',s); - Delete(s,1,j); // supprime séparateurs - if length(s)>0 then - begin - // champ impulsion nouvelle syntaxe - if s[1]=',' then delete(s,1,1); - val(s,i,erreur); - Tablo_PN[NbrePN].Pulse:=i; - s:=''; - end; - end; - end; - until (s='0') or eof(fichier) ; - dec(maxTablo_act); -end; - -procedure compile_aiguillages; -begin - //Affiche('Définition des aiguillages',clyellow); - maxaiguillage:=0; - Nligne:=1; - repeat - s:=lit_ligne; - inc(Nligne); - //Affiche(s,ClLime); - //chaine:=s; - if debugconfig then Affiche(s,ClLime); - if (s<>'0') then - begin - if MaxAiguillage>=MaxAcc then - begin - Affiche('Nombre maximal d''aiguillages atteint',clRed); - end - else - inc(maxaiguillage); - virgule:=pos(',',s); - enregistrement:=copy(s,1,virgule-1); // adresse de l'aiguillage [TRI] - delete(s,1,virgule); - postriple:=pos('TRI',enregistrement);triC:=postriple<>0;if triC then delete(enregistrement,postriple,3); - postjd:=pos('TJD',enregistrement);tjdC:=postjd<>0;if tjdC then delete(enregistrement,postjd,3); - postjs:=pos('TJS',enregistrement);tjsC:=postjs<>0;if tjsC then delete(enregistrement,postjs,3); - poscroi:=pos('CROI',enregistrement);croi:=poscroi<>0;if croi then delete(enregistrement,poscroi,4); - - // adresse de l'aiguillage - Val(enregistrement,adraig,erreur); // adraig = adresse de l'aiguillage - if erreur<>0 then Affiche('Erreur aiguillage '+intToSTR(adraig)+' ; caractère '+enregistrement[erreur]+' inconnu',clred); - if debugConfig then Affiche('Adresse='+IntToSTR(adraig)+' enregistrement='+Enregistrement,clyellow); - - aiguillage[maxaiguillage].adresse:=adraig; - aiguillage[maxaiguillage].AdroitB:='Z'; aiguillage[maxaiguillage].AdevieB:='Z'; - aiguillage[maxaiguillage].DdroitB:='Z'; aiguillage[maxaiguillage].DdevieB:='Z'; - - aiguillage[maxaiguillage].ApointeB:='Z'; - aiguillage[maxaiguillage].Adevie2B:='Z'; - - if (triC) then aiguillage[maxaiguillage].modele:=triple; - if (tjsC) then - begin - aiguillage[maxaiguillage].modele:=tjs - end; - if (tjdC) then - begin - aiguillage[maxaiguillage].modele:=tjd ; - end; - if not(tjsC) and not(tjdC) and not(triC) then - begin - aiguillage[maxaiguillage].modele:=aig; - end; - if croi then aiguillage[maxaiguillage].modele:=crois; - - if (triC) then - begin - Val(s,aig2,erreur); // aig = 2eme adresse de l'aiguillage - aiguillage[maxaiguillage].AdrTriple:=aig2; - virgule:=pos(',',s); - delete(s,1,virgule); - end; - ComptEl:=0;Compt_It:=0;Num_element:=Num_element+1; - // préparer l'enregistrement pour la boucle de ligne - - enregistrement:=s; - - Num_Champ:=1; - itl:=0; - repeat // parcoure la ligne - if (debugConfig) then Affiche('boucle de ligne: '+s,clYellow); - if (length(enregistrement)<>0) then - if (enregistrement[1]='P') then - begin - if tjdC then begin affiche('Erreur P interdit dans une TJD : '+sOrigine,clred);exit; end; - if debugconfig then Affiche('Section P - enregistrement='+enregistrement,clYellow); - ComptEl:=ComptEl+1; - decodeAig(enregistrement,detect,c); - if c='' then c:='Z'; - aiguillage[maxaiguillage].Apointe:=detect; - aiguillage[maxaiguillage].ApointeB:=c; - - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(Enregistrement)+1; - delete(enregistrement,1,virgule); - end; - - if (length(enregistrement)<>0) then // section droite - if (enregistrement[1]='D') then - begin - if debugconfig then Affiche('Section D - enregistrement='+enregistrement,clYellow); - ComptEl:=ComptEl+1; - if tjdC or tjsC or croi then - begin - Delete(Enregistrement,1,2); - decodeAig(Enregistrement,detect,c); - aiguillage[maxaiguillage].Adroit:=detect; - aiguillage[maxaiguillage].AdroitB:=c; - i:=pos(',',Enregistrement);Delete(Enregistrement,1,i); - decodeAig(Enregistrement,detect,c); - aiguillage[maxaiguillage].DDroit:=detect; - aiguillage[maxaiguillage].DdroitB:=c; - i:=pos(')',enregistrement);if i=0 then begin Affiche('Erreur de syntaxe ligne '+SOrigine,clred);exit;end; - Delete(enregistrement,1,i+1); - end - else - begin - decodeAig(enregistrement,detect,c); - if c='' then c:='Z'; - aiguillage[maxaiguillage].Adroit:=detect; - aiguillage[maxaiguillage].AdroitB:=c; - - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(enregistrement)+1; - delete(enregistrement,1,virgule); - end; - end; - - if (length(enregistrement)<>0) then - if (enregistrement[1]='S') then - begin - if debugconfig then Affiche('Section S - enregistrement='+enregistrement,clYellow); - ComptEl:=ComptEl+1; - - if tjdC or tjsC or croi then - begin - Delete(enregistrement,1,2); - decodeAig(enregistrement,detect,c); - aiguillage[maxaiguillage].Adevie:=detect; - aiguillage[maxaiguillage].AdevieB:=c; - i:=pos(',',enregistrement);Delete(enregistrement,1,i); - decodeAig(enregistrement,detect,c); - aiguillage[maxaiguillage].DDevie:=detect; - aiguillage[maxaiguillage].DDevieB:=c; - i:=pos(')',enregistrement);if i=0 then begin Affiche('Erreur de syntaxe ligne '+SOrigine,clred);exit;end; - Delete(enregistrement,1,i+1); - - //Affiche(enregistrement,clBlue); - end - else - begin - delete(enregistrement,1,1); // supprime le S - i:=pos(',',enregistrement); - if i=0 then i:=length(enregistrement)+1; - s:=copy(enregistrement,1,i-1); // isole la zone S - - erreur:=pos('2-',s); - S2:=erreur<>0; - if (S2) then delete(s,erreur,2); - - erreur:=pos('S2',s); // description d'un rattachement à la branche S2 d'un aiguillage triple - tec:=erreur<>0; // ne supprimer que le 2 - if (tec) then delete(s,erreur+1,1); - - //val(enregistrement,detect,erreur); // extraction de l'adresse - decodeAig(s,detect,c); - //if ((detect=0) and (erreur=0)) then Affiche('Erreur pas d''adresse dans section S: '+s,clred); - //c:='Z'; - //if (erreur<>0) then begin delete(enregistrement,1,erreur-1);c:=enregistrement[1];end; - - if not(S2) and not(tec) then begin aiguillage[maxaiguillage].Adevie:=detect;aiguillage[maxaiguillage].AdevieB:=c;end; - if S2 and not(tec) then begin aiguillage[maxaiguillage].Adevie2:=detect;aiguillage[maxaiguillage].Adevie2B:=c;end; - if S2 and tec then begin aiguillage[maxaiguillage].Adevie2:=detect;aiguillage[maxaiguillage].Adevie2B:='T';end; - - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(enregistrement)+1; - delete(enregistrement,1,virgule);; - end; - end; - - // inversion aiguillage - if (length(enregistrement)<>0) then - if (enregistrement[1]='I') then - begin - inc(Num_Champ); - delete(enregistrement,1,1); - Val(enregistrement,adr,erreur); - if (adr<0) or (adr>1) then begin Affiche('Erreur Inversion ; ligne '+sOrigine,clred);end; - //Affiche(intTostr(adr),clblue); - Aiguillage[maxaiguillage].inversionCDM:=adr; - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(s)+1; - delete(enregistrement,1,virgule); - end; - - // si vitesse définie - if (length(enregistrement)<>0) then - if enregistrement[1]='V' then - begin - inc(num_champ); - delete(enregistrement,1,1); - Val(enregistrement,adr,erreur); - //Affiche('section vitesse définie aig='+intToSTR(aig)+'/'+intToSTR(adr),clyellow); - aiguillage[maxaiguillage].vitesse:=adr; - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(s)+1; - delete(enregistrement,1,virgule); - end; - - // TJS et L - if (length(enregistrement)<>0) then - if enregistrement[1]='L' then - begin - if not(tjsC) then begin Affiche('Erreur paramètre L ligne: '+sOrigine,clred);exit;end; - inc(num_champ); - delete(enregistrement,1,1); - Val(enregistrement,adr,erreur); - aiguillage[maxaiguillage].tjsInt:=adr; - c:=#0; - if erreur<>0 then c:=enregistrement[erreur]; - if ((c<>'S') and (c<>'D')) then - begin - c:=' ';Affiche('Erreur paramètre L '+sOrigine,clred); - end; - aiguillage[maxaiguillage].tjsIntB:=c; - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(enregistrement)+1; - delete(enregistrement,1,virgule); - end; - - // Init aiguillage - i:=pos('INIT(',enregistrement); - if i=1 then - begin - inc(num_champ); - delete(enregistrement,i,i+4); - Val(enregistrement,position,erreur); - i:=pos(',',enregistrement); - if i<>0 then delete(enregistrement,1,i); - Val(enregistrement,j,erreur); - aiguillage[maxaiguillage].temps:=j; - aiguillage[maxaiguillage].posinit:=position; - i:=pos(')',enregistrement); - delete(enregistrement,1,i); - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(enregistrement)+1; - delete(enregistrement,1,virgule); - end; - - // nombre d'états de la TJD - if (length(enregistrement)<>0) then - if enregistrement[1]='E' then - begin - inc(num_champ); - delete(enregistrement,1,1); - Val(enregistrement,adr,erreur); - aiguillage[maxaiguillage].EtatTJD:=adr; - virgule:=pos(',',enregistrement);if virgule=0 then virgule:=length(s)+1; - delete(enregistrement,1,virgule); - end; - - inc(itl); - until (enregistrement='') or (itl>3); - if itl>4 then begin Affiche('Erreur 400 ligne '+sOrigine,clred);exit;end; - end; - until (sOrigine='0'); -end; - -procedure compile_dccpp; -var nv,i : integer; -begin - Nligne:=1; - nv:=0; - repeat - lit_ligne; - sa:=sOrigine; - - sa:=uppercase(EnvAigDccpp_ch); - i:=pos(sa,s); - if i<>0 then - begin - inc(nv); - delete(s,i,length(sa)+1); - val(s,EnvAigDccpp,erreur); - s:=''; - end; - - sa:=uppercase(AdrBaseDetDccpp_ch); - i:=pos(sa,s); - if i<>0 then - begin - inc(nv); - delete(s,i,length(sa)+1); - val(s,AdrBaseDetDccpp,erreur); - s:=''; - end; - - sa:=uppercase(section_initpp_ch); - i:=pos(sa,s); - if i<>0 then - begin - inc(nv); - nLigne:=1; - repeat - lit_ligne; - s:=sOrigine; - if s<>'0' then CdeDccpp[Nligne]:=s; - inc(Nligne); - until eof(fichier) or (s='') or (s='0') or (nLigne>MaxCdeDccpp); - end; - - until eof(fichier) or (s='0'); -end; - -procedure compile_trains; -var i,erreur : integer; -begin - ntrains:=0; - repeat - lit_ligne; - if s<>'0' then - begin - inc(ntrains); - sa:=sOrigine; - i:=pos(',',s); - if i<>0 then - begin - trains[ntrains].nom_train:=copy(sa,1,i-1); - delete(s,1,i-1); - end; - - i:=pos(',',s); - if i<>0 then - begin - delete(s,i,1); - val(s,trains[ntrains].adresse,erreur); - delete(s,1,erreur-1); - end; - - i:=pos(',',s); - if i<>0 then - begin - delete(s,i,1); - val(s,trains[ntrains].vitMax,erreur); - delete(s,1,erreur-1); - end; - - i:=pos(',',s); - if i<>0 then - begin - delete(s,i,1); - val(s,trains[ntrains].vitnominale,erreur); - delete(s,1,erreur-1); - end; - - i:=pos(',',s); - if i<>0 then - begin - delete(s,i,1); - val(s,trains[ntrains].vitralenti,erreur); - delete(s,1,erreur-1); - end; - - Formprinc.ComboTrains.Items.Add(trains[ntrains].nom_train); - end; - if ntrains>1 then - with Formprinc do - begin - ComboTrains.ItemIndex:=0; - editadrtrain.Text:=inttostr(trains[1].adresse); - end; - until (sOrigine='0') or (ntrains>=Max_Trains); -end; - -procedure lit_flux; - label ici1,ici2,ici3,ici4 ; - var i : integer; - -// début de la procédure lit_config -begin - // valeurs par défaut - Nb_cantons_Sig:=3; - nv:=0; it:=0; - // taille de fonte - repeat - s:=lit_ligne; - - sa:=uppercase(debug_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - delete(s,i,length(sa)); - val(s,debug,erreur); - end; - - sa:=uppercase(Avec_roulage_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - delete(s,i,length(sa)); - val(s,AvecRoulage,erreur); - if avecRoulage=1 then Formprinc.roulage1.visible:=true; - end; - - sa:=uppercase(Fonte_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_fonte:=true; - delete(s,i,length(sa)); - val(s,TailleFonte,erreur); - if (TailleFonte<8) or (tailleFonte>25) then taillefonte:=10; - FormPrinc.FenRich.Font.Size:=TailleFonte; - end; - - sa:=uppercase(Protocole_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_protocole:=true; - delete(s,i,length(sa)); - val(s,Protocole,erreur); - if (Protocole<1) or (Protocole>2) then Protocole:=1; //1=xpressnet 2=DCC+ - end; - - // adresse ip et port de CDM - sa:=uppercase(IpV4_PC_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_ipv4_PC:=true; - delete(s,i,length(sa)); - i:=pos(':',s); - if i<>0 then - begin - adresseIPCDM:=copy(s,1,i-1);Delete(s,1,i); - val(s,portCDM,erreur); - if (portCDM=0) or (portCDM>65535) or (erreur<>0) then affiche('Erreur port CDM : '+s,clred); - end - else affiche('Erreur adresse ip cdm rail '+s,clred); - end; - - // adresse ip et port de la centrale - sa:=uppercase(IPV4_INTERFACE_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_IPV4_INTERFACE:=true; - delete(s,i,length(sa)); - i:=pos(':',s); - if i<>0 then - begin - adresseIP:=copy(s,1,i-1);Delete(s,1,i);portInterface:=StrToINT(s); - if (adresseIP<>'0') and (portInterface=0) then affiche('Erreur port nul : '+sOrigine,clRed); - end - else begin adresseIP:='0';parSocketLenz:=false;end; - end; - - // nombre max de port série à explorer - // configuration du port com - sa:=uppercase(MaxCom_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_MaxPort:=true; - val(s,MaxPortCom,erreur); - if erreur<>0 then Affiche('Erreur MaxCom: '+sOrigine,clred); - if (MaxPortCom<1) or (MaxPortCom>99) then MaxPortCom:=30; - end; - - // configuration du port com - sa:=uppercase(PROTOCOLE_SERIE_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_PROTOCOLE_SERIE:=true; - delete(s,i,length(sa)); - if not(config_com(s)) then Affiche('Erreur port com mal déclaré : '+s,clred); - portcom:=s; - end; - - // temporisation entre 2 caractères - sa:=uppercase(INTER_CAR_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_INTER_CAR:=true; - val(s,TempoOctet,erreur); - if erreur<>0 then Affiche('Erreur temporisation entre 2 octets',clred); - end; - - // temporisation attente maximale interface - sa:=uppercase(TEMPO_MAXI_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_Tempo_maxi:=true; - val(s,TimoutMaxInterface,erreur); - if erreur<>0 then Affiche('Erreur temporisation maximale interface',clred); - end; - - // entete - sa:=uppercase(ENTETE_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_Entete:=true; - val(s,Valeur_entete,erreur); - entete:=''; - case Valeur_entete of - 0 : begin entete:='';suffixe:='';end; - 1 : begin entete:=#$FF+#$FE;suffixe:='';end; - end; - if (erreur<>0) or (valeur_entete>1) then Affiche('Erreur déclaration variable '+entete_ch,clred); - end; - - // avec ou sans initialisation des aiguillages - sa:=uppercase(INIT_AIG_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - trouve_init_aig:=true; - inc(nv); - delete(s,i,length(sa)); - AvecInitAiguillages:=s='1'; - end; - - // avec demande de position des aiguillages en mode autonome au démarrage - sa:=uppercase(Init_dem_aig_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - trouve_dem_aig:=true; - inc(nv); - delete(s,i,length(sa)); - AvecDemandeAiguillages:=s='1'; - end; - - // avec demande de connexion en COM USB au démarrage - sa:=uppercase(Init_dem_interfaceUSBCOM_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - trouve_demcnxCOMUSB:=true; - inc(nv); - delete(s,i,length(sa)); - AvecDemandeInterfaceUSB:=s='1'; - end; - - // avec demande de connexion en ethernet au démarrage - sa:=uppercase(Init_dem_interfaceEth_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - trouve_demcnxEth:=true; - inc(nv); - delete(s,i,length(sa)); - AvecDemandeInterfaceEth:=s='1'; - end; - - // taille de la fenetre - sa:=uppercase(fenetre_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_fenetre:=true; - delete(s,i,length(sa)); - val(s,fenetre,erreur); - if fenetre=1 then Formprinc.windowState:=wsMaximized; - end; - - // Nombre de cantons avant signal - sa:=uppercase(Nb_cantons_Sig_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_Nb_cantons_Sig:=true; - delete(s,i,length(sa)); - val(s,Nb_cantons_Sig,erreur); - if (Nb_cantons_Sig<3) or (Nb_cantons_Sig>5) then Nb_cantons_Sig:=3; - end; - - // temporisation aiguillages - sa:=uppercase(Tempo_Aig_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_Tempo_aig:=true; - delete(s,i,length(sa)); - val(s,Tempo_Aig,erreur); - end; - - // temporisation décodeurs de feux - sa:=uppercase(Tempo_Feu_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_Tempo_feu:=true; - delete(s,i,length(sa)); - val(s,Tempo_Feu,erreur); - if tempo_Feu=0 then Tempo_feu:=100; - end; - - // algo unisemaf - sa:=uppercase(Algo_unisemaf_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_Algo_Uni:=true; - delete(s,i,length(sa)); - val(s,algo_Unisemaf,erreur); - if (algo_Unisemaf<0) or (algo_Unisemaf>2) then algo_Unisemaf:=1; - end; - - sa:=uppercase(verif_version_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - trouve_verif_version:=true; - inc(nv); - delete(s,i,length(sa)); - // vérification de la version au démarrage - verifVersion:=true; - val(s,i,erreur); - if erreur=0 then verifVersion:=i=1; - end; - - sa:=uppercase(NOTIF_VERSION_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_NOTIF_VERSION:=true; - // vérification de la version au démarrage - val(s,i,erreur); - notificationVersion:=i=1; - end; - - sa:=uppercase(TCO_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_TCO:=true; - val(s,i,erreur); - AvecTCO:=i=1; - end; - - sa:=uppercase(MasqueBandeauTCO_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - delete(s,i,length(sa)); - trouve_MasqueTCO:=true; - val(s,i,erreur); - MasqueBandeauTCO:=i=1; - end; - - sa:=uppercase(CDM_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_CDM:=true; - delete(s,i,length(sa)); - val(s,i,erreur); - LanceCDM:=i=1; - end; - - sa:=uppercase(LAY_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_lay:=true; - delete(s,i,length(sa)); - lay:=s; - end; - - sa:=uppercase(SERVEUR_INTERFACE_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_serveur_interface:=true; - delete(s,i,length(sa)); - val(s,i,erreur); - ServeurInterfaceCDM:=i; - end; - - sa:=uppercase(RETRO_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_retro:=true; - delete(s,i,length(sa)); - val(s,i,erreur); - ServeurRetroCDM:=i; - end; - - sa:=uppercase(nb_det_dist_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_NbDetDist:=true; - delete(s,i,length(sa)); - val(s,i,erreur); - if i<2 then begin i:=2;Affiche('Attention '+nb_det_dist_ch+' ramené à '+IntToSTR(i),clOrange); end; - Nb_Det_Dist:=i; - end; - - sa:=uppercase(Raz_signaux_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_NbDetDist:=true; - delete(s,i,length(sa)); - val(s,i,erreur); - if i>1 then i:=1; - Raz_Acc_signaux:=i=1; - end; - - // section aiguillages - sa:=uppercase(section_aig_ch); - if pos(sa,s)<>0 then - begin - trouve_section_aig:=true; - compile_aiguillages; - end; - - // section branche - sa:=uppercase(section_branches_ch); - if pos(sa,s)<>0 then - begin - trouve_section_branche:=true; - compile_branches; - end; - - // section signaux - sa:=uppercase(section_sig_ch); - if pos(sa,s)<>0 then - begin - trouve_section_sig:=true; - compile_signaux; - end; - - // section actionneurs - sa:=uppercase(section_act_ch); - if pos(sa,s)<>0 then - begin - trouve_section_act:=true; - compile_actionneurs; - end; - - // section dcc++ - sa:=uppercase(section_dccpp_ch); - if pos(sa,s)<>0 then - begin - trouve_section_dccpp:=true; - compile_dccpp; - end; - - // section trains - sa:=uppercase(section_trains_ch); - if pos(sa,s)<>0 then - begin - trouve_section_trains:=true; - compile_trains; - end; - - // section placement - sa:=uppercase(section_placement_ch); - if pos(sa,s)<>0 then - begin - i:=1; - repeat - lit_ligne; - if s<>'0' then - begin - j:=pos(',',s); - if j<>0 then - begin - placement[i].train:=copy(s,1,j-1); - delete(s,1,j); - val(s,j,erreur); - placement[i].detecteur:=j; - inc(i); - end; - s:=''; - end; - until (s='0') or eof(fichier); - end; - - inc(it); - - until (eof(fichier)); - -end; -// procédure lit_config -begin - debugConfig:=false; - trouve_NbDetDist:=false; - trouve_ipv4_PC:=false; - trouve_retro:=false; - trouve_sec_init:=false; - trouve_init_aig:=false; - trouve_dem_aig:=false; - trouve_tempo_aig:=false; - trouve_tempo_feu:=false; - trouve_INTER_CAR:=false; - trouve_entete:=false; - trouve_IPV4_INTERFACE:=false; - trouve_Tempo_maxi:=false; - trouve_PROTOCOLE_SERIE:=false; - trouve_TCO:=false; - trouve_LAY:=false; - trouve_Serveur_interface:=false; - trouve_cdm:=false; - trouve_NOTIF_VERSION:=false; - trouve_masqueTCO:=false; - trouve_fenetre:=false; - trouve_verif_version:=false; - trouve_Fonte:=false; - trouve_Raz:=false; - trouve_demcnxCOMUSB:=false; - trouve_demcnxEth:=false; - trouve_Algo_Uni:=false; - trouve_Nb_cantons_Sig:=false; - //trouve_FVR:=false; - - if not(trouve_tempo_feu) then - begin - s:=tempo_feu_ch; - tempo_feu:=100; - s:=''; - end; - if not(trouve_NOTIF_VERSION) then s:=NOTIF_VERSION_ch; - if not(trouve_verif_version) then s:=verif_version_ch; - if not(trouve_fonte) then s:=fonte_ch; - - Nb_Det_Dist:=3; - // initialisation des aiguillages avec des valeurs par défaut - for i:=1 to MaxAcc do - begin - Aiguillage[i].modele:=rien ; // sans existence - Aiguillage[i].adresse:=0; - Aiguillage[i].adrTrain:=0; - Aiguillage[i].position:=const_inconnu; // position inconnue - Aiguillage[i].PosInit:=const_inconnu; // position inconnue - Aiguillage[i].temps:=5; - Aiguillage[i].inversionCDM:=0; - Aiguillage[i].EtatTJD:=4; - end; - for i:=1 to 1024 do - begin - Detecteur[i].etat:=false; - //Detecteur[i].train:='0'; - Ancien_detecteur[i]:=false; - end; - - //Affiche('Lecture du fichier de configuration '+NomConfig,clyellow); - {$I+} - try - assign(fichier,NomConfig); - reset(fichier); - except - Affiche('Fichier '+NomConfig+' non trouvé : création d''un fichier vide par défaut',clred); - portcom:='COM3:57600,N,8,1,2'; - adresseIPCDM:='127.0.0.1';portCDM:=9999; - adresseIP:='192.168.1.23';portInterface:=5550; - verifVersion:=true; - Valeur_entete:=1; - TempoOctet:=50; - TimoutMaxInterface:=7; - AvecInitAiguillages:=true; - AvecDemandeInterfaceUSB:=true; - AvecDemandeInterfaceEth:=true; - lay:=''; - Tempo_Aig:=100; - Tempo_feu:=100; - ServeurInterfaceCDM:=1; - Nb_cantons_Sig:=3; - ServeurRetroCDM:=1; - algo_Unisemaf:=1; - TailleFonte:=12; - Nb_Det_Dist:=3; - genere_config; - assign(fichier,NomConfig); - reset(fichier); - end; - {$I-} - lit_flux; - close(fichier); - - configNulle:=(maxAiguillage=0) and (NbreBranches=0) and (Nbrefeux=0); - if configNulle then Affiche('Fonctionnement en config nulle',ClYellow); - - s:='';//Affiche(intToSTR(Nv),clred); - if not(trouve_NbDetDist) then s:=nb_det_dist_ch; - if not(trouve_ipv4_PC) then s:=IpV4_PC_ch; - if not(trouve_retro) then s:=retro_ch; - if not(trouve_init_aig) then s:=INIT_AIG_ch; - if not(trouve_INTER_CAR) then s:=INTER_CAR_ch; - if not(trouve_Tempo_maxi) then s:=Tempo_maxi_ch; - if not(trouve_Entete) then s:=Entete_ch; - if not(trouve_LAY) then s:=s+LAY_ch; - if not(trouve_TCO) then s:=TCO_ch; - if not(trouve_CDM) then s:=CDM_ch; - if not(trouve_Serveur_interface) then s:=Serveur_interface_ch; - if not(trouve_fenetre) then s:=fenetre_ch; - if not(trouve_tempo_aig) then s:=tempo_aig_ch; - if not(trouve_Algo_Uni) then s:=Algo_unisemaf_ch; - if not(trouve_Nb_cantons_Sig) then s:=Nb_cantons_Sig_ch; - if not(trouve_dem_aig) then s:=Init_dem_aig_ch; - if not(trouve_demcnxCOMUSB) then s:=Init_dem_interfaceUSBCOM_ch; - if not(trouve_demcnxEth) then s:=Init_dem_interfaceEth_ch; - - if not(trouve_tempo_feu) then - begin - s:=tempo_feu_ch; - tempo_feu:=100; - s:=''; - end; - if not(trouve_NOTIF_VERSION) then s:=NOTIF_VERSION_ch; - if not(trouve_verif_version) then s:=verif_version_ch; - if not(trouve_fonte) then s:=fonte_ch; - - if s<>'' then - begin - affiche('Manque variable(s) dans '+NomConfig+' : '+s,clOrange); - Affiche('Elles seront régénérées automatiquement',clOrange); - confasauver:=true; - end; - if not(trouve_section_aig) then Affiche('Manque section '+section_aig_ch,clred); - if not(trouve_section_sig) then Affiche('Manque section '+section_sig_ch,clred); - if not(trouve_section_branche) then Affiche('Manque section '+section_branches_ch,clred); - verif_coherence; - formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal'; -end; - - -// sauvegarder la config dans le fichier cfg -function Sauve_config : boolean; -begin - // générer le fichier de config - genere_config; - Affiche('Configuration sauvegardée dans le fichier',clLime); - config_modifie:=false; - confasauver:=false; - sauve_config:=true; - exit; -end; - -function verifie_panneau_config : boolean; -var ChangeCDM,changeInterface,changeUSB,change_srv,ok : boolean; - i,erreur : integer; - s : string; -begin - ok:=true; - // Vérification de la configuration------------------------------------------- - // contrôle adresse IP CDM - with FormConfig do - begin - s:=EditAdrIPCDM.text; - if s='' then s:='127.0.0.1'; - if not(IpOk(s)) then begin labelInfo.Caption:='Adresse IP CDM rail incorrecte';ok:=false;end; - ChangeCDM:=s<>AdresseIPCDM; - adresseIPCDM:=s; - - // contrôle port CDM - val(EditPortCDM.Text,i,erreur); - if i=0 then i:=9999; - if i>65535 then begin labelInfo.Caption:='Port CDM rail incorrect';ok:=false;end; - changeCDM:=(portCDM<>i) or ChangeCDM; - portCDM:=i; - - // taille fonte - val(EditFonte.text,i,erreur); - if (i<8) or (i>25) then i:=10; - TailleFonte:=i; - - val(EditDebug.text,i,erreur); - if (i<0) or (i>2) then i:=0; - Debug:=i; - - if checkRoulage.Checked then AvecRoulage:=1 else AvecRoulage:=0; - - // contrôle adresse IP interface - s:=EditIPLenz.text; - if s='' then s:='0'; - if not(IpOk(s)) and (s<>'0') then begin labelInfo.Caption:='Adresse IP interface Xpressnet incorrecte';ok:=false;end; - changeInterface:=s<>AdresseIP; - AdresseIP:=s; - - // contrôle port interface - val(EditPortLenz.Text,i,erreur); - if i=0 then i:=5550; - if i>65535 then begin labelInfo.Caption:='Port Interface incorrect';ok:=false;end; - changeInterface:=changeInterface or (i<>portinterface); - portInterface:=i; - - Val(editTempoAig.Text,i,erreur); - if i>3000 then begin labelInfo.Caption:='Temporisation de séquencement incorrecte ';ok:=false;end; - Tempo_Aig:=i; - - // contrôle protocole interface COM3:57600,N,8,1,2 - s:=EditComUSB.Text; - if s='' then s:='COM3:57600,N,8,1,2'; - if not(config_com(s)) then begin labelInfo.Caption:='Protocole série USB Interface incorrect';ok:=false;end; - changeUSB:=portcom<>s; - portcom:=s; - - val(EditTempoOctetUSB.text,i,erreur); - if erreur<>0 then begin labelInfo.Caption:='Valeur temporisation octet incorrecte';ok:=false;end; - TempoOctet:=i; - - val(EditTempoReponse.text,i,erreur); - if erreur<>0 then begin labelInfo.Caption:='Valeur temporisation de réponse interface';ok:=false;end; - TimoutMaxInterface:=i; - - val(EditNbDetDist.text,i,erreur); - if (erreur<>0) or (i<3) then begin labelInfo.Caption:='Valeur nombre de détecteurs trop distants incorrecte';ok:=false;end; - Nb_Det_Dist:=i; - - val(EditNbCantons.text,i,erreur); - if (erreur<>0) or ((i<3) or (i>5)) then begin labelInfo.Caption:='Valeur cantons signaux de 3 à 5';ok:=false;end; - Nb_cantons_Sig:=i; - formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal'; - - if RadioButton1.checked then Valeur_entete:=0; - if RadioButton2.checked then Valeur_entete:=1; - case Valeur_entete of - 0 : begin entete:='';suffixe:='';end; - 1 : begin entete:=#$FF+#$FE;suffixe:='';end; - end; - - if changeCDM then connecte_CDM; - if changeInterface then - begin - if AdresseIP<>'0' then - begin - Affiche('demande connexion à la centrale Lenz par Ethernet',clyellow); - With Formprinc do - begin - ClientSocketInterface.port:=portInterface; - ClientSocketInterface.Address:=AdresseIP; - ClientSocketInterface.Open; - end; - end - end; - - if changeUSB then - begin - deconnecte_USB; - connecte_USB; - end; - - verifVersion:=CheckVerifVersion.Checked; - notificationVersion:=CheckInfoVersion.Checked; - - LanceCDM:=CheckLanceCDM.Checked; - if CheckFenEt.checked then fenetre:=1 else fenetre:=0; - - AvecTCO:=CheckAvecTCO.checked; - MasqueBandeauTCO:=CheckBandeauTCO.checked; - lay:=editLay.Text; - if RadioButton4.Checked then ServeurInterfaceCDM:=0; - if RadioButton5.Checked then ServeurInterfaceCDM:=1; - if RadioButton6.Checked then ServeurInterfaceCDM:=2; - if RadioButton7.Checked then ServeurInterfaceCDM:=3; - if RadioButton8.Checked then ServeurInterfaceCDM:=4; - if RadioButton9.Checked then ServeurInterfaceCDM:=5; - if RadioButton10.Checked then ServeurInterfaceCDM:=6; - if RadioButton11.Checked then ServeurInterfaceCDM:=7; - if RadioButton12.Checked then ServeurInterfaceCDM:=8; - if RadioButton12.Checked then ServeurInterfaceCDM:=13; - if RadioButton13.Checked then ServeurRetroCDM:=1; - if RadioButton14.Checked then ServeurRetroCDM:=2; - if RadioButton15.Checked then ServeurRetroCDM:=3; - if RadioButton16.Checked then ServeurRetroCDM:=4; - if RadioButton17.Checked then ServeurRetroCDM:=5; - if RadioButton18.Checked then ServeurRetroCDM:=6; - - // changement sur les services CDM - change_srv:=Srvc_Aig<>CheckBoxServAig.checked; - change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv; - change_srv:=Srvc_Act<>CheckBoxServAct.checked or change_srv; - change_srv:=Srvc_PosTrain<>CheckServPosTrains.checked or change_srv; - change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv; - - Srvc_Aig:=CheckBoxServAig.checked; - Srvc_Det:=CheckBoxServDet.checked; - Srvc_Act:=CheckBoxServAct.checked; - Srvc_PosTrain:=CheckServPosTrains.checked; - Srvc_Sig:=CheckBoxSrvSig.checked; - Raz_Acc_signaux:=CheckBoxRazSignaux.checked; - AvecInitAiguillages:=CheckBoxInitAig.Checked; - AvecDemandeAiguillages:=checkPosAig.checked; - AvecDemandeInterfaceUSB:=CheckBoxDemarUSB.checked; - AvecDemandeInterfaceEth:=CheckBoxDemarEth.checked; - protocole:=1; - if RadioButtonXpress.Checked then - begin - protocole:=1; - formprinc.EditEnvoi.Visible:=false; - formprinc.ButtonEnv.Visible:=false; - end; - if RadioButtonDcc.Checked then - begin - protocole:=2; - formprinc.EditEnvoi.Visible:=true; - formprinc.ButtonEnv.Visible:=true; - end; - - if checkEnvAigDccpp.Checked then EnvAigDccpp:=1 else EnvAigDccpp:=0; - val(EditBase.Text,AdrBaseDetDccpp,erreur); - if (AdrBaseDetDccpp<0) or (AdrBaseDetDccpp>2048) then AdrBaseDetDccpp:=513; - - end; - if change_srv then services_CDM; - verifie_panneau_config:=ok; -end; - -procedure TFormConfig.ButtonAppliquerEtFermerClick(Sender: TObject); -var ok : boolean; -begin - ok:=verifie_panneau_config; - if ok then - begin - Sauve_config; - formConfig.close; // si la config est ok, on ferme la fenetre - end; -end; - -// LC=Adresse du feu -procedure clicListeFeu(lc : integer); -var AncAdresse,index,adresse,erreur : integer; - s : string; -begin - index:=index_feu(lc)-1; - s:=Uppercase(FormConfig.RichSig.Lines[index]); // ligne cliquée - if s='' then - begin - RE_ColorLine(Formconfig.RichSig,ligneclicSig,ClAqua); - ligneclicSig:=-1; - exit; - end; - - Feu_Sauve:=feux[index+1]; // sauvegarde - - AncLigneClicSig:=ligneclicSig; - ligneClicSig:=index; - - // Mettre en rouge le signal modifié quand on clique sur un autre signal - if AncligneclicSig<>-1 then - begin - val(FormConfig.RichSig.Lines[AncLigneClicSig],AncAdresse,erreur); - if feux[ligneClicSig+1].modifie then RE_ColorLine(Formconfig.RichSig,AncLigneClicSig,ClWhite) else - RE_ColorLine(Formconfig.RichSig,AncLigneClicSig,ClAqua); - end; - - Val(s,Adresse,erreur); // Adresse du signal - if adresse=0 then exit; - - FormConfig.EditAdrSig.Color:=clWindow; - RE_ColorLine(Formconfig.RichSig,ligneClicSig,Clyellow); - - aff_champs_sig_feux(index+1); // affiche les champs du feu - clicliste:=false; -end; - - -procedure TFormConfig.FormActivate(Sender: TObject); -var i :integer; - s : string; -begin - if affevt then affiche('FormConfig activate',clLime); - Aig_supprime.Adresse:=0; - Feu_Supprime.Adresse:=0; - Feu_sauve.adresse:=0; - - clicListe:=false; - Edit_HG.Visible:=false; - labelHG.Visible:=false; - EditP1.Visible:=false; - EditP2.Visible:=false; - EditP3.Visible:=false; - EditP4.Visible:=false; - LabelTJD1.Visible:=false; - LabelTJD2.Visible:=false; - EditDevieS2.Visible:=false; - Label18.Visible:=false; - Label20.Visible:=false; - GroupBoxPN.Visible:=false; - GroupBoxAct.Visible:=false; - GroupBoxRadio.Visible:=false; - GroupBoxEtatTJD.Visible:=false; - - EditP1.ReadOnly:=false; - EditP2.ReadOnly:=false; - EditP3.ReadOnly:=false; - EditP4.ReadOnly:=false; - EditPointe_BG.ReadOnly:=false; - EditDevie_HD.ReadOnly:=false; - EditDroit_BD.ReadOnly:=false; - Edit_HG.ReadOnly:=false; - - EditNbCantons.text:=intToSTR(Nb_cantons_Sig); - EditTempoFeu.Text:=IntToSTR(Tempo_feu); - EditNbDetDist.text:=IntToSTR(Nb_Det_dist); - EditAdrIPCDM.text:=adresseIPCDM; - EditPortCDM.Text:=IntToSTR(portCDM); - EditIPLenz.text:=AdresseIP; - EditportLenz.text:=IntToSTR(PortInterface); - EditTempoAig.Text:=IntToSTR(Tempo_Aig); - - EditComUSB.Text:=PortCom; - EditFonte.text:=IntToSTR(TailleFonte); - editdebug.Text:=IntToSTR(debug); - checkRoulage.Checked:=AvecRoulage=1; - EditTempoOctetUSB.text:=IntToSTR(TempoOctet); - EditTempoReponse.Text:=IntToSTR(TimoutMaxInterface); - RadioButton1.checked:=false; - RadioButton2.checked:=false; - if Valeur_entete=0 then RadioButton1.checked:=true; - if Valeur_entete=1 then RadioButton2.checked:=true; - LabelInfo.Width:=253;LabelInfo.Height:=25; - LabelResult.width:=137;LabelResult.Height:=25; - LabelNomSon.top:=16;LabelNomSon.Left:=48; - SpeedButtonJoue.Top:=60; SpeedButtonCharger.Top:=60; - EditSon.Top:=38;EditSon.Left:=16; - - CheckVerifVersion.Checked:=verifVersion; - CheckFenEt.Checked:=Fenetre=1; - CheckInfoVersion.Checked:=notificationVersion; - CheckLanceCDM.Checked:=LanceCDM; - CheckAvecTCO.checked:=avecTCO; - CheckBandeauTCO.Checked:=MasqueBandeauTCO; - editLAY.Text:=lay; - RadioButton4.Checked:=ServeurInterfaceCDM=0; - RadioButton5.Checked:=ServeurInterfaceCDM=1; - RadioButton6.Checked:=ServeurInterfaceCDM=2; - RadioButton7.Checked:=ServeurInterfaceCDM=3; - RadioButton8.Checked:=ServeurInterfaceCDM=4; - RadioButton9.Checked:=ServeurInterfaceCDM=5; - RadioButton10.Checked:=ServeurInterfaceCDM=6; - RadioButton11.Checked:=ServeurInterfaceCDM=7; - RadioButton12.Checked:=ServeurInterfaceCDM=8; - RadioButton12.Checked:=ServeurInterfaceCDM=13; - RadioButton13.Checked:=ServeurRetroCDM=1; - RadioButton14.Checked:=ServeurRetroCDM=2; - RadioButton15.Checked:=ServeurRetroCDM=3; - RadioButton16.Checked:=ServeurRetroCDM=4; - RadioButton17.Checked:=ServeurRetroCDM=5; - RadioButton18.Checked:=ServeurRetroCDM=6; - - CheckBoxServAig.checked:=Srvc_Aig; - CheckBoxServDet.checked:=Srvc_Det; - CheckBoxServAct.checked:=Srvc_Act; - CheckServPosTrains.checked:=Srvc_PosTrain; - CheckBoxRazSignaux.checked:=Raz_Acc_signaux; - CheckBoxInitAig.checked:=AvecInitAiguillages; - CheckPosAig.checked:=AvecDemandeAiguillages; - CheckBoxDemarUSB.checked:=AvecDemandeInterfaceUSB; - CheckBoxDemarEth.checked:=AvecDemandeInterfaceEth; - - RadioButtonXpress.Checked:=protocole=1; - RadioButtonDcc.Checked:=protocole=2; - - clicListe:=true; // empeche le traitement de l'evt text - EditDroit_BD.Text:=''; - EditPointe_BG.Text:=''; - EditDevie_HD.Text:=''; - - ligneclicSig:=-1; - AncLigneClicSig:=-1; - ligneclicAct:=-1; - AncLigneClicAct:=-1; - ligneclicAig:=-1; - AncLigneClicAig:=-1; - lignecliqueePN:=-1; - AncLigneCliqueePN:=-1; - - // remplit les 4 fenêtres de config des aiguillages branches signaux, actionneurs - - // aiguillages - RichAig.Clear; - for i:=1 to MaxAiguillage do - begin - s:=encode_aig(i); - RichAig.Lines.Add(s); - RE_ColorLine(RichAig,RichAig.lines.count-1,ClAqua); - Aiguillage[i].modifie:=false; - end; - // pour positionner sur la 1ere ligne - With RichAig do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - - // branches - clicListe:=true; - RichBranche.clear; - for i:=1 to NbreBranches do - begin - s:=Branche[i]; - RichBranche.Lines.Add(s); - RE_ColorLine(RichBranche,RichBranche.lines.count-1,ClAqua); - end; - With RichBranche do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - - // signaux - RichSig.clear; - ComboBoxDec.items.Clear; - for i:=1 to NbDecodeur do - begin - ComboBoxDec.items.add(decodeur[i-1]); - end; - - for i:=1 to NbreFeux do - begin - s:=encode_sig_feux(i); // encode la ligne depuis le tableau feux - //Affiche(s,clwhite); - if s<>'' then - begin - RichSig.Lines.Add(s); - RE_ColorLine(RichSig,RichSig.lines.count-1,ClAqua); - Feux[i].modifie:=false; - end; - end; - With RichSig do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - - // actionneurs Train ou accessoire - RichAct.Clear; - for i:=1 to maxTablo_act do - begin - s:=encode_act_loc_son(i); - if s<>'' then - begin - RichAct.Lines.Add(s); - RE_ColorLine(RichAct,RichAct.lines.count-1,ClAqua); - end; - end; - With RichAct do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - - // actionneurs PN - RichPN.Clear; - for i:=1 to NbrePN do - begin - s:=encode_act_pn(i); - if s<>'' then - begin - RichPN.Lines.Add(s); - RE_ColorLine(RichPN,RichPN.lines.count-1,ClAqua); - end; - end; - With RichPN do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - - if clicproprietes then clicListeFeu(Adressefeuclic); - clicproprietes:=false; - - i:=1; - RichCdeDCCpp.clear; - repeat - if CdeDccpp[i]<>'' then - begin - RichCdeDccpp.Lines.add(CdeDccpp[i]); - RE_ColorLine(RichCdeDccpp,RichCdeDccpp.lines.count-1,ClAqua); - end; - inc(i); - until (CdeDccpp[i]='') or (i>MaxCdeDccpp); - - CheckEnvAigDccpp.Checked:=EnvAigDccpp=1; - EditBase.Text:=intToSTR(AdrBaseDetDccpp); - - with RicheditTrains do - begin - clear; - for i:=1 to ntrains do - begin - Lines.Add(Train_tablo(i)); - end; - end; - - //l'onglet affiché est sélectionné à l'appel de la fiche dans l'unité UnitPrinc - clicListe:=false; -end; - - -procedure TFormConfig.FormCreate(Sender: TObject); -begin - affevt:=false; // pour debug - clicListe:=true; - if affevt then affiche('FormConfig create',clLime); - PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page - clicListe:=false; - if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true; - ConfigPrete:=true; -end; - - -// décode un morceau d'une chaine d'aiguillage ('P5S') -// si erreur, B='?' -procedure decodeAig(s : string;var adr : integer;var B : char); -var erreur,i : integer; -begin - if s='' then begin B:='?';adr:=0;exit;end; - if (s[1]='P') or (s[1]='S') or (s[1]='D') then delete(s,1,1); - if s='' then - begin - adr:=0; - B:='Z'; - exit; - end; - // supprimer le champ suivant éventuel - i:=pos(',',s); - if i<>0 then delete(s,i,length(s)-i+1); - val(s,adr,erreur); - if adr<0 then begin B:='?';adr:=0;exit;end; - if erreur<>0 then - begin - if s[erreur]='S' then begin B:='S';exit;end; - if s[erreur]='P' then begin B:='P';exit;end; - if s[erreur]='D' then begin B:='D';exit;end; - end; - B:='Z'; -end; - -// affiche le graphisme de l'aiguillage en fonction du tablo en index -procedure Aff_champs_aig_tablo(index : integer); -var Adresse,Adr2,ind,id2,erreur,position : integer; - tjd,tri,tjs,croi : boolean; - s,ss : string; - i : integer; - B : char; -begin - if index<1 then exit; - s:=Uppercase(formConfig.RichAig.Lines[index-1]); - //Affiche(s,clLime); - if s='' then exit; - - Val(s,Adresse,erreur); // Récupérer l'adresse de l'aiguillage - if adresse=0 then exit; - - ind:=Index_aig(adresse); - clicliste:=true; - - ss:=InttoSTr(Adresse); - formconfig.EditAdrAig.text:= ss; - - tjd:=pos('TJD',s)<>0 ; - tri:=pos('TRI',s)<>0 ; - tjs:=pos('TJS',s)<>0 ; - croi:=pos('CROI',s)<>0 ; - with formconfig do - begin - EditAdrAig.Color:=clWindow; - ImageAffiche.Picture.Bitmap.TransparentMode:=tmAuto; - ImageAffiche.Picture.Bitmap.TransparentColor:=clblue; - ImageAffiche.Transparent:=true; - GroupBoxEtatTJD.Visible:=false; - GroupBox21.Visible:=true; - GroupBox10.Visible:=true; - checkInverse.Visible:=true; - - // tjd - if tjd or tjs or croi then - begin - if not(croi) then Label20.Visible:=true; - if tjd then - begin - ComboBoxAig.ItemIndex:=1; - EditL.Visible:=false; - LabelL.Visible:=false; - GroupBoxEtatTJD.Visible:=true; - if aiguillage[ind].EtatTJD=2 then - begin - RadioButtonTJD2.Checked:=true;RadioButtonTJD4.Checked:=false; - EditP1.Visible:=false;EditP2.Visible:=false;EditP3.Visible:=false;EditP4.Visible:=false; - LabelTJD1.Visible:=false;LabelTJD2.Visible:=false; - LabelInfo.Caption:=''; - end - else if aiguillage[ind].EtatTJD=4 then - begin - RadioButtonTJD2.Checked:=false;RadioButtonTJD4.Checked:=true; - EditP1.Visible:=true;EditP2.Visible:=true;EditP3.Visible:=true;EditP4.Visible:=true; - LabelTJD1.Visible:=true;LabelTJD2.Visible:=true; - LabelInfo.Caption:=''; - end - else LabelInfo.Caption:='Nombre d''états de la TJD/S inconnu'; - end; - - if tjs then - begin - ComboBoxAig.ItemIndex:=2; - EditL.Visible:=true; - LabelL.Visible:=true; - LabelL.Caption:='L'; - EditL.Text:=IntToSTR(aiguillage[ind].tjsint)+aiguillage[ind].tjsintB; - end; - ImageAffiche.Picture.BitMap:=Imagetjd.Picture.Bitmap; - labelBG.Caption:='S'; - Edit_HG.Visible:=true; - EditAigTriple.Visible:=false; - - Edit_HG.ReadOnly:=false; - EditPointe_BG.ReadOnly:=false; - EditDevie_HD.ReadOnly:=false; - EditDroit_BD.ReadOnly:=false; - tjd:=true; - labelHG.Visible:=true; - - CheckInverse.Visible:=true; - EditDevieS2.Visible:=false; - Label18.Visible:=false; - adr2:=aiguillage[Index_Aig(adresse)].DDevie; - id2:=Index_Aig(adr2); - - // champ en haut à gauche - b:=aiguillage[Index_Aig(adresse)].ADroitB; - if b='Z' then b:=#0; - Edit_HG.Text:=intToSTR(aiguillage[index].ADroit)+b; - Edit_HG.Hint:=TypeElAIg_to_char(aiguillage[index].Adroit,b); - - // champ en bas à gauche - b:=aiguillage[Index].ADevieB; - if b='Z' then b:=#0; - EditPointe_BG.Text:=intToSTR(aiguillage[index].ADevie)+b; - EditPointe_BG.Hint:=TypeElAIg_to_char(aiguillage[index].ADevie,b); - - // milieu haut gauche - EditP1.Text:=intToSTR(adresse)+aiguillage[Index].DDroitB; - // milieu bas gauche - EditP2.Text:=intToSTR(adresse)+aiguillage[Index].DDevieB; - - // milieu haut droit - EditP3.Text:=intToSTR(aiguillage[index].Ddevie)+aiguillage[index].DDevieB; - // milieu bas droit - EditP4.Text:=intToSTR(aiguillage[index].Ddroit)+aiguillage[index].DdroitB; - - if (aiguillage[ind].EtatTJD=4) or tjs then - begin - // droit haut - EditDevie_HD.Text:=intToSTR(aiguillage[id2].Adevie)+aiguillage[id2].AdevieB; - EditDevie_HD.Hint:=TypeElAIg_to_char(aiguillage[id2].Adevie,aiguillage[id2].AdevieB); - LabelTJD1.Caption:=IntToSTR(adresse); - - // droit bas - EditDroit_BD.Text:=intToSTR(aiguillage[id2].Adroit)+aiguillage[Id2].AdroitB; - EditDroit_BD.Hint:=TypeElAIg_to_char(aiguillage[id2].ADroit,aiguillage[Id2].AdroitB); - LabelTJD2.Caption:=IntToSTR(adr2); - end; - - if ((aiguillage[ind].EtatTJD=2) and tjd) or croi then - begin - // droit haut - EditDevie_HD.Text:=intToSTR(aiguillage[index].Ddevie)+aiguillage[index].DdevieB; - EditDevie_HD.Hint:=TypeElAIg_to_char(aiguillage[index].Ddevie,aiguillage[index].DdevieB); - LabelTJD1.Caption:=IntToSTR(adresse); - - // droit bas - EditDroit_BD.Text:=intToSTR(aiguillage[index].Ddroit)+aiguillage[index].DdroitB; - EditDroit_BD.Hint:=TypeElAIg_to_char(aiguillage[index].Ddroit,aiguillage[index].DdroitB); - LabelTJD2.Caption:=IntToSTR(adresse); - end; - - - CheckInverse.checked:=aiguillage[Index_Aig(adresse)].inversionCDM=1; - - if aiguillage[Index_Aig(adresse)].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=false;end; - if aiguillage[Index_Aig(adresse)].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButton60kmh.checked:=false;end; - if aiguillage[Index_Aig(adresse)].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end; - end; - - if croi then - begin - GroupBox21.Visible:=false; - GroupBox10.Visible:=false; - checkInverse.Visible:=false; - editL.Visible:=false; - labelL.Visible:=false; - ComboBoxAig.ItemIndex:=4; - editP1.Visible:=false; - editP2.Visible:=false; - editP3.Visible:=false; - editP4.Visible:=false; - labelTJD1.Visible:=false; - labelTJD2.Visible:=false; - end; - - // aiguillage normal ou tri - if (not(tjd) and not(tjs) and not(croi)) or tri then - begin - EditL.Visible:=false; - Label20.Visible:=false; - LabelL.Visible:=false; - ComboBoxAig.ItemIndex:=0; - if not(tri) then - begin - ImageAffiche.Picture.BitMap:=Imageaig.Picture.Bitmap; - EditDevieS2.Visible:=false; - EditAigTriple.Visible:=false; - end; - labelBG.Caption:='P'; - EditPointe_BG.ReadOnly:=false; - Edit_HG.Visible:=false; - labelHG.Visible:=false; - EditP1.Visible:=false; - EditP2.Visible:=false; - EditP3.Visible:=false; - EditP4.Visible:=false; - labelTJD1.Visible:=false; - LabelTJD2.Visible:=false; - - Label18.Visible:=false; - CheckInverse.checked:=aiguillage[Index_Aig(adresse)].inversionCDM=1; - if aiguillage[Index].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=false;end; - if aiguillage[Index].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButton60kmh.checked:=false;end; - if aiguillage[Index].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end; - - EditPointe_BG.Text:=intToSTR(aiguillage[index].Apointe)+aiguillage[index].ApointeB; - EditPointe_BG.Hint:=TypeElAIg_to_char(aiguillage[index].Apointe,aiguillage[index].ApointeB); - - EditDevie_HD.Text:=intToSTR(aiguillage[index].Adevie)+aiguillage[index].AdevieB; - EditDevie_HD.Hint:=TypeElAIg_to_char(aiguillage[index].Adevie,aiguillage[index].AdevieB); - - EditDroit_BD.Text:=intToSTR(aiguillage[index].Adroit)+aiguillage[index].AdroitB; - EditDroit_BD.Hint:=TypeElAIg_to_char(aiguillage[index].Adroit,aiguillage[index].AdroitB); - if tri then - begin - ComboBoxAig.ItemIndex:=3; // 0=n'existe pas 1=aiguillage 2=TJD 3=TJS 4=aiguillage triple - EditAigTriple.Visible:=true; - labelTJD1.Visible:=false; - LabelTJD2.Visible:=false; - EditPointe_BG.ReadOnly:=false; - labelBG.Caption:='P'; - ImageAffiche.Picture.BitMap:=ImageTri.Picture.Bitmap; - EditDevieS2.Visible:=true; - Label18.Visible:=true; - adr2:=aiguillage[index].AdrTriple; - EditDevieS2.text:=intToSTR(aiguillage[index].Adevie2)+aiguillage[index].Adevie2B; - i:=aiguillage[index].Adrtriple; - EditAigTriple.Text:=intToSTR(i); - if i=0 then EditAigTriple.Color:=clred else EditAigTriple.Color:=clWindow; - end; - end; - end; - - position:=aiguillage[index].posinit; - if position=const_inconnu then formconfig.ComboBoxDD.ItemIndex:=2; - if position=const_droit then formconfig.ComboBoxDD.ItemIndex:=1; - if position=const_devie then formconfig.ComboBoxDD.ItemIndex:=0; - formconfig.EditTempo10.text:=InttoSTr(aiguillage[index].temps); - formconfig.EditTempo10.text:=InttoSTr(aiguillage[index].temps); - - clicListe:=false; -end; - -procedure champs_type_pn; -begin - with formconfig do - begin - GroupBoxRadio.Visible:=false; - GroupBoxAct.Visible:=false; - GroupBoxPN.Top:=24; - GroupBoxPN.Left:=16; - GroupBoxPN.Visible:=true; - Visible:=true; - RadioButtonLoc.Checked:=false; - RadioButtonAccess.Checked:=false; - RadioButtonSon.Checked:=false; - EditSon.Visible:=false; - SpeedButtonJoue.Visible:=false; - SpeedButtonCharger.Visible:=false; - - LabelNomSon.Visible:=false; - end; -end; - -procedure positionne; -begin - with formconfig do - begin - GroupBoxRadio.Visible:=true; - GroupBoxRadio.top:=16; - GroupBoxRadio.Left:=16; - GroupBoxAct.Top:=92; - GroupBoxAct.Left:=16; - GroupBoxAct.Height:=340; - GroupBox18.Top:=16; - GroupBox18.Height:=150; - GroupBox19.Top:=190; - GroupBox19.Height:=96; - end; -end; - -procedure champs_type_loco; -begin - with formconfig do - begin - positionne; - - CheckRaz.Visible:=false; - GroupBoxAct.Caption:='Action pour fonction F de locomotive'; - LabelTempo.Visible:=true; EditTempo.visible:=true; editEtatFoncSortie.visible:=false;LabelA.Visible:=false; - LabelFonction.visible:=true; - LabelFonction.caption:='Action : Fonction'; - RadioButtonLoc.Checked:=true; - RadioButtonAccess.Checked:=false; - RadioButtonSon.Checked:=false; - GroupBoxAct.Visible:=true; - GroupBoxPN.Visible:=false; - EditSon.Visible:=false; - SpeedButtonJoue.Visible:=false; - SpeedButtonCharger.Visible:=false; - EditFonctionAccess.Visible:=true; - LabelNomSon.Visible:=false; - editTrainDest.Visible:=true; - label42.Visible:=true; - end; -end; - -procedure champs_type_act; -begin - with formconfig do - begin - positionne; - - GroupBoxAct.Caption:='Action pour accessoire'; - CheckRaz.Visible:=true; - LabelTempo.Visible:=false; EditTempo.visible:=false;editEtatFoncSortie.visible:=true;LabelA.Visible:=true; - LabelFonction.visible:=true; - LabelFonction.caption:='Action : Accessoire'; - RadioButtonLoc.Checked:=false; - RadioButtonSon.checked:=false; - RadioButtonAccess.Checked:=true; - GroupBoxAct.Visible:=true; - GroupBoxPN.Visible:=false; - EditSon.Visible:=false; - SpeedButtonJoue.Visible:=false; - SpeedButtonCharger.Visible:=false; - EditFonctionAccess.Visible:=true; - LabelNomSon.Visible:=false; - editTrainDest.Visible:=false; - label42.Visible:=false; - end; -end; - -procedure champs_type_son; -begin - with formconfig do - begin - Positionne; - GroupBoxAct.Caption:='Action pour son'; - CheckRaz.Visible:=true; - - LabelTempo.Visible:=false; EditTempo.visible:=false; - - editEtatFoncSortie.visible:=false; - LabelA.Visible:=false; - LabelFonction.visible:=false; - EditFonctionAccess.Visible:=false; - CheckRaz.Visible:=false; - EditSon.Visible:=true; - SpeedButtonJoue.Visible:=true; - SpeedButtonCharger.Visible:=true; - LabelNomSon.Visible:=true; - - RadioButtonLoc.Checked:=false; - RadioButtonAccess.Checked:=false; - RadioButtonSon.checked:=true; - - GroupBoxAct.Visible:=true; - GroupBoxPN.Visible:=false; - editTrainDest.Visible:=false; - label42.Visible:=false; - end; -end; - -procedure champs_decl_actdet; -begin - with formconfig do - begin - EditTrainDecl.Visible:=true ; - LabelTrain.Visible:=true ; - radioButtonActDet.Checked:=true; - radioButtonZones.Checked:=false; - radioButtonAig.Checked:=false; - editact2.Visible:=false; - LabelActionneur.Caption:='Actionneur DétecteurZ'; - end; -end; - -procedure champs_decl_zones; -begin - with formconfig do - begin - radioButtonActDet.Checked:=false; - radioButtonZones.Checked:=true; - radioButtonAig.Checked:=false; - EditTrainDecl.Visible:=false; - LabelTrain.Visible:=false; - editact2.Visible:=true; - LabelActionneur.Caption:='Mémoire de Zone'; - end; -end; - -procedure champs_decl_aig; -begin - with formconfig do - begin - radioButtonActDet.Checked:=false; - radioButtonZones.Checked:=false; - radioButtonAig.Checked:=true; - EditAct2.Visible:=false; - EditTrainDecl.Visible:=false; - LabelTrain.Visible:=false; - editact2.Visible:=false; - LabelActionneur.Caption:='Aiguillage'; - end; -end; - -// transforme une chaine "élément" en une chaine affichable pour le hint -// ex chaine_element("A32")=aiguillage 32 -function chaine_element(Equip : Tequipement;adr : integer) : string; -var s: string; -begin - case Equip of - aig : s:='Aiguillage '; - tjd : s:='Tjd '; - tjs : s:='Tjs '; - triple : s:='Aiguillage triple '; - det : s:='Détecteur '; - else s:='Inconnu '; - end; - result:=s+intToSTR(adr); -end; - -// mise à jour des champs du signal d'après le tableau feux -Procedure aff_champs_sig_feux(index : integer); -var i,j,l,d,p,k,nc,decodeur : integer; - s : string; -begin - if Affevt then affiche('Aff_champs_sig_feux('+intToSTR(index)+')',clyellow); - if index<0 then exit; - clicListe:=true; - i:=index; - FormConfig.EditAdrSig.text:=InttoSTr(feux[i].adresse); - - with formconfig.ImageSignal do - begin - Picture.Bitmap.TransparentMode:=tmAuto; - Picture.Bitmap.TransparentColor:=clblue; - Transparent:=true; - picture.Bitmap:=Select_dessin_feu(feux[i].aspect); - end; - - with formconfig do - begin - MemoCarre.Lines.Clear; - EditDet2.Text:=''; EditSuiv2.Text:=''; - EditDet3.Text:=''; EditSuiv3.Text:=''; - EditDet4.Text:=''; EditSuiv4.Text:=''; - ComboBoxDec.ItemIndex:=feux[i].decodeur; - - decodeur:=feux[i].decodeur; - ButtonConfigSR.Visible:=false; - //SR - if (decodeur=7) or (decodeur=2) then ButtonConfigSR.Visible:=true; - - // unisemaf - if (decodeur=6) then - begin - EditSpecUni.Visible:=true; - LabelUni.Caption:='Spec Unisemaf'; - LabelUni.Visible:=true; - EditSpecUni.Text:=IntToSTR(feux[i].Unisemaf); - editSpecUni.Hint:='Paramètre de description supplémentaire du décodeur Unisemaf'; - editSpecUni.ShowHint:=true; - end; - // digikeijs - if (decodeur=5) then - begin - ButtonConfigSR.Visible:=true ; - end; - if (decodeur<>6) then - begin EditSpecUni.Visible:=false;LabelUni.Visible:=false;end; - - - d:=feux[i].aspect; - case d of - 2 : ComboBoxAsp.ItemIndex:=0; - 3 : ComboBoxAsp.ItemIndex:=1; - 4 : ComboBoxAsp.ItemIndex:=2; - 5 : ComboBoxAsp.ItemIndex:=3; - 7 : ComboBoxAsp.ItemIndex:=4; - 9 : ComboBoxAsp.ItemIndex:=5; - else - ComboBoxAsp.ItemIndex:=d-10+4; - end; - - if ((d=2) or (d>=5)) and (d<10) then checkBoxFB.Visible:=true else checkBoxFB.Visible:=false; - if d>2 then - begin - checkFVC.Visible:=true; - checkFRC.Visible:=true; - end - else - begin - checkFVC.Visible:=false; - checkFRC.Visible:=false; - end; - - if (d>3) and (d<10) then CheckVerrouCarre.Visible:=true else CheckVerrouCarre.Visible:=false; - - // signal normal - if d<10 then - begin - Label17.Caption:='Conditions supplémentaires d''affichage du carré par les aiguillages :'; - Label17.Width:=228; - LabelDetAss.visible:=true; - LabelElSuiv.visible:=true; - label43.Visible:=true; - - EditDet1.Visible:=true;EditDet2.Visible:=true;EditDet3.Visible:=true;EditDet4.Visible:=true; - EditSuiv1.Visible:=true;EditSuiv2.Visible:=true;EditSuiv3.Visible:=true;EditSuiv4.Visible:=true; - Label24.Visible:=true; Label25.Visible:=true;Label26.Visible:=true;Label27.Visible:=true; - EditDet1.Text:=IntToSTR(feux[i].Adr_det1); - EditSuiv1.Text:=TypeEl_To_char(feux[i].Btype_suiv1)+IntToSTR(feux[i].Adr_el_suiv1); - - EditSuiv1.Hint:=chaine_element(feux[i].Btype_suiv1,feux[i].Adr_el_suiv1); - j:=feux[i].Adr_det2; - if j<>0 then - begin - Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(feux[i].Btype_suiv2)+IntToSTR(feux[i].Adr_el_suiv2); - EditSuiv2.Hint:=chaine_element(feux[i].Btype_suiv2,feux[i].Adr_el_suiv2); - end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end; - j:=feux[i].Adr_det3; - if j<>0 then - begin - EditDet3.Text:=IntToSTR(j);EditSuiv3.Text:=TypeEl_To_char(feux[i].Btype_suiv3)+IntToSTR(feux[i].Adr_el_suiv3); - EditSuiv3.Hint:=chaine_element(feux[i].Btype_suiv3,feux[i].Adr_el_suiv3); - end - else begin EditDet3.Text:='';EditSuiv3.Text:='';EditSuiv3.Hint:='';end; - j:=feux[i].Adr_det4; - if j<>0 then - begin - EditDet4.Text:=IntToSTR(j);EditSuiv4.Text:=TypeEl_To_char(feux[i].Btype_suiv4)+IntToSTR(feux[i].Adr_el_suiv4); - EditSuiv4.Hint:=chaine_element(feux[i].Btype_suiv4,feux[i].Adr_el_suiv4); - end - else begin EditDet4.Text:='';EditSuiv4.Text:='';EditSuiv4.Hint:='';end; - - checkVerrouCarre.Checked:=feux[i].VerrouCarre; - checkBoxFB.Checked:=feux[i].FeuBlanc; - checkFVC.Checked:=feux[i].checkFV; - checkFRC.Checked:=feux[i].checkFR; - - // conditions supplémentaires du carré par aiguillages - l:=1; - repeat - nc:=Length(feux[i].condcarre[l])-1 ; - s:=''; - for k:=1 to nc do - begin - s:=s+'A'+IntToSTR(feux[i].condcarre[l][k].Adresse)+feux[i].condcarre[l][k].PosAig; - if k6); - // scrolle le MemoCarre sur la première ligne - MemoCarre.SelStart:=0; - MemoCarre.Perform(EM_SCROLLCARET,0,0); - end - else - begin // directionnel - Label17.Caption:='Conditions d''affichage du feu directionnel :'; - label43.Visible:=false; - LabelDetAss.visible:=false; - LabelElSuiv.visible:=false; - EditDet1.Visible:=false;EditDet2.Visible:=false;EditDet3.Visible:=false;EditDet4.Visible:=false; - EditSuiv1.Visible:=false;EditSuiv2.Visible:=false;EditSuiv3.Visible:=false;EditSuiv4.Visible:=false; - CheckVerrouCarre.Visible:=false; - checkFVC.visible:=false; - checkFRC.visible:=false; - - Label24.Visible:=false; Label25.Visible:=false;Label26.Visible:=false;Label27.Visible:=false; - - // conditions d'affichage du signal directionnel - L:=feux[i].aspect-10; //nombre de feux du signal directionnel - for p:=1 to L+1 do - begin - s:=''; - nc:=Length(feux[i].AigDirection[p])-1; - for k:=1 to nc do - begin - s:=s+'A'+IntToSTR(feux[i].AigDirection[p][k].adresse) + feux[i].AigDirection[p][k].posaig; - if kNbrePN); - if not(trouve) then exit; - - with formConfig do - begin - EditAdrFerme.text:=IntToSTR(Tablo_PN[i].AdresseFerme); - EditAdrOuvre.text:=IntToSTR(Tablo_PN[i].AdresseOuvre); - EditCmdFerme.text:=intToSTR(Tablo_PN[i].CommandeFerme); - EditCdeOuvre.text:=intToSTR(Tablo_PN[i].CommandeOuvre); - if Tablo_PN[i].Pulse=1 then trouve:=true else trouve:=false; - CheckPnPulse.Checked:=trouve; - - // par actionneur - if Tablo_PN[i].voie[1].ActFerme<>0 then - begin - EditV1F.text:=intToSTR(Tablo_PN[i].voie[1].ActFerme); - EditV1O.text:=intToSTR(Tablo_PN[i].voie[1].ActOuvre); - v:=Tablo_PN[i].nbvoies; - if v>=2 then - begin - EditV2F.text:=intToSTR(Tablo_PN[i].voie[2].ActFerme); - EditV2O.text:=intToSTR(Tablo_PN[i].voie[2].ActOuvre); - end; - if v>=3 then - begin - EditV3F.text:=intToSTR(Tablo_PN[i].voie[3].ActFerme); - EditV3O.text:=intToSTR(Tablo_PN[i].voie[3].ActOuvre); - end; - if v>=4 then - begin - EditV4F.text:=intToSTR(Tablo_PN[i].voie[4].ActFerme); - EditV4O.text:=intToSTR(Tablo_PN[i].voie[4].ActOuvre); - end; - end - else - begin - // par zone de détecteurs - v:=Tablo_PN[i].nbvoies; - j:=Tablo_PN[i].voie[1].detZ1F;if j<>0 then - begin - EditZdet1V1F.text:=intToSTR(j); - EditZdet2V1F.text:=intToSTR(Tablo_PN[i].voie[1].detZ2F); - EditZdet1V1O.text:=intToSTR(Tablo_PN[i].voie[1].detZ1O); - EditZdet2V1O.text:=intToSTR(Tablo_PN[i].voie[1].detZ2O); - if v>=2 then - begin - EditZdet1V2F.text:=intToSTR(Tablo_PN[i].voie[2].detZ1F); - EditZdet2V2F.text:=intToSTR(Tablo_PN[i].voie[2].detZ2F); - EditZdet1V2O.text:=intToSTR(Tablo_PN[i].voie[2].detZ1O); - EditZdet2V2O.text:=intToSTR(Tablo_PN[i].voie[2].detZ2O); - end; - if v>=3 then - begin - EditZdet1V3F.text:=intToSTR(Tablo_PN[i].voie[3].detZ1F); - EditZdet2V3F.text:=intToSTR(Tablo_PN[i].voie[3].detZ2F); - EditZdet1V3O.text:=intToSTR(Tablo_PN[i].voie[3].detZ1O); - EditZdet2V3O.text:=intToSTR(Tablo_PN[i].voie[3].detZ2O); - end; - if v>=4 then - begin - EditZdet1V4F.text:=intToSTR(Tablo_PN[i].voie[4].detZ1F); - EditZdet2V4F.text:=intToSTR(Tablo_PN[i].voie[4].detZ2F); - EditZdet1V4O.text:=intToSTR(Tablo_PN[i].voie[4].detZ1O); - EditZdet2V4O.text:=intToSTR(Tablo_PN[i].voie[4].detZ2O); - end; - end; - end; - end; - end -end; - -procedure raz_champs_act; -begin - with formConfig do - begin - editAct.Text:=''; - EditEtatActionneur.Text:=''; - EditTrainDecl.Text:=''; - EditFonctionAccess.Text:=''; - EditEtatFoncSortie.Text:=''; - EditTempo.Text:=''; - CheckRaz.Checked:=false; - end; -end; - -procedure raz_champs_aig; -begin - with formConfig do - begin - LabelInfo.caption:=''; - EditAdrAig.Text:='';EditAigTriple.Text:=''; - Edit_HG.text:=''; - editDevie_HD.Text:=''; - editDroit_BD.Text:=''; - editPointe_BG.Text:=''; - EditTempo10.text:=''; - end; -end; - -procedure raz_champs_sig; -begin - with formconfig do - begin - LabelInfo.caption:=''; - EditDet1.Text:='';EditSuiv1.Text:=''; - EditDet2.Text:='';EditSuiv2.Text:=''; - EditDet3.Text:='';EditSuiv3.Text:=''; - EditDet4.Text:='';EditSuiv4.Text:=''; - EditAdrSig.Text:=''; - MemoCarre.Clear; - ComboBoxAsp.ItemIndex:=-1; - ComboBoxDec.ItemIndex:=-1; - ImageSignal.Picture:=Nil; - checkVerrouCarre.Checked:=false; - checkBoxFB.Checked:=false; - checkFVC.Checked:=false; - checkFRC.Checked:=false; - end; -end; - -// cliqué sur liste aiguillages -procedure TFormConfig.RichAigMouseDown(Sender: TObject;Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var i,lc,adresse,erreur : integer; - s : string; -begin - clicliste:=true; - raz_champs_aig; - ComboBoxAig.ItemIndex:=-1; - formconfig.ComboBoxDD.ItemIndex:=-1; - - with Formconfig.RichAig do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - //Affiche('numéro de la ligne cliquée '+intToStr(lc),clyellow); - s:=Uppercase(Lines[lc]); // ligne cliquée - if s='' then - begin - RE_ColorLine(Formconfig.RichAig,ligneclicAig,ClAqua); - ligneclicAig:=-1; - exit; - end; - - Aig_sauve:=Aiguillage[lc+1]; // sauvegarde - AncligneclicAig:=ligneclicAig; - ligneclicAig:=lc; - - if AncligneclicAig<>-1 then - begin - if aiguillage[ligneclicAig+1].modifie then RE_ColorLine(Formconfig.RichAig,AncligneclicAig,ClWhite) else - RE_ColorLine(Formconfig.RichAig,AncligneclicAig,ClAqua); - end; - end; - - Val(s,Adresse,erreur); // Adresse de l'aguillage - if adresse=0 then exit; - - RE_ColorLine(Formconfig.RichAig,ligneclicAig,Clyellow); - i:=index_aig(Adresse); - - aff_champs_Aig_tablo(i); - clicliste:=false; -end; - -procedure TFormConfig.Edit_HGChange(Sender: TObject); -var s : string; - adr,adraig,erreur,index : integer; - b : char; -begin - if clicliste then exit; - if affevt then affiche('Evt change HG',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - //vérifier la syntaxe - s:=Edit_HG.text; - decodeAig(s,adr,B); - if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then - begin - RE_ColorLine(RichAig,ligneclicAig,ClWhite); - Index:=Index_Aig(AdrAig); - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - Aiguillage[index].Adroit:=adr; - Aiguillage[index].AdroitB:=B; - Edit_HG.Hint:=TypeElAIg_to_char(adr,B); - - // réencoder la ligne - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end - else - LabelInfo.caption:='Erreur pointe aiguillage '+intToSTR(AdrAig); - end; -end; - -// on change la valeur de la description du champ HG pour les TJD -procedure TFormConfig.EditDevie_HDChange(Sender: TObject); -var AdrAig,adr,adr2,erreur,index : integer; - b : char; - modele:Tequipement; - s : string; -begin - // cliqué sur le edit dévié aiguillage - // ne pas traiter si on a cliqué sur la liste - if clicliste then exit; - if affevt then affiche('Evt change dévié',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - //vérifier la syntaxe de P - s:=EditDevie_HD.text; - decodeAig(s,adr,B); - index:=index_aig(adrAig); - if index=0 then exit; - modele:=aiguillage[index].modele; - - if (modele=aig) or (modele=triple) then - begin - if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then - begin - // aiguillage normal ou triple - LabelInfo.caption:=''; - if (B='S') or (b='P') or (b='D') then - begin - if adr=AdrAig then LabelInfo.caption:='Un aiguillage ne peut pointer sur lui même '; - end; - - RE_ColorLine(RichAig,ligneclicAig,ClWhite); - Aiguillage[index].modifie:=true; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - Aiguillage[Index].ADevie:=adr; - Aiguillage[Index].ADevieB:=B; - EditDevie_HD.Hint:=TypeElAIg_to_char(adr,B); - // réencoder la ligne - s:=encode_aig(Index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end - else - begin - LabelInfo.caption:='Erreur déviation aiguillage '+intToSTR(AdrAig); - end; - end; - - if (modele=tjd) or (modele=tjs) then - begin - // TJD4/TJS - if aiguillage[index].EtatTJD=4 then - begin - adr2:=aiguillage[index].DDroit; // adresse homologue - index:=Index_aig(adr2); - if index=0 then exit; - aiguillage[index].Adevie:=adr; - aiguillage[index].AdevieB:=B; - RE_ColorLine(Formconfig.RichAig,index-1,ClWhite); - LabelInfo.caption:='Modification de la TJD homologe ('+IntToSTR(adr2)+')'; - end; - if aiguillage[index].EtatTJD=2 then - begin - aiguillage[index].Ddevie:=adr; - aiguillage[index].DdevieB:=B; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end; - - if modele=crois then - begin - aiguillage[index].Ddevie:=adr; - aiguillage[index].DdevieB:=B; - RE_ColorLine(Formconfig.RichAig,index-1,ClWhite); - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end; - - end; -end; - -// on change la valeur de la description de la déviation de l'aiguillage -procedure TFormConfig.EditDroit_BDChange(Sender: TObject); -var AdrAig,adr,erreur,index,adr2 : integer; - b : char; - modele: TEquipement; - s : string; -begin - // cliqué sur le edit droit aiguillage - // ne pas traiter si on a cliqué sur la liste - if clicliste then exit; - if affevt then affiche('Evt change droit',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - //vérifier la syntaxe de P - s:=EditDroit_BD.text; - decodeAig(s,adr,B); - Index:=Index_Aig(AdrAig); - if index=0 then exit; - - LabelInfo.caption:=''; - if (B='S') or (b='P') or (b='D') then - begin - if adr=AdrAig then LabelInfo.caption:='Un aiguillage ne peut pointer sur lui même '; - end; - - modele:=aiguillage[index].modele; - if (modele=aig) or (modele=triple) then - begin - if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then - begin - RE_ColorLine(RichAig,ligneclicAig,ClWhite); - Aiguillage[Index].modifie:=true; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - Aiguillage[index].ADroit:=adr; - Aiguillage[index].ADroitB:=B; - EditDroit_BD.Hint:=TypeElAIg_to_char(adr,B); - // réencoder la ligne - s:=encode_aig(Index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end - else - begin - LabelInfo.caption:='Erreur droit aiguillage '+intToSTR(AdrAig); - end; - end; - - if (modele=tjd) or (modele=tjs) then - begin - // TJD4/TJS - if aiguillage[index].EtatTJD=4 then - begin - adr2:=aiguillage[index].DDroit; // adresse homologue - index:=Index_aig(adr2); - if index=0 then exit; - aiguillage[index].Adroit:=adr; - aiguillage[index].AdroitB:=B; - end; - // TJD2 - if aiguillage[index].EtatTJD=2 then - begin - aiguillage[index].Ddroit:=adr; - aiguillage[index].DdroitB:=B; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - RE_ColorLine(Formconfig.RichAig,index-1,ClWhite); - LabelInfo.caption:='Modification de la TJD homologe ('+IntToSTR(adr2)+')'; - end; - - if modele=crois then - begin - aiguillage[index].Ddroit:=adr; - aiguillage[index].DdroitB:=B; - RE_ColorLine(Formconfig.RichAig,index-1,ClWhite); - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end; - - end; - -end; - -procedure TFormConfig.EditPointe_BGChange(Sender: TObject); -var AdrAig,adr,erreur,index : integer; - b : char; - normal,tjdC,tjsC,triC,croi : boolean; - s : string; -begin - // cliqué sur le edit pointe aiguillage - // ne pas traiter si on a cliqué sur la liste - if clicliste then exit; - if affevt then affiche('Evt change pointe',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - - //vérifier la syntaxe de P - s:=Editpointe_BG.text; - decodeAig(s,adr,B); - if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then - begin - RE_ColorLine(RichAig,ligneclicAig,ClWhite); - Index:=Index_Aig(AdrAig); - LabelInfo.caption:=''; - if (B='S') or (b='P') or (b='D') then - begin - if adr=AdrAig then LabelInfo.caption:='Un aiguillage ne peut pointer sur lui même '; - end; - - normal:=aiguillage[index].modele=aig; - tjdC:=aiguillage[index].modele=tjd; - tjsC:=aiguillage[index].modele=tjs; - triC:=aiguillage[index].modele=triple; - croi:=aiguillage[index].modele=crois; - - Aiguillage[index].modifie:=true; - - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - if normal or triC then - begin - Aiguillage[index].APointe:=adr; - Aiguillage[index].APointeB:=B; - // réencoder la ligne - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end; - if tjdC or tjsC or croi then - begin - Aiguillage[index].ADevie:=adr; - Aiguillage[index].ADevieB:=B; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end; - EditPointe_BG.Hint:=TypeElAIg_to_char(adr,B); - end - else - LabelInfo.caption:='Erreur pointe aiguillage '+intToSTR(AdrAig); - end; - -end; - - - -procedure TFormConfig.EditDevieS2KeyPress(Sender: TObject; var Key: Char); -var AdrAig,adr,erreur,index : integer; - b : char; - s : string; -begin - // cliqué sur le edit droit aiguillage - // ne pas traiter si on a cliqué sur la liste - if clicliste or (ord(Key)<>VK_RETURN) then exit; - if affevt then affiche('Evt change S2',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - //vérifier la syntaxe de P - s:=EditDevieS2.text; - decodeAig(s,adr,B); - - if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then - begin - RE_ColorLine(RichAig,ligneclicAig,ClWhite); - Index:=Index_Aig(AdrAig); - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - Aiguillage[index].ADevie2:=adr; - Aiguillage[index].ADevie2B:=B; - // réencoder la ligne - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end - else - begin - LabelInfo.caption:='Erreur S2 aiguillage '+intToSTR(AdrAig); - end; - end; -end; - - -procedure TFormConfig.CheckInverseClick(Sender: TObject); -var s : string; - adrAig,erreur : integer; -begin - // récupérer l'adresse de l'aiguillage cliqué - if clicliste then exit; - if affevt then affiche('Evt change pointe',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if checkInverse.Checked then aiguillage[Index_Aig(adraig)].InversionCDM:=1 else aiguillage[Index_Aig(adraig)].InversionCDM:=0; - // réencoder la ligne - s:=encode_aig(Index_Aig(AdrAig)); - formconfig.RichAig.Lines[ligneclicAig]:=s; -end; - -procedure TFormConfig.RadioButtonsansClick(Sender: TObject); -var AdrAig,erreur,index : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt RadioBouton sans vitesse',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if AdrAig=0 then exit; - index:=Index_Aig(AdrAig); - aiguillage[index].vitesse:=0; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; -end; - -procedure TFormConfig.RadioButtonTJD2Click(Sender: TObject); -var AdrAig,erreur,index,adr2 : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt RadioBouton tjd 2 états',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if AdrAig=0 then exit; - - EditP1.Visible:=false;EditP2.Visible:=false;EditP3.Visible:=false;EditP4.Visible:=false; - LabelTJD1.Visible:=false;LabelTJD2.Visible:=false; - - index:=Index_Aig(AdrAig); - aiguillage[index].etatTJD:=2; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - - adr2:=aiguillage[index].Ddroit; // adresse homologue - index:=Index_Aig(Adr2); - if index<>0 then - begin - aiguillage[index].etatTJD:=2; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; -end; - - -procedure TFormConfig.RadioButtonTJD4Click(Sender: TObject); -var AdrAig,erreur,index,adr2 : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt RadioBouton tjd 4 états',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if AdrAig=0 then exit; - - EditP1.Visible:=true;EditP2.Visible:=true;EditP3.Visible:=true;EditP4.Visible:=true; - LabelTJD1.Visible:=true;LabelTJD2.Visible:=true; - - index:=Index_Aig(AdrAig); - aiguillage[index].etatTJD:=4; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - - adr2:=aiguillage[index].Ddroit; // adresse homologue - index:=Index_Aig(Adr2); - if index<>0 then - begin - aiguillage[index].etatTJD:=4; - aiguillage[index].modifie:=true; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; -end; - -procedure TFormConfig.RadioButton30kmhClick(Sender: TObject); -var AdrAig,erreur,index : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt RadioBouton vitesse 30',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if AdrAig=0 then exit; - index:=Index_Aig(AdrAig); - if index<>0 then - begin - aiguillage[index].vitesse:=30; - aiguillage[index].modifie:=true; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; -end; - -procedure TFormConfig.RadioButton60kmhClick(Sender: TObject); -var AdrAig,erreur,index : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt RadioBouton vitesse 60',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - if AdrAig=0 then exit; - index:=Index_Aig(AdrAig); - if index<>0 then - begin - aiguillage[Index].vitesse:=60; - aiguillage[Index].modifie:=true; - end; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; -end; - -procedure TFormConfig.ComboBoxDecChange(Sender: TObject); -var s: string; - i,decodeur : integer; -begin -// Affiche(IntToStr(ComboBoxDec.ItemIndex),clyellow); - if clicListe then exit; - - if NbreFeux'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_det1:=i; - maj_hint_feu(ligneClicSig+1); - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.EditTempoFeuChange(Sender: TObject); -var i,erreur : integer; - s : string; -begin - s:=editTempoFeu.Text; - Val(s,i,erreur); - if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur temporisation décodeurs ';exit;end; - LabelInfo.caption:=' '; - tempo_feu:=i; -end; - -procedure Suiv1; - var s : string; - i,erreur : integer; - bt : Tequipement; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt Element suivant1',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditSuiv1.Text; - if s<>'' then - begin - Val(s,i,erreur); - if erreur<>0 then - begin - if (s[erreur]='A') and (erreur=1) then - begin - bt:=aig; - delete(s,erreur,1); - Val(s,i,erreur); - end - else begin LabelInfo.caption:='Erreur élément suivant 1';exit;end; - end - else bt:=det; - end - else - begin - i:=0; - bt:=rien; - end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_el_suiv1:=i; - feux[ligneClicSig+1].Btype_suiv1:=bt; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - end; -end; - - -procedure TFormConfig.EditSuiv1Change(Sender: TObject); -begin - Suiv1; -end; - - -procedure Det2; -var s : string; - i,erreur : integer; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt detecteur 2',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditDet2.Text; - Val(s,i,erreur); - if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur2 ';exit;end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_det2:=i; - maj_hint_feu(ligneClicSig+1); - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.EditDet2Change(Sender: TObject); -begin - det2; -end; - - -procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject); -var s : string; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt Verrou carré',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - begin - feux[ligneClicSig+1].VerrouCarre:=checkVerrouCarre.Checked; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.CheckBoxFBClick(Sender: TObject); -var s : string; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt FB',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - begin - feux[ligneClicSig+1].FeuBlanc:=checkBoxFB.Checked; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure Suiv2; -var s : string; - erreur,i: integer; - bt : Tequipement; -begin - if affevt then Affiche('Evt Element suivant2',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditSuiv2.Text; - if s<>'' then - begin - Val(s,i,erreur); - if erreur<>0 then - begin - if (s[erreur]='A') and (erreur=1) then - begin - bt:=aig; - delete(s,erreur,1); - Val(s,i,erreur); - end - else begin LabelInfo.caption:='Erreur élément suivant 2';exit;end; - end - else bt:=det; - end - else - begin - i:=0; - bt:=rien; - end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_el_suiv2:=i; - feux[ligneClicSig+1].Btype_suiv2:=bt; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - end; -end; - -procedure TFormConfig.EditSuiv2Change(Sender: TObject); -begin - if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit; - Suiv2; -end; - -procedure det3; -var s : string; - i,erreur : integer; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt detecteur 3',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditDet3.Text; - Val(s,i,erreur); - if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_det3:=i; - maj_hint_feu(ligneClicSig+1); - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.EditDet3Change(Sender: TObject); -begin - if clicliste or (ligneClicSig<0) then exit; - det3; -end; - - -procedure Suiv3; -var s : string; - erreur,i : integer; - bt : Tequipement; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt Element suivant3',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditSuiv3.Text; - if s<>'' then - begin - Val(s,i,erreur); - if erreur<>0 then - begin - if (s[erreur]='A') and (erreur=1) then - begin - bt:=aig; - delete(s,erreur,1); - Val(s,i,erreur); - end - else begin LabelInfo.caption:='Erreur élément suivant 3';exit;end; - end - else bt:=det; - end - else - begin - i:=0; - bt:=rien; - end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_el_suiv3:=i; - feux[ligneClicSig+1].Btype_suiv3:=bt; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - end; -end; - -procedure TFormConfig.EditSuiv3Change(Sender: TObject); -begin - if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit; - suiv3; -end; - -procedure det4; -var s : string; - i,erreur : integer; -begin - if clicliste then exit; - if affevt then Affiche('Evt detecteur 4',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditDet4.Text; - Val(s,i,erreur); - if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_det4:=i; - maj_hint_feu(ligneClicSig+1); - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.EditDet4Change(Sender: TObject); -begin - if clicliste or (ligneClicSig<0) then exit; - det4; -end; - -procedure suiv4; -var s : string; - erreur,i : integer; - bt : Tequipement; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt Element suivant4',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditSuiv4.Text; - if s<>'' then - begin - Val(s,i,erreur); - if erreur<>0 then - begin - if (s[erreur]='A') and (erreur=1) then - begin - bt:=aig; - delete(s,erreur,1); - Val(s,i,erreur); - end - else begin LabelInfo.caption:='Erreur élément suivant 4';exit;end; - end - else bt:=det; - end - else - begin - i:=0; - bt:=rien; - end; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].Adr_el_suiv4:=i; - feux[ligneClicSig+1].Btype_suiv4:=bt; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - end; -end; - -procedure TFormConfig.EditSuiv4Change(Sender: TObject); -begin - if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit; - Suiv4; -end; - - -procedure TFormConfig.EditActChange(Sender: TObject); -var s,s2 : string; - act,erreur : integer; - det : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit act Change',clyellow); - if ligneClicAct<0 then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditAct.Text; - if radioButtonLoc.Checked or RadioButtonAccess.Checked or RadioButtonSon.Checked then - begin - Val(s,act,erreur); - if s='' then exit; - det:=pos('Z',s)<>0; // si détecteur - if det then s2:='Détecteur ' else s2:='Actionneur '; - s2:=s2+intToSTR(act); - EditAct.Hint:=s2; - if det then delete(s,erreur,1); - Val(s,act,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur adresse actionneur';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].adresse:=act; - tablo_actionneur[ligneClicAct+1].det:=det; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - - -procedure TFormConfig.EditAct2Change(Sender: TObject); -var s : string; - det2,erreur : integer; - det : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit act2 Change',clyellow); - if ligneClicAct<0 then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditAct2.Text; - if radioButtonLoc.Checked or RadioButtonAccess.Checked or RadioButtonSon.Checked then - begin - Val(s,det2,erreur); - if s='' then exit; - if erreur<>0 then - begin - LabelInfo.caption:='Erreur adresse détecteur';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].adresse2:=det2; - tablo_actionneur[ligneClicAct+1].det:=det; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.RichActMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var ligne,i : integer; -begin - clicliste:=true; - LabelInfo.caption:=''; - raz_champs_act; - - // désactiver la ligne PN - RE_ColorLine(Formconfig.RichPN,LigneCliqueePN,ClAqua); - lignecliqueePN:=-1; - - with RichAct do - begin - i:=Selstart; - ligne:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if ligne-1 then RE_ColorLine(RichAct,AncligneClicAct,ClAqua); - AncligneClicAct:=Ligne; - ligneClicAct:=ligne; - RE_ColorLine(Formconfig.RichAct,ligneClicAct,ClYellow); - Aff_champs_Act(ligneClicAct); - end - else - begin - RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua); - ligneclicAct:=-1; - exit; - end; - end; - clicliste:=false; -end; - -procedure TFormConfig.EditEtatActionneurChange(Sender: TObject); -var s : string; - etat,erreur,typ : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditActionneur Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditEtatActionneur.Text; - if radioButtonLoc.Checked or RadioButtonAccess.Checked or RadioButtonSon.Checked then - begin - Val(s,etat,erreur); - typ:=tablo_actionneur[ligneClicAct+1].typdeclenche; - if (erreur<>0) or (etat<0) or ((typ<2) and (etat>1)) or ((typ=2) and (etat>2)) then - begin - if typ<2 then begin LabelInfo.caption:='Erreur état actionneur';exit;end; - if typ=2 then begin LabelInfo.caption:='Erreur position aiguillage';exit;end; - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].etat:=etat; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.EditTrainDeclChange(Sender: TObject); -var s,train : string; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit TrainDecl Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - train:=EditTrainDecl.Text; - if train='' then - begin - LabelInfo.caption:='Erreur train';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].trainDecl:=train; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; -end; - -procedure TFormConfig.EditTrainDestChange(Sender: TObject); -var s,train : string; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit TrainDest Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - if radioButtonLoc.Checked then - begin - train:=EditTrainDest.Text; - if train='' then - begin - LabelInfo.caption:='Erreur train';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].trainDest:=train; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; - -end; - - -procedure TFormConfig.EditSonChange(Sender: TObject); -var s,fichier : string; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit NomFichier Change',clyellow); - if ligneClicAct<0 then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - if radioButtonLoc.Checked or RadioButtonAccess.Checked or RadioButtonSon.Checked then - begin - fichier:=EditSon.Text; - if fichier='' then - begin - LabelInfo.caption:='Nom fichier vide';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].fichierSon:=fichier; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.EditFonctionAccessChange(Sender: TObject); -var s : string; - fonction,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit fonctionAccess Change',clyellow); - if ligneClicAct<0 then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditFonctionAccess.Text; - if radioButtonLoc.Checked or RadioButtonAccess.Checked then - begin - Val(s,fonction,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur fonction actionneur';exit - end else LabelInfo.caption:=' '; - - if radioButtonLoc.Checked then tablo_actionneur[ligneClicAct+1].fonction:=fonction; - if RadioButtonAccess.Checked then Tablo_Actionneur[ligneClicAct+1].accessoire:=fonction; - - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.EditEtatFoncSortieChange(Sender: TObject); -var s : string; - Etat,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt Edit FoncSortie Change',clyellow); - if ligneClicAct<0 then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditEtatFoncSortie.Text; - if radioButtonAccess.Checked then - begin - Val(s,etat,erreur); - if (erreur<>0) or (etat<0) or (etat>2) then - begin - LabelInfo.caption:='Erreur Etat actionneur';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].sortie:=etat; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.EditTempoChange(Sender: TObject); -var s : string; - tempo,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt TempoChange',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditTempo.Text; - if radioButtonLoc.Checked then - begin - Val(s,tempo,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur Tempo actionneur';exit - end else LabelInfo.caption:=' '; - - tablo_actionneur[ligneClicAct+1].tempo:=tempo; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.CheckRAZClick(Sender: TObject); - var s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt CheckRaz Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - if radioButtonAccess.Checked then - begin - tablo_actionneur[ligneClicAct+1].raz:=CheckRAZ.checked; - s:=encode_act_loc_son(ligneClicAct+1); - RichAct.Lines[ligneClicAct]:=s; - end; - end; -end; - -procedure TFormConfig.EditAdrSigChange(Sender: TObject); -var s : string; - i, erreur : integer; -begin - if clicliste then exit; - if affevt then Affiche('Evt adresse signal',clOrange); - // attention interférence avec clic droit propriétés sur un signal qui génère un evt sur ce contrôle - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - with Formconfig do - begin - s:=EditAdrSig.Text; - if (s='') or (ligneClicSig<0) then exit; - Val(s,i,erreur); - if (erreur<>0) or (i<=0) or (i>MaxAcc) then - begin - EditAdrSig.Color:=clred; - LabelInfo.caption:='Erreur adresse signal ';exit; - end; - if (index_feu(i)<>0) then - begin - EditAdrSig.Color:=clred; - LabelInfo.caption:='Signal '+intToSTR(i)+' existe, il ne sera pas écrasé';exit; - end; - - EditAdrSig.Color:=clWindow; - LabelInfo.caption:=' '; - feux[ligneClicSig+1].adresse:=i; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - Maj_Hint_feu(ligneClicSig+1); - end; -end; - - -procedure TFormConfig.EditAdrAigChange(Sender: TObject); - var s : string; - i,vide,erreur,index,adr2 : integer; - modele: TEquipement; - c : char; -begin - if clicliste then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=EditAdrAig.Text; - Val(s,i,erreur); - if (erreur<>0) or (i<=0) or (i>MaxAcc) then - begin - EditAdrAig.Color:=clred; - LabelInfo.caption:='Erreur adresse Aiguillage ';exit; - end; - - index:=ligneclicAig+1; - if index=0 then exit; - - modele:=aiguillage[index].modele; - // si normal ou triple - if (modele=aig) or (modele=triple) then - begin - if (erreur<>0) or (i>MaxAcc) then begin LabelInfo.caption:='Erreur adresse aiguillage ';exit;end; - // vérifier si l'adresse de l'aiguillage existe déja - if (aiguillage[Index_Aig(i)].modele<>rien) then - begin - EditAdrAig.Color:=clred; - LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ; - exit; - end; - - EditAdrAig.Color:=clWindow; - LabelInfo.caption:=' '; - aiguillage[index].adresse:=i; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end; - if (modele=tjd) or (modele=tjs) then - begin - clicListe:=true; - // modifier les champs P1 et P2 avec la nouvelle adresse - val(editP1.Text,vide,erreur); - if erreur<>0 then c:=editP1.text[erreur] else c:='D'; - editP1.Text:=IntToSTR(i)+c; - val(editP2.Text,vide,erreur); - if erreur<>0 then c:=editP2.text[erreur] else c:='D'; - editP2.Text:=IntToSTR(i)+c; - - clicListe:=false; - aiguillage[index].adresse:=i; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - - // modif homologue - adr2:=aiguillage[index].Ddroit; - index:=index_aig(adr2); - aiguillage[index].dDroit:=i; - aiguillage[index].dDevie:=i; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end; - end; -end; - -procedure TFormConfig.ComboBoxAspChange(Sender: TObject); -var x,y,i,index,aspect,adresseFeu : integer; - s : string; -begin - if clicListe then exit; - if affevt then Affiche('Evt aspect',clOrange); - i:=ComboBoxAsp.ItemIndex; - //Affiche(IntToSTR(i),clyellow); - case i of - 0 : aspect:=2; - 1 : aspect:=3; - 2 : aspect:=4; - 3 : aspect:=5; - 4 : aspect:=7; - 5 : aspect:=9; - else aspect:=i+6; - end; - index:=ligneClicSig+1; // index du feu - if index<1 then exit; - if NbreFeux0) and (ligneClicSig>=0) then - begin - clicListe:=true; - index:=ligneClicSig+1; - feux[index]:=Feu_sauve; - RichSig.Lines[ligneClicSig]:=encode_sig_feux(index); - aff_champs_sig_feux(index); // réaffiche les champs - Maj_Hint_feu(index); - // change l'image du feu dans la feuille graphique principale - Feux[index].Img.picture.Bitmap:=Select_dessin_feu(feux[index].aspect); - dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal - clicListe:=false; - end; -end; - -procedure TFormConfig.RadioButtonLocClick(Sender: TObject); -var champ,i,erreur : integer; - s : string; -begin - // rendre visible le groupbox Actionneur fonction F loco - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioLoc '+IntToSTR(i),clyellow); - - Tablo_Actionneur[i].loco:=true; - Tablo_Actionneur[i].Act:=false; - Tablo_Actionneur[i].Son:=false; - champs_type_loco; - - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - Tablo_actionneur[i].trainDecl:=EditTrainDecl.Text; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; -end; - -procedure TFormConfig.RadioButtonAccessClick(Sender: TObject); -var champ,i,erreur : integer; - s : string; -begin - // rendre visible le groupbox Actionneur fonction F loco - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioAccessoire '+IntToSTR(i),clyellow); - - Tablo_Actionneur[i].loco:=false; - Tablo_Actionneur[i].Act:=true; - Tablo_Actionneur[i].Son:=false; - champs_type_act; - - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - Tablo_actionneur[i].trainDecl:=EditTrainDecl.Text; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; -end; - - -procedure TFormConfig.RadioButtonSonClick(Sender: TObject); -var champ,i,erreur : integer; - s : string; -begin - // rendre visible le groupbox Actionneur fonction F loco - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioSon '+IntToSTR(i),clyellow); - - Tablo_Actionneur[i].loco:=false; - Tablo_Actionneur[i].Act:=false; - Tablo_Actionneur[i].Son:=true; - - champs_type_son; - - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - Tablo_actionneur[i].trainDecl:=EditTrainDecl.Text; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; -end; - -procedure TFormConfig.RichPNMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var i,ligne : integer; -begin - clicliste:=true; - LabelInfo.caption:=''; - editV1F.Text:='';editV1O.Text:=''; - editV2F.Text:='';editV2O.Text:=''; - editV3F.Text:='';editV3O.Text:=''; - editV4F.Text:='';editV4O.Text:=''; - EditZdet1V1F.text:='';EditZdet2V1F.text:=''; - EditZdet1V1O.text:='';EditZdet2V1O.text:=''; - EditZdet1V2F.text:='';EditZdet2V2F.text:=''; - EditZdet1V2O.text:='';EditZdet2V2O.text:=''; - EditZdet1V3F.text:='';EditZdet2V3F.text:=''; - EditZdet1V3O.text:='';EditZdet2V3O.text:=''; - EditZdet1V4F.text:='';EditZdet2V4F.text:=''; - EditZdet1V4O.text:='';EditZdet2V4O.text:=''; - - editAdrFerme.Text:='';EditCmdFerme.text:=''; - editAdrOuvre.Text:='';EditCdeOuvre.text:=''; - - // désactive la sélection des actionneurs - RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua); - ligneclicAct:=-1; - - with RichPN do - begin - i:=Selstart; - ligne:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if ligne-1 then RE_ColorLine(RichPN,AncligneCliqueePN,ClAqua); - AncLigneCliqueePN:=Ligne; - ligneCliqueePN:=ligne; - RE_ColorLine(RichPN,LigneCliqueePN,ClYellow); - Aff_champs_PN(lignecliqueePN); - end - else - begin - RE_ColorLine(Formconfig.RichPN,lignecliqueePN,ClAqua); - lignecliqueePN:=-1; - exit; - end; - end; - clicliste:=false; -end; - -procedure TFormConfig.EditAdrFermeChange(Sender: TObject); -var s : string; - act,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditAdrFerme Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditAdrFerme.Text; - Val(s,act,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur adresse actionneur ferme';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].AdresseFerme:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditCmdFermeChange(Sender: TObject); -var s : string; - i,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditCmdFerme Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditCmdFerme.Text; - { - if (s='+') or (s='-') then - begin - if s='-' then act:=1 else act:=2; - LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].CommandeFerme:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end - } - val(s,i,erreur); - if (i<0) or (i>2) or (erreur<>0) then begin LabelInfo.caption:='Erreur Commande ferme actionneur';exit;end; - LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].CommandeFerme:=i; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditAdrOuvreChange(Sender: TObject); -var s : string; - act,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditAdrOuvre Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditAdrOuvre.Text; - Val(s,act,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur adresse actionneur ouvre';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].AdresseOuvre:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditCdeOuvreChange(Sender: TObject); -var s : string; - i,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditCmdOuvre Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditCdeOuvre.Text; - val(s,i,erreur); - if (i<0) or (i>2) or (erreur<>0) then begin LabelInfo.caption:='Erreur Commande ferme actionneur';exit;end; - LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].CommandeOuvre:=i; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - {if (s='+') or (s='-') then - begin - if s='-' then act:=1 else act:=2; - LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].CommandeOuvre:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end - else - LabelInfo.caption:='Erreur Commande ouvre actionneur';exit } - - end; -end; - -procedure TFormConfig.EditV1FChange(Sender: TObject); -var s : string; - act,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV1F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV1F.Text; - Val(s,act,erreur); - if (erreur<>0) then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 1 ferme'; - tablo_PN[lignecliqueePN+1].voie[1].ActFerme:=0; - exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].ActFerme:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - - -procedure TFormConfig.EditV1OChange(Sender: TObject); -var s : string; - act,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV1O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV1O.Text; - Val(s,act,erreur); - if erreur<>0 then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 1 ouvre';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].ActOuvre:=act; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditV2FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV2F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV2F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 2 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].ActFerme:=act; - V2valide:=(EditV2O.text<>'') and (EditV2F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; - -end; - -procedure TFormConfig.EditV2OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV2O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV2O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 2 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].ActOuvre:=act; - V2valide:=(EditV2O.text<>'') and (EditV2F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditV3FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V3valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV3F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV3F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 3 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].ActFerme:=act; - V3valide:=(EditV3O.text<>'') and (EditV3F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V3Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V3Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditV3OChange(Sender: TObject); -var s : string; - i,act,erreur,NbVoies : integer; - V3valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV3O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV3O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 3 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].ActOuvre:=act; - V3valide:=(EditV3O.text<>'') and (EditV3F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V3Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V3Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.ButtonNouvAccClick(Sender: TObject); -var s: string; - i : integer; -begin - if affevt then affiche('Evt bouton nouveau acc',clyellow); - clicliste:=true; - inc(maxTablo_act); - i:=MaxTablo_act; - - // désactiver la ligne PN - RE_ColorLine(Formconfig.RichPN,LigneCliqueePN,ClAqua); - lignecliqueePN:=-1; - - radioButtonLoc.Checked:=true; - Tablo_actionneur[maxtablo_act].act:=false; - Tablo_actionneur[maxtablo_act].loco:=true; - - s:=encode_act_loc_son(i); - if ligneClicAct<>-1 then RE_ColorLine(RichAct,ligneClicAct,ClAqua); - - // ajouter et scroller en fin - with richAct do - begin - Lines.add(s); - SetFocus; - Selstart:=RichAct.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - - GroupBoxRadio.Visible:=true; - LabelInfo.caption:=''; - LigneClicAct:=i-1; - AncligneClicAct:=ligneClicAct; - Aff_champs_Act(maxTablo_act-1); - clicliste:=false; - config_modifie:=true; -end; - - -procedure TFormConfig.ButtonNouvPNClick(Sender: TObject); -var s: string; - i : integer; -begin - if affevt then affiche('Evt bouton nouveau PN',clyellow); - clicliste:=true; - inc(nbrePN); - i:=nbrePN; - - // désactive la sélection des actionneurs - RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua); - ligneclicAct:=-1; - - Tablo_PN[i].NbVoies:=1; - - s:=encode_act_pn(i); - if LigneCliqueePN<>-1 then RE_ColorLine(RichPN,ligneCliqueePN,ClAqua); - - // ajouter et scroller en fin - with richPN do - begin - Lines.add(s); - SetFocus; - Selstart:=RichPN.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - - editV1F.Text:='';editV1O.Text:=''; - editV2F.Text:='';editV2O.Text:=''; - editV3F.Text:='';editV3O.Text:=''; - editV4F.Text:='';editV4O.Text:=''; - EditZdet1V1F.text:='';EditZdet2V1F.text:=''; - EditZdet1V1O.text:='';EditZdet2V1O.text:=''; - EditZdet1V2F.text:='';EditZdet2V2F.text:=''; - EditZdet1V2O.text:='';EditZdet2V2O.text:=''; - EditZdet1V3F.text:='';EditZdet2V3F.text:=''; - EditZdet1V3O.text:='';EditZdet2V3O.text:=''; - EditZdet1V4F.text:='';EditZdet2V4F.text:=''; - EditZdet1V4O.text:='';EditZdet2V4O.text:=''; - - GroupBoxRadio.Visible:=false; - LabelInfo.caption:=''; - LigneCliqueePN:=i-1; - AncLigneCliqueePN:=LigneCliqueePN; - tablo_PN[lignecliqueePN+1].Pulse:=1; - Aff_champs_PN(nbrePN-1); - clicliste:=false; - config_modifie:=true; -end; - -procedure TFormConfig.ButtonSupAccClick(Sender: TObject); -var i,index,adr : integer; - s: string; -begin - if affevt then affiche('Evt bouton Sup acc',clyellow); - - i:=ligneClicAct; - if (i=-1) then exit; - index:=i+1; // passe en index tableau - - adr:=tablo_actionneur[index].adresse; - s:='Voulez-vous supprimer l''actionneur '+IntToSTR(adr)+'?'; - if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; - Affiche('Suppression de l''actionneur index='+IntToSTR(index)+' adresse='+IntToSTR(adr),clOrange); - - clicliste:=true; - - // supprime l'actionneur du tableau - dec(maxTablo_act); - for i:=index to maxTablo_act do - begin - tablo_actionneur[i]:=tablo_actionneur[i+1]; - end; - - clicliste:=false; - config_modifie:=true; - - RichAct.Clear; - for i:=1 to maxTablo_act do - begin - s:=encode_act_loc_son(i); - if s<>'' then - begin - RichAct.Lines.Add(s); - RE_ColorLine(RichAct,RichAct.lines.count-1,ClAqua); - end; - end; - AncligneClicAct:=-1; - ligneClicAct:=-1; -end; - -procedure TFormConfig.ButtonSupPNClick(Sender: TObject); -var i,index,adr : integer; - ac,pn : boolean; - s: string; -begin - if affevt then affiche('Evt bouton Sup PN',clyellow); - i:=lignecliqueePN; - if (i=-1) then exit; - index:=i+1; // passe en index tableau - - pn:=false; - adr:=tablo_PN[index].voie[1].ActFerme; - ac:=adr<>0 ; // type actionneur - if adr=0 then - begin - adr:=tablo_PN[index].voie[1].DetZ1F; - pn:=adr<>0; - end; - if not(ac) and not(pn) then ac:=true; - - if ac then s:='Voulez-vous supprimer l''actionneur '+IntToSTR(adr)+'?'; - if pn then s:='Voulez-vous supprimer l''actionneur de zone '+IntToSTR(adr)+'-'+inttostr(tablo_PN[index].voie[1].DetZ1O)+'?'; - if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; - Affiche('Suppression de l''actionneur index='+IntToSTR(index)+' adresse='+IntToSTR(adr),clOrange); - - clicliste:=true; - - // supprime l'actionneur du tableau - dec(nbrePN); - for i:=index to nbrePN do - begin - tablo_PN[i]:=tablo_PN[i+1]; - end; - - clicliste:=false; - config_modifie:=true; - - RichPN.Clear; - for i:=1 to NbrePN do - begin - s:=encode_act_PN(i); - if s<>'' then - begin - RichPN.Lines.Add(s); - RE_ColorLine(RichPN,RichPN.lines.count-1,ClAqua); - end; - end; - lignecliqueePN:=-1; - AncLigneCliqueePN:=-1; -end; - -procedure TFormConfig.ButtonNouvFeuClick(Sender: TObject); -var i,AdrMax : integer; - s : string; -begin - clicliste:=true; - inc(NbreFeux); - - AdrMax:=0; - for i:=1 to NbreFeux do - begin - if AdrMax-1 then RE_ColorLine(RichSig,ligneClicSig,ClAqua); - - // ajouter et scroller en fin - with richSig do - begin - Lines.add(s); - SetFocus; - Selstart:=RichSig.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - - LabelInfo.caption:=''; - ligneClicSig:=i-1; - AncligneClicSig:=ligneClicSig; - Aff_champs_Sig_feux(i); - clicliste:=false; - Feu_sauve.Adresse:=0; - config_modifie:=true; -end; - - -procedure supprime_sig; -var adresse,i,indexFeu,index,debut,fin,longueur,ltot,lignedeb,lignefin,l : integer; - s : string; -begin - if affevt then affiche('Evt bouton Sup Feu',clyellow); - //trouver ligne de début et de fin sélectionner. - debut:=FormConfig.RichSig.SelStart; - longueur:=FormConfig.RichSig.SelLength; - fin:=debut+longueur; - //Affiche(inttostr(debut)+' '+inttostr(longueur),clyellow); - // trouver les lignes sélectionnées - i:=0;ltot:=0;ligneDeb:=0;LigneFin:=0; - repeat - l:=length(FormConfig.RichSig.lines[i])+2; //+2 car CR LF - ltot:=ltot+l; - if (debut=fin) and (ligneFin=0) and (ligneDeb<>0) then ligneFin:=i+1; - //if (ltot=fin) and (ligneFin=0) then ligneFin:=i; - inc(i); - until (i>=NbreFeux) or (ligneFin>0); - if lignefin=0 then if fin>ltot then ligneFin:=NbreFeux; - //Affiche(inttostr(ligneDeb)+' '+inttostr(LigneFin),clyellow); - - i:=ligneClicSig; - if (i<0) then exit; - index:=i+1; // passe en index tableau - - if ligneDeb=LigneFin then s:='Voulez-vous supprimer le signal '+IntToSTR(feux[index].adresse)+'?' - else s:='Voulez-vous supprimer les signaux de '+ - IntToSTR(feux[ligneDeb].adresse)+' à '+IntToSTR(feux[ligneFin].adresse)+' ?'; - - if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; - - FormConfig.ButtonInsFeu.Caption:='Ajouter le feu '+intToSTR(feux[index].adresse)+' supprimé'; - clicliste:=true; - Feu_supprime:=feux[index]; // sauvegarde le supprimé - feu_sauve.adresse:=0; // dévalider sa définition - - index:=ligneDeb; - - if ligneDeb=LigneFin then s:='Suppression du signal '+IntToSTR(feux[index].adresse) - else s:='Suppression des signaux de '+ - IntToSTR(feux[ligneDeb].adresse)+' à '+IntToSTR(feux[ligneFin].adresse); - Affiche(s,clOrange); - - //Affiche('Boucle de '+intToSTR(ligneDeb)+' N='+intToSTR(NbreFeux-ligneFin),clyellow); - - // d'abord supprimer les images des feux - for i:=LigneDeb to LigneFin do - begin - feux[i].Img.free; // supprime l'image, ce qui efface le feu du tableau graphique - Feux[i].Lbl.free; // supprime le label, ... - if Feux[i].checkFB<>nil then begin Feux[i].checkFB.Free;Feux[i].CheckFB:=nil;end; // supprime le check du feu blanc s'il existait - end; - - for i:=1 to NbreFeux-ligneFin do - begin - index:=i+lignefin; //index ddu feu de remplacement - indexFeu:=lignedeb+i-1; - //Affiche('Suppresion feu '+intToSTR(feux[i+lignedeb].Adresse),clorange); - //Affiche('remplacement par index '+intToSTR(index),clorange); - - feux[indexFeu]:=feux[index]; - adresse:=feux[indexFeu].adresse; - - with feux[IndexFeu].Img do - begin - Parent:=Formprinc.ScrollBox1; // dire que l'image est dans la scrollBox1 - Top:=(HtImg+espY+20)*((IndexFeu-1) div NbreImagePLigne); // détermine les points d'origine - Left:=10+ (LargImg+5)*((IndexFeu-1) mod (NbreImagePLigne)); - Name:='ImageFeu'+IntToSTR(adresse); - s:='Index='+IntToSTR(IndexFeu)+' @='+inttostr(feux[IndexFeu].Adresse)+' Décodeur='+intToSTR(feux[IndexFeu].Decodeur)+ - ' Adresse détecteur associé='+intToSTR(feux[IndexFeu].Adr_det1)+ - ' Adresse élement suivant='+intToSTR(feux[IndexFeu].Adr_el_suiv1); - if feux[IndexFeu].Btype_suiv1=aig then s:=s+' (aig)'; - Hint:=s; - end; - with feux[IndexFeu].Lbl do - begin - Top:=HtImg+((HtImg+EspY+20)*((IndexFeu-1) div NbreImagePLigne)); - Left:=10+ (LargImg+5)*((IndexFeu-1) mod (NbreImagePLigne)); - caption:='@'+IntToSTR(Feux[IndexFeu].adresse); - end; - if Feux[IndexFeu].checkFB<>nil then - with Feux[IndexFeu].CheckFB do - begin - Name:='CheckBoxFB'+intToSTR(adresse); - Hint:='Feu blanc'; - Top:=HtImg+15+((HtImg+EspY+20)*((IndexFeu-1) div NbreImagePLigne)); - Left:=10+ (LargImg+5)*((IndexFeu-1) mod (NbreImagePLigne)); - end; - - //Affiche('décale feu '+IntToSTR(i)+'<'+intToSTR(i+1),clorange); - - feux[index].Adresse:=0; - feux[index].modifie:=false; - end; - Nbrefeux:=NbreFeux-(ligneFin-LigneDeb)-1; - - config_modifie:=true; - FormConfig.RichSig.Clear; - - // réafficher le richsig - for i:=1 to NbreFeux do - begin - s:=encode_Sig_Feux(i); - if s<>'' then - begin - FormConfig.RichSig.Lines.Add(s); - RE_ColorLine(FormConfig.RichSig,FormConfig.RichSig.lines.count-1,ClAqua); - end; - end; - ligneClicSig:=-1; - AncligneClicSig:=-1; - raz_champs_sig; - clicliste:=false; - -end; - -procedure TFormConfig.ButtonSupFeuClick(Sender: TObject); -begin - Supprime_sig; -end; - -// Ajouter le feu supprimé -procedure TFormConfig.ButtonInsFeuClick(Sender: TObject); -var s : string; -begin - if feu_supprime.adresse<>0 then - begin - clicliste:=true; - inc(NbreFeux); - feux[NbreFeux]:=Feu_supprime; - Feu_Supprime.adresse:=0; // dévalider le feu sauvegardé - Feu_supprime.aspect:=0; - cree_image(nbrefeux); - config_modifie:=true; - // réafficher le rechedit - s:=encode_Sig_Feux(NbreFeux); - if s<>'' then - begin - with RichSig do - begin - ButtonInsFeu.Caption:='Ajouter le feu supprimé'; - Lines.Add(s); - RE_ColorLine(RichSig,RichSig.lines.count-1,ClYellow); - ligneClicSig:=NbreFeux-1; - AncligneClicSig:=-1; - SetFocus; - Selstart:=RichSig.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - Aff_champs_sig_feux(NbreFeux); - end; - clicListe:=false; - end; -end; - -// renvoie le numéro de branche en défaut -// si ok, renvoie 0 -Function verif_extr_branches : integer; -var i,j,detect,erreur : integer; - model,AncModel : Tequipement; -begin - Erreur:=0; - for i:=1 to NbreBranches do - begin - j:=1; - repeat - detect:=BrancheN[i][j].Adresse; - AncModel:=model; - model:=BrancheN[i][j].BType; - if (j=1) and (model<>Aig) and (Model<>Buttoir) then - begin - Affiche('Erreur 3.1 branche '+intToSTR(i)+' : le premier élément d''une branche doit être un buttoir ou un aiguillage',clred); - erreur:=i; - end; - inc(j); - until((model=rien) and (detect=0)); - if (Ancmodel<>Aig) and (AncModel<>Buttoir) then - begin - Affiche('Erreur 3.2 branche '+intToSTR(i)+' : le dernier élément d''une branche doit être un buttoir ou un aiguillage',clred); - erreur:=i; - end; - end; - - verif_extr_branches:=Erreur; -end; - -function verif_coherence : boolean; -var AncAdr,i,j,k,l,Indexaig,adr,adr2,extr,detect,condcarre,nc,index2,SuivAdr, - x,y,extr2,adr3,index3,det1Br,det2Br,det1index,det2index : integer; - modAig,AncModel,model,km,SuivModel,model2: TEquipement; - c : char; - vitesse : longint; - ok,trouveSuiv,TrouvePrec : boolean; -begin - // vérification de la cohérence1 - // parcoure les branches jusqu'à trouver un aiguillage pour voir s'il a été décrit - ok:=true; - for i:=1 to NbreBranches do - begin - j:=1; - repeat - detect:=BrancheN[i][j].Adresse; - - if detect>NbMemZone then - begin - Affiche('Erreur 1: adresse détecteur trop grand: '+intToSTR(detect),clred); - ok:=false; - end; - - AncModel:=model; - model:=BrancheN[i][j].BType; // 1= détecteur 2= aiguillage 4=Buttoir - - if (model=aig) then - begin - //affiche('trouvé aig '+intToSTR(detect),clyellow); - modAig:=aiguillage[Index_Aig(detect)].modele; - if (modAig=rien) then - begin - Affiche('Erreur 2: Aiguillage '+intToStr(detect)+' non décrit mais présent en branche '+intToStr(i)+' pos. '+intToSTR(j),clred); - ok:=false; - end; - end; - j:=j+1; - until((model=rien) and (detect=0)); - if (Ancmodel<>Aig) and (AncModel<>Buttoir) then - Affiche('Erreur 3.2 branche '+intToSTR(i)+' : le dernier élément d''une branche doit être un buttoir ou un aiguillage',clred); - end; - - if verif_extr_branches<>0 then ok:=false; - - // vérification de la cohérence2 - // parcoure les aiguillages pour voir si les détecteurs sont en branches des détecteurs - // et les tjd pour voir si pb de cohérence - for Indexaig:=1 to maxaiguillage do - begin - // tjd ou tjs - if ((aiguillage[Indexaig].modele=tjd) and (aiguillage[Indexaig].EtatTJD=4)) or (aiguillage[Indexaig].modele=tjs) then - begin - if aiguillage[Indexaig].Ddroit<>aiguillage[Indexaig].Ddevie then - begin - Affiche('Erreur 7: la TJD/S '+IntToStr(Indexaig)+' a des adresses de destination différentes ('+intToSTR(aiguillage[Indexaig].Ddroit)+' et '+intToSTR(aiguillage[Indexaig].Ddevie)+')',clred); - ok:=false; - end; - // vérifier si son homologue est une tjd - adr2:=aiguillage[Indexaig].Ddroit; - if (aiguillage[Index_Aig(adr2)].modele<>tjd) and (aiguillage[Index_Aig(adr2)].modele<>tjs) then - begin - Affiche('Erreur 8: l''aiguillage '+intToStr(Adr2)+' n''est pas une TJD/S ou n''existe pas, mais apparait dans la TJD/S '+IntToSTR(aiguillage[Indexaig].Adresse),clred); - ok:=false; - end; - end; - // vérifier si l'aiguillage est dans les branches - if aiguillage[Indexaig].modele<>rien then - begin - trouve_aiguillage(aiguillage[Indexaig].adresse); // passe l'adresse de l'aiguillage à trouver - if (IndexBranche_trouve=0) then - begin - Affiche('Avertissement 6: aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' décrit dans les aiguillages ; absent dans la description des branches',clOrange); - ok:=false; - end; - end; - adr:=aiguillage[Indexaig].Adroit; - if (aiguillage[Indexaig].AdroitB='Z') then - begin - trouve_detecteur(adr); - if IndexBranche_trouve=0 then - begin - Affiche('Erreur 21: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clred); - ok:=false; - end; - end; - adr:=aiguillage[Indexaig].Adevie; - if (aiguillage[Indexaig].AdevieB='Z') then - begin - trouve_detecteur(adr); - if IndexBranche_trouve=0 then - begin - Affiche('Erreur 31: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed); - ok:=false; - end; - end; - adr:=aiguillage[Indexaig].Apointe; - if ((aiguillage[Indexaig].ApointeB='Z') and (aiguillage[Indexaig].modele=aig)) then - begin - trouve_detecteur(adr); - if IndexBranche_trouve=0 then - begin - Affiche('Erreur 4 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed); - ok:=false; - end; - end; - if (aiguillage[Indexaig].modele=triple) then // aiguillage triple - begin - if (aiguillage[Indexaig].Adevie2B='Z') then - begin - adr:=aiguillage[Indexaig].Adevie2; - trouve_detecteur(adr); - if IndexBranche_trouve=0 then - begin - Affiche('Erreur 5 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed); - ok:=false; - end; - end; - end; - end; - - // cohérence 3 : vérifie si aiguillage triple ok et si doublon aiguillage - for Indexaig:=1 to maxaiguillage do - begin - adr:=aiguillage[Indexaig].Adresse; - if aiguillage[Indexaig].modele=triple then - begin - if aiguillage[Indexaig].AdrTriple=0 then - begin - Affiche('Erreur 6.1: 2ème adresse de l''aiguillage triple '+intToSTR(adr)+' non définie',clred); - ok:=false; - end; - end; - for i:=Indexaig+1 to maxaiguillage do - begin - if adr=aiguillage[i].Adresse then - begin - affiche('Erreur 6.2: aiguillage '+intToSTR(adr)+' défini deux fois',clred); - ok:=false; - end; - end; - end; - - // cohérence 4 : vérifie si doublon signal - for j:=1 to NbreFeux do - begin - adr:=feux[j].Adresse; - for i:=j+1 to NbreFeux do - begin - if adr=feux[i].Adresse then - begin - affiche('Erreur 7 : signal '+intToSTR(adr)+' défini deux fois',clred); - ok:=false; - end; - end; - end; - - // cohérence 5 ; vérifie si aiguillages définis en condition supplémentaires de carré existent - for j:=1 to NbreFeux do - begin - l:=1; - repeat - nc:=Length(feux[j].condcarre[l])-1 ; - for k:=1 to nc do - begin - adr:=feux[j].condcarre[l][k].Adresse; // adresse de l'aiguillage - if index_aig(adr)=0 then - begin - Affiche('Avertissement : Aig '+intToSTR(adr)+' défini dans les cond de carré du signal '+intToSTR(feux[j].adresse)+' mais non existant',clOrange); - ok:=false; - end; - end; - inc(l); - until (nc<=0) or (l>6); - end; - - // cohérence 6 : vérifier si les détecteurs et les aiguillages associés aux signaux existent - for j:=1 to NbreFeux do - begin - i:=feux[j].Adr_det1; - if i<>0 then - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 8.1: Détecteur '+intToSTR(i)+' non existant dans les branches mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end - else - begin - if feux[j].Aspect<10 then - begin - ok:=false; - Affiche('Erreur 8.2: Détecteur inconnu ('+intToSTR(i)+') sur signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - - i:=feux[j].Adr_det2; - if i<>0 then - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 8.3: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - - i:=feux[j].Adr_det3; - if i<>0 then - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 8.4: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - - i:=feux[j].Adr_det4; - if i<>0 then - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 8.5: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - - // élement suivant 1 - i:=feux[j].Adr_el_suiv1; - km:=feux[j].Btype_suiv1; - if i<>0 then - begin - if km=det then // détecteur - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 9.1: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end - else - begin - // vérifier si les deux détecteurs du signal sont consécutifs (l et i) - l:=feux[j].Adr_det1; - trouve_detecteur(i); - det1Br:=branche_trouve; - det1Index:=IndexBranche_trouve; - - trouve_detecteur(l); - det2Br:=branche_trouve; - det2Index:=IndexBranche_trouve; - if (det1Br<>Det2Br) or (abs(det1Index-det2Index)>1) then - begin - ok:=false; - Affiche('Erreur 9.12: signal '+intToSTR(feux[j].adresse)+' : détecteurs '+intToSTR(i)+' et '+intToSTR(l)+' non consécutifs ',clred); - end; - end; - end; - if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then - begin - // aiguillage - k:=index_aig(i); - if k=0 then - begin - ok:=false; - Affiche('Erreur 9.2: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end - else - begin - // vérifier si le détecteur du signal et l'aiguillage sont consécutifs - l:=feux[j].Adr_det1; - if (aiguillage[k].ADroit<>l) and (aiguillage[k].ADevie<>l) and (aiguillage[k].APointe<>l) then - begin - ok:=false; - Affiche('Erreur 9.21: signal '+intToSTR(feux[j].adresse)+' : aiguillage '+intToSTR(i)+' et détecteur '+intToSTR(l)+' non consécutifs ',clred); - end; - end; - end; - end; - - // élement suivant 2 - i:=feux[j].Adr_el_suiv2; - km:=feux[j].Btype_suiv2; - if i<>0 then - begin - if km=det then // détecteur - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 9.3: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then - begin - // aiguillage - if index_aig(i)=0 then - begin - ok:=false; - Affiche('Erreur 9.4: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - end; - - // élement suivant 3 - i:=feux[j].Adr_el_suiv3; - km:=feux[j].Btype_suiv3; - if i<>0 then - begin - if km=det then // détecteur - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 9.5: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then - begin - // aiguillage - if index_aig(i)=0 then - begin - ok:=false; - Affiche('Erreur 9.6: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - end; - - // élement suivant 4 - i:=feux[j].Adr_el_suiv4; - km:=feux[j].Btype_suiv4; - if i<>0 then - begin - if km=det then // détecteur - begin - trouve_detecteur(i); - if IndexBranche_trouve=0 then - begin - ok:=false; - Affiche('Erreur 9.7: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then - begin - // aiguillage - if index_aig(i)=0 then - begin - ok:=false; - Affiche('Erreur 9.10: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; - end; - end; - end; - - // cohérence 7 - // parcoure les aiguillages pour voir si les aiguillages déclarés aux extrémités sont existants - for Indexaig:=1 to maxaiguillage do - //indexaig:=index_aig(93); - begin - adr:=aiguillage[indexaig].Adresse; - model:=aiguillage[indexaig].modele; - - if adr>NbMemZone then - begin - Affiche('Erreur 9.11: adresse aiguillage trop grand: '+intToSTR(adr),clred); - ok:=false; - end; - - // on ne vérifie pas les tjd tjs crois - if (model<>tjd) and (model<>tjd) and (model<>crois) then - begin - - adr2:=aiguillage[indexaig].ADroit; // adresse de ce qui est connecté sur la position droite - c:=aiguillage[indexaig].AdroitB; - if (c='D') or (c='S') or (c='P') then - begin - index2:=Index_aig(adr2); // adresse de l'aiguillage connecté - model2:=aiguillage[index2].modele; // modèle de l'aiguillage connecté - if index2=0 then - begin - ok:=false; - Affiche('Erreur 10.20: aiguillage '+intToSTR(adr)+': déclaration d''un aiguillage '+IntToSTR(adr2)+' inexistant',clred); - end - else - begin - // tjs ou tjs à 2 états ou croisement - if ( ((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=2) ) or (model2=crois) then - begin - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index2].DDevie) and (adr<>aiguillage[index2].Ddroit) then - begin - Affiche('Erreur 10.21: Discordance de déclaration aiguillages '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - end; - - // tjs ou tjs à 4 états - if (((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=4)) then - begin - adr3:=aiguillage[index2].Ddroit; // 2eme adresse de la TJD - index3:=index_aig(adr3); - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index3].ADevie) and (adr<>aiguillage[index3].Adroit) then - begin - Affiche('Erreur 10.22: Discordance de déclaration aiguillages '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - end; - - if (model2=aig) or (model2=triple) then - begin - if c='D' then - begin - extr:=aiguillage[index2].ADroit; - if adr<>extr then Affiche('Erreur 10.23: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred); - end; - if c='S' then - begin - extr:=aiguillage[index2].ADevie; - if adr<>extr then Affiche('Erreur 10.24: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred); - end; - if c='P' then - begin - extr:=aiguillage[index2].APointe; - if adr<>extr then Affiche('Erreur 10.25: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'P différent de '+intToSTR(extr),clred); - end; - end; - end; - end; - - adr2:=aiguillage[indexaig].Adevie; // adresse de ce qui est connecté sur la position déviée - c:=aiguillage[indexaig].AdevieB; - if (c='D') or (c='S') or (c='P') then - begin - index2:=Index_aig(adr2); // adresse de l'aiguillage connecté - model2:=aiguillage[index2].modele; // modèle de l'aiguillage connecté - if index2=0 then - begin - ok:=false; - Affiche('Erreur 10.30: aiguillage '+intToSTR(adr)+': déclaration d''un aiguillage '+IntToSTR(adr2)+' inexistant',clred); - end - else - begin - // tjs ou tjs à 2 états ou croisement - if (((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=2)) or (model2=crois) then - begin - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index2].DDevie) and (adr<>aiguillage[index2].Ddroit) then - begin - Affiche('Erreur 10.31: Discordance de déclaration aiguillage '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - end; - - // tjs ou tjs à 4 états - if (((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=4)) then - begin - adr3:=aiguillage[index2].Ddroit; // 2eme adresse de la TJD - index3:=index_aig(adr3); - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index3].ADevie) and (adr<>aiguillage[index3].Adroit) then - begin - Affiche('Erreur 10.32: Discordance de déclaration aiguillage '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - end; - - if (model2=aig) or (model2=triple) then - begin - if c='D' then - begin - extr:=aiguillage[index2].ADroit; - if adr<>extr then Affiche('Erreur 10.33: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred); - end; - if c='S' then - begin - extr:=aiguillage[index2].ADevie; - if adr<>extr then Affiche('Erreur 10.34: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred); - end; - if c='P' then - begin - extr:=aiguillage[index2].APointe; - if adr<>extr then Affiche('Erreur 10.35: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'P différent de '+intToSTR(extr),clred); - end; - end; - end; - end; - - adr2:=aiguillage[indexaig].APointe; // adresse de ce qui est connecté sur la pointe - c:=aiguillage[indexaig].ApointeB; - if (c='D') or (c='S') or (c='P') then - begin - index2:=Index_aig(adr2); // adresse de l'aiguillage connecté - model2:=aiguillage[index2].modele; // modèle de l'aiguillage connecté - if index2=0 then - begin - ok:=false; - Affiche('Erreur 10.40: aiguillage '+intToSTR(adr)+': déclaration d''un aiguillage '+IntToSTR(adr2)+' inexistant',clred); - end - else - begin - // tjs ou tjs à 2 états ou croisement - if (((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=2)) or (model2=crois) then - begin - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index2].DDevie) and (adr<>aiguillage[index2].Ddroit) then - begin - Affiche('Erreur 10.41: Discordance de déclaration aiguillage '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - - // tjs ou tjs à 4 états - if (((model2=tjs) or (model2=tjd)) and (aiguillage[index2].EtatTJD=4)) then - begin - adr3:=aiguillage[index2].Ddroit; // 2eme adresse de la TJD - index3:=index_aig(adr3); - if (adr<>aiguillage[index2].Adevie) and (adr<>aiguillage[index2].ADroit) and - (adr<>aiguillage[index3].ADevie) and (adr<>aiguillage[index3].Adroit) then - begin - Affiche('Erreur 10.42: Discordance de déclaration aiguillage '+intToSTR(adr)+': '+intToSTR(adr2),clred); - ok:=false; - end; - end; - - if (model2=aig) or (model2=triple) then - begin - if c='D' then - begin - extr:=aiguillage[index2].ADroit; - if adr<>extr then Affiche('Erreur 10.43: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred); - end; - if c='S' then - begin - extr:=aiguillage[index2].ADevie; - if adr<>extr then Affiche('Erreur 10.44: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred); - end; - if c='P' then - begin - extr:=aiguillage[index2].APointe; - if adr<>extr then Affiche('Erreur 10.45: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'P différent de '+intToSTR(extr),clred); - end; - end; - end; - end; - end; - end; - end; - - // cohérence 8 - // parcoure les branches pour voir si les aiguillages aux extrémités sont cohérentes avec leurs déclarations - for i:=1 to NbreBranches do - begin - j:=1; // on vérifie entre j-1 et j+1 - detect:=BrancheN[i][1].Adresse; - model:=BrancheN[i][1].BType; - repeat - AncAdr:=detect;AncModel:=model; - detect:=BrancheN[i][j].Adresse; - SuivAdr:=BrancheN[i][j+1].Adresse; - SuivModel:=BrancheN[i][j+1].Btype; - model:=BrancheN[i][j].BType; // 1= détecteur 2= aiguillage 4=Buttoir - trouvePrec:=false; - - if (model=aig) or (model=Tjd) or (model=Tjs) then - begin - k:=index_aig(detect); - // comparer au précédent - if j=1 then trouvePrec:=true; - if (j>1) then - begin - if aiguillage[k].modele=Aig then - begin - if aiguillage[k].ADroit=AncAdr then trouvePrec:=true; - if aiguillage[k].ADevie=AncAdr then trouvePrec:=true; - if aiguillage[k].APointe=AncAdr then trouvePrec:=true; - end; - if (aiguillage[k].modele=Tjd) or (aiguillage[k].modele=TjS) then - begin - if aiguillage[k].EtatTJD=2 then - begin - if aiguillage[k].ADroit=AncAdr then trouvePrec:=true; - if aiguillage[k].ADevie=AncAdr then trouvePrec:=true; - if aiguillage[k].Ddroit=AncAdr then trouvePrec:=true; - if aiguillage[k].Ddevie=AncAdr then trouvePrec:=true; - end; - if aiguillage[k].EtatTJD=4 then - begin - l:=index_aig(aiguillage[k].Ddroit); // 2eme adresse de la TJD - if aiguillage[k].ADroit=AncAdr then trouvePrec:=true; - if aiguillage[k].ADevie=AncAdr then trouvePrec:=true; - if aiguillage[k].Ddroit=AncAdr then trouvePrec:=true; - if aiguillage[l].Adroit=AncAdr then trouvePrec:=true; - if aiguillage[l].Adevie=AncAdr then trouvePrec:=true; - if aiguillage[l].Ddevie=AncAdr then trouvePrec:=true; - end; - end; - if aiguillage[k].modele=crois then - begin - if aiguillage[k].ADroit=AncAdr then trouvePrec:=true; - if aiguillage[k].ADevie=AncAdr then trouvePrec:=true; - if aiguillage[k].Ddroit=AncAdr then trouvePrec:=true; - if aiguillage[k].Ddevie=AncAdr then trouvePrec:=true; - end; - - if not(trouvePrec) then - begin - Affiche('Erreur 11: La description de l''aiguillage '+intToSTR(detect)+' ne correspond pas à son élément contigu ('+intToStr(AncAdr)+') en branche '+intToSTR(i),clred); - ok:=false; - end; - end; - - TrouveSuiv:=false; - // comparer au suivant - if SuivModel<>rien then - begin - if aiguillage[k].modele=Aig then - begin - if aiguillage[k].ADroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].ADevie=SuivAdr then trouveSuiv:=true; - if aiguillage[k].APointe=SuivAdr then trouveSuiv:=true; - end; - if (aiguillage[k].modele=Tjd) or (aiguillage[k].modele=TjS) then - begin - if aiguillage[k].EtatTJD=2 then - begin - if aiguillage[k].ADroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].ADevie=SuivAdr then trouveSuiv:=true; - if aiguillage[k].Ddroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].Ddevie=SuivAdr then trouveSuiv:=true; - end; - if aiguillage[k].EtatTJD=4 then - begin - l:=index_aig(aiguillage[k].Ddroit); // 2eme adresse de la TJD - if aiguillage[k].ADroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].ADevie=SuivAdr then trouveSuiv:=true; - if aiguillage[k].Ddroit=SuivAdr then trouveSuiv:=true; - if aiguillage[l].Adroit=SuivAdr then trouveSuiv:=true; - if aiguillage[l].Adevie=SuivAdr then trouveSuiv:=true; - if aiguillage[l].Ddevie=SuivAdr then trouveSuiv:=true; - end; - end; - if aiguillage[k].modele=crois then - begin - if aiguillage[k].ADroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].ADevie=SuivAdr then trouveSuiv:=true; - if aiguillage[k].Ddroit=SuivAdr then trouveSuiv:=true; - if aiguillage[k].Ddevie=SuivAdr then trouveSuiv:=true; - end; - - if not(trouveSuiv) then - begin - Affiche('Erreur 12: La description de l''aiguillage '+intToSTR(detect)+' ne correspond pas à son élément contigu ('+intToStr(SuivAdr)+') en branche '+intToSTR(i),clred); - ok:=false; - end; - end; - end; - inc(j); - until((model=rien) and (detect=0)) ; - end; - - // 9. vérifier la cohérence TCO - if avecTCO then - begin - for y:=1 to NbreCellY do - for x:=1 to NbreCellX do - begin - i:=TCO[x,y].BImage; - if i=30 then - begin - adr:=TCO[x,y].adresse; - if index_feu(adr)=0 then - begin - Affiche('Un signal '+IntToSTR(adr)+' est déclaré dans le TCO['+intToSTR(x)+','+intToSTR(y)+'] mais absent de la configuration',clred); - ok:=false; - end; - end; - if (i=2) or (i=3) or (i=4) or (i=5) or (i=12) or (i=13) or (i=14) or (i=15) then - begin - adr:=TCO[x,y].adresse; - if index_aig(adr)=0 then - begin - Affiche('Un aiguillage '+IntToSTR(adr)+' est déclaré dans le TCO['+intToSTR(x)+','+intToSTR(y)+'] mais absent de la configuration',clred); - ok:=false; - end; - end; - if (i=1) or (i=6) or (i=7) or (i=8) or (i=9) or (i=16) or (i=17) or (i=18) or (i=19) or (i=20) or (i=10) or (i=11) then - begin - adr:=TCO[x,y].adresse; - if adr<>0 then - begin - j:=1; - repeat - trouveSuiv:=adr=Adresse_detecteur[j]; - inc(j); - until (j>NDetecteurs) or trouveSuiv; - - if not(trouveSuiv) then - begin - Affiche('Un détecteur '+IntToSTR(adr)+' est déclaré dans le TCO['+intToSTR(x)+','+intToSTR(y)+'] mais absent de la configuration',clred); - ok:=false; - end; - end; - end; - end; - end; - - // 10 Divers - i:=pos(':',portcom);j:=pos(',',portcom); - val(copy(portcom,i+1,j-i),vitesse,l); - if (protocole=2) and (vitesse<>115200) then Affiche('La vitesse COM/USB en procotole DCC++ doit être de 115200 bauds',clred); - - verif_coherence:=ok; -end; - -procedure TFormConfig.ButtonNouvAigClick(Sender: TObject); -var i : integer; - s : string; -begin - if MaxAiguillage>=MaxAcc then - begin - Affiche('Nombre maximal d''aiguillages atteint',clRed); - exit; - end; - clicliste:=true; - inc(MaxAiguillage); - i:=MaxAiguillage; - aiguillage[i].Adresse:=999; - aiguillage[i].modele:=aig; - aiguillage[i].AdroitB:='Z'; aiguillage[i].AdevieB:='Z'; - aiguillage[i].DdroitB:='D'; aiguillage[i].DdevieB:='S'; // préparation pour TJD/S - aiguillage[i].EtatTJD:=4; - aiguillage[i].ApointeB:='Z'; - aiguillage[i].Adevie2B:='Z'; - aiguillage[i].tjsintB:='D'; - - aiguillage[i].posInit:=const_inconnu; - aiguillage[i].Temps:=5; - - s:=encode_Aig(i); - if ligneClicAig<>-1 then RE_ColorLine(RichAig,ligneClicAig,ClAqua); - // scroller à la fin - with richAig do - begin - Lines.add(s); - SetFocus; - Selstart:=RichAig.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - - LabelInfo.caption:='Aiguillage '+intToSTR(aiguillage[i].Adresse)+' créé'; - ligneClicAig:=i-1; - AncligneClicAig:=ligneClicAig; - Aff_champs_aig_tablo(i); - clicliste:=false; - config_modifie:=true; - Aig_sauve.Adresse:=0; -end; - - -// supprime le ou les aiguillages sélectionnés dans le richEdit -procedure supprime_aig; -var ligneDeb,LigneFin,i,index,debut,longueur,fin,l,ltot : integer; - s : string; -begin - //trouver ligne de début et de fin sélectionner. - with formConfig do - begin - debut:=RichAig.SelStart; - longueur:=RichAig.SelLength; - end; - fin:=debut+longueur; - //Affiche(inttostr(debut)+' '+inttostr(longueur),clyellow); - // trouver les lignes sélectionnées - i:=0;ltot:=0;ligneDeb:=0;LigneFin:=0; - repeat - l:=length(FormConfig.RichAig.lines[i])+2; //+2 car CR LF - ltot:=ltot+l; - if (debut=fin) and (ligneFin=0) and (ligneDeb<>0) then ligneFin:=i+1; - //if (ltot=fin) and (ligneFin=0) then ligneFin:=i; - inc(i); - until (i>=MaxAiguillage) or (ligneFin>0); - if lignefin=0 then if fin>ltot then ligneFin:=MaxAiguillage; - //Affiche(inttostr(Ltot)+' '+inttostr(Fin),clyellow); - - - i:=ligneClicAig; - if (i<0) then exit; - index:=i+1; // passe en index tableau - - if ligneDeb=LigneFin then s:='Voulez-vous supprimer l''aiguillage '+IntToSTR(aiguillage[index].adresse)+'?' - else s:='Voulez-vous supprimer les aiguillages de '+ - IntToSTR(aiguillage[ligneDeb].adresse)+' à '+IntToSTR(aiguillage[ligneFin].adresse)+' ?'; - - if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; - - FormConfig.ButtonAjSup.Caption:='Ajouter l''aig '+intToSTR(aiguillage[index].adresse)+' supprimé'; - clicliste:=true; - raz_champs_aig; - Aig_supprime:=aiguillage[index]; // sauvegarde le supprimé - Aig_sauve.adresse:=0; // dévalider sa définition - - index:=ligneDeb; - - if ligneDeb=LigneFin then s:='Suppression de l''aiguillage '+IntToSTR(aiguillage[index].adresse) - else s:='Suppression des aiguillages de '+ - IntToSTR(aiguillage[ligneDeb].adresse)+' à '+IntToSTR(aiguillage[ligneFin].adresse); - Affiche(s,clOrange); - - //Affiche('Boucle de '+intToSTR(ligneDeb)+' N='+intToSTR(MaxAiguillage-ligneFin),clyellow); - - for i:=1 to MaxAiguillage-ligneFin do - begin - index:=i+lignefin; //index de l'aiguillage de remplacement - //Affiche('Suppresion aiguillage '+intToSTR(aiguillage[i+lignedeb].Adresse),clorange); - //Affiche('remplacement par index '+intToSTR(index),clorange); - - Aiguillage[lignedeb+i-1]:=Aiguillage[index]; - aiguillage[index].Adresse:=0; - aiguillage[index].Modele:=rien; - aiguillage[index].Adroit:=0; - aiguillage[index].Adevie:=0; - aiguillage[index].Ddroit:=0; - aiguillage[index].Ddevie:=0; - aiguillage[index].APointe:=0; - aiguillage[index].modifie:=false; - end; - MaxAiguillage:=maxAiguillage-(ligneFin-LigneDeb)-1; - - config_modifie:=true; - FormConfig.RichAig.Clear; - - // réafficher le richsig - for i:=1 to MaxAiguillage do - begin - s:=encode_Aig(i); - if s<>'' then - begin - FormConfig.RichAig.Lines.Add(s); - RE_ColorLine(FormConfig.RichAig,FormConfig.RichAig.lines.count-1,ClAqua); - end; - end; - With FormConfig.RichAig do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - ligneClicAig:=-1; - AncligneClicAig:=-1; - clicliste:=false; -end; - -procedure TFormConfig.BoutSupAigClick(Sender: TObject); -begin - Supprime_aig; -end; - -procedure TFormConfig.EditP1KeyPress(Sender: TObject; var Key: Char); -var AdrAig,adr,adr2,erreur,index,id2 : integer; - b,c : char; - s : string; -begin - if clicliste or (ord(Key)<>VK_RETURN) then exit; - if affevt then affiche('Evt change P1',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneClicAig]; - Val(s,adrAig,erreur); - - //vérifier la syntaxe de P - s:=EditP1.text; - if RightStr(s,1)<>'D' then - begin - clicListe:=true; - s:=s+'D'; - editP1.text:=s; - clicListe:=false; - end; - - decodeAig(s,adr,B); - if (B='D') and (adr<>0) then - begin - LabelInfo.caption:=''; - RE_ColorLine(RichAig,ligneClicAig,ClWhite); - Index:=Index_Aig(AdrAig); - - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - adr2:=aiguillage[index].DDevie; // ancien aiguillage associé à la tjd - clicliste:=true; - if B='D' then c:='S'; - if B='S' then c:='D'; - EditP2.Text:=IntToSTR(adr)+c; - clicliste:=false; - LabelInfo.caption:='Changement de l''adresse de la TJD de '+IntToSTR(adr2)+' à '+intToSTR(adr) ; - - id2:=Index_Aig(Adr); - if (aiguillage[id2].modele<>rien) then - begin - LabelInfo.caption:='aiguillage '+IntToSTR(adr)+' existe déja - ne sera pas écrasé' ; - exit; - end ; - aiguillage[index].Adresse:=adr; - clicliste:=true; - editAdrAig.Text:=IntToSTR(adr); - clicListe:=false; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneClicAig]:=s; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneClicAig]:=s; - // changer l'homologue - adr2:=aiguillage[index].Ddroit; - index:=index_aig(Adr2); - aiguillage[index].Ddroit:=adr; - aiguillage[index].Ddevie:=adr; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end - else - LabelInfo.caption:='Erreur P1 TJD '+intToSTR(AdrAig); - end; -end; - -procedure TFormConfig.EditP2KeyPress(Sender: TObject; var Key: Char); -var AdrAig,adr,adr2,erreur,index,id2 : integer; - b,c : char; - s : string; -begin - if clicliste or (ord(Key)<>VK_RETURN) then exit; - if affevt then affiche('Evt change P2',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneClicAig]; - Val(s,adrAig,erreur); - - //vérifier la syntaxe - s:=EditP2.text; - if RightStr(s,1)<>'S' then - begin - clicListe:=true; - s:=s+'S'; - editP2.text:=s; - clicListe:=false; - end; - - decodeAig(s,adr,B); - if (B='S') and (adr<>0) then - begin - LabelInfo.caption:=''; - RE_ColorLine(RichAig,ligneClicAig,ClWhite); - Index:=Index_Aig(AdrAig); - - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - adr2:=aiguillage[index].DDevie; // ancien aiguillage associé à la tjd - clicliste:=true; - if B='D' then c:='S'; - if B='S' then c:='D'; - EditP1.Text:=IntToSTR(adr)+c; - clicliste:=false; - - LabelInfo.caption:='Changement de l''adresse de la TJD de '+IntToSTR(adr2)+' à '+intToSTR(adr) ; - - id2:=Index_Aig(Adr); - if (aiguillage[id2].modele<>rien) then - begin - LabelInfo.caption:='aiguillage '+IntToSTR(adr)+' existe déja - ne sera pas écrasé' ; - exit; - end ; - aiguillage[index].Adresse:=adr; - clicliste:=true; - editAdrAig.Text:=IntToSTR(adr); - clicListe:=false; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneClicAig]:=s; - // changer l'homologue - adr2:=aiguillage[index].Ddroit; - index:=index_aig(Adr2); - aiguillage[index].Ddroit:=adr; - aiguillage[index].Ddevie:=adr; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end - else - LabelInfo.caption:='Erreur P2 TJD '+intToSTR(AdrAig); - end; -end; - -procedure TFormConfig.EditP3KeyPress(Sender: TObject; var Key: Char); -var AdrAig,adr,adr2,erreur,index : integer; - model: Tequipement; - b,c : char; - s : string; -begin - if clicliste or (ord(Key)<>VK_RETURN) then exit; - if affevt then affiche('Evt change P3',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneClicAig]; - Val(s,adrAig,erreur); // adrAig est l'adresse de l'aiguillage modifié - - //vérifier la syntaxe - s:=EditP3.text; - if RightStr(s,1)<>'S' then - begin - clicListe:=true; - s:=s+'S'; - editP3.text:=s; - clicListe:=false; - end; - - decodeAig(s,adr,B); // adr est le contenu du champ P3 - if (B='S') and (adr<>0) then - begin - LabelInfo.caption:=''; - RE_ColorLine(RichAig,ligneClicAig,ClWhite); - Index:=Index_Aig(AdrAig); - model:=aiguillage[Index].modele; - - if model=tjs then // TJS - begin - LabelL.caption:=IntToSTR(adr); - aiguillage[index].tjsint:=adr; - end; - - - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - adr2:=aiguillage[index].DDevie; // ancien aiguillage associé à la tjd - clicliste:=true; - if B='D' then c:='S'; - if B='S' then c:='D'; - EditP4.Text:=IntToSTR(adr)+c; - clicliste:=false; - LabelInfo.caption:='Changement de la TJD homologue de '+IntToSTR(adr2)+' à '+intToSTR(adr) ; - - adr2:=aiguillage[index].Ddroit; // 'ancienne' adresse homologue avant écrasement - aiguillage[index].Ddroit:=adr; - //aiguillage[index].DdroitB:=B; - aiguillage[index].Ddevie:=adr; - aiguillage[index].DdevieB:=B; - - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneClicAig]:=s; - - // changer l'homologue - index:=index_aig(Adr); - if index=0 then // si elle n'existe pas la créer - begin - // créer homologue - if model=tjd then labelInfo.Caption:='Création de la TJD homologue '+IntToSTR(adr); - if model=tjs then labelInfo.Caption:='Création de la TJS homologue '+IntToSTR(adr); - - inc(MaxAiguillage); - index:=MaxAiguillage; - aiguillage[index].Adresse:=Adr; - aiguillage[Index].modele:=model; - aiguillage[Index].Adroit:=0; - aiguillage[Index].AdroitB:='D'; - aiguillage[Index].Adevie:=0; - aiguillage[Index].AdevieB:='D'; - aiguillage[Index].Ddroit:=adrAig; - aiguillage[Index].DdroitB:='D'; - aiguillage[Index].Ddevie:=adrAig; - aiguillage[Index].DdevieB:='S'; - aiguillage[Index].APointeB:='Z'; - aiguillage[Index].tjsINTB:='S'; - - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - // scroller à la fin - with richAig do - begin - SetFocus; - Selstart:=RichAig.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - RE_ColorLine(RichAig,index-1,ClAqua); - HideCaret(richAig.Handle); // éteint curseur - end; - end // fin de la création - else - begin - // existe, vérifier si c'est bien une TJD/S - model:=aiguillage[Index].modele; - if (model=tjd) or (model=tjs) then - begin - aiguillage[index].adresse:=adr; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end - else - labelInfo.caption:='L''aiguillage '+IntToSTR(adr)+' existe, il ne sera pas écrasé'; - end; - end - else - LabelInfo.caption:='Erreur P3 TJD '+intToSTR(AdrAig); - end; -end; - - -procedure TFormConfig.EditP4KeyPress(Sender: TObject; var Key: Char); -var AdrAig,adr,adr2,erreur,index : integer; - b,c : char; - s : string; -begin - if clicliste or (ord(Key)<>VK_RETURN) then exit; - if affevt then affiche('Evt change P4',clyellow); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=formconfig.RichAig.Lines[ligneClicAig]; - Val(s,adrAig,erreur); - - //vérifier la syntaxe - s:=EditP4.text; - if RightStr(s,1)<>'D' then - begin - clicListe:=true; - s:=s+'D'; - editP4.text:=s; - clicListe:=false; - end; - - decodeAig(s,adr,B); - if (B='D') and (adr<>0) then - begin - LabelInfo.caption:=''; - RE_ColorLine(RichAig,ligneClicAig,ClWhite); - Index:=Index_Aig(AdrAig); - - Aiguillage[index].modifie:=true; - LabelInfo.caption:=''; - // modifier la base de données de l'aiguillage - if b=#0 then b:='Z'; - - adr2:=aiguillage[index].DDevie; // ancien aiguillage associé à la tjd - clicliste:=true; - if B='D' then c:='S'; - if B='S' then c:='D'; - EditP3.Text:=IntToSTR(adr)+c; - clicliste:=false; - LabelInfo.caption:='Changement de la TJD homologue de '+IntToSTR(adr2)+' à '+intToSTR(adr) ; - - adr2:=aiguillage[index].Ddroit; // 'ancienne' adresse homologue avant écrasement - aiguillage[index].Ddroit:=adr; - //aiguillage[index].DdroitB:=B; - aiguillage[index].Ddevie:=adr; - aiguillage[index].DdevieB:=B; - - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneClicAig]:=s; - - // changer l'homologue - index:=index_aig(Adr2); - aiguillage[index].adresse:=adr; - s:=encode_aig(index); - formconfig.RichAig.Lines[index-1]:=s; - end - else - LabelInfo.caption:='Erreur P4 TJD '+intToSTR(AdrAig); - end; -end; - -procedure TFormConfig.ButtonAjSupClick(Sender: TObject); -var s : string; -begin - if Aig_supprime.adresse<>0 then - begin - inc(MaxAiguillage); - aiguillage[MaxAiguillage]:=Aig_supprime; - Aig_Supprime.adresse:=0; // dévalider l'aiguillage sauvegardé - Aig_Supprime.modele:=rien; - clicListe:=true; - config_modifie:=true; - - // réafficher les rechedit et scroller à la fin - s:=encode_Aig(MaxAiguillage); // ligne de l'aiguillage - if s<>'' then - with RichAig do - begin - ButtonAjSup.Caption:='Ajouter l''aig supprimé'; - ligneClicAig:=MaxAiguillage-1; - AncligneClicAig:=-1; - RichAig.Lines.Add(s); - RE_ColorLine(RichAig,RichAig.lines.count-1,clYellow); - SetFocus; - Selstart:=RichAig.GetTextLen-1; - Perform(EM_SCROLLCARET,0,0); - end; - Aff_champs_aig_tablo(MaxAiguillage); - end; - clicListe:=false; -end; - -procedure TFormConfig.ButtonRestaureAigClick(Sender: TObject); -var index : integer; -begin - if (Aig_sauve.adresse<>0) and (ligneclicAig>=0) then - begin - clicListe:=true; - index:=ligneclicAig+1; - Aiguillage[index]:=Aig_sauve; - RichAig.Lines[ligneclicAig]:=encode_Aig(index); - aff_champs_Aig_tablo(index); // réaffiche les champs - clicListe:=false; - end; -end; - -procedure TFormConfig.ComboBoxAigChange(Sender: TObject); -var s: string; - i : integer; -begin - if clicListe then exit; - if MaxAiguillage'S') and (aiguillage[i].tjsIntB<>'D') then aiguillage[i].tjsIntB:='D'; - end; - - s:=encode_aig(i); - formconfig.RichAig.Lines[ligneclicAig]:=s; - clicliste:=true; - Aff_champs_aig_tablo(i); - clicliste:=false; -end; - -procedure TFormConfig.ButtonValLigneClick(Sender: TObject); -var s: string; - ligne,esp : integer; - ok : boolean; -begin - ligne:=1; - ok:=true; - repeat - s:=AnsiUpperCase(RichBranche.Lines[ligne-1]); - if s<>'' then - begin - // supprime les espaces éventuels - repeat - esp:=pos(' ',s); - if esp<>0 then delete(s,esp,1); - until esp=0; - if s<>'' then - begin - RichBranche.Lines[ligne-1]:=s; - branche[ligne]:=s; // stocker la ligne dans la branche pour la compiler - if compile_branche(s,ligne) then - begin - RE_ColorLine(RichBranche,Ligne-1,ClLime); - end - else - begin - RE_ColorLine(RichBranche,Ligne-1,ClRed); - ok:=false; - end; - inc(ligne); - end - else RichBranche.Lines.Delete(ligne-1); - end - else RichBranche.Lines.Delete(ligne-1); - - until (ligne>RichBranche.Lines.count) or (ligne>=MaxBranches); - NbreBranches:=ligne-1; - if ligne>=MaxBranches then Affiche('Nombre maximal de branches atteint',clRed); - - ligne:=verif_extr_branches; - if ligne<>0 then - begin - ok:=false; - RE_ColorLine(RichBranche,Ligne-1,ClRed); - end; - - if ok then - begin - labelResult.Caption:='Syntaxe correcte'; - config_modifie:=true; - modif_branches:=false; - end - else labelResult.Caption:='Erreur de syntaxe'; -end; - -function virgule_suiv(sl : string;o : integer) : integer; -var k : integer; -begin - o:=o+1; - for k:=o to length(sl) do - begin - // Affiche(sl[k],clGreen); - if sl[k]=',' then begin result:=k;exit;end; - end; - result:=0; -end; - -// trouve l'enregistrement suivant après l'offset dans une branche -// en sortie : trouve_enregistrement= nouvel offset, enregistrement -// si 0 en sortie: fin de ligne -function trouve_enregistrement_suiv(num_branche : integer;offset : integer) : integer; -var j : integer; - ss : string; -begin - j:=virgule_suiv(branche[Num_Branche],offset); // pointe sur la virgule suivante - if j<>0 then ss:=copy(branche[Num_Branche],offset,j-offset) // champ suivant - else ss:=copy(branche[Num_Branche],offset,length(branche[Num_Branche])-offset+1); // si j=0 c'est la fin de la chaîne - enregistrement:=ss; - if j=0 then result:=0 else result:=j+1; -end; - -// compile une branche de réseau sous forme de texte, et la stocke dans le tableau des branches -// i = index de la branche à stocker -function compile_branche(s : string;i : integer) : boolean; -var offset,j,bd,detect,erreur,adresse,erreur2 : integer; - c : char; - trouve,code : boolean; - se : string; -begin - j:=1;offset:=1; - code:=true; - // la boucle repeat parcoure la ligne s - repeat - BrancheN[i,j].adresse:=0; // préparer le suivant à 0 - offset:=trouve_enregistrement_suiv(i,offset) ; - if enregistrement='' then - begin - Affiche('Erreur ligne '+s,clred); - compile_branche:=false; - exit; - end; - se:=enregistrement; - // décoder l'enregistrement - // si c'est un détecteur, fini trouvé - Val(enregistrement,detect,erreur); // détermine si le champ est numérique ou pas (cad si aiguillage) - // il y a un aiguillage ou un espace après le champ....en fin de ligne - if erreur<>0 then - begin - c:=enregistrement[1]; - delete(enregistrement,1,1); - if c='A' then - begin - Val(enregistrement,adresse,erreur2); - if (adresse=0) or (erreur2<>0) then - begin - Affiche('Erreur 17 champ '+se+' ligne '+s,clred); - code:=false; - end; - if adresse>NbMemZone then - begin - Affiche('Erreur 18 ligne '+s+' : adresse aiguillage trop grand: '+intToSTR(adresse),clred); - adresse:=NbMemZone; - code:=false; - end; - BrancheN[i,j].adresse:=adresse; - BrancheN[i,j].btype:=aig; // ident aiguillage - end - else - begin - Affiche('Erreur 19 champ '+se+' ligne '+s,clred); - code:=false; - erreur:=0; // forcer erreur à 0 pour obliger à passer sur un détecteur - end; - end; - // détecteur - if erreur=0 then - begin - if detect>NbMemZone then - begin - Affiche('Erreur 20 ligne '+s+' : adresse détecteur trop grand: '+intToSTR(detect),clred); - detect:=NbMemZone; - code:=false; - end; - BrancheN[i,j].adresse:=detect; // adresse - BrancheN[i,j].btype:=det;// ident détecteur - if detect=0 then begin BrancheN[i,j].btype:=buttoir;end; // buttoir - // vérifier si le détecteur est déja stocké - bd:=0; - repeat - inc(bd); - if bd>NbMaxDet then - begin - Affiche('Nombre maximal de détecteurs dépassé ('+IntToSTR(NbMaxDet)+')',clred); - code:=false; - end - else - trouve:=Adresse_detecteur[bd]=detect; - until ((bd=NDetecteurs+1) or trouve) or (bd>NbMaxDet) ; - if not(trouve) then - begin - Adresse_detecteur[bd]:=detect; - NDetecteurs:=bd; - end; - end; - inc(j); - - BrancheN[i,j].adresse:=0; // préparer le suivant à 0 - BrancheN[i,j].BType:=rien; - //Affiche('branche '+intToSTR(i)+' index='+intToStr(j),clGreen); - until (offset=0) or (j>=MaxElBranches); - if j=2 then - begin - Affiche('Branche '+IntToSTR(i)+' : Une branche doit contenir au moins deux éléments',clred); - code:=false; - end; - if (j>=MaxElBranches) then Affiche('Nombre maximal d''élements dans une branche atteint',clred); - compile_branche:=code; -end; - -procedure TFormConfig.RichBrancheMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var i,curseur,lc : integer; -begin - if clicListe then exit; - clicListe:=true; - if affevt then affiche('Evt RichBranche clic',clyellow); - with Formconfig.RichBranche do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if lines[lc]<>'' then LabelNumBranche.Caption:='Branche n°'+intToSTR(lc+1) else LabelNumBranche.Caption:=''; - AncligneClicBr:=ligneClicBr; - ligneClicBr:=lc; - curseur:=SelStart; // position initiale du curseur - if AncligneClicBr<>ligneClicBr then - begin - if AncligneClicBr<>-1 then - begin - RE_ColorLine(RichBranche,AncligneClicBr,ClAqua); - end; - RE_ColorLine(RichBranche,ligneClicBr,ClYellow); - selStart:=curseur; // remettre le curseur en position initiale - end; - end; - clicListe:=false; -end; - -procedure TFormConfig.ButtonVerifConfigClick(Sender: TObject); -var s : string; -begin - if verif_coherence then - begin - s:='La configuration est ok'; - labelResult.Caption:=s; - Affiche(s,clLime); - end - else - labelResult.Caption:='Erreur de cohérence'; -end; - -procedure TFormConfig.MemoCarreChange(Sender: TObject); -var s,sO: string; - j,erreur,adr,ligne,aspect : integer; - c : char; - dir : boolean; -begin - if (ligneClicSig<0) or clicListe then exit; - - if affevt then affiche('Evt MemoCarre change',clyellow); - j:=MemoCarre.Selstart; - clicMemo:=MemoCarre.Perform(EM_LINEFROMCHAR,j,0); // numéro de la ligne du curseur - aspect:=feux[ligneClicSig+1].aspect; - dir:=aspect>10; - - if dir and (clicMemo>aspect-10) then - begin - clicListe:=true; - LabelInfo.Caption:='Erreur '+intToSTR(aspect-9)+' conditions maxi pour un signal à '+intToSTR(aspect-10)+' directions'; - MemoCarre.Lines.Delete(clicMemo); - clicListe:=false; - exit; - end; - - if not(dir) and (clicMemo>5) then - begin - clicListe:=true; - LabelInfo.Caption:='Erreur 6 conditions maxi'; - MemoCarre.Lines.Delete(clicMemo); - clicListe:=false; - exit; - end; - - // signal directionnel - if dir then - begin - // boucle de ligne - for ligne:=1 to 6 do - begin - s:=MemoCarre.Lines[ligne-1]; - sO:=s; - // boucle de chaine - j:=1; - if s<>'' then - repeat - if s[1]<>'A' then begin LabelInfo.Caption:='Erreur manque A : '+sO;exit;end; - delete(s,1,1); - val(s,adr,erreur); // adresse - if adr=0 then exit; - c:=#0; - if erreur<>0 then c:=s[erreur]; // S ou D - if (c<>'D') and (c<>'S') then begin LabelInfo.Caption:='Erreur manque D ou S : '+sO;exit;end; - setlength(feux[ligneClicSig+1].AigDirection[ligne],j+1); // augmenter le tableau dynamique - feux[ligneClicSig+1].AigDirection[ligne][j].PosAig:=c; - feux[ligneClicSig+1].AigDirection[ligne][j].Adresse:=adr; - delete(s,1,erreur); // supprime jusque D - if length(s)<>0 then if s[1]=',' then delete(s,1,1); - inc(j); - until s='' - else - setlength(feux[ligneClicSig+1].AigDirection[ligne],0); - end; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - end - - else - // signal normal - begin - // boucle de ligne - for ligne:=1 to 6 do - begin - s:=MemoCarre.Lines[ligne-1]; - sO:=s; - j:=1; - if s<>'' then - repeat - if s[1]<>'A' then begin LabelInfo.Caption:='Erreur manque A : '+sO;exit;end; - delete(s,1,1); - val(s,adr,erreur); // adresse - if adr=0 then exit; - c:=#0; - if erreur<>0 then c:=s[erreur]; // S ou D - if (c<>'D') and (c<>'S') then begin LabelInfo.Caption:='Erreur manque D ou S : '+sO;exit;end; - setlength(feux[ligneClicSig+1].condCarre[ligne],j+1); - feux[ligneClicSig+1].condCarre[ligne][j].PosAig:=c; - feux[ligneClicSig+1].condCarre[ligne][j].Adresse:=adr; - delete(s,1,erreur); // supprime jusque D - if length(s)<>0 then if s[1]=',' then delete(s,1,1); - inc(j); - until s='' - else - setlength(feux[ligneClicSig+1].condCarre[ligne],0); - end; - end; - - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - LabelInfo.Caption:=''; -end; - - -procedure TFormConfig.EditAigTripleChange(Sender: TObject); - var s : string; - i,erreur,index : integer; - model: TEquipement; -begin - if clicliste then exit; - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=EditAigTriple.Text; - Val(s,i,erreur); - index:=ligneclicAig+1; - if index=0 then exit; - - model:=aiguillage[index].modele; - if (model=triple) then - begin - if (erreur<>0) then begin LabelInfo.caption:='Erreur adresse aiguillage ';exit;end; - // vérifier si l'adresse de l'aiguillage existe déja - if (aiguillage[Index_Aig(i)].modele<>rien) then - begin - LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ; - EditAigTriple.Color:=clred; - exit; - end ; - if i=0 then EditAigTriple.Color:=clred else EditAigTriple.Color:=clWindow; - LabelInfo.caption:=''; - - aiguillage[index].AdrTriple:=i; - aiguillage[index].modifie:=true; - s:=encode_aig(index); - formconfig.RichAig.Lines[ligneclicAig]:=s; - end; - end; -end; - -procedure TFormConfig.ComboBoxDDChange(Sender: TObject); -var s: string; - i,pos: integer; -begin - if clicliste or (ligneclicAig<0) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - - i:=ComboBoxDD.ItemIndex; - case i of - 0 : pos:=const_devie; - 1 : pos:=const_droit; - 2 : pos:=const_inconnu; - end; - - aiguillage[ligneclicAig+1].PosInit:=pos; - aiguillage[ligneclicAig+1].modifie:=true; - s:=encode_aig(ligneclicAig+1); - RichAig.lines[ligneclicAig]:=s; - end; -end; - -procedure TFormConfig.EditTempo10Change(Sender: TObject); -var s : string; - i,erreur : integer; -begin - if clicliste or (ligneclicAig<0) then exit; - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - with Formconfig do - begin - s:=EditTempo10.Text; - Val(s,i,erreur); - if (i>0) and (i<50) then - begin - LabelInfo.caption:=''; - aiguillage[ligneclicAig+1].temps:=i; - aiguillage[ligneclicAig+1].modifie:=true; - s:=encode_aig(ligneclicAig+1); - RichAig.lines[ligneclicAig]:=s; - end ; - end; -end; - -procedure TFormConfig.CheckInvInitClick(Sender: TObject); -var adrAig,erreur : integer; - s : string; -begin - // récupérer l'adresse de l'aiguillage cliqué - if clicliste or (ligneclicAig<0) then exit; - if affevt then affiche('Evt change InvInit',clyellow); - s:=formconfig.RichAig.Lines[ligneclicAig]; - Val(s,adrAig,erreur); - // réencoder la ligne - s:=encode_aig(Index_Aig(AdrAig)); - formconfig.RichAig.Lines[ligneclicAig]:=s; -end; - -procedure TFormConfig.EditV4FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V4valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditV4F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV4F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 4 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].ActFerme:=act; - V4valide:=(EditV4O.text<>'') and (EditV4F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V4Valide and (NbVoies<=3) then tablo_PN[i].NbVoies:=4; - if not(V4Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditV4OChange(Sender: TObject); -var s : string; - i,act,erreur,NbVoies : integer; - V4valide : boolean; -begin - if clicliste or (lignecliqueePN<0) then exit; - if affevt then affiche('Evt EditV4O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditV4O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse actionneur voie 4 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].ActOuvre:=act; - V4valide:=(EditV4O.text<>'') and (EditV4F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V4Valide and (NbVoies<=3) then tablo_PN[i].NbVoies:=4; - if not(V4Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditLChange(Sender: TObject); -var s : string; - i, erreur :integer; -begin - if clicliste or (ligneclicAig<0) then exit; - if affevt then affiche('Evt EditL Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then - begin - s:=EditL.Text; - if s='' then exit; - val(s,i,erreur); - if erreur<>0 then - if (s[erreur]<>'S') and (s[erreur]<>'D') then - begin - LabelInfo.caption:='Erreur Champ L manque D ou S';exit - end - else LabelInfo.caption:=''; - aiguillage[ligneclicAig+1].tjsint:=i; - aiguillage[ligneclicAig+1].tjsintb:=s[erreur]; - s:=encode_aig(ligneclicAig+1); - RichAig.Lines[ligneclicAig]:=s; - end; -end; - -procedure TFormConfig.Button2Click(Sender: TObject); -begin - close; -end; - -procedure TFormConfig.FormClose(Sender: TObject; var Action: TCloseAction); -var index : integer; - ok : boolean; -begin - if modif_branches then - begin - if MessageDlg('Les branches ont été modifiées mais non validées. Voulez fermer la fenêtre ?',mtConfirmation,[mbYes,mbNo],0)=mrNo then - begin - action:=tCloseAction(caNone); - exit; - end; - end; - modif_branches:=false; - - for index:=1 to NbreFeux do - begin - // créer les nouveau checkBox de feux blancs si de nouveaux ont été cochés - if feux[index].FeuBlanc and (feux[index].checkFB=nil) then - begin - feux[index].CheckFB:=TCheckBox.create(Formprinc.ScrollBox1); // crée le handle - with Feux[index].CheckFB do - begin - onClick:=formprinc.proc_checkBoxFB; // affecter l'adresse de la procédure de traitement quand on clique dessus - Hint:=intToSTR(index); - caption:='dem FB'; - Parent:=Formprinc.ScrollBox1; - width:=100;height:=15; - Top:=HtImg+15+((HtImg+EspY+20)*((index-1) div NbreImagePLigne)); - Left:=10+ (LargImg+5)*((index-1) mod (NbreImagePLigne)); - BringToFront; - end; - end; - // supprimer les checkBox de feux blancs si ils ont été décochés - if not(feux[index].FeuBlanc) and (feux[index].checkFB<>nil) then - begin - Feux[index].CheckFB.free; - Feux[index].CheckFB:=nil; - end; - end; - - ok:=verifie_panneau_config; - - if not(ok) then action:=tCloseAction(caNone); // si la config est nok, on ferme pas la fenetre - -end; - -procedure TFormConfig.ButtonConfigSRClick(Sender: TObject); -var decodeur : integer; -begin - clicListe:=true; - decodeur:=feux[ligneClicSig+1].decodeur; - if decodeur=7 then // SR - begin - formSR.showmodal; - formSR.close; - end; - if (decodeur=2) or (decodeur=5) then // cdf ou digikeijs - begin - formCDF.showmodal; - formCDF.close; - end; - clicListe:=false; -end; - -procedure TFormConfig.PageControlChange(Sender: TObject); -begin - Label20.Visible:=false; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then label40.Visible:=true - else label40.Visible:=false; -end; - - -procedure TFormConfig.SpeedButtonJoueClick(Sender: TObject); -begin - if PlaySound(pchar(EditSon.Text),0,SND_ASYNC)=false then - labelInfo.Caption:='Erreur'; - -end; - - -procedure TFormConfig.ButtonTestActClick(Sender: TObject); -Var Adr,adr2,erreur,etat : integer; -begin - etat:=0; - val(EditEtatActionneur.Text,Etat,erreur); - val(EditAct.Text,Adr,erreur); - val(EditAct2.Text,Adr2,erreur); - if erreur=0 then - begin - Event_act(adr,adr2,etat,''); - end; -end; - -procedure TFormConfig.RadioButtonActDetClick(Sender: TObject); -var i,champ,erreur : integer; - s : string; -begin - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioBoutonActDet '+IntToSTR(i),clyellow); - Tablo_Actionneur[i].typdeclenche:=0; - LabelActionneur.Caption:='Actionneur DétecteurZ'; - editAct2.Visible:=false; - EditTrainDecl.Visible:=true; - LabelTrain.Visible:=true; - - Tablo_Actionneur[i].trainDecl:=trainSauve; - EditTrainDecl.Text:=trainSauve; - - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - Tablo_actionneur[i].trainDecl:=EditTrainDecl.Text; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; - -end; - - -procedure TFormConfig.RadioButtonZonesClick(Sender: TObject); -var i,champ,erreur : integer; - s : string; -begin - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioBoutonZones '+IntToSTR(i),clyellow); - Tablo_Actionneur[i].typdeclenche:=1; - LabelActionneur.Caption:='Mémoire de Zone'; - EditTrainDecl.Visible:=false; - LabelTrain.Visible:=false; - editAct2.Visible:=true; - //editact.Text:=intToSTR(Tablo_actionneur[i].adresse2); - - Tablo_actionneur[i].trainDecl:='X'; - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; -end; - -procedure TFormConfig.RadioButtonAigClick(Sender: TObject); -var i,champ,erreur : integer; - s : string; -begin - if clicListe then exit; - i:=ligneClicAct+1; - if AffEvt then Affiche('RadioBoutonAig '+IntToSTR(i),clyellow); - Tablo_Actionneur[i].typdeclenche:=2; - LabelActionneur.Caption:='Aiguillage'; - EditTrainDecl.Visible:=false; - LabelTrain.Visible:=false; - editAct2.Visible:=false; - //editact.Text:=intToSTR(Tablo_actionneur[i].adresse2); - - Tablo_actionneur[i].trainDecl:='X'; - val(editact.Text,champ,erreur); - Tablo_actionneur[i].adresse:=champ ; - val(editEtatActionneur.Text,champ,erreur); - Tablo_actionneur[i].etat:=champ; - val(editFonctionAccess.Text,champ,erreur); - Tablo_actionneur[i].fonction:=champ; - val(editEtatFoncSortie.Text,champ,erreur); - Tablo_actionneur[i].sortie:=champ; - val(editTempo.Text,champ,erreur); - Tablo_actionneur[i].tempo:=champ; - tablo_actionneur[i].Raz:=checkRaz.checked; - s:=encode_act_loc_son(i); - RichAct.Lines[ligneClicAct]:=s; -end; - - -procedure TFormConfig.SpeedButtonChargerClick(Sender: TObject); -var s: string; -begin - s:=GetCurrentDir; - OpenDialogSon.InitialDir:=s; - OpenDialogSon.DefaultExt:='wav'; - OpenDialogSon.Title:='Ouvrir un fichier son'; - OpenDialogSon.Filter:='Fichiers wav (*.wav)|*.wav|Tous fichiers (*.*)|*.*'; - if openDialogSon.Execute then - begin - s:=openDialogSon.FileName; - editson.Text:=s; - end; -end; - -procedure TFormConfig.RichBrancheKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -var lc,curseur,i : integer; -begin - modif_branches:=true; - if ord(Key)=VK_UP then - begin - if clicListe then exit; - clicListe:=true; - if affevt then affiche('Evt RichBranche keydown',clyellow); - with Formconfig.RichBranche do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if lc>0 then - begin - dec(lc); - if lines[lc]<>'' then LabelNumBranche.Caption:='Branche n°'+intToSTR(lc+1) else LabelNumBranche.Caption:=''; - AncligneClicBr:=ligneClicBr; - ligneClicBr:=lc; - curseur:=SelStart; // position initiale du curseur - if AncligneClicBr<>ligneClicBr then - begin - if AncligneClicBr<>-1 then - begin - RE_ColorLine(RichBranche,AncligneClicBr,ClAqua); - end; - RE_ColorLine(RichBranche,ligneClicBr,ClYellow); - selStart:=curseur; // remettre le curseur en position initiale - end; - end; - end; - end; - - if ord(Key)=VK_DOWN then - begin - if clicListe then exit; - clicListe:=true; - if affevt then affiche('Evt RichBranche keydown',clyellow); - with Formconfig.RichBranche do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if lcligneClicBr then - begin - if AncligneClicBr<>-1 then - begin - RE_ColorLine(RichBranche,AncligneClicBr,ClAqua); - end; - RE_ColorLine(RichBranche,ligneClicBr,ClYellow); - selStart:=curseur; // remettre le curseur en position initiale - end; - end; - end; - end; - clicListe:=false; -end; - - -procedure TFormConfig.RichAigKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if key=VK_delete then supprime_aig; -end; - -procedure TFormConfig.RichSigKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -begin - if key=VK_delete then supprime_sig; -end; - -procedure TFormConfig.ButtonEnregistreClick(Sender: TObject); -var ok: boolean; -begin - ok:=verifie_panneau_config; - if ok then Sauve_config; -end; - - -procedure TFormConfig.EditZdet1V1FChange(Sender: TObject); -var s : string; - det,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V1F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V1F.Text; - Val(s,det,erreur); - if (erreur<>0) then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 1 ferme';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].DetZ1F:=det; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V1FChange(Sender: TObject); -var s : string; - det,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V1F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V1F.Text; - Val(s,det,erreur); - if (erreur<>0) then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 1 ferme';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].DetZ2F:=det; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet1V1OChange(Sender: TObject); -var s : string; - det,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V1O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V1O.Text; - Val(s,det,erreur); - if (erreur<>0) then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 1 ouvre';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].DetZ1O:=det; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V1OChange(Sender: TObject); -var s : string; - det,erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V1O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V1O.Text; - Val(s,det,erreur); - if (erreur<>0) then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 1 ouvre';exit - end else LabelInfo.caption:=' '; - tablo_PN[lignecliqueePN+1].voie[1].DetZ2O:=det; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet1V2FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V2F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V2F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 2 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].detZ1F:=act; - V2valide:=(EditZdet1V2F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V2FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V2F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V2F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 2 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].detZ2F:=act; - V2valide:=(EditZdet2V2F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet1V2OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V2O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V2O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 2 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].detZ1O:=act; - V2valide:=(EditZdet1V2O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V2OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V2F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V2O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 2 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[2].detZ2O:=act; - V2valide:=(EditZdet2V2O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=1) then tablo_PN[i].NbVoies:=2; - if not(V2Valide) then tablo_PN[i].NbVoies:=1; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; - -end; - -procedure TFormConfig.EditZdet1V3FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V3F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V3F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 3 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].detZ1F:=act; - V2valide:=(EditZdet1V3F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V2Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V3FChange(Sender: TObject); - var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V3F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V3F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 3 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].detZ2F:=act; - V2valide:=(EditZdet2V3F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V2Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet1V3OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V3O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V3O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 3 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].detZ1O:=act; - V2valide:=(EditZdet1V3O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V2Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; - -end; - -procedure TFormConfig.EditZdet2V3OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V3O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V3O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 3 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[3].detZ2O:=act; - V2valide:=(EditZdet2V3O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=2) then tablo_PN[i].NbVoies:=3; - if not(V2Valide) then tablo_PN[i].NbVoies:=2; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; - -end; - -procedure TFormConfig.EditZdet1V4FChange(Sender: TObject); - var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V4F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V4F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 4 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].detZ1F:=act; - V2valide:=(EditZdet1V4F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=3) then tablo_PN[i].NbVoies:=4; - if not(V2Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet2V4FChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V4F Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V4F.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 4 ferme';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].detZ2F:=act; - V2valide:=(EditZdet2V4F.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=3) then tablo_PN[i].NbVoies:=4; - if not(V2Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.EditZdet1V4OChange(Sender: TObject); -var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet1V4O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet1V4O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 4 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].detZ1O:=act; - V2valide:=(EditZdet1V4O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=3) then tablo_PN[i].NbVoies:=4; - if not(V2Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; - -end; - -procedure TFormConfig.EditZdet2V4OChange(Sender: TObject); - var s : string; - act,erreur,NbVoies,i : integer; - V2valide : boolean; -begin - if clicliste then exit; - if affevt then affiche('Evt EditZdet2V4O Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - s:=EditZdet2V4O.Text; - Val(s,act,erreur); - if (erreur<>0) and (s<>'') then - begin - LabelInfo.caption:='Erreur adresse détecteur voie 3 ouvre';exit - end else LabelInfo.caption:=' '; - i:=lignecliqueePN+1; - tablo_PN[i].voie[4].detZ2O:=act; - V2valide:=(EditZdet2V4O.text<>''); - NbVoies:=tablo_PN[i].NbVoies; - if V2Valide and (NbVoies=3) then tablo_PN[i].NbVoies:=4; - if not(V2Valide) then tablo_PN[i].NbVoies:=3; - s:=encode_act_PN(i); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.Button1Click(Sender: TObject); -var adr,cmd,erreur : integer; - ts : Taccessoire; -begin - val(editAdrFerme.Text,adr,erreur);if erreur<>0 then exit; - val(editCmdFerme.Text,cmd,erreur);if erreur<>0 then exit; - if ligneCliqueePN=-1 then exit; - aff_acc:=true; - if Tablo_PN[ligneCliqueePN+1].pulse=1 then ts:=aigP else ts:=feu; - pilote_acc(adr,cmd,ts); - aff_acc:=false; -end; - -procedure TFormConfig.Button3Click(Sender: TObject); -var adr,cmd,erreur : integer; - ts : Taccessoire; -begin - val(editAdrOuvre.Text,adr,erreur);if erreur<>0 then exit; - val(editCdeOuvre.Text,cmd,erreur);if erreur<>0 then exit; - if ligneCliqueePN=-1 then exit; - aff_acc:=true; - if Tablo_PN[ligneCliqueePN+1].pulse=1 then ts:=aigP else ts:=feu; - pilote_acc(adr,cmd,ts); - aff_acc:=false; -end; - -procedure TFormConfig.CheckPnPulseClick(Sender: TObject); -var i : integer; - s : string; -begin - if clicliste then exit; - if affevt then affiche('Evt CheckPnPulse Change',clyellow); - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then - with Formconfig do - begin - if CheckPnPulse.Checked then i:=1 else i:=0; - tablo_PN[lignecliqueePN+1].Pulse:=i; - s:=encode_act_PN(lignecliqueePN+1); - RichPN.Lines[lignecliqueePN]:=s; - end; -end; - -procedure TFormConfig.CheckFVCClick(Sender: TObject); -var s : string; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt FVC',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - begin - feux[ligneClicSig+1].checkFV:=checkFVC.Checked; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.CheckFRCClick(Sender: TObject); -var s : string; -begin - if clicliste or (ligneClicSig<0) then exit; - if affevt then Affiche('Evt FRC',clOrange); - - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then - begin - feux[ligneClicSig+1].checkFR:=checkFRC.Checked; - s:=encode_sig_feux(ligneClicSig+1); - RichSig.Lines[ligneClicSig]:=s; - feux[ligneClicSig+1].modifie:=true; - end; -end; - -procedure TFormConfig.ButtonEnvClick(Sender: TObject); -begin - init_dccpp; -end; - -procedure TFormConfig.EditBaseChange(Sender: TObject); -var erreur : integer; -begin - val(EditBase.Text,AdrBaseDetDccpp,erreur); - if (AdrBaseDetDccpp<0) or (AdrBaseDetDccpp>2048) then - begin - AdrBaseDetDccpp:=513; - EditBase.Text:='513'; - end; -end; - -procedure TFormConfig.RichCdeDccppChange(Sender: TObject); -var i,maxi : integer; -begin - maxi:=RichCdeDCCpp.Lines.count; - if maxi>MaxCdeDccpp then maxi:=MaxCdeDccpp; - for i:=1 to maxi do - begin - CdeDccpp[i]:=RichCdeDccpp.Lines[i-1]; - end; -end; - -procedure TFormConfig.CheckEnvAigDccppClick(Sender: TObject); -begin - if CheckEnvAigDccpp.checked then EnvAigDccpp:=1 else EnvAigDccpp:=0; -end; - -procedure clicListeTrains(index : integer); -begin - with formconfig do - begin - editNomTrain.text:=Trains[index].nom_train; - editAdresseTrain.Text:=intToSTR(trains[index].adresse); - editVitesseMaxi.Text:=intToSTR(trains[index].vitmax); - editVitRalenti.Text:=IntToSTR(trains[index].Vitralenti); - editvitnom.text:=IntToSTR(trains[index].VitNominale); - end; -end; - -procedure TFormConfig.RichEditTrainsMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var j : integer; - s : string; -begin - //affiche('RichEditTrainChange',clyellow); - clicListe:=true; - with richeditTrains do - begin - j:=Selstart; - RE_ColorLine(Formconfig.richeditTrains,clicListeTrain,ClAqua); - clicListeTrain:=Perform(EM_LINEFROMCHAR,j,0); // numéro de la lignée cliquée - end; - - //Affiche(intToSTR(lc),clyellow); - - if clicListeTrain+1>Max_Trains then - begin - ligneclicAig:=Max_Trains-1; - end; - s:=RichEditTrains.Lines[clicListeTrain]; - if s='' then exit; - - RE_ColorLine(Formconfig.richeditTrains,clicListeTrain,ClYellow); - - clicListeTrains(clicListeTrain+1); - - clicliste:=false; -end; - - -procedure TFormConfig.EditNomTrainChange(Sender: TObject); -var i : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt change nom train',clyellow); - if (clicListeTrain<0) or (clicListeTrain>=Max_Trains) or (ntrains<1) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetTrains then - RE_ColorLine(RichEditTrains,clicListeTrain,ClYellow); - trains[clicListeTrain+1].Nom_train:=EditNomTrain.text; - RichEditTrains.Lines[clicListeTrain]:=Train_tablo(clicListeTrain+1); - - i:=formprinc.ComboTrains.ItemIndex; - if i<0 then exit; - formprinc.ComboTrains.Items[clicListeTrain]:=EditNomTrain.text; - if i=clicListeTrain then formprinc.ComboTrains.Text:=EditNomTrain.text; - -end; - -procedure TFormConfig.EditAdresseTrainChange(Sender: TObject); -var erreur :integer; -begin - if clicliste then exit; - if affevt then affiche('Evt change adresse train',clyellow); - if (clicListeTrain<0) or (clicListeTrain>=Max_Trains) or (ntrains<1) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetTrains then - RE_ColorLine(RichEditTrains,clicListeTrain,ClYellow); - val(EditAdresseTrain.text,trains[clicListeTrain+1].adresse,erreur); - formconfig.RichEditTrains.Lines[clicListeTrain]:=Train_tablo(clicListeTrain+1); -end; - -procedure TFormConfig.EditVitesseMaxiChange(Sender: TObject); -var erreur :integer; -begin - if clicliste then exit; - if affevt then affiche('Evt change adresse train',clyellow); - if (clicListeTrain<0) or (clicListeTrain>=Max_Trains) or (ntrains<1) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetTrains then - RE_ColorLine(RichEditTrains,clicListeTrain,ClYellow); - val(EditVitesseMaxi.text,trains[clicListeTrain+1].vitmax,erreur); - formconfig.RichEditTrains.Lines[clicListeTrain]:=Train_tablo(clicListeTrain+1); -end; - -procedure TFormConfig.EditVitNomChange(Sender: TObject); - var erreur : integer; -begin - if clicliste then exit; - if affevt then affiche('Evt change vitesse nominale train',clyellow); - if (clicListeTrain<0) or (clicListeTrain>=Max_Trains) or (ntrains<1) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetTrains then - with Formconfig do - begin - RE_ColorLine(RichEditTrains,clicListeTrain,ClYellow); - val(EditVitNom.text,trains[clicListeTrain+1].vitNominale,erreur); - formconfig.RichEditTrains.Lines[clicListeTrain]:=Train_tablo(clicListeTrain+1); - end; -end; - - procedure TFormConfig.EditVitRalentiChange(Sender: TObject); - var erreur : integer; - begin - if clicliste then exit; - if affevt then affiche('Evt change vitesse ralenti train',clyellow); - if (clicListeTrain<0) or (clicListeTrain>=Max_Trains) then exit; - if FormConfig.PageControl.ActivePage=FormConfig.TabSheetTrains then - with Formconfig do - begin - RE_ColorLine(RichEditTrains,clicListeTrain,ClYellow); - val(EditVitRalenti.text,trains[clicListeTrain+1].vitRalenti,erreur); - formconfig.RichEditTrains.Lines[clicListeTrain]:=Train_tablo(clicListeTrain+1); - end; -end; - -procedure TFormConfig.ButtonNTClick(Sender: TObject); -var j : integer; -begin - if nTrains>=Max_Trains then exit; - clicListe:=true; - inc(nTrains); - trains[ntrains].nom_train:='train'; - trains[ntrains].adresse:=99; - trains[ntrains].VitNominale:=60; - trains[ntrains].VitRalenti:=40; - trains[ntrains].vitmax:=120; - clicListeTrains(ntrains); - j:=richEditTrains.Selstart; - RE_ColorLine(Formconfig.richeditTrains,clicListeTrain,ClAqua); - clicListeTrain:=ntrains-1; - RE_ColorLine(Formconfig.richeditTrains,clicListeTrain,ClYellow); - formconfig.RichEditTrains.Lines.Add(Train_tablo(ntrains)); - clicListe:=false; -end; - -// supprime le ou les train sélectionnés dans le richEdit -procedure supprime_train; -var ligneDeb,LigneFin,i,index,debut,longueur,fin,l,ltot : integer; - s : string; -begin - //trouver ligne de début et de fin sélectionner. - with formConfig do - begin - debut:=RichEditTrains.SelStart; - longueur:=RichEditTrains.SelLength; - end; - fin:=debut+longueur; - //Affiche(inttostr(debut)+' '+inttostr(longueur),clyellow); - // trouver les lignes sélectionnées - i:=0;ltot:=0;ligneDeb:=0;LigneFin:=0; - repeat - l:=length(FormConfig.RichEditTrains.lines[i])+2; //+2 car CR LF - ltot:=ltot+l; - if (debut=fin) and (ligneFin=0) and (ligneDeb<>0) then ligneFin:=i+1; - //if (ltot=fin) and (ligneFin=0) then ligneFin:=i; - inc(i); - until (i>=ntrains) or (ligneFin>0); - if lignefin=0 then if fin>ltot then ligneFin:=clicListeTrain; - //Affiche(inttostr(Ltot)+' '+inttostr(Fin),clyellow); - - - i:=clicListeTrain; - if (i<0) then exit; - index:=i+1; // passe en index tableau - - if ligneDeb=LigneFin then s:='Voulez-vous supprimer le train '+trains[index].nom_train+'?' - else s:='Voulez-vous supprimer les trains de '+ - trains[index].nom_train+' à '+trains[lignefin].nom_train+' ?'; - - if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; - - //FormConfig.ButtonAjSup.Caption:='Ajouter l''aig '+intToSTR(aiguillage[index].adresse)+' supprimé'; - clicliste:=true; - //raz_champs_aig; - //Aig_supprime:=aiguillage[index]; // sauvegarde le supprimé - //Aig_sauve.adresse:=0; // dévalider sa définition - - index:=ligneDeb; - - if ligneDeb=LigneFin then s:='Suppression du train '+trains[index].nom_train - else s:='Suppression des trains de '+ - trains[ligneDeb].nom_train+' à '+trains[ligneFin].nom_train; - Affiche(s,clOrange); - - //Affiche('Boucle de '+intToSTR(ligneDeb)+' N='+intToSTR(MaxAiguillage-ligneFin),clyellow); - - for i:=1 to ntrains-ligneFin do - begin - index:=i+lignefin; //index de l'aiguillage de remplacement - //Affiche('Suppresion aiguillage '+intToSTR(aiguillage[i+lignedeb].Adresse),clorange); - //Affiche('remplacement par index '+intToSTR(index),clorange); - - trains[lignedeb+i-1]:=trains[index]; - trains[index].Adresse:=0; - trains[index].nom_train:=''; - trains[index].vitmax:=0; - end; - ntrains:=ntrains-(ligneFin-LigneDeb)-1; - - config_modifie:=true; - FormConfig.RichEdittrains.Clear; - - // réafficher le richsig - for i:=1 to ntrains do - begin - s:=trains[i].nom_train+','+inttostr(trains[i].adresse)+','+intToSTR(trains[i].vitmax); - if s<>'' then - begin - FormConfig.RicheditTrains.Lines.Add(s); - RE_ColorLine(FormConfig.RicheditTrains,FormConfig.RicheditTrains.lines.count-1,ClAqua); - end; - end; - With FormConfig.RicheditTrains do - begin - SelStart:=0; - Perform(EM_SCROLLCARET,0,0); - end; - clicListeTrain:=-1; - clicliste:=false; -end; - - -procedure TFormConfig.ButtonSupprimeClick(Sender: TObject); -begin - supprime_train; -end; - - - - - - - -end. - - diff --git a/UnitConfig.dcu b/UnitConfig.dcu index 98755f7..d695338 100644 Binary files a/UnitConfig.dcu and b/UnitConfig.dcu differ diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 93e09e7..decce34 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1570,7 +1570,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 505 - ActivePage = TabSheetAct + ActivePage = TabSheetCDM Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -1799,7 +1799,7 @@ object FormConfig: TFormConfig Left = 312 Top = 184 Width = 281 - Height = 113 + Height = 89 Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ' TabOrder = 3 object RadioButton13: TRadioButton @@ -1819,25 +1819,25 @@ object FormConfig: TFormConfig TabOrder = 1 end object RadioButton15: TRadioButton - Left = 8 - Top = 56 - Width = 217 + Left = 152 + Top = 40 + Width = 105 Height = 17 Caption = 'LI-101F' TabOrder = 2 end object RadioButton16: TRadioButton Left = 8 - Top = 72 - Width = 217 + Top = 56 + Width = 89 Height = 17 Caption = 'LI-100F' TabOrder = 3 end object RadioButton17: TRadioButton - Left = 8 - Top = 88 - Width = 209 + Left = 152 + Top = 56 + Width = 89 Height = 17 Caption = 'LI-100' TabOrder = 4 @@ -1908,9 +1908,9 @@ object FormConfig: TFormConfig end object GroupBox15: TGroupBox Left = 312 - Top = 304 + Top = 288 Width = 281 - Height = 137 + Height = 121 Caption = 'Divers' TabOrder = 5 object Label31: TLabel @@ -1980,7 +1980,7 @@ object FormConfig: TFormConfig Height = 21 Hint = 'Mode d'#233'bug au d'#233'marrage (0=sans ; 1=Log d'#233'marrage ; 2=D'#233'marrage ' + - 'par '#233'tape)' + 'par '#233'tape ; 3=Dynamique)' ParentShowHint = False ShowHint = True TabOrder = 3 @@ -2211,7 +2211,7 @@ object FormConfig: TFormConfig Width = 257 Height = 25 Hint = 'Initialisation des aiguillages au d'#233'marrage' - Caption = 'Initialisation des aiguillages ' + Caption = 'Initialiser les aiguillages en position initiale' ParentShowHint = False ShowHint = True TabOrder = 0 @@ -2263,7 +2263,10 @@ object FormConfig: TFormConfig Top = 120 Width = 169 Height = 17 + Hint = 'Permet le roulage des trains en mode autonome' Caption = 'Option roulage des trains' + ParentShowHint = False + ShowHint = True TabOrder = 5 end end @@ -3044,7 +3047,7 @@ object FormConfig: TFormConfig Width = 129 Height = 21 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 TabOrder = 1 OnChange = ComboBoxDecChange end diff --git a/UnitConfig.pas b/UnitConfig.pas index 28a7801..7e9443a 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -466,9 +466,10 @@ type end; const -// variables du fichier de configuration +// constantes du fichier de configuration NomConfig='ConfigGenerale.cfg'; Debug_ch='Debug'; +Algo_localisation_ch='Algo_localisation'; Avec_roulage_ch='Avec_roulage'; nb_det_dist_ch='nb_det_dist'; IpV4_PC_ch='IpV4_PC'; @@ -519,9 +520,10 @@ var portCDM,TempoOctet,TimoutMaxInterface,Valeur_entete,PortInterface,prot_serie,NumPort,debug, LigneCliqueePN,AncLigneCliqueePN,clicMemo,Nb_cantons_Sig,protocole,Port,clicListeTrain, ligneclicAig,AncLigneClicAig,ligneClicSig,AncligneClicSig,EnvAigDccpp,AdrBaseDetDccpp, - ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Adressefeuclic,NumTrameCDM : integer; + ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Adressefeuclic,NumTrameCDM, + Algo_localisation : integer; - ack_cdm,clicliste,affevt,config_modifie,clicproprietes,confasauver,trouve_MaxPort, + ack_cdm,clicliste,config_modifie,clicproprietes,confasauver,trouve_MaxPort, modif_branches,ConfigPrete,trouve_section_dccpp,trouve_section_trains : boolean; fichier : text; @@ -544,7 +546,7 @@ uses UnitDebug,UnitTCO, UnitSR, UnitCDF; {$R *.dfm} -// envoi d'une chaîne à CDM par socket, puis attend l'ack ou le nack +// envoi d'une chaîne Com_IPC à CDM par socket, puis attend l'ack ou le nack function envoi_CDM(s : string) : boolean; var temps : integer; begin @@ -581,9 +583,9 @@ begin // ne pas supprimer le @ espace et = qui sert de marqueur pour identifier le feu s:='@='+inttostr(feux[i].Adresse)+' Decodeur='+intToSTR(feux[i].Decodeur)+' Adresse détecteur associé='+intToSTR(feux[i].Adr_det1)+ ' Adresse élement suivant='+intToSTR(feux[i].Adr_el_suiv1); - if feux[i].Btype_suiv1=aig then s:=s+' (aig)'; + if feux[i].Btype_suiv1=aig then s:=s+' (aig)'; feux[i].Img.Hint:=s; -end; +end; // demande les services Com-IP à CDM function services_CDM : boolean; @@ -663,9 +665,8 @@ begin Id_CDM:=copy(recuCDM,5,2); // récupère l'ID reçu de CDM, à utiliser dans toutes les futures trames recucdm:=''; s:='Connecté au serveur CDM rail avec l''ID='+Id_CDM; - + Affiche(s,clYellow); - AfficheDebug(s,clyellow); CDM_connecte:=true; // demande des services @@ -679,7 +680,7 @@ begin end; end; //else Affiche('CDM Rail non lancé',clOrange); - end + end else begin if adresseIPCDM='0' then Affiche('La connexion à CDM n''est pas demandée car l''adresse IP est nulle dans '+NomConfig,cyan); @@ -1377,6 +1378,7 @@ begin // entête // copie_commentaire; writeln(fichierN,'/ Fichier de configuration de signaux_complexes_GL'); + writeln(fichierN,Algo_localisation_ch+'=',Algo_localisation); writeln(fichierN,Avec_roulage_ch+'=',avecRoulage); writeln(fichierN,debug_ch+'=',debug); // taille de la fonte @@ -1554,7 +1556,12 @@ begin writeln(fichierN,'/------------'); writeln(fichierN,section_placement_ch); for i:=1 to 6 do - writeln(fichierN,placement[i].train,',',placement[i].detecteur); + begin + s:=placement[i].train+','+inttoSTR(placement[i].detecteur)+','; + s:=s+intToSTR(placement[i].detdir)+','; + if placement[i].inverse then s:=s+'1' else s:=s+'0'; + writeln(fichierN,s); + end; writeln(fichierN,'0'); closefile(fichierN); @@ -2303,6 +2310,14 @@ begin val(s,debug,erreur); end; + sa:=uppercase(Algo_localisation_ch)+'='; + i:=pos(sa,s); + if i=1 then + begin + delete(s,i,length(sa)); + val(s,Algo_localisation,erreur); + end; + sa:=uppercase(Avec_roulage_ch)+'='; i:=pos(sa,s); if i=1 then @@ -2396,7 +2411,7 @@ begin portcom:=s; end; - // temporisation entre 2 caractères + // temporisatflion entre 2 caractères sa:=uppercase(INTER_CAR_ch)+'='; i:=pos(sa,s); if i=1 then @@ -2718,8 +2733,22 @@ begin delete(s,1,j); val(s,j,erreur); placement[i].detecteur:=j; - inc(i); + j:=pos(',',s); + if j<>0 then + begin + delete(s,1,j); + val(s,j,erreur); + placement[i].detdir:=j; + j:=pos(',',s); + if j<>0 then + begin + delete(s,1,j); + val(s,j,erreur); + placement[i].inverse:=j=1; + end; + end; end; + inc(i); s:=''; end; until (s='0') or eof(fichier); @@ -2793,7 +2822,6 @@ begin end; //Affiche('Lecture du fichier de configuration '+NomConfig,clyellow); - {$I+} try assign(fichier,NomConfig); reset(fichier); @@ -2822,7 +2850,6 @@ begin assign(fichier,NomConfig); reset(fichier); end; - {$I-} lit_flux; close(fichier); @@ -2869,7 +2896,7 @@ begin if not(trouve_section_sig) then Affiche('Manque section '+section_sig_ch,clred); if not(trouve_section_branche) then Affiche('Manque section '+section_branches_ch,clred); verif_coherence; - formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal'; + end; @@ -2914,7 +2941,7 @@ begin TailleFonte:=i; val(EditDebug.text,i,erreur); - if (i<0) or (i>2) then i:=0; + if (i<0) or (i>3) then i:=0; Debug:=i; if checkRoulage.Checked then AvecRoulage:=1 else AvecRoulage:=0; @@ -2971,7 +2998,7 @@ begin if changeCDM then connecte_CDM; if changeInterface then begin - if AdresseIP<>'0' then + if (AdresseIP<>'0') and (adresseIP<>'') then begin Affiche('demande connexion à la centrale Lenz par Ethernet',clyellow); With Formprinc do @@ -3340,7 +3367,6 @@ end; procedure TFormConfig.FormCreate(Sender: TObject); begin - affevt:=false; // pour debug clicListe:=true; if affevt then affiche('FormConfig create',clLime); PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page @@ -3454,7 +3480,7 @@ begin Edit_HG.Visible:=true; EditAigTriple.Visible:=false; - Edit_HG.ReadOnly:=false; + Edit_HG.ReadOnly:=false; EditPointe_BG.ReadOnly:=false; EditDevie_HD.ReadOnly:=false; EditDroit_BD.ReadOnly:=false; @@ -4253,6 +4279,7 @@ var i,lc,adresse,erreur : integer; s : string; begin clicliste:=true; + // HideCaret(RichAig.Handle); raz_champs_aig; ComboBoxAig.ItemIndex:=-1; formconfig.ComboBoxDD.ItemIndex:=-1; @@ -5614,7 +5641,7 @@ begin feux[index]:=Feu_sauve; RichSig.Lines[ligneClicSig]:=encode_sig_feux(index); aff_champs_sig_feux(index); // réaffiche les champs - Maj_Hint_feu(index); + Maj_Hint_feu(index); // change l'image du feu dans la feuille graphique principale Feux[index].Img.picture.Bitmap:=Select_dessin_feu(feux[index].aspect); dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal @@ -6675,7 +6702,7 @@ begin end else begin - // vérifier si les deux détecteurs du signal sont consécutifs (l et i) + // vérifier si les deux détecteurs du signal sont contigüs (l et i) l:=feux[j].Adr_det1; trouve_detecteur(i); det1Br:=branche_trouve; @@ -6687,7 +6714,7 @@ begin if (det1Br<>Det2Br) or (abs(det1Index-det2Index)>1) then begin ok:=false; - Affiche('Erreur 9.12: signal '+intToSTR(feux[j].adresse)+' : détecteurs '+intToSTR(i)+' et '+intToSTR(l)+' non consécutifs ',clred); + Affiche('Erreur 9.12: signal '+intToSTR(feux[j].adresse)+' : détecteurs '+intToSTR(i)+' et '+intToSTR(l)+' non contigüs ',clred); end; end; end; @@ -6707,7 +6734,7 @@ begin if (aiguillage[k].ADroit<>l) and (aiguillage[k].ADevie<>l) and (aiguillage[k].APointe<>l) then begin ok:=false; - Affiche('Erreur 9.21: signal '+intToSTR(feux[j].adresse)+' : aiguillage '+intToSTR(i)+' et détecteur '+intToSTR(l)+' non consécutifs ',clred); + Affiche('Erreur 9.21: signal '+intToSTR(feux[j].adresse)+' : aiguillage '+intToSTR(i)+' et détecteur '+intToSTR(l)+' non contigüs ',clred); end; end; end; diff --git a/UnitConfigCellTCO.dcu b/UnitConfigCellTCO.dcu index ffa2977..291daa5 100644 Binary files a/UnitConfigCellTCO.dcu and b/UnitConfigCellTCO.dcu differ diff --git a/UnitConfigTCO.dcu b/UnitConfigTCO.dcu index 8ba9a7b..35986f3 100644 Binary files a/UnitConfigTCO.dcu and b/UnitConfigTCO.dcu differ diff --git a/UnitConfigTCO.pas b/UnitConfigTCO.pas index 6d1e19c..a0b1a2e 100644 --- a/UnitConfigTCO.pas +++ b/UnitConfigTCO.pas @@ -96,7 +96,7 @@ end; procedure dessine_icones; var r : Trect; - x1,y1,x2,jy1,jy2 : integer; + x1,x2,jy1,jy2 : integer; begin // 1 icone_aig; @@ -123,13 +123,13 @@ begin canvas.Pen.color:=fond; canvas.Brush.Color:=fond; canvas.Rectangle(0,0,Width,Height); - + canvas.Brush.Color:=clAllume; canvas.pen.color:=clAllume; canvas.Pen.Mode:=pmCopy; r:=Rect(1,(height div 2)-6,width-1,(height div 2)+6); canvas.FillRect(r); - + canvas.pen.color:=clVoies; canvas.brush.color:=clVoies; // bande horizontale @@ -137,13 +137,13 @@ begin canvas.FillRect(r); end; - // 5 canton + // 5 canton with formCOnfigTCO.Imagecanton do begin canvas.Pen.color:=fond; canvas.Brush.Color:=fond; canvas.Rectangle(0,0,Width,Height); - + canvas.pen.color:=clCanton; canvas.brush.color:=clCanton; // bande horizontale diff --git a/UnitDebug.dcu b/UnitDebug.dcu index ee85fdd..cc4e553 100644 Binary files a/UnitDebug.dcu and b/UnitDebug.dcu differ diff --git a/UnitDebug.dfm b/UnitDebug.dfm index 158f7e3..90392af 100644 --- a/UnitDebug.dfm +++ b/UnitDebug.dfm @@ -1,14 +1,11 @@ object FormDebug: TFormDebug Left = 306 Top = 21 - Width = 836 + Width = 856 Height = 721 - VertScrollBar.Position = 160 - VertScrollBar.Range = 850 + VertScrollBar.Position = 6 VertScrollBar.Smooth = True - VertScrollBar.Style = ssFlat VertScrollBar.Tracking = True - AutoScroll = False Caption = 'Fen'#234'tre de d'#233'bug' Color = clWindow TransparentColorValue = clTeal @@ -20,16 +17,17 @@ object FormDebug: TFormDebug KeyPreview = True OldCreateOrder = False Position = poMainFormCenter + OnActivate = FormActivate OnCreate = FormCreate OnKeyPress = FormKeyPress DesignSize = ( - 811 + 831 690) PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel - Left = 646 - Top = -156 + Left = 666 + Top = -2 Width = 108 Height = 13 Anchors = [akTop, akRight] @@ -44,8 +42,8 @@ object FormDebug: TFormDebug ParentFont = False end object Label2: TLabel - Left = 494 - Top = -158 + Left = 514 + Top = -4 Width = 131 Height = 18 Anchors = [akTop, akRight] @@ -58,8 +56,8 @@ object FormDebug: TFormDebug ParentFont = False end object EditNivDebug: TEdit - Left = 757 - Top = -158 + Left = 777 + Top = -4 Width = 49 Height = 21 Anchors = [akTop, akRight] @@ -73,72 +71,51 @@ object FormDebug: TFormDebug Text = 'EditNivDebug' OnKeyPress = EditNivDebugKeyPress end - object MemoEvtDet: TMemo - Left = 562 - Top = 176 - Width = 234 - Height = 187 - Anchors = [akTop, akRight] - Color = clBlack - Font.Charset = ANSI_CHARSET - Font.Color = clYellow - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - Lines.Strings = ( - 'Tableau des '#233'v'#232'nements ' - 'fronts descendants d'#233'tecteurs') - ParentFont = False - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 1 - OnChange = MemoEvtDetChange - end object ButtonEcrLog: TButton - Left = 453 - Top = 168 + Left = 441 + Top = 322 Width = 97 Height = 29 Anchors = [akTop, akRight] Caption = 'Sauvegarder le log' - TabOrder = 2 + TabOrder = 1 OnClick = ButtonEcrLogClick end object ButtonRazTampon: TButton - Left = 453 - Top = 200 + Left = 441 + Top = 354 Width = 97 Height = 33 Anchors = [akTop, akRight] Caption = 'Raz Tampon Ev'#232'nements ---->' - TabOrder = 3 + TabOrder = 2 WordWrap = True OnClick = ButtonRazTamponClick end object ButtonCherche: TButton - Left = 453 - Top = 136 + Left = 441 + Top = 290 Width = 97 Height = 25 Anchors = [akTop, akRight] Caption = 'Chercher erreurs' - TabOrder = 4 + TabOrder = 3 OnClick = ButtonChercheClick end object ButtonAffEvtChrono: TButton - Left = 453 - Top = 96 + Left = 441 + Top = 250 Width = 97 Height = 33 Anchors = [akTop, akRight] Caption = 'Affiche Evts d'#233'tecteurs et aig' - TabOrder = 5 + TabOrder = 4 WordWrap = True OnClick = ButtonAffEvtChronoClick end object ButtonCop: TButton - Left = 453 - Top = 48 + Left = 441 + Top = 202 Width = 97 Height = 41 Anchors = [akTop, akRight] @@ -149,14 +126,14 @@ object FormDebug: TFormDebug Font.Name = 'MS Sans Serif' Font.Style = [] ParentFont = False - TabOrder = 6 + TabOrder = 5 WordWrap = True OnClick = ButtonCopClick end object RichEdit: TRichEdit - Left = 562 - Top = 16 - Width = 234 + Left = 546 + Top = 170 + Width = 270 Height = 153 Anchors = [akTop, akRight] Font.Charset = DEFAULT_CHARSET @@ -169,24 +146,24 @@ object FormDebug: TFormDebug PopupMenu = PopupMenuRE ReadOnly = True ScrollBars = ssVertical - TabOrder = 7 + TabOrder = 6 OnChange = RichEditChange end object ButtonRazLog: TButton - Left = 453 - Top = 240 + Left = 441 + Top = 394 Width = 97 Height = 33 Anchors = [akTop, akRight] Caption = 'Raz Tampon Log <-----' - TabOrder = 8 + TabOrder = 7 WordWrap = True OnClick = ButtonRazLogClick end object GroupBox1: TGroupBox - Left = 451 - Top = 480 - Width = 345 + Left = 447 + Top = 634 + Width = 372 Height = 185 Anchors = [akTop, akRight] Caption = 'Fonctions primitives' @@ -198,16 +175,16 @@ object FormDebug: TFormDebug Font.Style = [] ParentColor = False ParentFont = False - TabOrder = 9 + TabOrder = 8 object GroupBox3: TGroupBox Left = 8 Top = 16 - Width = 329 + Width = 353 Height = 73 Caption = 'Signal' TabOrder = 0 object Label4: TLabel - Left = 281 + Left = 305 Top = 10 Width = 32 Height = 13 @@ -220,7 +197,7 @@ object FormDebug: TFormDebug ParentFont = False end object ButtonSigSuiv: TButton - Left = 8 + Left = 16 Top = 16 Width = 57 Height = 49 @@ -233,7 +210,7 @@ object FormDebug: TFormDebug OnClick = ButtonSigSuivClick end object ButtonCanSuivSig: TButton - Left = 64 + Left = 72 Top = 16 Width = 65 Height = 49 @@ -246,9 +223,9 @@ object FormDebug: TFormDebug OnClick = ButtonCanSuivSigClick end object EditSigSuiv: TEdit - Left = 280 + Left = 304 Top = 32 - Width = 41 + Width = 33 Height = 21 Hint = 'Indiquer l'#39'adresse du signal ' ParentShowHint = False @@ -256,7 +233,7 @@ object FormDebug: TFormDebug TabOrder = 2 end object ButtonCP: TButton - Left = 128 + Left = 136 Top = 16 Width = 81 Height = 49 @@ -266,7 +243,7 @@ object FormDebug: TFormDebug OnClick = ButtonCPClick end object Button2: TButton - Left = 208 + Left = 224 Top = 16 Width = 65 Height = 49 @@ -279,7 +256,7 @@ object FormDebug: TFormDebug object GroupBox4: TGroupBox Left = 8 Top = 96 - Width = 329 + Width = 345 Height = 81 Caption = 'D'#233'tecteur/'#233'l'#233'ment suivant' TabOrder = 1 @@ -332,9 +309,9 @@ object FormDebug: TFormDebug end end object GroupBox2: TGroupBox - Left = 459 - Top = -140 - Width = 333 + Left = 439 + Top = 14 + Width = 380 Height = 149 Anchors = [akTop, akRight] Caption = 'S'#233'lections d'#39'affichage' @@ -346,7 +323,7 @@ object FormDebug: TFormDebug Font.Style = [] ParentColor = False ParentFont = False - TabOrder = 10 + TabOrder = 9 object CheckAffSig: TCheckBox Left = 8 Top = 16 @@ -488,7 +465,7 @@ object FormDebug: TFormDebug OnClick = CheckBox1Click end object CheckDebugTCO: TCheckBox - Left = 200 + Left = 248 Top = 128 Width = 121 Height = 17 @@ -505,21 +482,21 @@ object FormDebug: TFormDebug end object RichDebug: TRichEdit Left = 8 - Top = -152 - Width = 435 + Top = 2 + Width = 419 Height = 788 Anchors = [akLeft, akTop, akRight] Lines.Strings = ( 'RichDebug') PopupMenu = PopupMenuRD ScrollBars = ssBoth - TabOrder = 11 + TabOrder = 10 OnChange = RichDebugChange end object GroupBox5: TGroupBox - Left = 451 - Top = 368 - Width = 345 + Left = 447 + Top = 522 + Width = 372 Height = 57 Anchors = [akTop, akRight] Caption = 'Simulation d'#233'tecteur / actionneur' @@ -531,7 +508,7 @@ object FormDebug: TFormDebug Font.Style = [] ParentColor = False ParentFont = False - TabOrder = 12 + TabOrder = 11 object EditSimuDet: TEdit Left = 16 Top = 24 @@ -543,9 +520,9 @@ object FormDebug: TFormDebug TabOrder = 0 end object ButtonSimuDet0: TButton - Left = 56 + Left = 72 Top = 16 - Width = 57 + Width = 65 Height = 33 Caption = 'D'#233'tecteur '#224' 0' TabOrder = 1 @@ -553,9 +530,9 @@ object FormDebug: TFormDebug OnClick = ButtonSimuDet0Click end object ButtonSimuDet1: TButton - Left = 128 + Left = 152 Top = 16 - Width = 57 + Width = 65 Height = 33 Caption = 'D'#233'tecteur '#224' 1' TabOrder = 2 @@ -563,9 +540,9 @@ object FormDebug: TFormDebug OnClick = ButtonSimuDet1Click end object ButtonSimuAct0: TButton - Left = 200 + Left = 224 Top = 16 - Width = 59 + Width = 65 Height = 33 Caption = 'Actionneur '#224' 0' TabOrder = 3 @@ -573,9 +550,9 @@ object FormDebug: TFormDebug OnClick = ButtonSimuAct0Click end object ButtonSimuAct1: TButton - Left = 272 + Left = 296 Top = 16 - Width = 59 + Width = 65 Height = 33 Caption = 'Actionneur '#224' 1' TabOrder = 4 @@ -584,8 +561,8 @@ object FormDebug: TFormDebug end end object ButtonRazTout: TButton - Left = 454 - Top = 16 + Left = 442 + Top = 170 Width = 97 Height = 25 Hint = @@ -595,13 +572,13 @@ object FormDebug: TFormDebug Caption = 'RAZ tous trains' ParentShowHint = False ShowHint = True - TabOrder = 13 + TabOrder = 12 OnClick = ButtonRazToutClick end object GroupBox6: TGroupBox - Left = 450 - Top = 432 - Width = 345 + Left = 446 + Top = 586 + Width = 373 Height = 41 Anchors = [akTop, akRight] Caption = 'Sorties' @@ -613,7 +590,7 @@ object FormDebug: TFormDebug Font.Style = [] ParentColor = False ParentFont = False - TabOrder = 14 + TabOrder = 13 object Label3: TLabel Left = 16 Top = 16 @@ -675,6 +652,16 @@ object FormDebug: TFormDebug OnClick = Button0Click end end + object MemoEvtDet: TRichEdit + Left = 548 + Top = 330 + Width = 265 + Height = 185 + Anchors = [akTop, akRight] + Color = clBlack + ScrollBars = ssVertical + TabOrder = 14 + end object SaveDialog: TSaveDialog Left = 768 Top = 488 diff --git a/UnitDebug.pas b/UnitDebug.pas index 1780de8..f4a3390 100644 --- a/UnitDebug.pas +++ b/UnitDebug.pas @@ -10,7 +10,6 @@ type TFormDebug = class(TForm) EditNivDebug: TEdit; Label1: TLabel; - MemoEvtDet: TMemo; Label2: TLabel; SaveDialog: TSaveDialog; ButtonEcrLog: TButton; @@ -63,6 +62,7 @@ type EditSortie: TEdit; Button1: TButton; Button0: TButton; + MemoEvtDet: TRichEdit; procedure FormCreate(Sender: TObject); procedure ButtonEcrLogClick(Sender: TObject); procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char); @@ -89,7 +89,7 @@ type procedure ButtonSimuDet1Click(Sender: TObject); procedure ButtonRazToutClick(Sender: TObject); procedure RichEditChange(Sender: TObject); - procedure MemoEvtDetChange(Sender: TObject); + procedure MemoEvtDet1Change(Sender: TObject); procedure EditDebugSignalChange(Sender: TObject); procedure CheckBoxTiersClick(Sender: TObject); procedure ButtonSimuAct1Click(Sender: TObject); @@ -100,6 +100,7 @@ type procedure Button1Click(Sender: TObject); procedure Button0Click(Sender: TObject); procedure FormKeyPress(Sender: TObject; var Key: Char); + procedure FormActivate(Sender: TObject); private { Déclarations privées } public @@ -109,16 +110,18 @@ type var FormDebug: TFormDebug; NivDebug,signalDebug : integer; - AffSignal,AffAffect,initform,AffFD,debug_dec_sig,debugTCO : boolean; + AffSignal,AffAffect,initform,AffFD,debug_dec_sig,debugTCO,DebugAffiche : boolean; N_event_det : integer; // index du dernier évènement (de 1 à 20) N_Event_tick : integer ; // dernier index - - + + procedure AfficheDebug(s : string;lacouleur : TColor); +procedure AfficheDebug_suivi(s : string;lacouleur : TColor); procedure RE_ColorLine(ARichEdit: TRichEdit; ARow: Integer; AColor: TColor); - +procedure affiche_evt(s: string;lacouleur : TColor); + implementation uses UnitPrinc; @@ -138,6 +141,7 @@ end; procedure AfficheDebug(s : string;lacouleur : TColor); begin + if debugAffiche then with FormDebug.RichDebug do begin Lines.add(s); @@ -145,9 +149,33 @@ begin end; end; +procedure affiche_evt(s: string;lacouleur : TColor); +begin + if DebugAffiche then + with FormDebug.MemoEvtDet do + begin + Lines.add(s); + RE_ColorLine(FormDebug.MemoEvtDet,FormDebug.MemoEvtDet.lines.count-1,lacouleur); + end; +end; + +procedure AfficheDebug_suivi(s : string;lacouleur : TColor); +var i : integer; +begin + if DebugAffiche then + with formDebug.RichDebug do + begin + i:=lines.Count-1; + s:=lines.Strings[i]+s; + lines.Strings[i]:=s; + RE_ColorLine(FormDebug.RichDebug,i,lacouleur); + end; +end; + procedure TFormDebug.FormCreate(Sender: TObject); var s: string; begin + if affevt then affiche('FormDebug create',clLime); EditNivDebug.Text:='0'; s:='Cette fenêtre permet d''afficher des informations sur le '; s:=s+'comportement du programme. Positionner le niveau du débug de 1 à 3 pour'; @@ -161,14 +189,8 @@ begin if IsWow64Process then s:=s+' OS 64 Bits' else s:=s+' OS 32 Bits'; RichEdit.color:=$111122; RichDebug.Lines.add(s); - visible:=false; // invisible au démarrage - //garantit la scrollbar dans radstudio - with VertScrollBar do - begin - Range:=850; - visible:=true; - tracking:=true; - end; + Autoscroll:=true; // permet l'affichage de l'ascenseur + DebugAffiche:=true; end; procedure TFormDebug.ButtonEcrLogClick(Sender: TObject); @@ -332,13 +354,13 @@ end; procedure TFormDebug.ButtonSigSuivClick(Sender: TObject); -var adr,erreur,ancdebug : integer ; +var adr,erreur,ancdebug,AdrSigSuivant : integer ; begin ancdebug:=NivDebug; NivDebug:=3; Val(EditSigSuiv.Text,adr,erreur); if erreur<>0 then exit; - etat_signal_suivant(Adr,1) ; + etat_signal_suivant(Adr,1,AdrSigSuivant) ; NivDebug:=AncDebug; end; @@ -375,23 +397,23 @@ end; procedure TFormDebug.ButtonCPClick(Sender: TObject); -var Adr,erreur,ancdebug : integer ; +var Adr,erreur,ancdebug,adrtrain : integer ; begin Val(EditSigSuiv.Text,Adr,erreur); if erreur<>0 then exit; ancdebug:=NivDebug; NivDebug:=3; - PresTrainPrec(Adr); + PresTrainPrec(Adr,Nb_cantons_Sig,adrtrain); NivDebug:=AncDebug; end; procedure TFormDebug.Button2Click(Sender: TObject); -var Adr,erreur,ancdebug : integer ; +var Adr,erreur,ancdebug,trainreseve : integer ; begin Val(EditSigSuiv.Text,Adr,erreur); if erreur<>0 then exit; ancdebug:=NivDebug; NivDebug:=3; Cond_Carre(Adr); - carre_signal(adr); + carre_signal(adr,trainreseve); NivDebug:=AncDebug; end; @@ -446,7 +468,7 @@ begin SendMessage(RichEdit.handle, WM_VSCROLL, SB_BOTTOM, 0); end; -procedure TFormDebug.MemoEvtDetChange(Sender: TObject); +procedure TFormDebug.MemoEvtDet1Change(Sender: TObject); begin SendMessage(MemoEvtDet.handle, WM_VSCROLL, SB_BOTTOM, 0); end; @@ -462,7 +484,6 @@ begin AffTiers:=checkBoxTiers.checked; end; - procedure TFormDebug.ButtonElSuivClick(Sender: TObject); var Adr,Prec,Actuel,erreur,ancdebug : integer ; type1,type2 : tequipement; @@ -595,4 +616,10 @@ begin if key=chr(27) then close; end; +procedure TFormDebug.FormActivate(Sender: TObject); +begin + if affevt then affiche('FormConfig activate',clLime); + formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal'; +end; + end. diff --git a/UnitPilote.dcu b/UnitPilote.dcu index 4b4194a..4eef7cb 100644 Binary files a/UnitPilote.dcu and b/UnitPilote.dcu differ diff --git a/UnitPrinc.dcu b/UnitPrinc.dcu index 94fc8a4..2616f6d 100644 Binary files a/UnitPrinc.dcu and b/UnitPrinc.dcu differ diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index 8a4bc28..70c105f 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -1,6 +1,6 @@ object FormPrinc: TFormPrinc - Left = 67 - Top = 170 + Left = 35 + Top = 192 Width = 1213 Height = 670 Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ' @@ -18,8 +18,8 @@ object FormPrinc: TFormPrinc OnClose = FormClose OnCreate = FormCreate DesignSize = ( - 1205 - 619) + 1197 + 612) PixelsPerInch = 96 TextHeight = 13 object LabelTitre: TLabel @@ -1264,8 +1264,8 @@ object FormPrinc: TFormPrinc end object StatusBar1: TStatusBar Left = 0 - Top = 597 - Width = 1205 + Top = 590 + Width = 1197 Height = 22 Panels = <> SimplePanel = True @@ -1474,8 +1474,8 @@ object FormPrinc: TFormPrinc end end object GroupBox3: TGroupBox - Left = 656 - Top = 64 + Left = 640 + Top = 56 Width = 265 Height = 129 Anchors = [akTop, akRight] @@ -1600,6 +1600,16 @@ object FormPrinc: TFormPrinc TabOrder = 11 Text = '<1>' end + object Button1: TButton + Left = 960 + Top = 120 + Width = 75 + Height = 25 + Caption = 'Button1' + TabOrder = 12 + Visible = False + OnClick = Button1Click + end object Timer1: TTimer Interval = 100 OnTimer = Timer1Timer @@ -1637,6 +1647,10 @@ object FormPrinc: TFormPrinc Caption = 'Etat des zones par train' OnClick = Etatdeszonespartrain1Click end + object Evenementsdetecteurspartrain1: TMenuItem + Caption = 'Evenements detecteurs par train' + OnClick = Evenementsdetecteurspartrain1Click + end object N3: TMenuItem Caption = '-' end @@ -1812,8 +1826,12 @@ object FormPrinc: TFormPrinc object PopupMenuFeu: TPopupMenu Left = 896 object Proprits1: TMenuItem - Caption = 'Propri'#233't'#233's' + Caption = 'Propri'#233't'#233's du signal' OnClick = Proprits1Click end + object Informationsdusignal1: TMenuItem + Caption = 'Informations du signal' + OnClick = Informationsdusignal1Click + end end end diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 691889e..773ca23 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -1,9 +1,12 @@ Unit UnitPrinc; + (******************************************** programme signaux complexes Graphique Lenz Delphi 7 + activeX Tmscomm + clientSocket ou RadStudio option de compilations: options du debugger/exception du langage : décocher "arreter sur execeptions delphi" + sinon une exception surgira au moment de l'ouverture du com + Dans projet/option/fiches : fiches disponibles : formtco uniquement ******************************************** Pilotage des accessoires: raquette octet sortie @@ -27,7 +30,7 @@ port com lenz=57600 // Les aiguillages sont renvoyés quand on clique dessus // Les actionneurs fonctionnent. Les détecteurs ne sont pas renvoyés. // -// En mode cente connectée à signaux complexes (autonome) +// En mode centrale connectée à signaux complexes (autonome) // si on bouge un aiguillage à la raquette, on récupère bien sa position par XpressNet. // Une loco sur un détecteur au lancement ne renvoie pas son état. Seuls les changements // d'état sont renvoyés par la centrale. @@ -149,6 +152,9 @@ type Roulage1: TMenuItem; Placerlestrains1: TMenuItem; Demandetatdtecteurs1: TMenuItem; + Informationsdusignal1: TMenuItem; + Button1: TButton; + Evenementsdetecteurspartrain1: TMenuItem; procedure FormCreate(Sender: TObject); procedure MSCommUSBLenzComm(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); @@ -219,6 +225,9 @@ type procedure ButtonEnvClick(Sender: TObject); procedure Placerlestrains1Click(Sender: TObject); procedure Demandetatdtecteurs1Click(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Informationsdusignal1Click(Sender: TObject); + procedure Evenementsdetecteurspartrain1Click(Sender: TObject); private { Déclarations privées } procedure DoHint(Sender : Tobject); @@ -238,6 +247,7 @@ NbMaxDet=100; // nombre maximal de d NbMemZone=2048; // adresse maximale des détecteurs Max_Trains=100; MaxZones=250; +MaxTrainZone=40; Max_event_det=400; MaxBranches=100; MaxElBranches=200; @@ -363,12 +373,12 @@ var maxaiguillage,detecteur_chgt,Temps,Tempo_init,Suivant,ntrains,MaxPortCom, N_Cv,index_simule,NDetecteurs,N_Trains,N_routes,espY,Tps_affiche_retour_dcc, NbreImagePligne,NbreBranches,Index2_det,Index2_aig,branche_det,ntrains_cdm, - I_simule,maxTablo_act,NbreVoies,AdresseFeuSuivant,El_suivant,N_modules_dcc, + I_simule,maxTablo_act,NbreVoies,El_suivant,N_modules_dcc,NbDet1, tempsCli,NbreFeux,pasreponse,AdrDevie,fenetre,Tempo_Aig,Tempo_feu,etat_init_interface, NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant, Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,NbrePN,ServeurInterfaceCDM,index_couleur, - ServeurRetroCDM,TailleFonte,Nb_Det_Dist,Tdoubleclic,algo_Unisemaf,fA,fB,AdrTrain, - etape,idEl,avecRoulage : integer; + ServeurRetroCDM,TailleFonte,Nb_Det_Dist,Tdoubleclic,algo_Unisemaf,fA,fB, + etape,idEl,avecRoulage,intervalle_courant : integer; ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc, Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO, @@ -377,7 +387,7 @@ var NackCDM,MsgSim,StopSimu,succes,recu_cv,AffAigDet,Option_demarrage,AffTiers,AvecDemandeAiguillages, TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM,AvecInitAiguillages, AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro, - retEtatDet,roulage : boolean; + retEtatDet,roulage,init_aig_cours,affevt : boolean; tick,Premier_tick : longint; @@ -395,6 +405,10 @@ var tempo : integer; // temporisation de passage de 1 à 0 pour retarder le démarrage train au feu non rouge train : string; // nom du train ayant enclenché le détecteur (CDM - pas fiable) AdrTrain : integer; // adresse du train "train" + IndexTrain : integer; // index du train + QuitteVers1,QuitteVers2 : integer; // + vers1,vers2 : integer; // détecteurs vers lequel se dirige le train sur un front descendant + de1,de2 : integer; // détecteurs d'où vient le train qui vient sur ce détecteur end; TypeGen : TEquipement; @@ -403,7 +417,8 @@ var // Historique des zones d'occupation par train - TrainZone : array[1..20] of // train, index + + TrainZone : array[1..MaxTrainZone] of // train, index record train : string; adrTrain : integer; // adresse du train @@ -416,9 +431,10 @@ var record tick : longint; adresse : integer ; + train : integer; // numéro du train si détecteur modele : Tequipement ; // détecteur, aiguillage, actionneur etat : integer ; // état du détecteur de l'aiguillage ou de l'actionneur - traite : boolean; // traité lors de a recherche d'une route + reaffecte : integer ; // =1 réaffecté au bon train dans le cas de 2 détecteurs contigus qui ne s'enchainent pas bien =2 réaffecté par changement aiguillage end; // tableau des croisement rencontrés par la fonction suivant_alg3 @@ -438,7 +454,7 @@ var record etat : boolean; // mémoires de zones des détecteurs train : string; - AdrTrain : integer; + NumTrain,AdrTrain : integer; end; Tablo_actionneur : array[1..100] of @@ -505,7 +521,8 @@ var Placement : array[1..10] of record train : string; - detecteur : integer; + detecteur,detdir : integer; + inverse : boolean; end; event_det : array[1..Max_event_det] of record @@ -513,9 +530,10 @@ var etat : boolean; end; - event_det_train : array[1..Max_Trains] of record + event_det_train : array[0..Max_Trains] of record NbEl,AdrTrain : integer; nom_train : string; // nom du train + suivant : integer; // suivant prévisionnel à det1 et det2 Det : array[1..2] of record adresse : integer; // tableau des evts détecteurs par train etat : boolean; @@ -550,13 +568,13 @@ function IsWow64Process: Boolean; procedure Dessine_feu_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : real;adresse : integer;orientation : integer); procedure Pilote_acc0_X(adresse : integer;octet : byte); Function pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire) : boolean; -function etat_signal_suivant(Adresse,rang : integer) : integer; +function etat_signal_suivant(Adresse,rang : integer;var AdrSignalsuivant : integer) : integer; function suivant_alg3(prec : integer;typeELprec : TEquipement;actuel : integer;typeElActuel : TEquipement;alg : integer) : integer; function detecteur_suivant_El(el1: integer;TypeDet1 : TEquipement;el2 : integer;TypeDet2 : TEquipement;alg : integer) : integer ; function test_memoire_zones(adresse : integer) : boolean; -function PresTrainPrec(Adresse : integer) : boolean; +function PresTrainPrec(Adresse,NbCtSig : integer;var AdrTr : integer) : boolean; function cond_carre(adresse : integer) : boolean; -function carre_signal(adresse : integer) : boolean; +function carre_signal(adresse : integer;var TrainReserve : integer) : boolean; procedure Event_Detecteur(Adresse : integer;etat : boolean;train : string); procedure Event_act(adr,adr2,etat : integer;trainDecl : string); function verif_UniSemaf(adresse,UniSem : integer) : integer; @@ -574,6 +592,9 @@ procedure init_aiguillages; function index_adresse_detecteur(de : integer) : integer; function index_train_adresse(adr : integer) : integer; procedure vitesse_loco(nom_train :string;loco : integer;vitesse : integer;sens : boolean); +procedure Maj_Feux; +procedure Det_Adj(adresse : integer); +procedure reserve_canton(detecteur1,detecteur2,adrtrain : integer); implementation @@ -1458,8 +1479,10 @@ begin if typeFeu<=0 then exit; adresse:=feux[rang].adresse; Feux[rang].Img:=Timage.create(Formprinc.ScrollBox1); + if feux[rang].Img=nil then begin affiche('Erreur 900 : impossible de créer une image',clred);exit;end; with Feux[rang].Img do begin + if debug=1 then affiche('Image '+intToSTR(rang)+' créée',clLime); //canvas.Create; Parent:=Formprinc.ScrollBox1; // dire que l'image est dans la scrollBox1 //formprinc.ScrollBox1.Color:=ClGreen; @@ -1514,6 +1537,7 @@ begin // créée le checkBox si un feu blanc est déclaré sur ce feu if feux[rang].FeuBlanc then begin + if debug=1 then affiche('Création CheckBox feu blanc '+intToSTR(rang),clLime); Feux[rang].checkFB:=TCheckBox.create(Formprinc.ScrollBox1); // ranger l'adresse de la Checkbox dans la structure du feu with Feux[rang].CheckFB do begin @@ -1658,7 +1682,6 @@ begin Affiche(s,clRed); if traceTrames then AfficheDebug(s,clred); inc(pasreponse); - // &&&if pasreponse>3 then hors_tension2:=true; end; if ack then begin pasreponse:=0;hors_tension2:=false;end; end; @@ -1995,6 +2018,8 @@ begin begin if protocole=1 then begin + //Affiche(inttostr(vitesse),clOrange); + if vitesse>127 then vitesse:=127; if sens then vitesse:=vitesse or 128; s:=#$e4+#$13+#$0+char(loco)+char(vitesse); s:=checksum(s); @@ -2002,7 +2027,8 @@ begin end; if protocole=2 then begin - s:=''; + s:='' else s:=s+'0>'; envoi(s); end; end; @@ -2043,6 +2069,7 @@ begin // ('0carré','1sémaphore','2sémaphore cli','3vert','4vert cli','5violet', // '6blanc','7blanc cli','8jaune','9jaune cli','10ral 30','11ral 60','12rappel 30','13rappel 60'); + if debug=3 then formprinc.Caption:='Maj_Etat_Signal '+IntToSTR(adresse); i:=index_feu(adresse); if testBit(feux[i].EtatSignal,aspect)=false then // si le bit dans l'état du signal n'est pas allumé, procéder. begin @@ -2088,6 +2115,7 @@ begin feux[i].EtatSignal:=SetBit(feux[i].EtatSignal,aspect); // allume le numéro du bit de la fonction du signal end; end; + if debug=3 then formprinc.Caption:=''; end; {============================================= @@ -3268,10 +3296,11 @@ envoie les donn ===========================================================================*) procedure envoi_signalBahn(adresse : integer); var aspect,code,combine : integer; - ralrap, jau ,Ancralrap,Ancjau : boolean; + ralrap, jau ,Ancralrap,Ancjau,connecte : boolean; i : integer; s : string; begin + connecte:=cdm_connecte or portCommOuvert or parSocketLenz; i:=index_feu(adresse); if (feux[i].AncienEtat<>feux[i].EtatSignal) then //; && (stop_cmd==FALSE)) begin @@ -3299,17 +3328,20 @@ begin // effacement du signal combiné par sémaphore suivant condition if (((Ancralrap and not(ralrap)) or (Ancjau and not(jau))) and (combine<>0)) then begin - Sleep(40); - pilote_acc(adresse+semaphore,2,feu) ; + if connecte then + begin + Sleep(40); + pilote_acc(adresse+semaphore,2,feu) ; + end; // dessine_feu(adresse); end; - sleep(40); // les commandes entre 2 feux successifs doivent être séparées au minimum de 100 ms + if connecte then sleep(40); // les commandes entre 2 feux successifs doivent être séparées au minimum de 100 ms // affichage du premier aspect du signal(1er bit à 1 dans codebin if aspect<>-1 then pilote_acc(adresse+aspect,2,feu) ; // affichage de la signalisation combinée - if (Combine<>-1) then + if (Combine<>-1) and connecte then begin sleep(40); pilote_ACC(adresse+Combine,2,feu) ; @@ -3319,7 +3351,7 @@ end; // pilotage d'un signal, et mise à jour du graphisme du feu dans les 3 fenetres procedure envoi_signal(Adr : integer); -var i,adresse,det,a,b,aspect,x,y,TailleX,TailleY,Orientation : integer; +var i,adresse,det,a,b,aspect,x,y,TailleX,TailleY,Orientation,AdrTrain : integer; ImageFeu : TImage; frX,frY : real; s : string; @@ -3349,14 +3381,13 @@ begin 7 : envoi_SR(Adr); end; - // Gestion démarrage temporisé des trains si on quitte le rouge : ne fonctionne qu'avec CDM rail connecté - if Option_demarrage and cdm_connecte then + // Gestion démarrage temporisé des trains si on quitte le rouge : ne fonctionne qu'avec CDM rail connecté ou roulage + if (Option_demarrage and cdm_connecte) or roulage then begin a:=feux[i].AncienEtat; b:=feux[i].EtatSignal; if ((a=semaphore_F) or (a=carre_F) or (a=violet_F)) and ((b<>semaphore_F) and (b<>carre_F) and (b<>violet_F)) then begin - if not(Diffusion) then Affiche('On quitte le rouge du signal '+intToSTR(adr),clyellow); // y a t il un train en face du signal det:=feux[i].Adr_det1; if det<>0 then @@ -3364,13 +3395,23 @@ begin // test si train sur le détecteur det if detecteur[det].etat then begin - detecteur[det].tempo:=20; // armer la tempo à 2s - // arreter le train - //s:=detecteur[det].train; - //detecteur[det].train:=s; - //Affiche('et son détecteur '+IntToSTR(det)+'=1 tempo démarrage ; train '+s,clYellow); - s:=chaine_CDM_vitesseST(0,s); // 0% - envoi_cdm(s); + AdrTrain:=detecteur[det].AdrTrain; + if AdrTrain<>0 then + begin + s:='Le train @'+intToSTR(detecteur[det].AdrTrain)+' va démarrer du signal '+intToSTR(adr); + Affiche(s,clLime); + if TraceLIste then AfficheDebug(s,clLime); + detecteur[det].tempo:=20; // armer la tempo à 2s + // arreter le train + //s:=detecteur[det].train; + //detecteur[det].train:=s; + //Affiche('et son détecteur '+IntToSTR(det)+'=1 tempo démarrage ; train '+s,clYellow); + if cdm_connecte then + begin + s:=chaine_CDM_vitesseST(0,s); // 0% + envoi_cdm(s); + end; + end; end; end; end; @@ -3388,7 +3429,7 @@ begin Dessine_feu_mx(Feux[i].Img.Canvas,0,0,1,1,adr,1); // allume les signaux du feu dans le TCO - if formTCO.Showing then + if TCOouvert then begin for y:=1 to NbreCellY do for x:=1 to NbreCellX do @@ -3473,6 +3514,7 @@ var i,adr : integer; until trouve or (adr=0) ; end; begin + if debug=3 then formprinc.Caption:='index_detecteur '+IntToSTR(detecteur); i:=1;index2_det:=0; recherche; if trouve then result:=i else result:=0; @@ -3483,6 +3525,7 @@ begin //affiche('------------------------',clGreen); if trouve then index2_det:=i else index2_det:=0; //affiche('index2='+IntToSTR(index2_det),clWhite); + if debug=3 then formprinc.Caption:=''; end; // trouve l'index d'un aiguillage dans une branche @@ -3498,7 +3541,7 @@ var i,adr : integer; //Affiche('cherche='+intToSTR(det)+'/explore='+intToSTR(adr)+' Branche='+intToStr(Num_branche)+' index='+intToStr(i),ClWhite); if not(trouve) then inc(i); //if trouve then Affiche('Trouvé en branche'+IntToSTR(Num_branche)+' index='+IntToSTR(i),clGreen); - until trouve or (adr=0) ; + until trouve or (adr=0) or (i>MaxElBranches) ; end; begin i:=1;index2_aig:=0; @@ -3582,6 +3625,7 @@ var i,adr,Branche : integer ; BT : TEquipement; sort : boolean; begin + if debug=3 then formprinc.Caption:='Trouve_element '+IntToSTR(el); Branche:=Offset; branche_trouve:=0; IndexBranche_trouve:=0; @@ -3598,12 +3642,13 @@ begin branche_trouve:=Branche; IndexBranche_trouve:=i-1; end - else begin s:='Erreur 175 - élément '+intToSTR(el)+' '; + else begin s:='Erreur 175 : élément '+intToSTR(el)+' '; s:=s+BTypeToChaine(TypeEl); s:=s+' non trouvé';Affiche(s,clred); branche_trouve:=0; IndexBranche_trouve:=0; if NivDebug>=1 then AfficheDebug(s,clred); end; + if debug=3 then formprinc.Caption:=''; end; // renvoie l'élément suivant des deux éléments dans le sens (prec,typeElprec) -> (actuel,typeElActuel) quels qu'ils soient mais contigus @@ -3611,16 +3656,19 @@ end; // un élément est constitué de son adresse et de son type // et renvoie aussi en variable globale: typeGen le type de l'élément // s'ils ne sont pas contigus, on aura une erreur -// alg= algorithme 1 à 3: -// 1=arret sur suivant qu'il soit un détecteur ou un aiguillage -// 2=arret sur aiguillage en talon mal positionné ou aiguillage réservé -// 3=arret sur un aiguillage pris en pointe dévié et AdrDevie contient l'adresse de l'aiguillage dévié ainsi que typeGen +// alg= algorithme 1 à 8: +// bit0 (1)=arret sur suivant qu'il soit un détecteur ou un aiguillage +// bit1 (2)=arret sur aiguillage en talon mal positionné +// bit2 (4)=arret sur aiguillage réservé +// bits1 et 2: (2+4)=6= arret sur aiguillage en talon mal positionnée ou aiguillage réservé +// bit3 (8)=arret sur un aiguillage pris en pointe dévié et AdrDevie contient l'adresse de l'aiguillage dévié ainsi que typeGen // code de sortie : élément suivant ou: // 9999: erreur fatale ou itération trop longue // 9998: arret sur aiguillage en talon mal positionnée -// 9997: arrêt sur aiguillage dévié ou réservé +// 9997: arrêt sur aiguillage dévié // 9996: arrêt sur position inconnue d'aiguillage -// 9995: arrêt anormal sur buttoit +// 9995: arrêt anormal sur buttoir +// 9994: arrêt sur aiguillage réservé // la variable actuel peut etre changée en cas de TJD! function suivant_alg3(prec : integer;typeELprec : TEquipement;actuel : integer;typeElActuel : TEquipement;alg : integer) : integer; var Adr,AdrPrec,indexBranche_prec,branche_trouve_prec,indexBranche_actuel,branche_trouve_actuel, @@ -3730,7 +3778,7 @@ begin exit; end; goto recommence; - end; + end; if (Bt=aig) or (Bt=buttoir) then // aiguillage ou buttoir begin @@ -3752,7 +3800,7 @@ begin if (aiguillage[index].modele=aig) and (Bt=aig) then // aiguillage normal begin // si aiguillage reservé - if (alg=2) and (aiguillage[index].AdrTrain<>0) then + if (alg and $4=$4) and (aiguillage[index].AdrTrain<>0) then begin if NivDebug=3 then AfficheDebug('230 - aiguillage '+intToSTR(adr)+' réservé par train @'+intToSTR(aiguillage[index].AdrTrain),clyellow); suivant_alg3:=9997; @@ -3788,7 +3836,7 @@ begin if aiguillage[index].position=const_devie then begin if NivDebug=3 then AfficheDebug('133 - aiguillage '+intToSTR(Adr)+' Pris en pointe dévié',clyellow); - if alg=3 then // on demande d'arreter si l'aiguillage pris en pointe est dévié + if (alg and 8)=8 then // on demande d'arreter si l'aiguillage pris en pointe est dévié begin typeGen:=rien; AdrDevie:=Adr; @@ -3832,7 +3880,7 @@ begin begin // aiguillage index (adr) pris en talon if NivDebug=3 then AfficheDebug('135 - aiguillage '+intToSTR(Adr)+' Pris en talon',clyellow); - if (alg=2) then // on demande d'arreter si l'aiguillage en talon est mal positionné + if (alg and 2)=2 then // on demande d'arreter si l'aiguillage en talon est mal positionné begin if aiguillage[index].position=const_droit then begin @@ -3904,10 +3952,10 @@ begin // TJD ou TJS----------------------------- if (aiguillage[index].modele=tjd) or (aiguillage[index].modele=tjs) then begin - if (alg=2) and (aiguillage[index].AdrTrain<>0) then + if ((alg and 4)=4) and (aiguillage[index].AdrTrain<>0) then begin if NivDebug=3 then AfficheDebug('231 - TJD/S '+intToSTR(Adrtjdp)+' réservée par train @'+intToSTR(aiguillage[index].AdrTrain),clyellow); - suivant_alg3:=9997; + suivant_alg3:=9994; exit; end; @@ -3922,10 +3970,10 @@ begin tjsc2B:=aiguillage[index2].tjsintB; NetatTJD:=aiguillage[index].etatTJD; - if (alg=2) and (aiguillage[index2].AdrTrain<>0) then + if ((alg and 4)=4) and (aiguillage[index2].AdrTrain<>0) then begin if NivDebug=3 then AfficheDebug('130 - TJD/S '+intToSTR(Adrtjdp)+' réservée par train @'+intToSTR(aiguillage[index2].AdrTrain),clyellow); - suivant_alg3:=9997; + suivant_alg3:=9994; exit; end; @@ -4082,7 +4130,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.5- TJD/S '+intToSTR(adr)+' mal positionnée cas 1.1',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4096,8 +4144,8 @@ begin if NivDebug=3 then AfficheDebug('TJD/S '+intToSTR(adr)+' bien positionnée cas 1.2',clyellow);end else begin - if (nivdebug>1) or traceliste then AfficheDebug('135.6- TJD/S '+intToSTR(adr)+' mal positionnée cas 1.2',clyellow); - if alg=2 then + if (nivdebug>1) then AfficheDebug('135.6- TJD/S '+intToSTR(adr)+' mal positionnée cas 1.2',clyellow); + if (alg and 2=2) then begin suivant_alg3:=9998;exit; end; @@ -4134,7 +4182,7 @@ begin ( ((aiguillage[index].AdroitB)='D') and (aiguillage[index_aig(prec)].position=const_droit) ) then begin if NivDebug=3 then AfficheDebug('TJD/S '+intToSTR(adr)+' bien positionnée - cas 2.1',clyellow); - if alg=3 then // on demande d'arreter si l'aiguillage pris en pointe est dévié + if (alg and 4)=4 then // on demande d'arreter si l'aiguillage pris en pointe est dévié begin typeGen:=rien; AdrDevie:=Adr; @@ -4144,7 +4192,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.7- TJD '+intToSTR(adr)+' mal positionnée - cas 2.1',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4156,7 +4204,7 @@ begin if (aiguillage[index].Adroit)=prec then begin if NivDebug=3 then AfficheDebug('TJD '+intToSTR(adr)+' bien positionnée cas 2.2',clyellow); - if alg=3 then // on demande d'arreter si l'aiguillage pris en pointe est dévié + if (alg and 4)=4 then // on demande d'arreter si l'aiguillage pris en pointe est dévié begin typeGen:=rien; AdrDevie:=Adr; @@ -4166,7 +4214,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.18- TJD '+intToSTR(adr)+' mal positionnée cas 2.2',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4201,7 +4249,7 @@ begin ( ((aiguillage[index].AdevieB)='D') and (aiguillage[index_aig(prec)].position=const_droit) ) then begin if NivDebug=3 then AfficheDebug('TJD '+intToSTR(adr)+' bien positionnée cas 3.1',clyellow); - if alg=3 then // on demande d'arreter si l'aiguillage pris en pointe est dévié + if (alg and 4)=4 then // on demande d'arreter si l'aiguillage pris en pointe est dévié begin typeGen:=rien; AdrDevie:=Adr; @@ -4211,7 +4259,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.7- TJD '+intToSTR(adr)+' mal positionnée cas 3.1',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4223,7 +4271,7 @@ begin if (aiguillage[index].Adevie)=prec then begin if NivDebug=3 then AfficheDebug('TJD '+intToSTR(adr)+' bien positionnée cas 3.2',clyellow); - if alg=3 then // on demande d'arreter si l'aiguillage pris en pointe est dévié + if (alg and 4)=4 then // on demande d'arreter si l'aiguillage pris en pointe est dévié begin typeGen:=rien; AdrDevie:=Adr; @@ -4233,7 +4281,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.8- TJD '+intToSTR(adr)+' mal positionnée cas 3.2',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4272,7 +4320,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.7- TJD '+intToSTR(adr)+' mal positionnée cas 4.1',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4287,7 +4335,7 @@ begin else begin if (nivdebug>1) or traceliste then AfficheDebug('135.8- TJD '+intToSTR(adr)+' mal positionnée cas 4.2',clyellow); - if alg=2 then + if (alg and 2)=2 then begin suivant_alg3:=9998;exit; end; @@ -4340,9 +4388,9 @@ begin if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow); exit; end; - if (nivdebug>1) or traceliste then + if ((nivdebug>1) or traceliste) and not(init_aig_cours) then begin - s:='1026 - position TJD/S '+IntToSTR(Adr)+'/'+intToSTR(AdrTJDP)+' inconnue'; + s:='1026 - position TJD/S '+IntToSTR(Adr)+'='+intToSTR(aiguillage[index].position)+' / '+intToSTR(index)+'='+intToSTR(aiguillage[index2].position)+' inconnue'; AfficheDebug(s,clOrange); end; suivant_alg3:=9999;exit; @@ -4352,10 +4400,10 @@ begin if (aiguillage[index].modele=crois) then begin // si reservé - if (alg=2) and (aiguillage[index].AdrTrain<>0) then + if ((alg and 4)=4) and (aiguillage[index].AdrTrain<>0) then begin if NivDebug=3 then AfficheDebug('235 - croisement '+intToSTR(adr)+' réservé par train @'+intToSTR(aiguillage[index].AdrTrain),clyellow); - suivant_alg3:=9997; + suivant_alg3:=9994; exit; end; @@ -4430,7 +4478,7 @@ begin else begin if NivDebug=3 then AfficheDebug('Aiguillage triple pris en talon',clyellow); - if alg=2 then // on demande d'arreter si l'aiguillage en talon est mal positionné + if (alg and 2)=2 then // on demande d'arreter si l'aiguillage en talon est mal positionné begin if (aiguillage[index].position=const_droit) and (aiguillage[index_aig(adr2)].position=const_droit) then begin @@ -4485,6 +4533,19 @@ begin suivant_alg3:=adr; end; +// renvoie l'adresse du signal s'il est associé au détecteur "detecteur" +function signal_detecteur(detecteur : integer) : integer; +var trouve : boolean; + i : integer; +begin + i:=1; + repeat + trouve:=(feux[i].Adr_det1=detecteur) or (feux[i].Adr_det2=detecteur) or (feux[i].Adr_det3=detecteur) or (feux[i].Adr_det4=detecteur); + inc(i); + until (i>=NbreFeux) or trouve; + if trouve then signal_detecteur:=feux[i-1].adresse else signal_detecteur:=0; +end; + // trouve l'index du feu associé au détecteur adr // renvoie dans voie le numéro de la voie (1 à 4) du signal sur lequel le détecteur se trouve // attention , il peut y avoir plus d'un feu sur un detecteur (suivant le sens)! @@ -4560,14 +4621,14 @@ begin actuelCalc:=AdrSuiv; TypeActuelCalc:=typeGen; //Affiche('Suivant signalaig='+IntToSTR(AdrSuiv),clyellow); - until (j=10) or (typeGen=det) or (AdrSuiv=0) or (AdrSuiv>=9995); // arret si détecteur + until (j=10) or (typeGen=det) or (AdrSuiv=0) or (AdrSuiv>=9990); // arret si détecteur // si trouvé le sens, trouver le suivant if AdrSuiv=actuel then begin - AdrSuiv:=suivant_alg3(prec,TypeElPrec,actuel,TypeElActuel,1); + AdrSuiv:=suivant_alg3(prec,TypeElPrec,actuel,TypeElActuel,1); // suivant immédiat end; - if (NivDebug=3) and (AdrSuiv<9995) then AfficheDebug('618 : Le suivant est le '+intToSTR(AdrSuiv),clYellow); + if (NivDebug=3) and (AdrSuiv<9990) then AfficheDebug('618 : Le suivant est le '+intToSTR(AdrSuiv),clYellow); detecteur_suivant:=AdrSuiv; end; @@ -4841,6 +4902,7 @@ var suiv1,indexBranche_det1,indexBranche_det2,branche_det2,branche_det1, begin // trouver les éléments du précédent + if debug=3 then formprinc.Caption:='Det_contigu '+intToSTR(det1)+' '+intToSTr(det2); afdeb:=false;//TraceListe ; it:=0; if afdeb then afficheDebug('Det_contigu '+intToSTR(det1)+' '+intToSTr(det2),clyellow); @@ -4851,6 +4913,7 @@ begin if IndexBranche_trouve=0 then begin if NivDebug=3 then AfficheDebug('Element '+intToSTR(det1)+' non trouvé',clred); + if debug=3 then formprinc.Caption:=''; exit; end; indexBranche_det1:=IndexBranche_trouve; @@ -4862,6 +4925,7 @@ begin if IndexBranche_trouve=0 then begin if NivDebug=3 then AfficheDebug('Element '+intToSTR(actuel)+' non trouvé',clred); + if debug=3 then formprinc.Caption:=''; exit; end; @@ -4937,7 +5001,7 @@ begin end; suivant:=dernier;ElSuiv:=type_dernier; - + if debug=3 then formprinc.Caption:=''; end; @@ -4967,11 +5031,10 @@ var Adr,AdrFonc,Branche,AdrPrec,IndexBranche,i,Dir : integer; sortie : boolean; BtypeFonc,BtypePrec : TEquipement; begin - if TraceListe then AfficheDebug('Det_Adj '+IntToSTR(adresse),clyellow); trouve_element(adresse,det,1); // branche_trouve IndexBranche_trouve if (IndexBranche_trouve=0) then begin - Affiche('Erreur 380 : élément '+IntToSTR(adresse)+' non trouvé',clred); + Affiche('Erreur 380 : élément '+IntToSTR(adresse)+' det non trouvé',clred); exit; end; IndexBranche:=IndexBranche_trouve; @@ -5000,13 +5063,12 @@ begin AdrPrec:=AdrFonc;BtypePrec:=BtypeFonc; AdrFonc:=Adr;BtypeFonc:=typeGen; i:=i+1; - sortie:=(i=20) or (Adr=0) or (Adr>=9995) or (TypeGen=det); + sortie:=(i=20) or (Adr=0) or (Adr>=9990) or (TypeGen=det); until (sortie) ; // boucle de parcours if (typeGen=det) and (Dir=1) then begin Adj1:=Adr;end; if (typeGen=det) and (Dir=2) then begin Adj2:=Adr;end; inc(dir); until dir=3; - if TraceListe then AfficheDebug('Fin Det_Adj ',clyellow); end; @@ -5024,6 +5086,7 @@ var IndexBranche_det1,IndexBranche_det2,branche_trouve_det1,branche_trouve_det2, label reprise; begin + if debug=3 then formprinc.Caption:='Detecteur_suivant_el '+intToSTR(el1)+' '+intToSTR(el2); if NivDebug>=2 then AfficheDebug('Proc Detecteur_suivant_EL '+intToSTR(el1)+','+BTypeToChaine(Typedet1)+'/'+intToSTR(el2)+','+BTypeToChaine(Typedet2)+'-------------------------',clLime); if (el1>9000) or (el2>9000) then @@ -5105,14 +5168,14 @@ begin AdrPrec:=AdrFonc;TypePrec:=TypeFonc; AdrFonc:=Adr;TypeFonc:=typeGen; inc(i); - sortie:=((typeDet2=TypeGen) and (Adr=el2)) or (Adr=0) or (Adr>=9995) or (i=15) or (N_Det=Nb_det_dist); + sortie:=((typeDet2=TypeGen) and (Adr=el2)) or (Adr=0) or (Adr>=9990) or (i=15) or (N_Det=Nb_det_dist); until sortie ; if (i=15) and (Nivdebug=3) then afficheDebug('Pas trouvé',clyellow); if (N_det=Nb_det_dist) and (Nivdebug=3) then begin s:='Elements trop distants '+intToStr(el1)+' '+intToSTR(el2); afficheDebug(s,clorange); - end; + end; end else @@ -5120,7 +5183,7 @@ begin // déja trouvé adr:=el2;typeGen:=TypeDet2; end; - + if (typeDet2=TypeGen) and (Adr=el2) and (N_Det<>Nb_det_dist) then begin if Nivdebug=3 then AfficheDebug('614 - Trouvé '+intToSTR(el2),clYellow); @@ -5139,9 +5202,9 @@ begin AdrPrec:=AdrFonc;TypePrec:=TypeFonc; AdrFonc:=Adr;TypeFonc:=typeGen; inc(i); - sortie:=(TypeGen=det) or (Adr=0) or (Adr>=9995) or (i=10); + sortie:=(TypeGen=det) or (Adr=0) or (Adr>=9990) or (i=10); until sortie; - + if (TypeGen=det) or (TypeGen=buttoir) then begin if NivDebug=3 then @@ -5150,6 +5213,7 @@ begin affichedebug('------------------',clyellow); end; detecteur_suivant_el:=Adr; + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -5160,6 +5224,7 @@ begin detecteur_suivant_el:=9996; if NivDebug=3 then affichedebug('------------------',clyellow); + if debug=3 then formprinc.Caption:=''; end; @@ -5254,7 +5319,7 @@ begin AdrPrec:=AdrFonc;TypePrec:=TypeFonc; AdrFonc:=Adr;TypeFonc:=typeGen; inc(i); - sortie:=((TypeGen=det) and (Adr=el2)) or (Adr=0) or (Adr>=9995) or (i=15) or (N_Det=Nb_det_dist); + sortie:=((TypeGen=det) and (Adr=el2)) or (Adr=0) or (Adr>=9990) or (i=15) or (N_Det=Nb_det_dist); until sortie ; if (i=15) and (Nivdebug=3) then afficheDebug('Pas trouvé',clyellow); if (N_det=Nb_det_dist) and (Nivdebug=3) then @@ -5301,7 +5366,7 @@ begin cond_carre:=true; exit; end; - + NCondCarre:=Length(feux[i].condcarre[1]); l:=1; @@ -5338,20 +5403,22 @@ begin cond_carre:=ResultatOU; end; -// renvoi vrai si les aiguillages au delà du signal sont mal positionnés -function carre_signal(adresse : integer) : boolean; +// renvoie vrai si le signal adresse doit afficher un carré car les aiguillages au dela du signal sont mal positionnés +// renvoie dans TrainReserve l'adresse de l'aiguillage qui a été réservé +function carre_signal(adresse : integer;var TrainReserve : integer) : boolean; var i,j,k,prec,indexFeu,AdrSuiv,index2,voie,AdrFeu : integer; TypeELPrec,TypeElActuel : TEquipement; multi, sort : boolean; s : string; begin + TrainReserve:=0; if (NivDebug>=1) then AfficheDebug('Test si signal '+IntToSTR(adresse)+' doit afficher un carré si aiguillage avals mal positionnés',clyellow); i:=Index_feu(adresse); if i=0 then begin - Affiche('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred); + Affiche('Erreur 603 - signal '+IntToSTR(adresse)+' non trouvé',clred); if NivDebug=3 then AfficheDebug('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred); carre_signal:=true; exit; @@ -5368,18 +5435,21 @@ begin // trouver si une des voies présente un train if (multi) then begin - carre_signal:=FALSE; // pour l'instant verrouillé en mode pas de carré + carre_signal:=false; // pour l'instant verrouillé en mode pas de carré exit; end; + if debug=3 then formprinc.Caption:='carre_signal '+intToSTR(adresse); if (typeElActuel=Aig) or (typeElActuel=Crois) then begin // adresse k:=index_aig(actuel); if aiguillage[k].AdrTrain<>0 then begin - if (nivdebug>=1) then AfficheDebug('Aiguillage '+intToSTR(aiguillage[k].adresse)+' verrouillé par train @'+intToSTR(aiguillage[k].AdrTrain),clorange); - result:=true; + TrainReserve:=aiguillage[k].AdrTrain; + if (nivdebug>=1) then AfficheDebug('Aiguillage '+intToSTR(aiguillage[k].adresse)+' verrouillé par train @'+intToSTR(TrainReserve),clorange); + result:=false; + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -5387,11 +5457,12 @@ begin //Affiche(IntToSTR(actuel),clyellow); repeat inc(j); - AdrSuiv:=suivant_alg3(prec,typeElPrec,actuel,typeELActuel,2); + AdrSuiv:=suivant_alg3(prec,typeElPrec,actuel,typeELActuel,2); // arret sur aiguille en talon mal positionéne if (AdrSuiv=9999) or (AdrSuiv=9996) or (AdrSuiv=9995) then // élément non trouvé ou position aiguillage inconnu ou buttoir begin carre_signal:=true; + if debug=3 then formprinc.Caption:=''; exit; end; if (AdrSuiv<>9998) then // arret sur aiguillage en talon mal positionnée @@ -5465,8 +5536,10 @@ begin k:=index_aig(actuel); if aiguillage[k].AdrTrain<>0 then begin - if (nivdebug>=1) then AfficheDebug('Aiguillage '+intToSTR(aiguillage[k].adresse)+' verrouillé par train @'+intToSTR(aiguillage[k].AdrTrain),clorange); + TrainReserve:=aiguillage[k].AdrTrain; + if (nivdebug>=1) then AfficheDebug('Aiguillage '+intToSTR(aiguillage[k].adresse)+' verrouillé par train @'+intToSTR(TrainReserve),clorange); result:=true; + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -5481,27 +5554,14 @@ begin else AfficheDebug('Le signal '+IntToSTR(adresse)+' ne doit pas être au carré',clYellow); end; carre_signal:=AdrSuiv=9998; + if debug=3 then formprinc.Caption:=''; end; -// renvoie l'adresse du signal s'il est associé au détecteur "detecteur" -function signal_detecteur(detecteur : integer) : integer; -var trouve : boolean; - i : integer; -begin - i:=1; - repeat - trouve:=(feux[i].Adr_det1=detecteur) or (feux[i].Adr_det2=detecteur) or (feux[i].Adr_det3=detecteur) or (feux[i].Adr_det4=detecteur); - inc(i); - until (i>=NbreFeux) or trouve; - if trouve then signal_detecteur:=feux[i-1].adresse else signal_detecteur:=0; -end; - -// renvoie l'adresse du signal suivant à partir du détecteur adresse (non compris) Si renvoie 0, pas trouvé le signal suivant. -// reserve: true si il faut réserver les éléments à un train - false pour libérer la réservation +// renvoie l'adresse du signal suivant à partir du détecteur det1 (non compris) et dans le sens det1 vers det2. +// Si renvoie 0, pas trouvé le signal suivant. function signal_suivant_det(det1,det2 : integer) : integer; var num_feu,AdrFeu,i,j,prec,AdrSuiv,index2,voie : integer; - aspect,combine : integer; Typ,TypePrec,TypeActuel : TEquipement; s : string; @@ -5520,6 +5580,7 @@ begin // si det1 et det2 sont contigus, i=det1 // sinon i contient l'adresse de l'aiguillage avant det2 + if debug=3 then formprinc.Caption:='signal_suivant_det '+intToSTR(det1)+' '+inttostr(det2); j:=0; prec:=det1; // détecteur sur le courant TypePrec:=det; @@ -5528,14 +5589,12 @@ begin Affiche('Msg 601 - feu '+intToSTR(prec)+' détecteur non renseigné ',clOrange); if NivDebug=3 then AfficheDebug('Msg 602 - détecteur '+intToSTR(prec)+' non renseigné ',clOrange); signal_suivant_det:=0; + if debug=3 then formprinc.Caption:=''; exit; end; actuel:=i; typeActuel:=typ; - elements[1].adresse:=det1;elements[1].typ:=det; - elements[2].adresse:=actuel;elements[2].typ:=typ; - idEl:=3; if nivDebug=3 then AfficheDebug('Actuel ='+IntToSTR(actuel),clyellow); repeat @@ -5550,14 +5609,8 @@ begin else begin //if nivDebug=3 then AfficheDebug('Engagement j='+IntToSTR(j)+' '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow); - AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1); + AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1); // arret sur élément suivant if Nivdebug=3 then AfficheDebug('Suivant='+intToSTR(AdrSuiv),clyellow); - if IdEl<20 then - begin - elements[IdEl].adresse:=AdrSuiv; - elements[IdEl].typ:=typeGen; - inc(IdEl); - end; prec:=actuel;TypePrec:=TypeActuel; actuel:=AdrSuiv;TypeActuel:=typeGen; @@ -5565,12 +5618,14 @@ begin if (AdrSuiv=9999) or (AdrSuiv=9996) then begin signal_suivant_det:=0; + if debug=3 then formprinc.Caption:=''; exit; end; if (AdrSuiv=0) then begin if NivDebug=3 then AfficheDebug(intToSTR(j)+' Le suivant est un buttoir',clyellow); signal_suivant_det:=0; + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -5605,7 +5660,7 @@ begin begin s:='Trouvé feu suivant Adr='+IntToSTR(AdrFeu); AfficheDebug(s,clorange); - end; + end; end else begin @@ -5655,14 +5710,16 @@ begin end; end; } + if debug=3 then formprinc.Caption:=''; if (NivDebug=3) and (adrFeu=0) then AfficheDebug('Pas Trouvé de feu suivant au feu Adr='+IntToSTR(det1),clOrange); end; // renvoie l'état du signal suivant. Si renvoie 0, pas trouvé le signal suivant. // adresse : adresse du feu // rang=1 pour feu suivant, 2 pour feu suivant le 1, etc -// Dans AdresseFeuSuivant : adresse du feu suivant (variable globale) -function etat_signal_suivant(adresse,rang : integer) : integer ; +// retour dans AdrSignalsuivant : adresse du feu suivant +// stocke les éléments trouvés dans Elements +function etat_signal_suivant(Adresse,rang : integer;var AdrSignalsuivant : integer) : integer; var num_feu,etat,AdrFeu,i,j,prec,AdrSuiv,index2,voie : integer; aspect,combine : integer; TypePrec,TypeActuel : TEquipement; @@ -5689,7 +5746,7 @@ begin Affiche('Erreur 600 - feu '+IntToSTR(adresse)+' non trouvé',clred); if NivDebug=3 then AfficheDebug('Erreur 600 - feu '+IntToSTR(adresse)+' non trouvé',clred); etat_signal_suivant:=0; - AdresseFeuSuivant:=0; + AdrSignalsuivant:=0; exit; end; Etat:=0; @@ -5702,12 +5759,17 @@ begin Affiche('Msg 601 - feu '+intToSTR(adresse)+' détecteur non renseigné ',clOrange); if NivDebug=3 then AfficheDebug('Msg 601 - feu '+intToSTR(adresse)+' détecteur non renseigné ',clOrange); etat_signal_suivant:=0; - AdresseFeuSuivant:=0; + AdrSignalsuivant:=0; exit; end; + if debug=3 then formprinc.Caption:='Etat_signal_suivant '+intToSTR(adresse); actuel:=feux[i].Adr_el_suiv1; typeActuel:=feux[i].Btype_suiv1; + + elements[1].adresse:=actuel;elements[1].typ:=typeActuel; + idEl:=2; + if nivDebug=3 then AfficheDebug('Actuel ='+IntToSTR(actuel),clyellow); repeat inc(j); @@ -5726,17 +5788,24 @@ begin prec:=actuel;TypePrec:=TypeActuel; actuel:=AdrSuiv;TypeActuel:=typeGen; + if idEl<20 then + begin + elements[idEl].adresse:=actuel;elements[IdEl].typ:=typeActuel; + inc(idEl); + end; + if (AdrSuiv=9999) or (AdrSuiv=9996) then begin Etat_signal_suivant:=0; - AdresseFeuSuivant:=0; + AdrSignalsuivant:=0; exit; end; if (AdrSuiv=0) then begin if NivDebug=3 then AfficheDebug(intToSTR(j)+' Le suivant est un buttoir',clyellow); Etat_signal_suivant:=carre_F; // faire comme si c'était un signal au carré - AdresseFeuSuivant:=0; + AdrSignalsuivant:=0; + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -5819,8 +5888,9 @@ begin until (j=10) or ((AdrFeu<>0) and (num_feu=rang)); if etat=0 then Signal_Suivant:=0; etat_signal_suivant:=Etat; - AdresseFeuSuivant:=Signal_suivant; + AdrSignalsuivant:=Signal_suivant; if (NivDebug=3) and (adrFeu=0) then AfficheDebug('Pas Trouvé de feu suivant au feu Adr='+IntToSTR(ADresse),clOrange); + exit; end; // renvoie l'adresse de l'aiguille si elle est déviée après le signal et ce jusqu'au prochain signal @@ -5854,9 +5924,9 @@ begin repeat inc(j); - // le 3=demande si le suivant est un aiguillage en pointe dévié oui si AdrSuiv=9997 + // le 8=demande si le suivant est un aiguillage en pointe dévié oui si AdrSuiv=9997 // dans ce cas la variable globale AdrDevie est mise à jour - AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,3); + AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,8); // if NivDebug=3 then AfficheDebug('701 - Suivant signalaig='+IntToSTR(AdrSuiv),clyellow); if (AdrSuiv<>9997) and (AdrSuiv<>0) then @@ -5873,7 +5943,7 @@ begin if NivDebug=3 then AfficheDebug('trouvé signal '+intToSTR(AdrFeu)+' associé au détecteur '+IntToSTR(AdrSuiv),clyellow); end; end; - until (j=10) or (AdrSuiv>=9995) or (AdrFeu<>0) or (AdrSuiv=0) ; + until (j=10) or (AdrSuiv>=9990) or (AdrFeu<>0) or (AdrSuiv=0) ; if (AdrSuiv=9997) then begin s:='le signal '+intToSTR(adresse)+' doit afficher un rappel car l''aiguillage '+intToSTR(AdrDevie); @@ -5937,7 +6007,7 @@ begin end; -// renvoie vrai si une mémoire de zone est occupée du signal courant au signal suivant +// renvoie vrai si une mémoire de zone est occupée après le signal courant au signal suivant // sort de suite si on trouve un train // adresse=adresse du signal function test_memoire_zones(adresse : integer) : boolean; @@ -5959,6 +6029,7 @@ begin exit; end; + if debug=3 then formprinc.Caption:='Test_memoire_zones '+IntToSTR(adresse); Nfeux:=0; NFeuxMax:=1; // nombre de feux à trouver (nombre de cantons) @@ -5995,10 +6066,11 @@ begin begin // sortie si aucun détecteur déclaré sur le feu test_memoire_zones:=Pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; - Pres_train:=detecteur[actuel].etat; + Pres_train:=false; TypePrec:=det; dernierdet:=prec; @@ -6010,6 +6082,7 @@ begin if (AdrSuiv>9900) or (AdrSuiv=0) then begin test_memoire_zones:=Pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; prec:=actuel;TypePrec:=TypeActuel; @@ -6029,7 +6102,7 @@ begin if (typeactuel=det) and (dernierdet<>0) then begin - Pres_train:=MemZone[dernierdet,actuel].etat or Pres_Train; + Pres_train:=MemZone[dernierdet,actuel].etat or detecteur[actuel].etat or Pres_Train; if (nivDebug=3) then begin if Pres_Train then AfficheDebug('Présence train de '+intToSTR(dernierdet)+' à '+intToSTR(actuel),clyellow) @@ -6045,6 +6118,7 @@ begin if Pres_train then begin test_memoire_zones:=Pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; @@ -6058,6 +6132,7 @@ begin begin AdrFeu:=0;j:=10; // on ne trouve pas de suivant test_memoire_zones:=false; + if debug=3 then formprinc.Caption:=''; exit; end; if (AdrFeu<>0) then // si l'adresse est <>0 @@ -6072,6 +6147,7 @@ begin if nFeux=NFeuxMax then begin test_memoire_zones:=Pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; end @@ -6088,6 +6164,7 @@ begin if (AdrSuiv=0) or (AdrSuiv>9990) then begin test_memoire_zones:=Pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; prec:=actuel;TypePrec:=TypeActuel; @@ -6097,6 +6174,7 @@ begin inc(ife); until ife>=5; if (NivDebug>0) then AfficheDebug('Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow); + if debug=3 then formprinc.Caption:=''; test_memoire_zones:=Pres_train; end; @@ -6130,12 +6208,12 @@ function trouve_index_det_chrono(Adr,etat,index : integer) : integer; var i : integer; trouve : boolean; begin - if index<=0 then - begin + if index<=0 then + begin affiche('Erreur 784 index détecteur invalide',clred); AfficheDebug('Erreur 784 index détecteur invalide',clred); trouve_index_det_chrono:=0; - exit; + exit; end; i:=index; if i>N_Event_tick then begin trouve_index_det_chrono:=0;exit; end; @@ -6173,6 +6251,7 @@ begin end; } +// renvoie l'adresse du signal précédent au signal "adresse" function Signal_precedent(adresse : integer) : integer; var AdrSuiv,prec,ife,actuel,i,j,ifd, @@ -6181,6 +6260,7 @@ var malpositionne : boolean; s : string; begin + if debug=3 then formprinc.Caption:='Signal_precedent '+IntToSTR(adresse); if NivDebug>=1 then AfficheDebug('Proc Signal_Precedent'+intToSTR(adresse)+')',clyellow); i:=Index_feu(adresse); if (i=0) then @@ -6189,7 +6269,10 @@ begin AfficheDebug(s,clred); Affiche(s,clred); Signal_precedent:=0; + if debug=3 then formprinc.Caption:=''; + exit; end; + idEl:=1; Nfeux:=0; ife:=1; // index feu de 1 à 4 pour explorer les 4 détecteurs d'un feu @@ -6227,6 +6310,7 @@ begin // sortie si aucun détecteur déclaré sur le feu Signal_precedent:=0; if nivDebug=3 then AfficheDebug('Pas de voie '+intToSTR(ife),clyellow); + if debug=3 then formprinc.Caption:=''; exit; end; @@ -6234,16 +6318,16 @@ begin repeat inc(j); - - AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,2); // 2 car arrêt sur aiguille en talon mal positionnée + AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1); malpositionne:=(AdrSuiv=0) or (AdrSuiv>9990); if malpositionne then begin if (nivDebug=3) then begin - if (AdrSuiv>9990) then AfficheDebug('Aiguille en talon mal positionné',clYellow); + if (AdrSuiv>9990) then AfficheDebug('Erreur 41: Alg3='+intToSTR(AdrSuiv)+' Anomalie',clYellow); if AdrSuiv=0 then AfficheDebug('Buttoir',clyellow); end; + if debug=3 then formprinc.Caption:=''; exit; end; @@ -6252,6 +6336,12 @@ begin prec:=actuel;TypePrec:=TypeActuel; actuel:=AdrSuiv;TypeActuel:=typeGen; + if idEl<20 then + begin + elements[idEl].adresse:=actuel;elements[idEl].typ:=typeActuel; + inc(idEl); + end; + if typeactuel=det then begin dernierdet:=actuel; @@ -6272,6 +6362,7 @@ begin j:=0; s:='Trouvé feu '+IntToSTR(AdrFeu); Signal_precedent:=AdrFeu; + if debug=3 then formprinc.Caption:=''; exit; end else @@ -6287,29 +6378,39 @@ begin inc(ife); until ife>=5; if (NivDebug>0) then AfficheDebug('607. Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow); + if debug=3 then formprinc.Caption:=''; Signal_precedent:=0; end; -// présence train précédent les 3 cantons du signal (Nb_cantons_Sig) -function PresTrainPrec(Adresse : integer) : boolean; +// présence train précédent les n (NbCtSig) cantons du signal +// renvoie vrai si présence train +// dans AdrTrain: +// renvoie 0 si pas d +// renvoie l'adresse du train dans AdrTrain ou 0 si elle est indisponible +function PresTrainPrec(Adresse,NbCtSig : integer;var AdrTr : integer) : boolean; var AdrSuiv,prec,ife,actuel,i,j,ifd, dernierdet,AdrFeu,Nfeux,NFeuxMax,voie,index2 : integer; TypePrec,TypeActuel : TEquipement; - Pres_train,malpositionne : boolean; + Pres_train,malpositionne,etat : boolean; s : string; begin + AdrTr:=0; + if debug=3 then formprinc.Caption:='PresTrainPrec '+IntToSTR(adresse); if NivDebug>=1 then AfficheDebug('Proc testTrainPrec('+intToSTR(adresse)+')',clyellow); i:=Index_feu(adresse); if (i=0) then begin - AfficheDebug('Erreur 605 - feu '+IntToSTR(adresse)+' non trouvé',clred); - Affiche('Erreur 605 - feu '+IntToSTR(adresse)+' non trouvé',clred); - PresTrainPrec:=false; + AfficheDebug('Erreur 605 - Signal '+IntToSTR(adresse)+' non trouvé',clred); + Affiche('Erreur 605 - Signal '+IntToSTR(adresse)+' non trouvé',clred); + PresTrainPrec:=False; + AdrTr:=0; + if debug=3 then formprinc.Caption:=''; + exit; end; Nfeux:=0; - NFeuxMax:=Nb_cantons_Sig; // nombre de feux à trouver (nombre de cantons) + NFeuxMax:=NbCtSig; // nombre de feux à trouver (nombre de cantons) ife:=1; // index feu de 1 à 4 pour explorer les 4 détecteurs d'un feu repeat @@ -6341,6 +6442,7 @@ begin end; // détecteur sur le signal courant pres_Train:=Detecteur[actuel].etat; + if pres_train then AdrTr:=Detecteur[actuel].AdrTrain; TypeActuel:=det; if actuel=0 then @@ -6348,6 +6450,7 @@ begin // sortie si aucun détecteur déclaré sur le feu PresTrainPrec:=Pres_train; if nivDebug=3 then AfficheDebug('Pas de voie '+intToSTR(ife),clyellow); + if debug=3 then formprinc.Caption:=''; exit; end; @@ -6360,15 +6463,26 @@ begin malpositionne:=(AdrSuiv=0) or (AdrSuiv>9990); if malpositionne then begin - if AdrSuiv=0 then Pres_Train:=Pres_Train or (Detecteur[actuel].etat); - PresTrainPrec:=Pres_train; + if AdrSuiv=0 then + begin + PresTrainPrec:=Pres_Train or (Detecteur[actuel].etat); + AdrTr:=Detecteur[actuel].AdrTrain; + end; + if (nivDebug=3) then begin - if (AdrSuiv>9990) then AfficheDebug('Aiguille en talon mal positionné',clYellow); + if (AdrSuiv>9990) then AfficheDebug('Erreur 55: Alg3='+IntToSTR(AdrSuiv)+' Anomalie',clYellow); if AdrSuiv=0 then AfficheDebug('Buttoir',clyellow); - if Pres_train then AfficheDebug('Présence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow) + if Pres_train then + begin + s:='Présence train '; + if AdrTr<>0 then s:=s+'@'+IntToSTR(AdrTr)+' '; + s:=s+'de '+intToSTR(actuel)+' à '+intToSTR(dernierdet); + AfficheDebug(s,clYellow); + end else AfficheDebug('Absence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow); end; + if debug=3 then formprinc.Caption:=''; exit; end; @@ -6379,12 +6493,22 @@ begin if typeactuel=det then begin - Pres_train:=MemZone[actuel,dernierdet].etat or Pres_Train or (Detecteur[actuel].etat); - PresTrainPrec:=Pres_train; + etat:=Detecteur[actuel].etat; + Pres_train:=MemZone[actuel,dernierdet].etat or Pres_Train or (etat); + PresTrainPrec:=Pres_Train; + if etat then AdrTr:=Detecteur[actuel].AdrTrain; + if Pres_Train then begin - if (nivDebug=3) then AfficheDebug('Présence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow); - exit; + if (nivDebug=3) then + begin + s:='Présence train '; + if AdrTr<>0 then s:=s+'@'+IntToSTR(AdrTr)+' '; + s:=s+'de '+intToSTR(actuel)+' à '+intToSTR(dernierdet); + AfficheDebug(s,clYellow); + if debug=3 then formprinc.Caption:=''; + exit; + end; end else begin if nivDebug=3 then AfficheDebug('Absence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow);end; @@ -6398,6 +6522,8 @@ begin begin AdrFeu:=0; // on ne trouve pas de suivant PresTrainPrec:=false; + AdrTr:=0; + if debug=3 then formprinc.Caption:=''; exit; end; if (AdrFeu<>0) then // si l'adresse est <>0 @@ -6411,7 +6537,8 @@ begin if (NivDebug>0) And (not(Pres_Train)) then AfficheDebug(s+' et mémoire de zone à 0',clOrange); if nFeux=NFeuxMax then begin - PresTrainPrec:=Pres_train; + presTrainPrec:=pres_train; + if debug=3 then formprinc.Caption:=''; exit; end; end @@ -6428,19 +6555,24 @@ begin inc(ife); until ife>=5; if (NivDebug>0) then AfficheDebug('606. Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow); - PresTrainPrec:=Pres_train; + if debug=3 then formprinc.Caption:=''; + PresTrainPrec:=Pres_Train; end; // mise à jour de l'état d'un feu en fonction de son environnement et affiche le feu procedure Maj_Feu(Adrfeu : integer); -var Adr_det,etat,Aig,Adr_El_Suiv,modele,index,IndexAig : integer ; +var Adr_det,etat,Aig,Adr_El_Suiv,modele,index,IndexAig,trainreserve,AdrTrainLoc : integer ; PresTrain,Aff_semaphore,car : boolean; - code,combine : integer; + code,combine,AdrSignalsuivant : integer; Btype_el_suivant : TEquipement; s : string; begin - if signalDebug=AdrFeu then AffSignal:=true; + if affsignal=false then + begin + if signalDebug=AdrFeu then AffSignal:=true + else affsignal:=false; + end; if AffSignal then begin s:='Traitement du feu '+intToSTR(Adrfeu)+'------------------------------------'; @@ -6449,7 +6581,9 @@ begin end; index:=index_feu(Adrfeu); - if AdrFeu<>0 then + if debug=3 then formprinc.Caption:='Maj_Feu'+intToSTR(AdrFeu); + + if (AdrFeu<>0) and (index<>0) then begin modele:=Feux[index].aspect; Adr_det:=Feux[index].Adr_det1; // détecteur sur le signal @@ -6461,15 +6595,16 @@ begin begin //Affiche('Signal directionnel '+IntToSTR(AdrFeu),clyellow); Signal_direction(AdrFeu); + if debug=3 then formprinc.Caption:=''; exit; end; // signal non directionnel - etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant + etat:=etat_signal_suivant(AdrFeu,1,AdrSignalsuivant) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant if AffSignal then begin code_to_aspect(etat,code,combine); - s:='Etat_signal_suivant ('+intToSTR(AdresseFeuSuivant)+') est '; + s:='Etat_signal_suivant ('+intToSTR(AdrSignalsuivant)+') est '; s:=s+' à '; if code<>-1 then s:=s+etatSign[code]; if (Combine<>0) and (combine<>-1) then s:=s+' + '+etatSign[combine]; @@ -6480,12 +6615,13 @@ begin if (modele=2) then //or (feux[i].check<>nil) then // si carré violet begin //AfficheDebug('Feux à 2 feux',CLOrange); - // si aiguillage après signal mal positionnées ou pas de train avant le signal - PresTrain:=PresTrainPrec(AdrFeu); - if carre_signal(AdrFeu) or not(PresTrain) or (feux[index].VerrouilleCarre) then + // si aiguillage après signal mal positionnées ou réservé ou pas de train avant le signal + PresTrain:=PresTrainPrec(AdrFeu,Nb_cantons_Sig,AdrTrainLoc); + if carre_signal(AdrFeu,trainreserve) or not(PresTrain) or (feux[index].VerrouilleCarre) then begin Maj_Etat_Signal(AdrFeu,violet); envoi_signal(AdrFeu); + if debug=3 then formprinc.Caption:=''; exit; end else @@ -6494,6 +6630,7 @@ begin else Maj_Etat_Signal(AdrFeu,blanc); envoi_signal(AdrFeu); + if debug=3 then formprinc.Caption:=''; exit; end; end; @@ -6505,12 +6642,16 @@ begin PresTrain:=false; // détecteurs précédent le feu , pour déterminer si leurs mémoires de zones sont à 1 pour libérer le carré if (Feux[index].VerrouCarre) and (modele>=4) then - presTrain:=PresTrainPrec(AdrFeu); + presTrain:=PresTrainPrec(AdrFeu,Nb_cantons_Sig,AdrTrainLoc); //etape A // présence train par adresse train if AffSignal then afficheDebug('Fin de la recherche des 4 détecteurs précédents-----',clOrange); + // si le signal peut afficher un carré et les aiguillages après le signal sont mal positionnées ou aig réservé ou que pas présence train avant signal et signal // verrouillable au carré, afficher un carré - car:=carre_signal(AdrFeu); + car:=carre_signal(AdrFeu,trainreserve); // si trainReserve<>0, réservé par le train + // En mode roulage, si la réservation est faite par le train détecté en étape A, ne pas verrouiller au carré + if roulage and (trainreserve<>0) and (AdrTrainLoc=TrainReserve) then car:=false; + // conditions supplémentaires de carré en fonction des aiguillages décrits car:=cond_carre(AdrFeu) or car; if AffSignal and car then AfficheDebug('le signal a des aiguilles en talon aval mal positionnées',clYellow); @@ -6628,7 +6769,7 @@ begin end; envoi_signal(AdrFeu); if signalDebug=AdrFeu then begin AffSignal:=false;nivDebug:=0;end; - application.ProcessMessages; // évite le clignotement + if debug=3 then formprinc.Caption:=''; end; Procedure Maj_feux; @@ -6648,6 +6789,7 @@ end; // trouve l'index d'un détecteur dans une branche depuis la fin de la branche // si pas trouvé, renvoie 0 +// non utilisé function index_detecteur_fin(detecteur,Num_branche : integer) : integer; var dernier,i,j : integer; trouve : boolean; @@ -6692,93 +6834,212 @@ begin (BrancheN[branche_trouve,IndexBranche_trouve-1].Adresse=0) and (BrancheN[branche_trouve,IndexBranche_trouve-1].BType=buttoir) ) end; -// réserve (reserve=true) ou libère la réservation (false) le canton à partir de det1 à det2 au train d'adresse AdrTrain -// et ralentissement si signal suivant est à l'avertissement -// et arrêt si signal suivant au rouge -// det1 et det2 doivent être contigus -procedure reserve_canton(det1,det2 : integer;front : boolean;AdrTrain : integer;reserve : boolean); -var adresse,i,j,etat : integer; - rouge,jauneC,rappel30C,rappel60C,entree_Signal : boolean; + +// renvoie vrai si le signal adresse est dans le sens det1 det2 +function signal_sens(adrSig,det1,det2 : integer) : boolean; +var i,it,suiv,succ,actuel : integer; + typeAct,typSuiv : tEquipement; +begin + if debug=3 then formprinc.Caption:='Signal_sens '+IntToSTR(AdrSig); + it:=0; + i:=index_feu(adrsig); + if i=0 then + begin + result:=false; + if debug=3 then formprinc.Caption:=''; + exit; + end; + actuel:=det1; + typeAct:=det; + suiv:=feux[i].Adr_el_suiv1; + typSuiv:=feux[i].Btype_suiv1; + if suiv=det2 then + begin + signal_sens:=true; + if debug=3 then formprinc.Caption:=''; + exit; + end; + repeat + //parcourir les éléments jusque detecteur2 + // oui, est-il dans le bon sens? + succ:=suivant_alg3(actuel,typeAct,suiv,typSuiv,1); + actuel:=suiv;typeact:=typSuiv; + suiv:=succ;typSuiv:=typeGen; + inc(it); + until (succ=det2) or (it>7); + if debug=3 then formprinc.Caption:=''; + signal_sens:=succ=det2; +end; + +// libère le canton avant detecteur2 comportant un signal et le signal précédent +// attention le détecteur 2 n'est pas forcément associé à un signal (et dans le bon sens +Procedure libere_canton(detecteur1,detecteur2 : integer); +var sd2,i,j,AdrPrec : integer; typ : tEquipement; begin - if avecroulage=0 then exit; - // trouve le signal suivant - //if reserve then Affiche('proc reserve_canton '+intToSTR(det1)+' '+intToSTr(det2),clred); - //if not(reserve) then Affiche('proc déreserve_canton '+intToSTR(det1)+' '+intToSTr(det2),clred); + if not(roulage) then exit; + if traceliste then afficheDebug('demande libération canton '+intToSTR(detecteur1)+' '+intToSTR(detecteur2),clorange); - // sur demande de déreservation, libérer les éléments verrouillés - if not(reserve) then + // est-on en limite de canton du detecteur 2 pour le libérer? + sd2:=signal_detecteur(detecteur2); // trouve le signal associé au detecteur2 + if sd2=0 then exit; // pas de signal associé + + // ce signal sd2 est il dans le bon sens + i:=signal_suivant_det(detecteur1,detecteur2); // adresse du signal associé au détecteur + if i<>sd2 then exit; + + // trouver le signal précédent + i:=Signal_precedent(i); // trouve les éléments entre les deux signaux + + if traceListe then AfficheDebug('Libération canton det '+IntToSTR(detecteur1)+' '+intToSTR(detecteur2)+' : ',clLime); + for i:=1 to idEl-1 do begin - for i:=1 to idEl do + j:=elements[i].adresse; + typ:=elements[i].typ; + if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then begin - adresse:=elements[i].Adresse; - typ:=elements[i].typ; - if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then - begin - Aiguillage[index_aig(Adresse)].AdrTrain:=0; - end; + if traceListe then Affichedebug_Suivi(intToSTR(j)+' ',clLime); + Aiguillage[index_aig(j)].AdrTrain:=0; // libère l'aiguillage + end; + end; + Maj_Feux; +end; + +// réserve le canton du detecteur équipé du feu (non compris) au feu suivant +procedure reserve_canton(detecteur1,detecteur2,adrtrain : integer); +var it,AdrSig,actuel,succ,Suiv,i,j,etat,etatSuiv,AdrSignalsuivant : integer; + rouge,cas2 : boolean; + typ,typSuiv,typeAct : tEquipement; +begin + if not(roulage) then exit; + if traceliste then afficheDebug('demande réservation canton '+intToSTR(detecteur1)+' '+intToSTR(detecteur2)+' par train @'+intToSTR(adrtrain),clorange); + + // y a t-il un signal sur le détecteur1 + cas2:=false; + AdrSig:=signal_detecteur(detecteur1); // trouve le signal associé au detecteur1 + if adrSig<>0 then + begin + // si le signal est dans le bon sens + if signal_sens(AdrSig,detecteur1,detecteur2) then cas2:=true; // oui + end; + + if not(cas2) then AdrSig:=signal_suivant_det(detecteur1,detecteur2); + + if traceListe then afficheDebug('le signal suivant est '+intToSTR(AdrSig),clyellow); + etat:=feux[index_feu(AdrSig)].etatSignal; + + etatSuiv:=etat_signal_suivant(AdrSig,1,AdrSignalsuivant); //réserve le canton du signal AdrSig au suivant : AdresseFeuSuivant + // dans le bon sens + + rouge:=testbit(etat,semaphore) or testbit(etat,carre) or testbit(etat,violet); + if rouge then + begin + if TraceListe then AfficheDebug('Le signal '+intToSTR(AdrSig)+' étant rouge, pas de réservation aval pour le train @'+intToSTR(adrtrain),clYellow); + exit; + end; + +// etat_signal_suivant(i,1); // AdresseFeuSuivant et faire la réservation + + if TraceListe then AfficheDebug('Réservation canton det '+intToSTR(detecteur1)+' '+intToSTR(detecteur2)+' par train @'+intToSTR(adrTrain)+' : ',clLime); + // marquer les aiguillages réservés + for i:=1 to idEl-1 do + begin + j:=elements[i].adresse; + typ:=elements[i].typ; + if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then + begin + if TraceListe then AfficheDebug_Suivi(intToSTR(j)+' ',clOrange); + Aiguillage[index_aig(j)].AdrTrain:=AdrTrain; end; end; - // piloter vitesse loco suivant feu: de det1 à front montant de det2 - if reserve and front then + // réservation canton suivant + AdrSig:=AdrSignalSuivant; + etat_signal_suivant(AdrSig,1,AdrSignalsuivant); //réserve le canton du signal AdrSig au suivant : AdresseFeuSuivant + if traceListe then afficheDebug('le signal sursuivant est '+intToSTR(AdrSig),clyellow); + rouge:=testbit(etatSuiv,semaphore) or testbit(etatSuiv,carre) or testbit(etatSuiv,violet); + if rouge then begin - Adresse:=signal_suivant_det(det1,det2); // construit le tableau des ééments réservés de det1 à det2 - for i:=1 to idEl do + if TraceListe then AfficheDebug('Le signal sursuivant '+intToSTR(AdrSig)+' étant rouge, pas de réservation aval pour le train @'+intToSTR(adrtrain),clYellow); + exit; + end; + etat:=etat_signal_suivant(AdrSig,1,AdrSignalsuivant); //réserve le canton du signal + // marquer les aiguillages réservés + if traceliste then AfficheDebug('Elements réservés: ',clOrange); + for i:=1 to idEl-1 do + begin + j:=elements[i].adresse; + typ:=elements[i].typ; + if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then begin - j:=elements[i].adresse; - typ:=elements[i].typ; - if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then Aiguillage[index_aig(j)].AdrTrain:=AdrTrain; + if TraceListe then AfficheDebug_Suivi(intToSTR(j)+' ',clOrange); + Aiguillage[index_aig(j)].AdrTrain:=AdrTrain; // réserve l'aiguillage end; + end; + Maj_feux; +end; - //Affiche('Le feu suivant est '+intToSTR(adresse),clred); - i:=index_feu(adresse); - if i=0 then exit; +// pilote le train sur le détecteur det2, d'adresse adrtrain +// le det1 indique d'ou vient le train pour le bon sens du signal +procedure pilote_train(det1,det2,adrtrain : integer); +var entree_signal,jauneC,rappel30C,rappel60C,rouge : boolean; + i,adresse,adresse2,Etat,voie,i2 : integer; +begin + if not(roulage) or (adrtrain=0) then exit; + i:=index_feu_det(det2,voie,i2); // index du feu associé au det2 j:=signal_detecteur(det3); - etat:=feux[i].EtatSignal; - rouge:=testbit(etat,semaphore) or testbit(etat,carre) or testbit(etat,violet); - jauneC:=testbit(etat,jaune); - rappel30C:=testbit(etat,rappel_30); - rappel60C:=testbit(etat,rappel_60); - entree_signal:=(feux[i].Adr_det1=det2); // + if i=0 then exit; + adresse:=feux[i].adresse; //voir si il est dans le bon sens - // si le feu est au rouge et qu'on entre dans son détecteur - if rouge and entree_signal then + adresse2:=signal_suivant_det(det1,det2); // renvoie le signal suivant dans le sens det1 det2 + if adresse<>adresse2 then exit; // non pas dans le bon sens + + etat:=feux[i].EtatSignal; + + rouge:=testbit(etat,semaphore) or testbit(etat,carre) or testbit(etat,violet); + jauneC:=testbit(etat,jaune); + rappel30C:=testbit(etat,rappel_30); + rappel60C:=testbit(etat,rappel_60); + + entree_signal:=detecteur[det2].etat; + + // si le feu est au rouge et qu'on entre dans son détecteur + if rouge and entree_signal then + begin + if traceListe then AfficheDebug('Signal '+intToSTR(adresse)+' au rouge - Arrêt train @'+intToSTR(AdrTrain),clLime); + i:=index_train_adresse(AdrTrain); + if (i<>0) and (i0) and (i0) and (i0) and (i0) and (i0 then inc(nbre); + end; + + if ((nbre<2) and (i_simule>=77)) or (i_simule>=118) then + begin + Affiche('Erreur suivi: '+intToSTR(i_simule),clred); + Index_Simule:=0; // fin de simulation + I_Simule:=0; + MsgSim:=false; + StopSimu:=true; + //exit; + end; + { + if i_simule<>0 then + begin + s:=IntToSTR(i_simule)+' tick='+intToSTR(Tablo_simule[i_simule].tick)+' '+intToSTR(det3); + if front then s:=s+' (1)' else s:=s+' (0)'; + Affiche(s,clLime); + end; + } det3:=adresse; // c'est le nouveau détecteur if det3=0 then exit; // pas de nouveau détecteur - s:='Le nouveau détecteur est '+IntToSTR(det3); + traite:=false; + s:='V2A->Le nouveau détecteur est '+IntToSTR(det3); if front then s:=s+' (1)' else s:=s+' (0)'; FormDebug.MemoEvtDet.lines.add(s) ; - if TraceListe or dupliqueEvt then AfficheDebug(s,clyellow) ; + if dupliqueEvt then AfficheDebug(s,clyellow) ; for i:=1 to N_trains do begin @@ -6805,77 +7093,127 @@ begin det1:=event_det_train[i].det[1].adresse; det2:=event_det_train[i].det[2].adresse; - if det2=det3 then + { + if ((det2=det3) and (nbre=2)) or ((det1=det3) and (nbre=1)) then begin s:='Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); FormDebug.MemoEvtDet.lines.add(s); if dupliqueEvt then AfficheDebug(s,clyellow); exit; // sortir end; + } // 1 élément dans le tableau et détecteur à 0--------------------------------------------- if (nbre=1) and not(front) then begin - // traiter pour les cas avec 1 élément - if traceListe then AfficheDebug('1-0 traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); - // vérifier si l'élément du tableau et le nouveau sont contigus - Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2 - if (Adj1=det3) or (Adj2=det3) then + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + // vérifie si les détecteurs adjacents sont à 0 pour remplir le champ "prévision" de det3 : le train se dirige de det3 à adj1 ou adj2 + if not(detecteur[Adj1].etat) then begin - with event_det_train[i] do + detecteur[det3].vers1:=Adj1; // le train de det3 peut aller vers adj1 + detecteur[adj1].de1:=det3; // marquer adj1 que le train vient de det3 + end + else detecteur[det3].vers1:=0; + if not(detecteur[Adj2].etat) then + begin + detecteur[det3].vers2:=Adj2; // le train de det3 peut aller vers adj2 + detecteur[adj2].de1:=det3; // marquer adj2 que le train vient de det3 + end + else detecteur[det3].vers2:=0; + + + if (roulage) then + begin + // traiter pour les cas avec 1 élément + if traceListe then AfficheDebug('1-0 traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); + // vérifier si l'élément du tableau et le nouveau sont contigus + if (Adj1=det1) or (Adj2=det1) then begin - det[2].adresse:=det3; - det[2].etat:=front; - NbEl:=2; - end; - detecteur[det3].train:=event_det_train[i].nom_train; // affecter le nom du train au détecteur - AdrSuiv:=detecteur_suivant_el(det1,det,det3,det,1); - - //*** route validée *** - MemZone[det1,det3].etat:=TRUE; // valide la nouvelle zone - MemZone[det1,det3].train:=event_det_train[N_trains].nom_train; - MemZone[det1,det3].AdrTrain:=event_det_train[N_trains].Adrtrain; - - MemZone[det3,det1].etat:=False; // on dévalide la zone inverse - MemZone[det3,det1].train:=''; - MemZone[det3,det1].AdrTrain:=0; - - // stockage dans historique de zones - if i<20 then - begin - n:=TrainZone[i].Nbre+1; - if n>MaxZones then n:=1; - with TrainZone[i] do + with event_det_train[i] do begin - Nbre:=n; - Zone[n].det1:=det1; - Zone[n].det2:=det3; - train:=MemZone[det1,det3].train; - AdrTrain:=MemZone[det1,det3].Adrtrain; + det[2].adresse:=det3; + det[2].etat:=front; + NbEl:=2; end; - end; - reserve_canton(det1,det3,false,0,false); // déreserve le canton précedent - reserve_canton(det3,AdrSuiv,false,TrainZone[i].Adrtrain,true); // réserve canton courant - event_act(det1,det3,1,''); // évènement actionneur - // affichages - s:='1-0 route ok de '+intToSTR(det1)+' à '+IntToSTR(det3); + adrTrainLoc:=event_det_train[i].Adrtrain; + Train_ch:=event_det_train[i].nom_train; + if (AdrTrainLoc=0) and roulage then Affiche('Démarrage train non placé depuis détecteur '+intToSTR(det3),clred); + + // en mode roulage, on a placé les trains + + j:=1; + repeat + trouve:=placement[j].detdir=det3; + inc(j); + until (j>6) or trouve; + dec(j); + //si début de démarrage train i + if not(trouve) or (TrainZone[i].Nbre>0) then exit; + // affecter le nouveau détecteur + detecteur[det3].train:=Train_ch; + detecteur[det3].AdrTrain:=AdrTrainLoc; + // libérer l'ancien + //detecteur[event_det_train[i].Det[1].adresse].AdrTrain:=0; + //detecteur[event_det_train[i].Det[1].adresse].train:=''; + + AdrSuiv:=detecteur_suivant_el(det1,det,det3,det,1); + //*** route validée *** + MemZone[det1,det3].etat:=FALSE; // dévalide l'ancienne zone + MemZone[det1,det3].train:=''; + MemZone[det1,det3].Adrtrain:=0; + MemZone[det3,det1].etat:=FALSE; // dévalide l'ancienne zone inverse + MemZone[det3,det1].train:=''; + MemZone[det3,det1].Adrtrain:=0; + + MemZone[det3,AdrSuiv].etat:=true; // valide la nouvelle zone + MemZone[det3,AdrSuiv].train:=Train_ch; + MemZone[det3,AdrSuiv].AdrTrain:=AdrTrainLoc; + MemZone[AdrSuiv,det3].etat:=False; // on dévalide la zone inverse + MemZone[AdrSuiv,det2].train:=''; + MemZone[AdrSuiv,det2].AdrTrain:=0; + + // stockage dans historique de zones + if iMaxZones then n:=1; + with TrainZone[i] do + begin + Nbre:=n; + Zone[n].det1:=det1; + Zone[n].det2:=det3; + train:=train_ch; + AdrTrain:=AdrTrainLoc + end; + end; + //reserve_canton(det1,det3,false,0,false); // déreserve le canton précedent + //reserve_canton(det3,AdrSuiv,false,TrainZone[i].Adrtrain,true); // si feu réserve canton courant + libere_canton(det1,det3); // on quitte det3 + reserve_canton(det3,adrSuiv,adrtrainLoc); + event_act(det1,det3,1,''); // évènement actionneur + maj_feux; + + // affichages + Affiche_Evt('1-0 route ok de '+intToSTR(det1)+' à '+IntToSTR(det3),clWhite); FormDebug.MemoEvtDet.lines.add(s); if traceListe then AfficheDebug(s,clyellow); //Affiche(s,CouleurTrain[index_couleur]); if AffAigDet then AfficheDebug(s,clyellow); + + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + Affiche_Evt('1-0. Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------',couleurTrain[index_couleur]); with FormDebug.MemoEvtDet do begin - lines.add('1-0. Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------'); s:=intToSTR(event_det_train[i].det[1].adresse); - lines.add(s); + Affiche_Evt(s,couleurTrain[index_couleur]); if dupliqueEvt or traceliste then AfficheDebug(s,clyellow); s:=intToSTR(event_det_train[i].det[2].adresse); - lines.add(s); + Affiche_evt(s,couleurTrain[index_couleur]); if dupliqueEvt or traceliste then AfficheDebug(s,clyellow); end; - if formTCO.Showing then + if TCOouvert then begin // activation if ModeCouleurCanton=0 then zone_TCO(det3,AdrSuiv,1) @@ -6885,66 +7223,77 @@ begin end else begin - s:='1-0 Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); - FormDebug.MemoEvtDet.lines.add(s); - exit; + Affiche_evt('les éléments '+intToSTR(det1)+' et '+intToSTR(det3)+' ne sont pas contigus',clyellow); + // det3 et det1 non adjacents end; end; + end; - // 1 élément dans le tableau et détecteur à 1--------------------------------------------- + // 1 élément dans le tableau et détecteur à 1 : on pilote le train si feu sur det3--------------------------------------------- if (nbre=1) and front then begin - if traceListe then AfficheDebug('1-1 traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); + if traceListe then AfficheDebug('1-1 Traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); + if detecteur[det3].de1=det1 then // vérifier si l'élément du tableau et le nouveau sont contigus - Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2 - if (Adj1=det3) or (Adj2=det3) then + //Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2 + //if (Adj1=det3) or (Adj2=det3) then begin - detecteur[det3].train:=event_det_train[i].nom_train; // affecter le nom du train au détecteur - detecteur[det3].AdrTrain:=event_det_train[i].AdrTrain ; // affecter l'@ du train au détecteur + Train_ch:=event_det_train[i].nom_train; + AdrTrainLoc:=event_det_train[i].AdrTrain; - detecteur[det1].train:=''; // désaffecter le nom du train du détecteur précédent - detecteur[det1].AdrTrain:=0; - - //*** route validée *** - MemZone[det1,det3].etat:=TRUE; // valide la nouvelle zone - MemZone[det1,det3].train:=event_det_train[N_trains].nom_train; - MemZone[det1,det3].AdrTrain:=event_det_train[N_trains].Adrtrain; - - MemZone[det3,det1].etat:=False; // on dévalide la zone inverse - - reserve_canton(det1,det3,true,0,true); // 1er true=pilotage de train par signal suivant - event_act(det1,det3,1,''); // activation zone - - // affichages - s:='route ok de '+intToSTR(det1)+' à '+IntToSTR(det3); - FormDebug.MemoEvtDet.lines.add(s); - if traceListe then AfficheDebug(s,clyellow); - With FormDebug.RichEdit do + // en mode roulage, on a placé les trains + if roulage then begin - s:='Train '+IntToSTR(i)+' '+intToStr(det1)+' à '+intToStr(det3); - Lines.Add(s); - index_couleur:=((i - 1) mod NbCouleurTrain) +1; - RE_ColorLine(FormDebug.RichEdit,lines.count-1,CouleurTrain[index_couleur]); - end; - if TraceListe then AfficheDebug(s,clyellow); - Affiche(s,CouleurTrain[index_couleur]); - if AffAigDet then AfficheDebug(s,clyellow); + j:=1; + repeat + trouve:=placement[j].detdir=det3; + inc(j); + until (j>6) or trouve; + dec(j); + //si début de démarrage train i + if trouve and (TrainZone[i].Nbre=0) and (det10 then Maj_Feu(j); exit; - end - else - begin - if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); - end; + end; + if Traceliste then AfficheDebug(inttoSTR(det3)+' n''est pas contigu à '+intToSTR(det1)+' pour le train '+intToSTR(i),clyellow); + traite:=true; // traiter le train suivant end; // 2 éléments dans le tableau et détecteur à 0--------------------------------------------- @@ -6952,270 +7301,420 @@ begin begin if TraceListe or (NivDebug=3) then AfficheDebug('2-0 traitement Train n°'+intToSTR(i)+' 2 détecteurs',clyellow); // front descendant sur détecteur 2 + det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) + if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clYellow); + if (det_suiv=det3) then begin - det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) - if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clYellow); - if (det_suiv=det3) then + if TraceListe then AfficheDebug('La route est valide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' sont contigus',clyellow); + // ici on cherche le suivant à det2 det3, algo=1 + AdrSuiv:=detecteur_suivant_el(det2,det,det3,det,0); + if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),clyellow); + if (Adrsuiv>=9990) then begin - if TraceListe then AfficheDebug('La route est valide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' sont contigus',clyellow); - // ici on cherche le suivant à det2 det3, algo=1 - AdrSuiv:=detecteur_suivant_el(det2,det,det3,det,0); // 2 arret si aiguilage en talon mal positionné ou réservé - if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),clyellow); - - {inutile if adrSuiv>=9995 then - begin - Affiche('Franchissement train@'+IntToSTR(detecteur[det3].AdrTrain)+' '+detecteur[det3].Train+' '+intToSTR(det2)+' à '+intToSTR(det3)+' interdit ',clred); - exit; - end;} - // voir s'il y a un croisement de det2 à det3 - - //nc:=Test_croisement(det2,det3,1); // nombre de croisements rencontrés - //for j:=1 to nc do - //begin - // croisement[j].affect_train:=i; - // s:='Croisements entre '+intToSTR(det2)+' '+intToSTR(det3)+' : '+intToSTR(croisement[i].adresse)+' '+intToSTR(det2)+'à'+intToSTR(det3); - // s:=s+' '+intToSTR(croisement[i].entree)+'->'+intToSTR(croisement[i].sortie)+' Tr='+intToSTR(i); - // FormDebug.RichEdit.Lines.add(s); - //end; - - if (Adrsuiv>=9995) then - begin - //Affiche('Erreur 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clRed); - if (NivDebug=3) or TraceListe then AfficheDebug('Msg 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clorange); - end - else - begin - if (det2MaxZones then n:=1; - with TrainZone[i] do - begin - Nbre:=n; - Zone[n].det1:=det3; - Zone[n].det2:=AdrSuiv; - Nbre:=n; - end; - // zone suivante en prévision - det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1); - TrainPrevZone[i][1]:=det4; - end; - - event_act(det2,det3,0,''); // désactivation zone - event_act(det3,AdrSuiv,1,''); // activation zone - - end - else - begin - s:='Erreur 740 : Adresse détecteur trop élevé '; - if det2>NbMemZone then s:=s+inttostr(det2)+' '; - if det3>NbMemZone then s:=s+inttostr(det2)+' '; - if AdrSuiv>NbMemZone then s:=s+inttostr(det2); - Affiche(s,clred); - end; - - // supprimer le 1er et décaler - with event_det_train[i] do - begin - det[1].adresse:=event_det_train[i].det[2].adresse; - det[1].etat:=event_det_train[i].det[2].etat; - det[2].adresse:=det3; - det[2].etat:=detecteur[det3].etat; - NbEl:=2; - end; - - // affichages - s:='route ok de '+intToSTR(det2)+' à '+IntToSTR(det3)+' '+intToSTR(det3)+' à '+IntToSTR(Adrsuiv); - FormDebug.MemoEvtDet.lines.add(s); - if traceListe then AfficheDebug(s,clyellow); - With FormDebug.RichEdit do - begin - s:='Train '+IntToSTR(i)+' '+intToStr(det2)+' à '+intToStr(det3)+'=>'+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); - s:=s+' Prev='+intToSTR(TrainPrevZone[i][1]); - Lines.Add(s); - index_couleur:=((i - 1) mod NbCouleurTrain) +1; - RE_ColorLine(FormDebug.RichEdit,lines.count-1,CouleurTrain[index_couleur]); - end; - s:='Train '+IntToSTR(i)+' sur zones '+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); - if traceListe then AfficheDebug(s,clyellow); - Affiche(s,CouleurTrain[index_couleur]); - if AffAigDet then AfficheDebug(s,clyellow); - - detecteur[det3].train:=event_det_train[i].nom_train; // affectation nom train au nouveau détecteur - detecteur[event_det_train[i].det[1].adresse].train:=''; // désaffectation du nom de train de l'ancien détecteur - - with FormDebug.MemoEvtDet do - begin - s:='1.Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------'; - lines.add(s); - s:=intToSTR(event_det_train[i].det[1].adresse); - lines.add(s); - s:=intToSTR(event_det_train[i].det[2].adresse); - lines.add(s); - end; - if TraceListe or dupliqueEvt then - begin - AfficheDebug(s,clyellow); - AfficheDebug(intToSTR(event_det_train[i].det[1].adresse),clyellow); - AfficheDebug(intToSTR(event_det_train[i].det[2].adresse),clyellow); - end; - if formTCO.Showing then - begin - zone_TCO(det2,det3,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(det3,AdrSuiv,1) - else zone_TCO(det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train - end; - - // mettre à jour si présence signal sur det3 pour le passer au rouge de suite - j:=signal_detecteur(det3); - if j<>0 then - begin - Maj_Feu(j); - k:=index_feu(j); - // si le feu j est au rouge - etat:=feux[k].etatsignal; - if (testBit(etat,carre)) or (testBit(etat,semaphore)) or (testBit(etat,semaphore_cli)) then - begin - // Maj du signal précédent (pour l'avertissement) - j:=Signal_precedent(j); - if j<>0 then - begin - maj_feu(j); - j:=Signal_precedent(j); - if j<>0 then maj_feu(j); - end; - end; - end; - maj_feux; // mise à jour générale - maj_feux; // 2eme mise à jour - maj_feux; - exit; // sortir absolument - end; + //Affiche('Erreur 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clRed); + if (NivDebug=3) or TraceListe then AfficheDebug('Msg 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clorange); end else begin - if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); - if event_det_train[i].det[2].adresse=det3 then + if (det2MaxZones then n:=1; + with TrainZone[i] do + begin + Nbre:=n; + Zone[n].det1:=det3; + Zone[n].det2:=AdrSuiv; + Nbre:=n; + end; + // zone suivante en prévision + det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1); + TrainPrevZone[i][1]:=det4; + end; + + event_act(det2,det3,0,''); // désactivation zone + event_act(det3,AdrSuiv,1,''); // activation zone + end + else + begin + s:='Erreur 740 : Adresse détecteur trop élevé '; + if (det2>NbMemZone) and (det2<9990) then s:=s+inttostr(det2)+' '; + if (det3>NbMemZone) and (det3<9990) then s:=s+inttostr(det3)+' '; + if (AdrSuiv>NbMemZone) and (AdrSuiv<9990) then s:=s+inttostr(AdrSuiv); + Affiche(s,clred); end; + + // supprimer le 1er et décaler + with event_det_train[i] do + begin + det[1].adresse:=event_det_train[i].det[2].adresse; + det[1].etat:=event_det_train[i].det[2].etat; + det[2].adresse:=det3; + det[2].etat:=detecteur[det3].etat; + NbEl:=2; + end; + + // affichages + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + s:='2-0 Train n°'+intToSTR(i)+' route ok de '+intToSTR(det2)+' à '+IntToSTR(det3)+' '+intToSTR(det3)+' à '+IntToSTR(Adrsuiv); + FormDebug.MemoEvtDet.lines.add(s); + if traceListe then AfficheDebug(s,clyellow); + if DebugAffiche then With FormDebug.RichEdit do + begin + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' @'+intToSTR(AdrTrainLoc); + s:=s+' '+intToStr(det2)+' à '+intToStr(det3)+'=>'+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + s:=s+' Prev='+intToSTR(TrainPrevZone[i][1]); + Lines.Add(s); + RE_ColorLine(FormDebug.RichEdit,lines.count-1,CouleurTrain[index_couleur]); + end; + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' @'+intToSTR(AdrTrainLoc); + s:=s+' '+Train_ch+' sur zones '+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + if traceListe then AfficheDebug(s,clyellow); + + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' '+train_ch+' @'+intToSTR(AdrTrainLoc); + s:=s+' sur zones '+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + Affiche(s,CouleurTrain[index_couleur]); + if AffAigDet then AfficheDebug(s,clyellow); + + Affiche_Evt('1.Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------',couleurTrain[index_couleur]); + with FormDebug.MemoEvtDet do + begin + Affiche_Evt(intToSTR(event_det_train[i].det[1].adresse),couleurTrain[index_couleur]); + Affiche_Evt(intToStr(event_det_train[i].det[2].adresse),couleurTrain[index_couleur]); + end; + if TraceListe or dupliqueEvt then + begin + AfficheDebug(intToSTR(event_det_train[i].det[1].adresse),clyellow); + AfficheDebug(intToSTR(event_det_train[i].det[2].adresse),clyellow); + end; + if TCOouvert then + begin + zone_TCO(det2,det3,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(det3,AdrSuiv,1) + else zone_TCO(det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + end; + + // mettre à jour si présence signal sur det3 pour le passer au rouge de suite + j:=signal_detecteur(det3); + if j<>0 then + begin + Maj_Feu(j); + k:=index_feu(j); + // si le feu j est au rouge + etat:=feux[k].etatsignal; + if (testBit(etat,carre)) or (testBit(etat,semaphore)) or (testBit(etat,semaphore_cli)) then + begin + // Maj du signal précédent (pour l'avertissement) + j:=Signal_precedent(j); + if j<>0 then + begin + maj_feu(j); + j:=Signal_precedent(j); + if j<>0 then maj_feu(j); + end; + end; + end; + maj_feux; // mise à jour générale + maj_feux; // 2eme mise à jour + maj_feux; + exit; // sortir absolument end; end + else + begin + if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); + if event_det_train[i].det[2].adresse=det3 then + begin + s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + FormDebug.MemoEvtDet.lines.add(s); + if dupliqueEvt then AfficheDebug(s,clyellow); + // exhit sortir + end; + end; + traite:=true; end; if (nbre=2) and front then begin if TraceListe or (NivDebug=3) then AfficheDebug('2-1 traitement Train n°'+intToSTR(i)+' 2 détecteurs',clyellow); // front descendant sur détecteur 2 - det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) - if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clYellow); - if (det_suiv=det3) then + det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) + if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clYellow); + if (det_suiv=det3) then + begin + if TraceListe then AfficheDebug('La route est valide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' sont contigus',clyellow); + if (det1NbMemZone then s:=s+inttostr(det2)+' '; - if det3>NbMemZone then s:=s+inttostr(det2)+' '; - if AdrSuiv>NbMemZone then s:=s+inttostr(det2); - Affiche(s,clred); - end; - // stockage dans historique de zones sauf s'il est déja stocké - if i<20 then - begin - n:=TrainZone[i].Nbre; - if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then - begin - n:=TrainZone[i].Nbre+1; - if n>MaxZones then begin n:=1;end; - TrainZone[i].Nbre:=n; - TrainZone[i].Zone[n].det1:=det2; - TrainZone[i].Zone[n].det2:=det3; - TrainZone[i].Nbre:=n; - // zone suivante en prévision - det4:=detecteur_suivant_EL(det2,det,det3,det,1); - TrainPrevZone[i][1]:=det4; - end; - end; - - // affichages - s:='route ok de '+intToSTR(det2)+' à '+IntToSTR(det3)+' '+intToSTR(det3)+' à '+IntToSTR(Adrsuiv); - FormDebug.MemoEvtDet.lines.add(s); - if traceListe then AfficheDebug(s,clyellow); - With FormDebug.RichEdit do - begin - s:='Train '+IntToSTR(i)+' '+intToStr(det2)+' à '+intToStr(det3); - Lines.Add(s); - index_couleur:=((i - 1) mod NbCouleurTrain) +1; - RE_ColorLine(FormDebug.RichEdit,lines.count-1,CouleurTrain[index_couleur]); - end; - if TraceListe then AfficheDebug(s,clyellow); - Affiche(s,CouleurTrain[index_couleur]); - if AffAigDet then AfficheDebug(s,clyellow); - - - if formTCO.Showing then - begin - zone_TCO(det1,det2,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(det2,det3,1) - else zone_TCO(det2,det3,2); // affichage avec la couleur de index_couleur du train - end; - exit; // sortir absolument + pilote_train(det2,det3,adrtrainLoc); // pilote le train sur det3 + // test si on peut réserver le canton suivant + det_suiv:=det_suiv_cont(det2,det3); + if det_suiv<9990 then reserve_canton(det3,det_suiv,AdrTrainLoc); + //event_act(det2,det3,1,''); // activation zone end else begin - if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); - if event_det_train[i].det[2].adresse=det3 then + s:='Erreur 741 : Adresse détecteur trop élevé '; + if (det2>NbMemZone) and (det2<9990) then s:=s+inttostr(det2)+' '; + if (det3>NbMemZone) and (det3<9990) then s:=s+inttostr(det2)+' '; + if (AdrSuiv>NbMemZone) and (det2<9990) then s:=s+inttostr(det2); + Affiche(s,clred); + end; + // stockage dans historique de zones sauf s'il est déja stocké + if idet2) or (TrainZone[i].Zone[n].det2<>det3) then begin - s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); - FormDebug.MemoEvtDet.lines.add(s); - if dupliqueEvt then AfficheDebug(s,clyellow); - exit; // sortir + n:=TrainZone[i].Nbre+1; + if n>MaxZones then n:=1; + TrainZone[i].Nbre:=n; + TrainZone[i].Zone[n].det1:=det2; + TrainZone[i].Zone[n].det2:=det3; + TrainZone[i].Nbre:=n; + // zone suivante en prévision + det4:=detecteur_suivant_EL(det2,det,det3,det,1); + TrainPrevZone[i][1]:=det4; end; end; + // affichages + s:='2-1 Train n°'+intToSTR(i)+' Route ok de '+intToSTR(det2)+' à '+IntToSTR(det3)+' '+intToSTR(det3)+' à '+IntToSTR(Adrsuiv); + FormDebug.MemoEvtDet.lines.add(s); + if traceListe then AfficheDebug(s,clyellow); + if DebugAffiche then With FormDebug.RichEdit do + begin + s:='Train '+IntToSTR(i)+' '+intToStr(det2)+' à '+intToStr(det3); + Lines.Add(s); + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + RE_ColorLine(FormDebug.RichEdit,lines.count-1,CouleurTrain[index_couleur]); + end; + if TraceListe then AfficheDebug(s,clyellow); + Affiche(s,CouleurTrain[index_couleur]); + if AffAigDet then AfficheDebug(s,clyellow); + if TCOouvert then + begin + zone_TCO(det1,det2,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(det2,det3,1) + else zone_TCO(det2,det3,2); // affichage avec la couleur de index_couleur du train + end; + exit; // sortir absolument + end + else + begin + if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); + if event_det_train[i].det[2].adresse=det3 then + begin + s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + FormDebug.MemoEvtDet.lines.add(s); + if dupliqueEvt then AfficheDebug(s,clyellow); + exit; // rebond :sortir + end; end; + traite:=true; // non traité: train suivant + end; + end; // fin de la boucle for i + + // nouveau train front det=1 (uniquement mode roulage) + { + if front then + begin + if traceListe then AfficheDebug('Nouveau train',clyellow); + if N_Trains>=Max_Trains then + begin + Affiche('Erreur nombre de train maximal atteint',clRed); + N_trains:=0; + end; + Inc(N_trains); + with event_det_train[N_trains] do + begin + det[1].adresse:=det3; + det[2].adresse:=0; + det[1].etat:=front; + NbEl:=1; + nom_train:=detecteur[det3].train; + AdrTrain:=detecteur[det3].AdrTrain; + end; + end; + } + + + if front then + begin + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + // libére les "vers det3" de adj1 + if adj1<9990 then + begin + if detecteur[adj1].vers1=det3 then detecteur[adj1].vers1:=0; + if detecteur[adj1].vers2=det3 then detecteur[adj1].vers2:=0; + end; + // libére les "vers det3" de adj2 + if adj2<9990 then + begin + if detecteur[adj2].vers1=det3 then detecteur[adj2].vers1:=0; + if detecteur[adj2].vers2=det3 then detecteur[adj2].vers2:=0; + end; + + if adj1<9990 then + begin + if not(detecteur[Adj1].etat) then + // détecteur adjacent à 1 + begin + detecteur[det3].vers1:=Adj1; // le train de det3 peut aller vers adj1 + detecteur[adj1].de1:=det3; // marquer adj1 que le train vient de det3 + end + else + // détecteur adjacent à 0 + begin + detecteur[det3].vers1:=0; + detecteur[det3].de1:=0; detecteur[det3].de2:=0; + detecteur[adj1].de1:=0; + end; + end; + if adj2<9990 then + begin + if not(detecteur[Adj2].etat) then + begin + detecteur[det3].vers2:=Adj2; // le train de det3 peut aller vers adj2 + detecteur[adj2].de1:=det3; // marquer adj2 que le train vient de det3 + end + else + begin + detecteur[det3].vers2:=0; + detecteur[det3].de1:=0; detecteur[det3].de2:=0; + detecteur[adj2].de1:=0; + end; + end; + + // test nouveau train + v1:=detecteur[det3].vers1; // destination du det3 + v2:=detecteur[det3].vers2; + de1:=detecteur[v1].de1; // provenance du v1 + de2:=detecteur[v1].de2; + if ( (det3=de1) and (de1<>0) or ((v1=de2)) and (de2<>0)) then + cas1:=true; + + de1:=detecteur[v2].de1; // provenance du v2 + de2:=detecteur[v2].de2; + if ( (det3=de1) and (de1<>0) or ((v2=de2)) and (de2<>0)) then + cas2:=true; + if cas1 and cas2 then + begin + Affiche_evt('Incertitude '+intToSTR(det3)+' vers '+intToSTR(v1)+' ou '+intToSTR(v2),clwhite); + exit; + end; + + if cas1 then Affiche_evt('C1-1 Nouveau train de '+intToSTR(det3)+' à '+intToSTR(v1),clyellow); + if cas2 then Affiche_evt('C2-1 Nouveau train de '+intToSTR(det3)+' à '+intToSTR(v2),clyellow); + + end; - // nouveau train if not(front) then begin - if traceListe then Affiche('Nouveau train',clyellow); + + v1:=detecteur[det3].vers1; // destination du det3 + v2:=detecteur[det3].vers2; + de1:=detecteur[v1].de1; // provenance du v1 + de2:=detecteur[v1].de2; + if ( (det3=de1) and (de1<>0) or ((v1=de2)) and (de2<>0)) then + cas1:=true; + + de1:=detecteur[v2].de1; // provenance du v2 + de2:=detecteur[v2].de2; + if ( (det3=de1) and (de1<>0) or ((v2=de2)) and (de2<>0)) then + cas2:=true; + + if cas1 and cas2 then + begin + Affiche_evt('Incertitude '+intToSTR(det3)+' vers '+intToSTR(v1)+' ou '+intToSTR(v2),clwhite); + exit; + end; + + if cas1 then Affiche_evt('C1-0 Nouveau train de '+intToSTR(det3)+' à '+intToSTR(v1),clyellow); + if cas2 then Affiche_evt('C1-0 Nouveau train de '+intToSTR(det3)+' à '+intToSTR(v2),clyellow); + + detecteur[det3].vers1:=0; + detecteur[det3].vers2:=0; + + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + if adj1<9990 then + begin + if detecteur[adj1].etat then + begin + detecteur[det3].de1:=adj1; // revalider les liens possibles avec les adjacents + if detecteur[adj1].vers1=0 then detecteur[adj1].vers1:=det3 + else + if detecteur[adj1].vers2=0 then detecteur[adj1].vers2:=det3 + else Affiche_evt('Anomalie 750 ',clred); + end; + end; + + if adj2<9990 then + begin + if detecteur[adj2].etat then + begin + detecteur[det3].de1:=adj2; // revalider les liens possibles avec les adjacents + if detecteur[adj2].vers1=0 then detecteur[adj2].vers1:=det3 + else + if detecteur[adj2].vers2=0 then detecteur[adj2].vers2:=det3 + else Affiche_evt('Anomalie 751 ',clred); + end; + end; + end; + + exit; + + // nouveau train front det=0 + if traite or not(front) then + begin + if traceListe then AfficheDebug('Nouveau train',clyellow); // Nombre d'éléments à 0 : ici c'est un nouveau train donc créer un train, donc un tableau if N_Trains>=Max_Trains then begin @@ -7289,13 +7788,23 @@ begin end; TrainZone[n_trains].train:=detecteur[det3].train; - TrainZone[i].AdrTrain:=detecteur[det3].Adrtrain; + TrainZone[n_trains].AdrTrain:=detecteur[det3].Adrtrain; + if roulage then + begin + j:=index_train_adresse(detecteur[det3].AdrTrain); + j:=placement[j].detdir; // detecteur destination + MemZone[det3,j].etat:=true; + MemZone[det3,j].train:=detecteur[det3].train; + MemZone[det3,j].AdrTrain:=detecteur[det3].AdrTrain; + + end; s:=intToSTR(event_det_train[N_trains].det[1].adresse); with FormDebug.MemoEvtDet do begin - lines.add('0-0 Tampon train '+intToStr(N_trains)+' '+detecteur[det3].train+'--------'); - lines.add(s); + id_couleur:=((N_trains - 1) mod NbCouleurTrain) +1;; + Affiche_Evt('0-0 Tampon train '+intToStr(N_trains)+' '+detecteur[det3].train+'--------', CouleurTrain[id_couleur]); + Affiche_evt(s,CouleurTrain[id_couleur]); end; if dupliqueEvt then begin @@ -7311,6 +7820,838 @@ begin end; end; +procedure calcul_zones_V2b(adresse: integer;front : boolean); +var m,AdrFeu,AdrDetFeu,AdrTrainLoc,Nbre,etat,i,j,k,n,det1,det2,det3,det4,AdrSuiv,AdrPrec,Prev, + id_couleur,det_suiv,nc,de1,de2,v1,v2 : integer ; + traite,trouve,cas1,cas2 : boolean; + TypeSuiv : tEquipement; + couleur : Tcolor; + s,train_ch : string; +begin + det3:=adresse; // c'est le nouveau détecteur + if det3=0 then exit; // pas de nouveau détecteur + s:='V2B ->Le nouveau détecteur est '+IntToSTR(det3); + if front then s:=s+' (1)' else s:=s+' (0)'; + FormDebug.MemoEvtDet.lines.add(s) ; + if dupliqueEvt then AfficheDebug(s,clyellow) ; + + if front then + begin + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + // libére les "vers det3" de adj1 + if adj1<9990 then + begin + for i:=1 to n_trains do + begin + n:=event_det_train[i].NbEl; + // on vient de adj1.vers1 ? + if (detecteur[adj1].vers1=det3) and (detecteur[adj1].QuitteVers1=i) then // si le détecteur adjacent va vers det3 avec le train i + begin + //detecteur[adj1].QuitteVers1:=0; + detecteur[det3].IndexTrain:=i; + detecteur[adj1].IndexTrain:=0; + if n=2 then event_det_train[i].Det[1]:=event_det_train[i].Det[2]; + if n=1 then event_det_train[i].NbEl:=2; + event_det_train[i].Det[2].adresse:=det3; + event_det_train[i].Det[2].etat:=true; + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + Affiche_evt('A11 Train '+intToSTR(i)+' de '+intToSTR(adj1)+' vers '+intToSTR(det3),couleur); + Affiche_evt(intToSTR(adj1),couleur); + Affiche_evt(intToSTR(det3)+' 1',couleur); + detecteur[adj1].vers1:=0; + detecteur[adj1].vers2:=0; + exit; + end; + + //on vient de adj1.vers1? + if (detecteur[adj1].vers2=det3) and (detecteur[adj1].QuitteVers1=i) then + begin + //detecteur[adj1].QuitteVers1:=0; + detecteur[det3].IndexTrain:=i; + detecteur[adj1].IndexTrain:=0; + if n=2 then event_det_train[i].Det[1]:=event_det_train[i].Det[2]; + if n=1 then event_det_train[i].NbEl:=2; + event_det_train[i].Det[2].adresse:=det3; + event_det_train[i].Det[2].etat:=true; + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + Affiche_evt('A12 Train de '+intToSTR(i)+' de '+intToSTR(adj1)+' vers '+intToSTR(det3),couleur); + Affiche_evt(intToSTR(adj1),couleur); + Affiche_evt(intToSTR(det3),couleur); + detecteur[adj1].vers1:=0; + detecteur[adj1].vers2:=0; + exit; + end; + end; + + if adj2<9990 then + begin + if (detecteur[adj2].vers1=det3) and (detecteur[adj2].QuitteVers1=i) then + begin + //detecteur[adj2].QuitteVers1:=0; + detecteur[det3].IndexTrain:=i; + detecteur[adj2].IndexTrain:=0; + if n=2 then event_det_train[i].Det[1]:=event_det_train[i].Det[2]; + if n=1 then event_det_train[i].NbEl:=2; + event_det_train[i].Det[2].adresse:=det3; + event_det_train[i].Det[2].etat:=true; + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + Affiche_evt('A21 Train de '+intToSTR(i)+' de '+intToSTR(adj2)+' vers '+intToSTR(det3),couleur); + Affiche_evt(intToSTR(adj2),couleur); + Affiche_evt(intToSTR(det3),couleur); + detecteur[adj2].vers1:=0; + detecteur[adj2].vers2:=0; + exit; + end; + if (detecteur[adj2].vers2=det3) and (detecteur[adj2].QuitteVers1=i) then + begin + //detecteur[adj2].QuitteVers1:=0; + detecteur[det3].IndexTrain:=i; + detecteur[adj2].IndexTrain:=0; + if n=2 then event_det_train[i].Det[1]:=event_det_train[i].Det[2]; + if n=1 then event_det_train[i].NbEl:=2; + event_det_train[i].Det[2].adresse:=det3; + event_det_train[i].Det[2].etat:=true; + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + Affiche_evt('A22 Train de '+intToSTR(i)+' de '+intToSTR(adj2)+' vers '+intToSTR(det3),couleur); + Affiche_evt(intToSTR(adj2),couleur); + Affiche_evt(intToSTR(det3),couleur); + detecteur[adj2].vers1:=0; + detecteur[adj2].vers2:=0; + exit; + end; + end; + end; + + // évènement non lié : c'est un nouveau train + inc(n_trains); + index_couleur:=((n_trains - 1) mod NbCouleurTrain) +1; + Affiche_evt('Création train '+inttostr(n_trains),couleurTrain[index_couleur]); + event_det_train[n_trains].det[1].adresse:=det3; + event_det_train[n_trains].det[1].etat:=true; + event_det_train[n_trains].NbEl:=1; + if detecteur[det3].IndexTrain=0 then detecteur[det3].IndexTrain:=n_trains; // on affecte le numéro du train à défaut de l'adresse + Affiche_evt(intToSTR(event_det_train[n_trains].det[1].adresse),couleurTrain[index_couleur]); + end; + + if not(front) then + begin + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + if adj1<9990 then + begin + if not(detecteur[adj1].etat) then + begin + AdrTrainLoc:=detecteur[det3].QuitteVers1; + detecteur[adj1].de1:=detecteur[det3].IndexTrain; + detecteur[det3].vers1:=adj1; + detecteur[det3].QuitteVers1:=detecteur[det3].IndexTrain; + index_couleur:=((AdrTrainLoc - 1) mod NbCouleurTrain) +1; + Affiche_evt(intToSTR(det3)+' quitté par train '+intToSTR(AdrTrainLoc),couleurTrain[index_couleur]); + end; + end; + + if adj2<9990 then + begin + if not(detecteur[adj2].etat) then + begin + AdrTrainLoc:=detecteur[det3].QuitteVers1; + detecteur[adj2].de1:=detecteur[det3].IndexTrain; + detecteur[det3].vers2:=adj2; + detecteur[det3].QuitteVers1:=detecteur[det3].IndexTrain; + index_couleur:=((AdrTrainLoc - 1) mod NbCouleurTrain) +1; + Affiche_evt(intToSTR(det3)+' quitté par train '+intToSTR(AdrTrainLoc),couleurTrain[index_couleur]); + end; + end; + { begin + Affiche_evt('train '+inttostr(n_trains),clyellow); + Affiche_evt(intToSTR(event_det_train[n_trains].det[1].adresse),clyellow); + if event_det_train[n_trains].NbEl=2 then Affiche_evt(intToSTR(event_det_train[n_trains].det[2].adresse),clyellow); + end; + } + end; + + exit; + +end; + + + +// calcul des zones depuis le tableau des fronts montants ou descendants des évènements détecteurs +// transmis dans le tableau Event_det +// rattache le nouveau détecteur à un train +// adresse: adresse du detecteur, front: état du détecteur +procedure calcul_zones_V1(adresse: integer;front : boolean); +var m,AdrFeu,AdrDetFeu,AdrTrainLoc,Nbre,etat,i,j,k,n,det1,det2,det3,det4,AdrSuiv,AdrPrec,Prev, + id_couleur,det_suiv,nc : integer ; + traite,trouve,SuivOk,casaig : boolean; + couleur : tcolor; + TypeSuiv : tEquipement; + s,train_ch : string; +begin + det3:=adresse; // c'est le nouveau détecteur + if det3=0 then exit; // pas de nouveau détecteur + traite:=false; + s:='V1->Le nouveau détecteur est '+IntToSTR(det3); + if front then s:=s+' (1)' else s:=s+' (0)'; + Affiche_evt(s,clwhite) ; + if dupliqueEvt then AfficheDebug(s,clyellow) ; + + for i:=1 to N_trains do + begin + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=CouleurTrain[index_couleur]; + Nbre:=event_det_train[i].NbEl ; // Nombre d'éléments du tableau courant exploré + det1:=event_det_train[i].det[1].adresse; + det2:=event_det_train[i].det[2].adresse; + + if ((det2=det3) and (nbre=2)) or ((det1=det3) and (nbre=1)) then + begin + s:='Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + FormDebug.MemoEvtDet.lines.add(s); + if dupliqueEvt then AfficheDebug(s,clyellow); + exit; // sortir + end; + + // 1 élément dans le tableau et détecteur à 0--------------------------------------------- + if (nbre=1) and not(front) then + begin + Det_Adj(det3); // renvoie les adresses des détecteurs adjacents au détecteur "det3" résultat dans adj1 et adj2 + //if (roulage) then + begin + // traiter pour les cas avec 1 élément + if traceListe then AfficheDebug('1-0 traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); + // vérifier si l'élément du tableau et le nouveau sont contigus + if (Adj1=det1) or (Adj2=det1) then + begin + event_det_tick[N_event_tick].train:=i; + + with event_det_train[i] do + begin + det[2].adresse:=det3; + det[2].etat:=front; + NbEl:=2; + end; + + // en mode roulage, on a placé les trains + if roulage then + begin + adrTrainLoc:=event_det_train[i].Adrtrain; + Train_ch:=event_det_train[i].nom_train; + if (AdrTrainLoc=0) and roulage then Affiche('Démarrage train non placé depuis détecteur '+intToSTR(det3),clred); + + j:=1; + repeat + trouve:=placement[j].detdir=det3; + inc(j); + until (j>6) or trouve; + dec(j); + //si début de démarrage train i + if not(trouve) or (TrainZone[i].Nbre>0) then + begin + exit; + end; + // affecter le nouveau détecteur + detecteur[det3].train:=Train_ch; + detecteur[det3].AdrTrain:=AdrTrainLoc; + // libérer l'ancien + //detecteur[event_det_train[i].Det[1].adresse].AdrTrain:=0; + //detecteur[event_det_train[i].Det[1].adresse].train:=''; + end; + + AdrSuiv:=detecteur_suivant_el(det1,det,det3,det,1); + //*** route validée *** + MemZone[det1,det3].etat:=FALSE; // dévalide l'ancienne zone + MemZone[det1,det3].train:=''; + MemZone[det1,det3].Adrtrain:=0; + MemZone[det3,det1].etat:=FALSE; // dévalide l'ancienne zone inverse + MemZone[det3,det1].train:=''; + MemZone[det3,det1].Adrtrain:=0; + MemZone[det3,AdrSuiv].etat:=true; // valide la nouvelle zone + MemZone[det3,AdrSuiv].train:=Train_ch; + MemZone[det3,AdrSuiv].AdrTrain:=AdrTrainLoc; + MemZone[AdrSuiv,det3].etat:=False; // on dévalide la zone inverse + MemZone[AdrSuiv,det2].train:=''; + MemZone[AdrSuiv,det2].AdrTrain:=0; + + // stockage dans historique de zones + if iMaxZones then n:=1; + with TrainZone[i] do + begin + Nbre:=n; + Zone[n].det1:=det1; + Zone[n].det2:=det3; + train:=train_ch; + AdrTrain:=AdrTrainLoc + end; + end; + //reserve_canton(det1,det3,false,0,false); // déreserve le canton précedent + //reserve_canton(det3,AdrSuiv,false,TrainZone[i].Adrtrain,true); // si feu réserve canton courant + libere_canton(det1,det3); // on quitte det3 + reserve_canton(det3,adrSuiv,adrtrainLoc); + event_act(det1,det3,1,''); // évènement actionneur + maj_feux; + + // affichages + Affiche_Evt('1-0 route ok de '+intToSTR(det1)+' à '+IntToSTR(det3),clWhite); + if traceListe then AfficheDebug(s,clyellow); + //Affiche(s,CouleurTrain[index_couleur]); + if AffAigDet then AfficheDebug(s,clyellow); + + Affiche_Evt('1-0. Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------',couleur); + s:=intToSTR(event_det_train[i].det[1].adresse); + Affiche_Evt(s,couleur); + if dupliqueEvt or traceliste then AfficheDebug(s,clyellow); + s:=intToSTR(event_det_train[i].det[2].adresse); + Affiche_evt(s,couleur); + if dupliqueEvt or traceliste then AfficheDebug(s,clyellow); + + if TCOouvert then + begin + // activation + if ModeCouleurCanton=0 then zone_TCO(det3,AdrSuiv,1) + else zone_TCO(det3,adrSuiv,2); // affichage avec la couleur de index_couleur du train + end; + exit; // sortir absolument + end + else + begin + Affiche_evt('les éléments '+intToSTR(det1)+' et '+intToSTR(det3)+' ne sont pas contigus',clyellow); + // det3 et det1 non adjacents + end; + end; + end; + + // 1 élément dans le tableau et détecteur à 1 : on pilote le train si feu sur det3--------------------------------------------- + if (nbre=1) and front then + begin + if traceListe then AfficheDebug('1-1 Traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow); + // vérifier si l'élément du tableau et le nouveau sont contigus + Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2 + suivok:=(Adj1=det3) or (Adj2=det3); + if suivok then + begin + Train_ch:=event_det_train[i].nom_train; + AdrTrainLoc:=event_det_train[i].AdrTrain; + + event_det_tick[N_event_tick].train:=i; + + // en mode roulage, on a placé les trains + if roulage then + begin + j:=1; + repeat + trouve:=placement[j].detdir=det3; + inc(j); + until (j>6) or trouve; + dec(j); + //si début de démarrage train i + if trouve and (TrainZone[i].Nbre=0) and (det10 then Maj_Feu(j); + exit; + end; + if Traceliste then AfficheDebug(inttoSTR(det3)+' n''est pas contigu à '+intToSTR(det1)+' pour le train '+intToSTR(i),clyellow); + traite:=true; // traiter le train suivant + end; + + // 2 éléments dans le tableau et détecteur à 0--------------------------------------------- + if (nbre=2) and not(front) then + begin + if TraceListe or (NivDebug=3) then AfficheDebug('2-0 traitement Train n°'+intToSTR(i)+' 2 détecteurs',couleur); + // test si det1, det2 et det3 sont contigus malgré aig mal positionnés + //zizi + det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) + if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),couleur); + SuivOk:=det_suiv=det3; + CasAig:=false; + + if not(SuivOk) then + begin + // cas d'un aiguillage qui a changé + if det3=event_det_train[i].suivant then + begin + CasAig:=true; + s:='***CasAigChg train '+intToSTR(i)+' '+intToSTR(det1)+' '+intToSTR(det2)+' '+intToSTR(det3); + Affiche_Evt(s,couleur); + if TraceListe then AfficheDebug(s,couleur); + // trouver le suivant + det_Adj(det3); + if adj1<9990 then adrSuiv:=adj1; + if adj2<9990 then adrSuiv:=adj2; + event_det_tick[N_event_tick].reaffecte:=2; // réaffecté par changement d'aiguillage + end; + end; + + if SuivOk or CasAig then + begin + if TraceListe then AfficheDebug('Route est valide, dét '+intToSTR(det2)+' '+intToSTR(det3)+' contigus',couleur); + // ici on cherche le suivant à det2 det3, algo=1 + event_det_tick[N_event_tick].train:=i; + if not(casAig) then AdrSuiv:=detecteur_suivant_el(det2,det,det3,det,0); // dans le cas de CasAig, alors adrSuiv=9996 donc AdrSuiv est calculé plus haut + event_det_train[i].suivant:=AdrSuiv; + if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),couleur); + if (Adrsuiv>=9990) and not(casaig) then + begin + //Affiche('Erreur 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clRed); + if (NivDebug=3) or TraceListe then AfficheDebug('Msg 1500 : pas de suivant sur la route de '+intToSTR(det2)+' à '+intToSTR(det3),clorange); + end + else + begin + if (det2MaxZones then n:=1; + with TrainZone[i] do + begin + Nbre:=n; + Zone[n].det1:=det3; + Zone[n].det2:=AdrSuiv; + Nbre:=n; + end; + // zone suivante en prévision + det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1); + TrainPrevZone[i][1]:=det4; + end; + + event_act(det2,det3,0,''); // désactivation zone + event_act(det3,AdrSuiv,1,''); // activation zone + end + else + begin + s:='Erreur 740 : Adresse détecteur trop élevé '; + if det2>NbMemZone then s:=s+inttostr(det2)+' '; + if det3>NbMemZone then s:=s+inttostr(det2)+' '; + if AdrSuiv>NbMemZone then s:=s+inttostr(det2); + Affiche(s,clred); + end; + + // supprimer le 1er et décaler + with event_det_train[i] do + begin + det[1].adresse:=event_det_train[i].det[2].adresse; + det[1].etat:=event_det_train[i].det[2].etat; + det[2].adresse:=det3; + det[2].etat:=detecteur[det3].etat; + NbEl:=2; + end; + + // affichages + s:='2-0 Train n°'+intToSTR(i)+' route ok de '+intToSTR(det2)+' à '+IntToSTR(det3); + if casAig then s:=s+'A'; + s:=s+' à '+IntToSTR(Adrsuiv); + + Affiche_evt(s,couleur); + if traceListe then AfficheDebug(s,clyellow); + if DebugAffiche then With FormDebug.RichEdit do + begin + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' @'+intToSTR(AdrTrainLoc); + s:=s+' '+intToStr(det2)+' à '+intToStr(det3)+'=>'+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + s:=s+' Prev='+intToSTR(TrainPrevZone[i][1]); + Lines.Add(s); + RE_ColorLine(FormDebug.RichEdit,lines.count-1,couleur); + end; + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' @'+intToSTR(AdrTrainLoc); + s:=s+' '+Train_ch+' sur zones '+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + if traceListe then AfficheDebug(s,couleur); + + s:='Train '+IntToSTR(i); + if AdrTrainLoc<>0 then s:=s+' '+train_ch+' @'+intToSTR(AdrTrainLoc); + s:=s+' sur zones '+IntToSTR(det3)+' à '+IntToStr(AdrSuiv); + Affiche(s,Couleur); + if AffAigDet then AfficheDebug(s,couleur); + + Affiche_Evt('1.Tampon train '+intToStr(i)+' '+event_det_train[i].nom_train+'--------',couleur); + with FormDebug.MemoEvtDet do + begin + Affiche_Evt(intToSTR(event_det_train[i].det[1].adresse),couleur); + Affiche_Evt(intToStr(event_det_train[i].det[2].adresse),couleur); + end; + if TraceListe or dupliqueEvt then + begin + AfficheDebug(intToSTR(event_det_train[i].det[1].adresse),couleur); + AfficheDebug(intToSTR(event_det_train[i].det[2].adresse),couleur); + end; + if TCOouvert then + begin + zone_TCO(det2,det3,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(det3,AdrSuiv,1) + else zone_TCO(det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + end; + + // mettre à jour si présence signal sur det3 pour le passer au rouge de suite + j:=signal_detecteur(det3); + if j<>0 then + begin + Maj_Feu(j); + k:=index_feu(j); + // si le feu j est au rouge + etat:=feux[k].etatsignal; + if (testBit(etat,carre)) or (testBit(etat,semaphore)) or (testBit(etat,semaphore_cli)) then + begin + // Maj du signal précédent (pour l'avertissement) + j:=Signal_precedent(j); + if j<>0 then + begin + maj_feu(j); + j:=Signal_precedent(j); + if j<>0 then maj_feu(j); + end; + end; + end; + maj_feux; // mise à jour générale + maj_feux; // 2eme mise à jour + maj_feux; + exit; // sortir absolument + end; + end + else + begin + //Affiche_Evt('Route invalide: dét '+intToSTR(det2)+' '+intToSTR(det3)+' non contigus',clOrange); + if event_det_train[i].det[2].adresse=det3 then + begin + s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + FormDebug.MemoEvtDet.lines.add(s); + if dupliqueEvt then AfficheDebug(s,clyellow); + // exhit sortir + end; + end; + //traite:=true; + end; + + if (nbre=2) and front then + begin + if TraceListe or (NivDebug=3) then AfficheDebug('2-1 traitement Train n°'+intToSTR(i)+' 2 détecteurs',clwhite); + // front descendant sur détecteur 2 + det_suiv:=det_suiv_cont(det1,det2); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3) + if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clWhite); + if (det_suiv=det3) then + begin + event_det_tick[N_event_tick].train:=i; + if TraceListe then AfficheDebug('La route est valide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' sont contigus',couleur); + if (det1NbMemZone then s:=s+inttostr(det2)+' '; + if det3>NbMemZone then s:=s+inttostr(det2)+' '; + if AdrSuiv>NbMemZone then s:=s+inttostr(det2); + Affiche(s,clred); + end; + // stockage dans historique de zones sauf s'il est déja stocké + if idet2) or (TrainZone[i].Zone[n].det2<>det3) then + begin + n:=TrainZone[i].Nbre+1; + if n>MaxZones then n:=1; + TrainZone[i].Nbre:=n; + TrainZone[i].Zone[n].det1:=det2; + TrainZone[i].Zone[n].det2:=det3; + TrainZone[i].Nbre:=n; + // zone suivante en prévision + det4:=detecteur_suivant_EL(det2,det,det3,det,1); + TrainPrevZone[i][1]:=det4; + end; + end; + // affichages + s:='2-1 Train n°'+intToSTR(i)+' Route ok de '+intToSTR(det2)+' à '+IntToSTR(det3)+' '+intToSTR(det3)+' à '+IntToSTR(Adrsuiv); + Affiche_evt(s,couleur); + if traceListe then AfficheDebug(s,Couleur); + if DebugAffiche then With FormDebug.RichEdit do + begin + s:='Train '+IntToSTR(i)+' '+intToStr(det2)+' à '+intToStr(det3); + Lines.Add(s); + RE_ColorLine(FormDebug.RichEdit,lines.count-1,Couleur); + end; + if TraceListe then AfficheDebug(s,couleur); + Affiche(s,Couleur); + if AffAigDet then AfficheDebug(s,couleur); + if TCOouvert then + begin + zone_TCO(det1,det2,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(det2,det3,1) + else zone_TCO(det2,det3,2); // affichage avec la couleur de index_couleur du train + end; + exit; // sortir absolument + end + else + begin + if TraceListe then AfficheDebug('La route est invalide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' ne sont pas contigus',clOrange); + if event_det_train[i].det[2].adresse=det3 then + begin + s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + FormDebug.MemoEvtDet.lines.add(s); + if dupliqueEvt then AfficheDebug(s,clyellow); + exit; // rebond :sortir + end; + end; + traite:=true; // non traité: train suivant + end; + end; // fin de la boucle for i + + // nouveau train front det=1 (uniquement mode roulage) + { + if front then + begin + if traceListe then AfficheDebug('Nouveau train',clyellow); + if N_Trains>=Max_Trains then + begin + Affiche('Erreur nombre de train maximal atteint',clRed); + N_trains:=0; + end; + Inc(N_trains); + with event_det_train[N_trains] do + begin + det[1].adresse:=det3; + det[2].adresse:=0; + det[1].etat:=front; + NbEl:=1; + nom_train:=detecteur[det3].train; + AdrTrain:=detecteur[det3].AdrTrain; + end; + end; + } + + if front then + begin + // voir si on crée un nouveau train + for i:=1 to N_trains do + begin + det2:=event_det_train[i].Suivant; + SuivOk:=event_det_train[i].Det[2].etat ; + det_adj(det3); + if (adj1=det2) or (adj2=det2) then + begin + Affiche_evt('Train '+intToSTR(i)+' Détection '+intToSTR(det3)+' à 1 avant RAZ du '+intToSTR(det2),clorange); + detecteur[det3].AdrTrain:=i; // récupération du train au détecteur + event_det_tick[N_event_tick].train:=i; + event_det_tick[N_event_tick].reaffecte:=1; + exit; + end; + end; + end; + + // nouveau train front det=0 + if traite or not(front) then + begin + if traceListe then AfficheDebug('Nouveau train',clyellow); + // Nombre d'éléments à 0 : ici c'est un nouveau train donc créer un train, donc un tableau + if N_Trains>=Max_Trains then + begin + Affiche('Erreur nombre de train maximal atteint',clRed); + N_trains:=0; + end; + Inc(N_trains); + event_det_tick[N_event_tick].train:=n_trains; + + with event_det_train[N_trains] do + begin + det[1].adresse:=0; + det[2].adresse:=0; + NbEl:=0; + nom_train:=''; + end; + + // vérifier si le détecteur du nouveau train est associé à un feu vers un buttoir + for i:=1 to NbreFeux do + begin + AdrFeu:=Feux[i].Adresse; + AdrDetfeu:=Feux[i].Adr_Det1; + if (AdrDetFeu=Det3) and (feux[i].aspect<10) then + begin + AdrSuiv:=Feux[i].Adr_el_suiv1; + TypeSuiv:=Feux[i].Btype_suiv1; + AdrPrec:=detecteur_suivant(AdrSuiv,typeSuiv,AdrDetFeu,det,1) ; // détecteur précédent le feu ; algo 1 + if AdrPrec=0 then + begin + if TraceListe then Affiche('FD - Le feu '+IntToSTR(AdrFeu)+' est précédé d''un buttoir',clyellow); + if AdrDetFeuNbMemZone then + begin + Affiche('Erreur 82 : reçu adresse de détecteur trop grande : '+intToSTR(adresse),clred); + exit; + end; s:=detecteur[adresse].train; if (train='') and (s<>'') then train:=s; if Etat then Etat01:=1 else Etat01:=0; + // Affiche('Event Det '+inTToSTR(adresse)+' '+IntToSTR(etat01),Cyan); // vérifier si l'état du détecteur est déja stocké, car on peut reçevoir plusieurs évènements pour le même détecteur dans le même état // on reçoit un doublon dans deux index consécutifs. (* @@ -7618,7 +8965,7 @@ begin end; end; *) - if Traceliste then AfficheDebug('--------------------- détecteur '+intToSTR(Adresse)+' à '+intToSTR(etat01)+'-----------------------------',clOrange); + if Traceliste then AfficheDebug('--------------- détecteur '+intToSTR(Adresse)+' à '+intToSTR(etat01)+' par train'+Detecteur[adresse].Train+' -----------------------',clOrange); if AffAigDet then begin //s:='Evt Det '+intToSTR(adresse)+'='+intToSTR(etat01); @@ -7646,15 +8993,24 @@ begin if (n_Event_tick mod 10) =0 then affiche_memoire; // Affiche('stockage de '+intToSTR(N_event_tick)+' '+IntToSTR(Adresse)+' à '+intToSTR(etat01),clyellow); + // compter le nombre de détecteurs à 1 simultanément + NbDet1:=0; + for i:=1 to NDetecteurs do + begin + dr:=Adresse_detecteur[i]; + if Detecteur[dr].etat then inc(NbDet1); + end; + // détection front montant if not(ancien_detecteur[Adresse]) and (detecteur[Adresse].etat) then begin if AffFD then AfficheDebug('Tick='+intToSTR(tick)+' Index='+intToSTR(N_event_tick)+' FM '+intToSTR(Adresse),clyellow); inc(N_event_det); - event_det[N_event_det].adresse:=Adresse; + if algo_localisation=1 then event_det[N_event_det].adresse:=Adresse; event_det[N_event_det].etat:=true; if not(confignulle) then + //explore les feux pour voir si on démarre d'un buttoir for i:=1 to NbreFeux do begin AdrFeu:=Feux[i].Adresse; @@ -7690,7 +9046,7 @@ begin begin if AffFD then AfficheDebug('Tick='+intToSTR(tick)+' Index='+intToSTR(N_event_tick)+' FD '+intToSTR(Adresse),clyellow); inc(N_event_det); - event_det[N_event_det].adresse:=Adresse; + if algo_localisation=1 then event_det[N_event_det].adresse:=Adresse; event_det[N_event_det].etat:=false; // vérification de la connaissance de la position de tous les aiguillages au premier évènement FD détecteur @@ -7728,7 +9084,7 @@ begin // attention à partir de cette section le code est susceptible de ne pas être exécuté?? // Mettre à jour le TCO - if formTCO.Showing then + if TcoOuvert then begin formTCO.Maj_TCO(Adresse); end; @@ -7790,7 +9146,7 @@ begin event_det_tick[N_event_tick].etat:=pos; // Mettre à jour le TCO - if formTCO.Showing then formTCO.Maj_TCO(Adresse); + if TCOouvert then formTCO.Maj_TCO(Adresse); // l'évaluation des routes est à faire selon conditions if faire_event and not(confignulle) then begin evalue;evalue;end; @@ -8352,7 +9708,7 @@ end; // en sortie, la chaine chaineINT est supprimée de la partie traitée function decode_chaine_retro_Xpress(chaineINT : string) : string ; var msg : string; - i,cvLoc : integer; + i,cvLoc,AdrTrainLoc : integer; begin //affiche(chaine_hex(chaine),clyellow); msg:=''; @@ -8390,7 +9746,7 @@ begin delete(chaineInt,1,1); case chaineINT[1] of #$00 : begin ack:=true;msg:='Voie hors tension';end; - #$01 : begin ack:=true;msg:='Reprise';end; + #$01 : begin ack:=true;msg:='Reprise';Hors_tension2:=false;end; #$02 : begin ack:=true;msg:='Mode programmation ';end; @@ -8494,7 +9850,7 @@ begin if chaineInt[1]=#$E4 then begin - AdrTrain:=ord(chaineInt[2]); // identification + AdrTrainLoc:=ord(chaineInt[2]); // identification i:=ord(chaineInt[3]); // vitesse Fa:=ord(chaineInt[4]); // fonction A Fb:=ord(chaineInt[5]); // fonction B @@ -8667,14 +10023,12 @@ begin if (protocole=1) and (version_interface[1]=#2) then begin Affiche_suivi(' et l''interface a répondu correctement en '+intToSTR(temp)+'00 ms',clLime); - demande_etat_det; result:=true; exit; end; if (protocole=2) and (version_interface<>'') then begin Affiche_suivi(' et l''interface a répondu correctement en '+intToSTR(temp)+'00 ms',clLime); - demande_etat_det; result:=true; exit; end; @@ -8762,6 +10116,26 @@ begin until (s='') or (i>MaxCdeDccpp); end; +procedure connecte_interface_ethernet; +begin + etat_init_interface:=0; + // sinon ouvrir socket vers la centrale + // Initialisation de la comm socket LENZ + if AdresseIP<>'0' then + begin + procetape('Ouverture interface socket'); + etat_init_interface:=10; + Affiche('Demande ouverture interface par Ethernet '+AdresseIP+':'+intToSTR(portinterface),clyellow); + with formprinc.ClientSocketInterface do + begin + port:=portInterface; + Address:=AdresseIP; + Open; + end; + //Application.processMessages; + end; +end; + procedure connecte_usb; var numport,erreur : integer; s : string; @@ -9107,13 +10481,17 @@ begin event_det_tick[i].adresse:=-1; event_det_tick[i].modele:=rien; event_det_tick[i].etat:=-1; - event_det_tick[i].traite:=false ; // non traité + event_det_tick[i].reaffecte:=0 ; end; for i:=1 to NbMemZone do begin detecteur[i].etat:=false; detecteur[i].train:=''; detecteur[i].adrTrain:=0; + detecteur[i].vers1:=0; + detecteur[i].vers2:=0; + detecteur[i].de1:=0; + detecteur[i].de2:=0; ancien_detecteur[i]:=false; end; for i:=1 to NbMemZone do @@ -9129,14 +10507,30 @@ begin elements[i].typ:=rien; end; + for i:=1 to Max_Trains do + begin + event_det_train[i].NbEl:=0; + event_det_train[i].AdrTrain:=0; + event_det_train[i].nom_train:=''; + event_det_train[i].Det[1].adresse:=0; + event_det_train[i].Det[1].etat:=false; + event_det_train[i].Det[2].adresse:=0; + event_det_train[i].Det[2].etat:=false; + end; + for i:=1 to maxaiguillage do begin aiguillage[i].AdrTrain:=0; end; i_simule:=0; - FormDebug.MemoEvtDet.Clear; - FormDebug.Richedit.Clear; + if DebugAffiche then + begin + FormDebug.MemoEvtDet.Clear; + FormDebug.Richedit.Clear; + end; + roulage:=false; + { ralentit au démarrage for i:=1 to NbreFeux do begin @@ -9160,6 +10554,7 @@ begin // 2eme fois pour positionner physiquement les aiguillages // pour générer les evts de position // Affiche('Positionnement aiguillages',cyan); + init_aig_cours:=true; for i:=1 to MaxAcc do begin index:=index_aig(i); @@ -9188,6 +10583,7 @@ begin end; end; end; + init_aig_cours:=false; end; @@ -9207,6 +10603,7 @@ begin Srvc_Aig:=true; Srvc_Det:=true; Srvc_Act:=true; + DebugAffiche:=false; Srvc_PosTrain:=false; Srvc_sig:=false; confasauver:=false; @@ -9232,10 +10629,6 @@ begin Affiche(s,clLime); LabelEtat.Caption:='Initialisations en cours'; - //Menu_interface(devalide); - // créée la fenetre debug - FormDebug:=TFormDebug.Create(Self); - FormDebug.Caption:=AF+' debug'; N_Trains:=0; NivDebug:=0; ncrois:=0; @@ -9248,7 +10641,9 @@ begin etat_init_interface:=0; debug:=0; etape:=1; - + affevt:=false; + DebugAffiche:=false; + Algo_localisation:=1; // normal avecRoulage:=0; AvecInit:=true; // &&&& avec initialisation des aiguillages ou pas Option_demarrage:=false; // démarrage des trains après tempo, pas encore au point @@ -9263,8 +10658,6 @@ begin StaticText.Top:=FenRich.Height+FenRich.Top+10; //---------------------------------------- - // créée la fenetre vérification de version - FormVersion:=TformVersion.Create(Self); ferme:=false; CDM_connecte:=false; pasreponse:=0; @@ -9287,10 +10680,42 @@ begin Application.HintHidePause:=30000; visible:=true; // rend la form visible plus tot + // ouvrir le TCO avant de lire la config car en mode DCC++, on va + // recevoir les events détecteurs et la mise à jour du TCO + // !!non il faut ouvrir e TCO après la config + + { + procetape('Debug et TCO'); + if debug=1 then affiche('Ouverture du debug',clLime); + formdebug:=TformDebug.Create(nil); + i:=0; + repeat + application.processmessages; + inc(i); + until (DebugAffiche) or (i>15); + if not(DebugAffiche) then Affiche('Erreur : fenêtre debug non créée',clred); + if debugAffiche and (Debug=1) then Affiche('Fenêtre Debug créée',clYellow); + + if debug=1 then affiche('Ouverture du TCO',clLime); + + //créée la fenêtre TCO non modale avant la fin de la création de formprinc + FormTCO:=TformTCO.Create(nil); + i:=0; + repeat + application.processmessages; + inc(i); + until (TcoOuvert) or (i>15); + if not(TCOOUvert) then Affiche('Erreur : fenêtre TCO non créée',clred); + if TCOOuvert and (Debug=1) then Affiche('Fenêtre TCO créée',clYellow); + } + + // TCO + for i:=1 to MaxCdeDccpp do CdeDccpp[i]:=''; // lecture fichiers de configuration procetape('on va lire la config'); //2 lit_config; + lire_fichier_tco; procetape('on a lu la config'); if protocole=1 then @@ -9312,21 +10737,6 @@ begin procetape('fin cdm'); Loco.Visible:=true; - // ouvrir le TCO avant de lire la config car en mode DCC++, on va - // recevoir les events détecteurs et la mise à jour du TCO - if debug=1 then affiche('Ouverture du TCO',clLime); - procetape('TCO'); - //créée la fenêtre TCO non modale - FormTCO:=TformTCO.Create(nil); - if avecTCO then - begin - formTCO.show; - With Formprinc do - begin - BringToFront; - Setfocus; - end; - end; // tenter la liaison vers CDM rail procetape('Test connexion CDM'); @@ -9341,34 +10751,11 @@ begin if AvecDemandeInterfaceUSB then connecte_USB; if not(portCommOuvert) and AvecDemandeInterfaceEth then begin - etat_init_interface:=0; - // sinon ouvrir socket vers la centrale - // Initialisation de la comm socket LENZ - // a restructurer!!! comme connecte_usb faire connecte_socket - if AdresseIP<>'0' then - begin - procetape('Ouverture interface socket'); - etat_init_interface:=10; - Affiche('Demande ouverture interface par Ethernet '+AdresseIP+':'+intToSTR(portinterface),clyellow); - ClientSocketInterface.port:=portInterface; - ClientSocketInterface.Address:=AdresseIP; - ClientSocketInterface.Open; - end; + application.ProcessMessages; + connecte_interface_ethernet; // la connexion du socket ne se fait qu'a la sortie de cette procédure create end; end; - // attendre la fin des init de l'interface eth, car l'ethernet répond en asynchrone sur l'evt on read!!! - procetape('Test fin connexion interface socket'); - if etat_init_interface>=10 then - begin - i:=0;t:=5; - repeat - inc(i); - sleep(100); - if etat_init_interface=11 then t:=100; // init en cours, attendre au max 10s - until (etat_init_interface=20) or (i>t); - end; - if portCommOuvert or parSocketLenz then With Formprinc do begin @@ -9391,11 +10778,29 @@ begin // ajoute les images des feux dynamiquement for i:=1 to NbreFeux do begin - if debug=1 then affiche('Création du signal '+intToSTR(i),clLime); + if debug=1 then affiche('Création du signal '+intToSTR(i)+' ----------',clLime); cree_image(i); // et initialisation tableaux signaux end; Tempo_init:=5; // démarre les initialisation des signaux et des aiguillages dans 0,5 s - if avecTCO then Affiche_tco; + + // il faut afficher la fenetre TCO pour l'init aiguillage sinon violation + begin + //créée la fenêtre TCO non modale + FormTCO:=TformTCO.Create(nil); + i:=0; + repeat + application.processmessages; + inc(i); + until (TcoOuvert) or formTCO.active or (i>20); + Application.processmessages; + { + if not(TCOOUvert) then Affiche('Erreur : fenêtre TCO non créée',clred); + if TCOOuvert and (Debug=1) then Affiche('Fenêtre TCO créée',clYellow); + if formTCO.active then Affiche('active',clyellow); + } + if avecTCO then FormTCO.show; // créer fiche dynamique (projet/fichie) ne pas afficher sinon fenetre fantome!! + end; + raz_tout; procetape('Début des init'); I_Simule:=0; @@ -9426,7 +10831,6 @@ begin //Menu_interface(valide); end; - DoubleBuffered:=true; { aiguillage[index_aig(1)].position:=const_droit; @@ -9436,7 +10840,7 @@ begin aiguillage[index_aig(6)].position:=const_devie; aiguillage[index_aig(7)].position:=const_devie; aiguillage[index_aig(8)].position:=const_devie; - aiguillage[index_aig(10)].position:=const_droit; + aiguillage[index_aig(10)].position:=const_devie; aiguillage[index_aig(11)].position:=const_devie; aiguillage[index_aig(12)].position:=const_droit; aiguillage[index_aig(18)].position:=const_devie; @@ -9450,11 +10854,9 @@ begin aiguillage[index_aig(31)].position:=const_devie; aiguillage[index_aig(25)].position:=const_droit; aiguillage[index_aig(9)].position:=const_droit; - //nivdebug:=3; - //formdebug.Show; - i:=Signal_precedent(218); - Affiche(intToSTR(i),clred);} - //Aiguillage[index_aig(100)].adrTrain:=55; + // roulage:=true; + det_contigu(526,515,i,teq); + Affiche(intToSTR(i),clred); } procetape('fini !!'); end; @@ -9651,21 +11053,19 @@ begin end; end; - //simulation - if (index_simule<>0) then + if (i_simule<>0) then begin if not(MsgSim) then begin Affiche('Simulation en cours ',Cyan);MsgSim:=true; - Raz_tout; - // AffTickSimu:=true; end; - while tick=Tablo_simule[i_simule+1].tick do - //while i_simule=Intervalle then begin - inc(I_simule); + intervalle_courant:=0; + tick:=Tablo_simule[i_simule].tick; + //s:='Simulation '+intToSTR(I_simule)+' Tick='+IntToSTR(tick);Affiche(s,clYellow); // evt détecteur ? if Tablo_simule[I_simule].modele=det then @@ -9684,31 +11084,41 @@ begin StaticText.caption:=s; //Affiche(s,clyellow); end; - end; - if i_Simule>=Index_simule then - begin - Index_Simule:=0; // fin de simulation - I_Simule:=0; - MsgSim:=false; - Affiche('Fin de simulation',Cyan); - StaticText.caption:=''; + inc(i_simule); + if i_Simule>Index_simule then + begin + Index_Simule:=0; // fin de simulation + I_Simule:=0; + MsgSim:=false; + Affiche('Fin de simulation',Cyan); + StaticText.caption:=''; + end; end; + inc(intervalle_courant); end; - // temporisations de démarrage des trains au feux pas encore au point - if Option_demarrage then + // temporisations de démarrage des trains au feux + if (Option_demarrage or roulage) then for i:=1 to 1024 do begin if detecteur[i].tempo<>0 then begin dec(detecteur[i].tempo); + //Affiche(intToSTR(i),clBlue); if detecteur[i].tempo=0 then begin //s:=detecteur[i].train; - //Affiche('Tempo 0 timer train '+s+' det '+intToSTR(i),clOrange); - s:=chaine_CDM_vitesseST(100,s); // 100% - envoi_cdm(s); + if cdm_connecte then + begin + s:=chaine_CDM_vitesseST(100,s); // 100% + envoi_cdm(s); + end; + if roulage then + begin + a:=index_train_adresse(detecteur[i].AdrTrain); + if (a>1) and (a0 then s:=s+' @='+intToSTR(AdrTrain); + AdrTrain:=detecteur[adr].IndexTrain; + if AdrTrain<>0 then s:=s+' IndexTrain='+intToSTR(AdrTrain); + Affiche(s,clYellow); end; + Affiche('Nombre de détecteurs à 1 :'+intToSTR(NbDet1),clYellow); end; // trouve l'index du détecteur de. Si pas trouvé, renvoie 0 function index_adresse_detecteur(de : integer) : integer; var j : integer; + trouve : boolean; begin j:=1; repeat + trouve:=Adresse_detecteur[j]=de; inc(j); - until (j>NbMaxDet) or (Adresse_detecteur[j]=de); - if Adresse_detecteur[j]=de then index_adresse_detecteur:=j + until (j>NbMaxDet) or trouve; + if trouve then index_adresse_detecteur:=j else index_adresse_detecteur:=0; end; @@ -10081,7 +11501,7 @@ begin end; end; end; - + procedure TFormPrinc.ClientSocketInterfaceConnect(Sender: TObject;Socket: TCustomWinSocket); var trouve : boolean; begin @@ -10092,8 +11512,9 @@ begin LireunfichierdeCV1.enabled:=true; LabelTitre.caption:=titre+' Interface connectée par Ethernet'; etat_init_interface:=11; // socket connecté - trouve:=test_protocole; // appelle l'étatdes détécteurs - if trouve then + trouve:=test_protocole; // appelle l'état des détécteurs + + if trouve then // protocole reconnu begin if protocole=1 then begin @@ -10104,7 +11525,25 @@ begin begin init_dccpp; etat_init_interface:=20; - end; + end; + // interface ethernet connectée, faire les init + demande_etat_det; + if AvecInit then + begin + if not(ConfigNulle) and not(ferme) and (AvecInitAiguillages) then + begin + Affiche('Positionnement des signaux',clYellow); + init_aiguillages; // initialisation des aiguillages + envoi_signauxCplx; // initialisation des feux + end; + if not(AvecInitAiguillages) and not(ferme) and (parSocketLenz or portCommOuvert) + and AvecDemandeAiguillages then + begin + procetape('demande etats accessoires'); + demande_etat_acc; // demande l'état des accessoires (position des aiguillages) + end; + LabelEtat.Caption:=' '; + end; end; if not(trouve) then ClientSocketInterface.Close; end; @@ -10115,7 +11554,6 @@ begin s:='Socket CDM rail connecté'; LabelTitre.caption:=titre+' '+s; Affiche(s,clYellow); - AfficheDebug(s,clYellow); CDM_connecte:=True; MenuConnecterUSB.enabled:=false; DeConnecterUSB.enabled:=false; @@ -11277,6 +12715,7 @@ end; procedure TFormPrinc.Affichefentredebug1Click(Sender: TObject); begin +// formdebug.Create(nil); formDebug.show; end; @@ -11332,8 +12771,9 @@ begin end; procedure TFormPrinc.Etatdeszonespartrain1Click(Sender: TObject); -var i,j,n,train,couleur : integer; - rien : boolean; +var i,j,n,train,pos : integer; + couleur : tcolor; + rien,aff : boolean; s : string; begin Affiche('',clyellow); @@ -11345,7 +12785,8 @@ begin for i:=1 to n do begin rien:=false; - s:='Train='+intToSTR(train)+' '+TrainZone[train].train+' @='+intToSTR(TrainZone[train].adrTrain); + s:='Train='+intToSTR(train)+' '+TrainZone[train].train; + if TrainZone[train].adrTrain<>0 then s:=s+' @='+intToSTR(TrainZone[train].adrTrain); s:=s+' index='+intToSTR(i); s:=s+' '+intToSTR(TrainZone[train].Zone[i].det1); s:=s+' '+intToSTR(TrainZone[train].Zone[i].det2); @@ -11359,18 +12800,44 @@ begin repeat j:=1; repeat - rien:=MemZone[i,j].etat; - if rien then Affiche('MemZone['+intToSTR(i)+','+intToSTR(j)+'] '+MemZone[i,j].train+' @='+intToSTR(MemZone[i,j].AdrTrain),clYellow); + aff:=MemZone[i,j].etat; + if aff then + begin + Affiche('MemZone['+intToSTR(i)+','+intToSTR(j)+'] '+MemZone[i,j].train+' @='+intToSTR(MemZone[i,j].AdrTrain)+' Train n°'+intToSTR(MemZone[i,j].Numtrain),clYellow); + rien:=false; + end; inc(j); until (j>NbMemZone); inc(i); until (i>NbMemZone); - Affiche('Elements verrouillés:',clWhite); + Affiche('Derniers Elements verrouillés:',clWhite); for i:=1 to idEl do begin Affiche(IntToSTR(elements[i].adresse),clLime); end; + + for i:=1 to n_trains do + begin + Affiche('Event det train '+intToSTR(i),clOrange); + for j:=1 to event_det_train[i].NbEl do + begin + Affiche(intToSTR(event_det_train[i].Det[j].adresse),clyellow); + end; + end; + + Affiche('Evènements détecteurs par train',clWhite); + for i:=1 to n_trains do + begin + index_couleur:=((i - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + Affiche('Train '+intToSTR(i),couleur); + for j:=1 to N_event_tick do + begin + if event_det_tick[j].train=i then Affiche(intToSTR(event_det_tick[j].adresse)+' '+intToSTR(event_det_tick[j].etat),couleur); + end; + end; + if rien then Affiche('Aucune zone n''a été déclenchée',clOrange); end; @@ -11416,6 +12883,73 @@ begin formconfig.close; end; +procedure TFormPrinc.Informationsdusignal1Click(Sender: TObject); +var s: string; + v,i,etat,aspect,combine,adresse,aig,trainReserve,AdrSignalsuivant : integer; + code : word; +begin + clicliste:=false; + s:=((Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TImage).name; // nom du composant, pout récupérer l'adresse du feu (ex: ImageFeu260) + //Affiche(s,clOrange); // nom de l'image du signal (ex: ImageFeu260) + adresse:=extract_int(s); // extraire l'adresse (ex 260) + + i:=index_feu(Adresse); + if feux[i].aspect>10 then exit; + code:=feux[i].EtatSignal; + code_to_aspect(code,aspect,combine); + s:='Signal ad'+IntToSTR(adresse)+'='+chaine_signal(code); + Affiche(s,clYellow); + //Affiche(IntToSTR(aspect),clred); + //Affiche(IntToSTR(combine),clred); + + // carré + if aspect=0 then + begin + Affiche('Le signal est au carré car ',clyellow); + if carre_signal(Adresse,trainreserve) and (trainreserve=0) then affiche('les aiguillages en aval du signal sont mal positionnées ou leur positions inconnues',clyellow) ; + if trainreserve<>0 then affiche('un aiguillage ou un croisement en aval du signal sont réservés par le train @'+intToSTR(trainReserve),clyellow); + if Cond_Carre(Adresse) then affiche_suivi('les aiguillages déclarés dans la définition du signal sont mal positionnés',clyellow); + if feux[i].VerrouCarre and not(PresTrainPrec(Adresse,Nb_cantons_Sig,TrainReserve)) then affiche('le signal est verrouillable au carré et aucun train n''est présent avant le signal',clyellow); + if test_memoire_zones(Adresse) then affiche('présence train dans canton suivant le signal',clyellow); + if feux[i].VerrouilleCarre then affiche('le signal est verrouillé au carré dans la fenêtre de pilotage',clYellow); + end; + if aspect=1 then + begin + Affiche('Le signal est au sémaphore car ',clyellow); + if test_memoire_zones(Adresse) then affiche_suivi('Présence train dans canton après le signal',clyellow); + end; + // avertissement + if aspect=8 then + begin + i:=etat_signal_suivant(Adresse,1,AdrSignalsuivant); + Affiche('Le signal est à l''avertissement car son signal suivant '+intToSTR(AdrSignalsuivant)+' est au '+chaine_signal(i),clyellow); + end; + // avertissement cli + if aspect=9 then + begin + i:=etat_signal_suivant(Adresse,1,AdrSignalsuivant); + Affiche('Le signal est au jaune cli car son signal suivant '+intToSTR(AdrSignalsuivant)+' est au '+chaine_signal(i),clyellow); + end; + // ralen 30 + if combine=10 then + begin + i:=etat_signal_suivant(Adresse,1,AdrSignalsuivant); + Affiche('Le signal est au ralentissement 30 car son signal suivant '+intToSTR(AdrSignalsuivant)+' est au '+chaine_signal(i),clyellow); + end; + if combine=11 then + begin + i:=etat_signal_suivant(Adresse,1,AdrSignalsuivant); + Affiche('Le signal est au ralentissement 60 car son signal suivant '+intToSTR(AdrSignalsuivant)+' est au '+chaine_signal(i),clyellow); + end; + if (combine=12) or (combine=13) then + begin + Aig:=Aiguille_deviee(Adresse); + // si aiguille locale déviée + if (aig<>0) then Affiche('Le signal est à rappel 30 car l''aiguillage suivant '+intToSTR(Aig)+' est dévié',clyellow); + end; + +end; + procedure TFormPrinc.VrifierlacohrenceClick(Sender: TObject); begin if verif_coherence then affiche('La configuration est cohérente',clLime); @@ -11462,7 +12996,8 @@ end; procedure TFormPrinc.ComboTrainsChange(Sender: TObject); var i : integer; begin - i:=ComboTrains.itemIndex; + i:=ComboTrains.itemIndex+1; + if (i<>0) and (i0 then + begin + detecteur[Adr].train:=placement[i].train; + detecteur[Adr].AdrTrain:=trains[i].adresse; + event_detecteur(Adr,true,trains[i].nom_train); + Affiche('Positionnement train '+detecteur[Adr].train+' sur détecteur '+intToSTR(Adr),clLime); + end; + end; + init_aiguillages; + + for i:=1 to NDetecteurs do + begin + adr:=Adresse_detecteur[i]; + if Detecteur[adr].etat and (detecteur[adr].train<>'') then + begin + Affiche('Lancement du train '+detecteur[adr].train+' depuis détecteur '+intToSTR(adr),clYellow); + AdrTrain:=detecteur[Adr].AdrTrain; + j:=index_train_adresse(AdrTrain); + vitesse_loco('',adrTrain,trains[j].VitNominale,not(placement[j].inverse)); + trouve:=true; + roulage:=true; + end; + end; + if trouve then Maj_feux; + +end; + +procedure TFormPrinc.Button1Click(Sender: TObject); +begin +// placement_trains; + ouvre_simulation('C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL\2trains_autonome.txt'); + //ouvre_simulation('C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL\oua.txt'); +end; + + + +procedure TFormPrinc.Evenementsdetecteurspartrain1Click(Sender: TObject); +var i,j,train,pos : integer; + s : string; +begin +Affiche('Evenements tous détecteurs',clwhite); + Affiche(' ',clyellow); + for i:=0 to n_trains do + begin + Affiche_Suivi('Train '+intToSTR(i)+' ',clYellow); + end; + for i:=1 to N_event_tick do + begin + if event_det_tick[i].modele=det then + begin + train:=event_det_tick[i].train; + index_couleur:=((train - 1) mod NbCouleurTrain) +1; + couleur:=couleurTrain[index_couleur]; + s:=''; + for j:=1 to train*15 do s:=s+' '; + s:=s+intToSTR(event_det_tick[i].adresse)+' '+intToSTR(event_det_tick[i].etat); + if event_det_tick[i].reaffecte=1 then s:=s+'R'; + if event_det_tick[i].reaffecte=2 then s:=s+'A'; + Affiche(s,couleur); + end; + if event_det_tick[i].modele=aig then + begin + s:='Aiguillage '+intToSTR(event_det_tick[i].adresse)+' '; + pos:=event_det_tick[i].etat; + case pos of + const_devie : s:=s+' dévié' ; + const_droit : s:=s+' droit'; + const_inconnu : s:=s+' inconnue'; + else s:=s+' erreur ('+intToSTR(pos)+')'; + end; + Affiche(s,clWhite); + end; + end; + +end; + + end. diff --git a/UnitSR.dcu b/UnitSR.dcu index 062da37..fc34935 100644 Binary files a/UnitSR.dcu and b/UnitSR.dcu differ diff --git a/UnitSimule.dcu b/UnitSimule.dcu index 33531f9..db8087c 100644 Binary files a/UnitSimule.dcu and b/UnitSimule.dcu differ diff --git a/UnitSimule.dfm b/UnitSimule.dfm index 29460f6..004c710 100644 --- a/UnitSimule.dfm +++ b/UnitSimule.dfm @@ -50,9 +50,9 @@ object FormSimulation: TFormSimulation object CheckAffTick: TCheckBox Left = 64 Top = 64 - Width = 225 + Width = 313 Height = 17 - Caption = 'Afficher les ticks pendant la simulation' + Caption = 'RAZ des trains et de leurs placements avant de d'#233'marrer' TabOrder = 2 end object OpenDialog: TOpenDialog diff --git a/UnitSimule.pas b/UnitSimule.pas index a0508c3..34de9be 100644 --- a/UnitSimule.pas +++ b/UnitSimule.pas @@ -26,19 +26,105 @@ type var FormSimulation: TFormSimulation; Intervalle : integer; - AffTickSimu : boolean; + +procedure ouvre_simulation(nomfichier : string); implementation {$R *.dfm} -procedure TFormSimulation.ButtonChargeClick(Sender: TObject); -var s,nF : string; - fte : textFile; +procedure ouvre_simulation(nomfichier : string); +var s: string; + fte : text; i,k,erreur : integer; sortie : boolean; begin - AffTickSimu:= checkAffTick.Checked; + assignFile(fte,nomfichier); + {$I+} + try + reset(fte); + except + Affiche('Fichier '+nomFichier+' incorrect',clred); + exit; + end; + index_simule:=1; + sortie:=false; + while not(eof(fte)) and not(sortie) do + begin + readln(fte,s); + s:=Uppercase(s); + i:=pos('TICK=',s); + if i<>0 then + begin + Delete(s,1,i+4); + val(s,k,erreur); + //if intervalle<>0 then k:=Index_Simule*Intervalle+tick+30 else // démarre dans 3s + // k:=Index_Simule+tick+30 ; + Tablo_simule[index_simule].tick:=k; + // détecteur? + i:=pos('DET',s); + if i<>0 then + begin + Delete(s,1,i+2); + if s[1]='=' then delete(s,1,1); + if s[1]=' ' then delete(s,1,1); + val(s,k,erreur); + Tablo_simule[index_simule].adresse:=k; + Tablo_simule[index_simule].modele:=det; + i:=pos('=',s); + if i<>0 then + begin + Delete(s,1,i); + val(s,k,erreur); + Tablo_simule[index_simule].etat:=k; + {s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+ + ' Detecteur='+intToSTR(Tablo_simule[index_simule].Adresse)+ + '='+intToSTR(Tablo_simule[index_simule].etat); + Affiche(s,ClLime); } + inc(index_simule); + end; + end; + // aiguillage? + i:=pos('AIG',s); + if i<>0 then + begin + Delete(s,1,i+2); + if s[1]='=' then delete(s,1,1); + if s[1]=' ' then delete(s,1,1); + val(s,k,erreur); + Tablo_simule[index_simule].adresse:=k; + Tablo_simule[index_simule].modele:=aig; + i:=pos('=',s); + if i<>0 then + begin + Delete(s,1,i); + val(s,k,erreur); + if (k=1) or (k=2) then Tablo_simule[index_simule].etat:=k + else Affiche('Erreur 622 : Position aiguillage '+intToSTR(Tablo_simule[index_simule].adresse)+' inconnue dans le fichier de simulation',clred); + {s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+ + ' Aiguillage='+intToSTR(Tablo_simule[index_simule].adresse)+ + '='+intToSTR(Tablo_simule[index_simule].etat); + Affiche(s,ClLime); } + inc(index_simule); + end; + end; + end; + Application.ProcessMessages; + sortie:=eof(fte) or (index_simule>Max_Simule) or (pos('STOP',s)<>0); + end ; + if index_simule>Max_Simule then Affiche('Tableau maximal atteint',clred); + Affiche('Intervalle='+intToSTR(intervalle),clyellow); + dec(index_simule); //maxi + closeFile(fte); + formprinc.ButtonArretSimu.Visible:=true; + i_simule:=1; + FormSimulation.Close; + Affiche('Fichier simulation : '+Nomfichier ,clyellow); +end; + +procedure TFormSimulation.ButtonChargeClick(Sender: TObject); +var s : string; +begin s:=GetCurrentDir; s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL'; OpenDialog.InitialDir:=s; @@ -47,90 +133,12 @@ begin OpenDialog.Filter:='Fichiers texte (*.txt)|*.txt|Tous fichiers (*.*)|*.*'; if openDialog.Execute then begin - nF:=openDialog.FileName; - assignFile(fte,nF); - reset(fte); - index_simule:=1; - repeat - readln(fte,s); - //Affiche(s,clLime); - i:=pos('Tick=',s); - if i<>0 then - begin - Delete(s,1,i+4); - val(s,k,erreur); - if intervalle<>0 then k:=Index_Simule*Intervalle+tick+30 else // démarre dans 3s - k:=Index_Simule+tick+30 ; - Tablo_simule[index_simule].tick:=k; - - // détecteur? - i:=pos('Det',s); - if i<>0 then - begin - Delete(s,1,i+2); - if s[1]='=' then delete(s,1,1); - if s[1]=' ' then delete(s,1,1); - val(s,k,erreur); - Tablo_simule[index_simule].adresse:=k; - Tablo_simule[index_simule].modele:=det; - i:=pos('=',s); - if i<>0 then - begin - Delete(s,1,i); - val(s,k,erreur); - Tablo_simule[index_simule].etat:=k; - - //s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+ - // ' Detecteur='+intToSTR(Tablo_simule[index_simule].detecteur)+ - // '='+intToSTR(Tablo_simule[index_simule].etat); - //Affiche(s,ClLime); - - inc(index_simule); - end; - end; - - // aiguillage? - i:=pos('Aig',s); - if i<>0 then - begin - Delete(s,1,i+2); - if s[1]='=' then delete(s,1,1); - if s[1]=' ' then delete(s,1,1); - val(s,k,erreur); - Tablo_simule[index_simule].adresse:=k; - Tablo_simule[index_simule].modele:=aig; - i:=pos('=',s); - if i<>0 then - begin - Delete(s,1,i); - val(s,k,erreur); - if (k=1) or (k=2) then Tablo_simule[index_simule].etat:=k - else Affiche('Erreur 622 : Position aiguillage '+intToSTR(Tablo_simule[index_simule].adresse)+' inconnue dans le fichier de simulation',clred); - - {s:=IntToSTR(Index_simule)+' Tick='+intToSTR(Tablo_simule[index_simule].tick)+ - ' Aiguillage='+intToSTR(Tablo_simule[index_simule].adresse)+ - '='+intToSTR(Tablo_simule[index_simule].etat); - Affiche(s,ClLime); } - - inc(index_simule); - end; - end; - end; - Application.ProcessMessages; - sortie:=eof(fte) or (index_simule>Max_Simule); - until sortie ; - if index_simule>Max_Simule then Affiche('Tableau maximal atteint',clred); - Affiche('Intervalle='+intToSTR(intervalle),clyellow); - dec(index_simule); - closeFile(fte); - formprinc.ButtonArretSimu.Visible:=true; - - FormSimulation.Close; + if checkAffTick.Checked then raz_tout; + s:=openDialog.FileName; + ouvre_simulation(s); end; - Affiche('Fichier simulation : '+nF ,clyellow); end; - procedure TFormSimulation.FormCreate(Sender: TObject); begin Intervalle:=0; diff --git a/UnitTCO.dcu b/UnitTCO.dcu index 0124cc0..f4c9b3f 100644 Binary files a/UnitTCO.dcu and b/UnitTCO.dcu differ diff --git a/UnitTCO.dfm b/UnitTCO.dfm index 01a3ecf..9da0c5f 100644 --- a/UnitTCO.dfm +++ b/UnitTCO.dfm @@ -1,6 +1,6 @@ object FormTCO: TFormTCO - Left = 207 - Top = 62 + Left = 179 + Top = 15 Width = 1139 Height = 686 VertScrollBar.Visible = False @@ -96,7 +96,7 @@ object FormTCO: TFormTCO VertScrollBar.Tracking = True Anchors = [akLeft, akTop, akRight, akBottom] BevelEdges = [beLeft, beTop, beRight] - Color = clBackground + Color = clBlack ParentColor = False TabOrder = 0 DesignSize = ( @@ -105,8 +105,8 @@ object FormTCO: TFormTCO object ImageTCO: TImage Left = 0 Top = 0 - Width = 1030 - Height = 345 + Width = 1009 + Height = 337 Anchors = [akLeft, akTop, akRight, akBottom] ParentShowHint = False PopupMenu = PopupMenu1 @@ -135,10 +135,10 @@ object FormTCO: TFormTCO OnChange = TrackBarZoomChange end object Panel1: TPanel - Left = 8 - Top = 471 - Width = 1113 - Height = 166 + Left = 0 + Top = 480 + Width = 1121 + Height = 165 Anchors = [akLeft, akRight, akBottom] Color = clActiveBorder Font.Charset = ANSI_CHARSET @@ -150,10 +150,10 @@ object FormTCO: TFormTCO TabOrder = 2 OnDragOver = Panel1DragOver DesignSize = ( - 1113 - 166) + 1121 + 165) object ImagePalette5: TImage - Left = 504 + Left = 520 Top = 8 Width = 41 Height = 41 @@ -163,7 +163,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette5MouseDown end object Label6: TLabel - Left = 200 + Left = 216 Top = 22 Width = 9 Height = 19 @@ -176,7 +176,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette2: TImage - Left = 288 + Left = 304 Top = 8 Width = 41 Height = 41 @@ -186,7 +186,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette2MouseDown end object Label7: TLabel - Left = 272 + Left = 288 Top = 22 Width = 9 Height = 19 @@ -199,7 +199,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label10: TLabel - Left = 488 + Left = 504 Top = 22 Width = 9 Height = 19 @@ -212,7 +212,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette1: TImage - Left = 216 + Left = 232 Top = 8 Width = 41 Height = 41 @@ -225,7 +225,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette1MouseDown end object ImagePalette6: TImage - Left = 216 + Left = 232 Top = 56 Width = 41 Height = 41 @@ -235,7 +235,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette6MouseDown end object ImagePalette7: TImage - Left = 288 + Left = 304 Top = 56 Width = 41 Height = 41 @@ -245,7 +245,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette7MouseDown end object ImagePalette8: TImage - Left = 360 + Left = 376 Top = 56 Width = 41 Height = 41 @@ -255,7 +255,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette8MouseDown end object ImagePalette9: TImage - Left = 432 + Left = 448 Top = 56 Width = 41 Height = 41 @@ -265,7 +265,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette9MouseDown end object Label11: TLabel - Left = 200 + Left = 216 Top = 70 Width = 9 Height = 19 @@ -278,7 +278,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label12: TLabel - Left = 272 + Left = 288 Top = 70 Width = 9 Height = 19 @@ -291,7 +291,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label13: TLabel - Left = 344 + Left = 360 Top = 70 Width = 9 Height = 19 @@ -304,7 +304,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label14: TLabel - Left = 416 + Left = 432 Top = 70 Width = 9 Height = 19 @@ -317,7 +317,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette3: TImage - Left = 360 + Left = 376 Top = 8 Width = 41 Height = 41 @@ -327,7 +327,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette3MouseDown end object ImagePalette4: TImage - Left = 432 + Left = 448 Top = 8 Width = 41 Height = 41 @@ -336,7 +336,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette4MouseDown end object Label8: TLabel - Left = 344 + Left = 360 Top = 22 Width = 9 Height = 19 @@ -349,7 +349,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label9: TLabel - Left = 416 + Left = 432 Top = 22 Width = 9 Height = 19 @@ -362,7 +362,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette10: TImage - Left = 216 + Left = 232 Top = 104 Width = 41 Height = 41 @@ -372,7 +372,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette10MouseDown end object Label16: TLabel - Left = 192 + Left = 208 Top = 118 Width = 18 Height = 19 @@ -385,7 +385,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette11: TImage - Left = 288 + Left = 304 Top = 104 Width = 41 Height = 41 @@ -395,7 +395,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette11MouseDown end object Label17: TLabel - Left = 264 + Left = 280 Top = 118 Width = 17 Height = 19 @@ -408,7 +408,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette30: TImage - Left = 440 + Left = 456 Top = 104 Width = 25 Height = 41 @@ -422,7 +422,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette30MouseDown end object Label18: TLabel - Left = 408 + Left = 424 Top = 118 Width = 18 Height = 19 @@ -435,7 +435,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette12: TImage - Left = 576 + Left = 592 Top = 8 Width = 41 Height = 41 @@ -445,7 +445,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette12MouseDown end object Label20: TLabel - Left = 552 + Left = 568 Top = 22 Width = 18 Height = 19 @@ -458,7 +458,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label3: TLabel - Left = 624 + Left = 640 Top = 22 Width = 18 Height = 19 @@ -471,7 +471,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette13: TImage - Left = 648 + Left = 664 Top = 8 Width = 41 Height = 41 @@ -481,7 +481,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette13MouseDown end object Label21: TLabel - Left = 696 + Left = 712 Top = 22 Width = 18 Height = 19 @@ -494,7 +494,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette14: TImage - Left = 720 + Left = 736 Top = 8 Width = 41 Height = 41 @@ -504,7 +504,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette14MouseDown end object Label22: TLabel - Left = 768 + Left = 784 Top = 22 Width = 18 Height = 19 @@ -517,7 +517,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette15: TImage - Left = 792 + Left = 808 Top = 8 Width = 41 Height = 41 @@ -527,7 +527,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette15MouseDown end object ImagePalette16: TImage - Left = 504 + Left = 520 Top = 56 Width = 41 Height = 41 @@ -537,7 +537,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette16MouseDown end object Label24: TLabel - Left = 480 + Left = 496 Top = 70 Width = 18 Height = 19 @@ -550,7 +550,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette17: TImage - Left = 576 + Left = 592 Top = 56 Width = 41 Height = 41 @@ -560,7 +560,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette17MouseDown end object Label25: TLabel - Left = 552 + Left = 568 Top = 70 Width = 18 Height = 19 @@ -573,7 +573,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette18: TImage - Left = 648 + Left = 664 Top = 56 Width = 41 Height = 41 @@ -583,7 +583,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette18MouseDown end object Label26: TLabel - Left = 624 + Left = 640 Top = 70 Width = 18 Height = 19 @@ -596,7 +596,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette19: TImage - Left = 720 + Left = 736 Top = 56 Width = 41 Height = 41 @@ -606,7 +606,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette19MouseDown end object Label27: TLabel - Left = 696 + Left = 712 Top = 70 Width = 18 Height = 19 @@ -619,7 +619,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette20: TImage - Left = 792 + Left = 808 Top = 56 Width = 41 Height = 41 @@ -629,7 +629,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette20MouseDown end object Label28: TLabel - Left = 768 + Left = 784 Top = 70 Width = 18 Height = 19 @@ -642,7 +642,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette21: TImage - Left = 864 + Left = 880 Top = 8 Width = 41 Height = 41 @@ -655,7 +655,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette21MouseDown end object Label29: TLabel - Left = 840 + Left = 856 Top = 22 Width = 18 Height = 19 @@ -668,7 +668,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette22: TImage - Left = 936 + Left = 952 Top = 8 Width = 41 Height = 41 @@ -681,7 +681,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette22MouseDown end object Label30: TLabel - Left = 912 + Left = 928 Top = 22 Width = 18 Height = 19 @@ -694,7 +694,7 @@ object FormTCO: TFormTCO ParentFont = False end object ImagePalette23: TImage - Left = 360 + Left = 376 Top = 104 Width = 41 Height = 41 @@ -707,7 +707,7 @@ object FormTCO: TFormTCO OnMouseDown = ImagePalette23MouseDown end object Label31: TLabel - Left = 336 + Left = 352 Top = 118 Width = 18 Height = 19 @@ -720,7 +720,7 @@ object FormTCO: TFormTCO ParentFont = False end object ButtonSauveTCO: TButton - Left = 1005 + Left = 1013 Top = 48 Width = 92 Height = 33 @@ -731,7 +731,7 @@ object FormTCO: TFormTCO OnClick = ButtonSauveTCOClick end object ButtonRedessine: TButton - Left = 1005 + Left = 1013 Top = 8 Width = 92 Height = 33 @@ -741,8 +741,8 @@ object FormTCO: TFormTCO OnClick = ButtonRedessineClick end object Button1: TButton - Left = 608 - Top = 104 + Left = 760 + Top = 112 Width = 89 Height = 25 Caption = 'Simu det 1' @@ -750,8 +750,8 @@ object FormTCO: TFormTCO OnClick = Button1Click end object Button2: TButton - Left = 728 - Top = 104 + Left = 656 + Top = 112 Width = 89 Height = 25 Caption = 'Simu Det 0' @@ -759,7 +759,7 @@ object FormTCO: TFormTCO OnClick = Button2Click end object ButtonConfigTCO: TButton - Left = 1005 + Left = 1013 Top = 88 Width = 92 Height = 33 @@ -769,8 +769,8 @@ object FormTCO: TFormTCO OnClick = ButtonConfigTCOClick end object ButtonSimu: TButton - Left = 720 - Top = 136 + Left = 864 + Top = 80 Width = 113 Height = 25 Caption = 'Simu canton occup'#233 @@ -778,7 +778,7 @@ object FormTCO: TFormTCO OnClick = ButtonSimuClick end object ButtonMasquer: TButton - Left = 1005 + Left = 1013 Top = 128 Width = 92 Height = 33 @@ -789,7 +789,7 @@ object FormTCO: TFormTCO OnClick = ButtonMasquerClick end object GroupBox1: TGroupBox - Left = 0 + Left = 16 Top = 8 Width = 185 Height = 137 @@ -934,7 +934,7 @@ object FormTCO: TFormTCO end end object buttonRaz: TButton - Left = 901 + Left = 909 Top = 128 Width = 92 Height = 33 diff --git a/UnitTCO.pas b/UnitTCO.pas index 95e5f1a..ba2cb1c 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -389,6 +389,7 @@ procedure Tourne90D; procedure Vertical; procedure signalG; procedure signalD; +procedure lire_fichier_tco; implementation @@ -779,6 +780,7 @@ end; procedure calcul_cellules; begin LargeurCell:=ZoomMax-FormTCO.TrackBarZoom.Position+ZoomMin; + //Affiche(intToSTR(largeurcell),clyellow); hauteurCell:=(LargeurCell * RatioC) div 10; Epaisseur:=LargeurCell div 7; // épaisseur du trait pour PEN end; @@ -2968,7 +2970,7 @@ end; // affiche la cellule x et y en cases // index est utilisé pour accéder au tableau du tracé de la fonction zone_tco procedure affiche_cellule(x,y : integer); -var repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer; +var i,repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer; Bt : TEquipement; s : string; begin @@ -3063,6 +3065,21 @@ begin 3 : yt:=HauteurCell-round(17*frYGlob); // bas end; TextOut(xOrg+xt,Yorg+yt,s); + i:=detecteur[adresse].AdrTrain; + if i<>0 then + begin + i:=index_train_adresse(i); + if i<>0 then + begin + case repr of + 1,3 : yt:=1; // haut + 2 : yt:=HauteurCell-round(17*frYGlob); // bas + end; + s:=trains[i].nom_train; + PCanvasTCO.font.Size:=(LargeurCell div 13)+4 ; + TextOut(xOrg,Yorg+yt,s); + end; + end; end; end; @@ -3311,7 +3328,6 @@ begin comborepr.Enabled:=false; ImageTCO.Top:=0; ImageTCO.Left:=0; - TCOouvert:=true; //controlStyle:=controlStyle+[csOpaque]; end; @@ -3778,7 +3794,7 @@ end; procedure TFormTCO.FormActivate(Sender: TObject); begin - //Affiche('Form TCO activate',clyellow); + if affevt then Affiche('Form TCO activate',clyellow); if not(Forminit) then begin FormInit:=true; @@ -3794,7 +3810,6 @@ begin PScrollBoxTCO:=FormTCO.ScrollBox; - lire_fichier_tco; HauteurCell:=ImagePalette1.Height; LargeurCell:=ImagePalette1.Width; calcul_reduction(frxGlob,fryGlob,LargeurCell,HauteurCell,ZoomMax,ZoomMax); @@ -3856,16 +3871,16 @@ begin ButtonAfficheBandeau.visible:=true; BandeauMasque:=true; Panel1.Hide; - ScrollBox.Height:=ClientHeight-40; + ScrollBox.Height:=ClientHeight-30; end else begin BandeauMasque:=false; Panel1.show; - ScrollBox.Height:=ClientHeight-Panel1.Height-40; + ScrollBox.Height:=ClientHeight-Panel1.Height-30; end; end; - + TCOouvert:=true; end; // evt qui se produit quand on clic droit dans l'image @@ -5123,7 +5138,7 @@ begin calcul_cellules; Affiche_TCO; SelectionAffichee:=false; - //Affiche(intTostr(TrackBarZoom.Position),clLime); +// Affiche(intTostr(TrackBarZoom.Position),clLime); end; @@ -5783,9 +5798,7 @@ end; procedure TFormTCO.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); -var i,maxi,x,y : integer; -s : string; - position : tpoint; +var i,maxi : integer; begin i:=FormTCO.TrackBarZoom.Position; diff --git a/Unit_Pilote_aig - Copie.dcu b/Unit_Pilote_aig - Copie.dcu deleted file mode 100644 index dcf1cfc..0000000 Binary files a/Unit_Pilote_aig - Copie.dcu and /dev/null differ diff --git a/Unit_Pilote_aig - Copie.dfm b/Unit_Pilote_aig - Copie.dfm deleted file mode 100644 index 3eb6eed..0000000 --- a/Unit_Pilote_aig - Copie.dfm +++ /dev/null @@ -1,103 +0,0 @@ -object FormAig: TFormAig - Left = 400 - Top = 204 - Width = 363 - Height = 204 - Caption = 'Pilotage de l'#39'aiguillage' - Color = clMaroon - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - KeyPreview = True - OldCreateOrder = False - OnActivate = FormActivate - OnKeyPress = FormKeyPress - PixelsPerInch = 96 - TextHeight = 13 - object Label1: TLabel - Left = 80 - Top = 8 - Width = 173 - Height = 23 - Caption = 'Pilotage de l'#39'aiguillage' - Font.Charset = ANSI_CHARSET - Font.Color = clWindow - Font.Height = -19 - Font.Name = 'Arial Narrow' - Font.Style = [fsBold, fsItalic] - ParentFont = False - end - object LabelAdr1: TLabel - Left = 56 - Top = 56 - Width = 65 - Height = 16 - Caption = 'LabelAdr1' - Font.Charset = ANSI_CHARSET - Font.Color = clWindow - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object LabelAdr2: TLabel - Left = 224 - Top = 56 - Width = 65 - Height = 16 - Caption = 'LabelAdr2' - Font.Charset = ANSI_CHARSET - Font.Color = clWindow - Font.Height = -13 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - end - object ButtonOK: TButton - Left = 136 - Top = 128 - Width = 75 - Height = 25 - Caption = 'Ok' - ModalResult = 1 - TabOrder = 0 - end - object ButtonDev: TButton - Left = 8 - Top = 88 - Width = 75 - Height = 25 - Caption = 'D'#233'vi'#233 - TabOrder = 1 - OnClick = ButtonDevClick - end - object ButtonDroit: TButton - Left = 88 - Top = 88 - Width = 75 - Height = 25 - Caption = 'Droit' - TabOrder = 2 - OnClick = ButtonDroitClick - end - object ButtonDev2: TButton - Left = 184 - Top = 88 - Width = 75 - Height = 25 - Caption = 'D'#233'vi'#233 - TabOrder = 3 - OnClick = ButtonDev2Click - end - object ButtonDroit2: TButton - Left = 264 - Top = 88 - Width = 75 - Height = 25 - Caption = 'Droit' - TabOrder = 4 - OnClick = ButtonDroit2Click - end -end diff --git a/Unit_Pilote_aig - Copie.pas b/Unit_Pilote_aig - Copie.pas deleted file mode 100644 index 6584499..0000000 --- a/Unit_Pilote_aig - Copie.pas +++ /dev/null @@ -1,137 +0,0 @@ -unit Unit_Pilote_aig; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, UnitPrinc, UnitTCO; - -type - TFormAig = class(TForm) - ButtonOK: TButton; - Label1: TLabel; - ButtonDev: TButton; - ButtonDroit: TButton; - ButtonDev2: TButton; - ButtonDroit2: TButton; - LabelAdr1: TLabel; - LabelAdr2: TLabel; - procedure FormActivate(Sender: TObject); - procedure ButtonDevClick(Sender: TObject); - procedure ButtonDroitClick(Sender: TObject); - procedure ButtonDev2Click(Sender: TObject); - procedure ButtonDroit2Click(Sender: TObject); - procedure FormKeyPress(Sender: TObject; var Key: Char); - private - { Déclarations privées } - public - { Déclarations publiques } - end; - -var - FormAig: TFormAig; - aiguille,aiguille2 : integer; - tjdC,aigC : boolean; -implementation - -{$R *.dfm} - -procedure commande_simple; -begin - with formAig do - begin - LabelAdr2.Visible:=false; - LabelAdr1.Visible:=false; - ButtonDev2.Visible:=false; - ButtonDroit2.Visible:=false; - ButtonOk.Visible:=false; - ButtonDev.Left:=48; - ButtonDroit.Left:=216; - end; -end; - -procedure TFormAig.FormActivate(Sender: TObject); -var i : integer; - s : string; -begin - i:=Index_aig(Aiguille); - aigC:=(aiguillage[i].modele=aig); - tjdC:=(aiguillage[i].modele=tjd) or (aiguillage[i].modele=tjs); - if aigC then - begin - s:='Pilotage de l''aiguillage '+intToSTR(aiguille); - commande_simple; - end; - if tjdC then - begin - s:='Pilotage de la TJD '+intToSTR(aiguille); - - if aiguillage[i].EtatTJD=4 then - begin - LabelAdr1.Caption:='Adresse1: '+intToSTR(aiguille); - aiguille2:=aiguillage[i].DDevie; - LabelAdr2.Caption:='Adresse2: '+intToSTR(aiguille2); - s:=s+'/'+intToSTR(aiguille2); - LabelAdr2.Visible:=true; - LabelAdr1.Visible:=true; - ButtonDev2.Visible:=true; - ButtonOk.Visible:=true; - ButtonDroit2.Visible:=true; - ButtonDev.Left:=8; - ButtonDroit.Left:=88; - end; - end; - if aiguillage[i].EtatTJD=2 then - begin - commande_simple; - end; - - Label1.Caption:=s; -end; - -procedure TFormAig.ButtonDevClick(Sender: TObject); -var s : string; -begin - efface_entoure;SelectionAffichee:=false; - pilote_acc(aiguille,const_devie,aigP); - s:='accessoire '+IntToSTR(aiguille)+' dévié'; - Affiche(s,clyellow); - if AigC then close; -end; - -procedure TFormAig.ButtonDroitClick(Sender: TObject); -var s : string; -begin - efface_entoure;SelectionAffichee:=false; - pilote_acc(aiguille,const_droit,aigP); - s:='accessoire '+IntToSTR(aiguille)+' droit'; - Affiche(s,clyellow); - if AigC then close; -end; - -procedure TFormAig.ButtonDev2Click(Sender: TObject); -var s : string; -begin - efface_entoure;SelectionAffichee:=false; - pilote_acc(aiguille2,const_devie,aigP); - s:='accessoire '+IntToSTR(aiguille2)+' dévié'; - Affiche(s,clyellow); - if AigC then close; -end; - -procedure TFormAig.ButtonDroit2Click(Sender: TObject); -var s : string; -begin - efface_entoure;SelectionAffichee:=false; - pilote_acc(aiguille2,const_droit,aigP); - s:='accessoire '+IntToSTR(aiguille2)+' droit'; - Affiche(s,clyellow); - if AigC then close; -end; - -procedure TFormAig.FormKeyPress(Sender: TObject; var Key: Char); -begin - if key=chr(27) then close; -end; - -end. diff --git a/Unit_Pilote_aig.dcu b/Unit_Pilote_aig.dcu index a384775..c863e3d 100644 Binary files a/Unit_Pilote_aig.dcu and b/Unit_Pilote_aig.dcu differ diff --git a/Unit_Pilote_aig.dfm b/Unit_Pilote_aig.dfm index 7731fc6..3eb6eed 100644 --- a/Unit_Pilote_aig.dfm +++ b/Unit_Pilote_aig.dfm @@ -10,8 +10,10 @@ object FormAig: TFormAig Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] + KeyPreview = True OldCreateOrder = False OnActivate = FormActivate + OnKeyPress = FormKeyPress PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel diff --git a/Unit_Pilote_aig.pas b/Unit_Pilote_aig.pas index baafaf2..6584499 100644 --- a/Unit_Pilote_aig.pas +++ b/Unit_Pilote_aig.pas @@ -21,6 +21,7 @@ type procedure ButtonDroitClick(Sender: TObject); procedure ButtonDev2Click(Sender: TObject); procedure ButtonDroit2Click(Sender: TObject); + procedure FormKeyPress(Sender: TObject; var Key: Char); private { Déclarations privées } public @@ -128,4 +129,9 @@ begin if AigC then close; end; +procedure TFormAig.FormKeyPress(Sender: TObject; var Key: Char); +begin + if key=chr(27) then close; +end; + end. diff --git a/Unitplace.dcu b/Unitplace.dcu index a431b6f..c4d86ff 100644 Binary files a/Unitplace.dcu and b/Unitplace.dcu differ diff --git a/Unitplace.dfm b/Unitplace.dfm index fb38814..b58a45e 100644 --- a/Unitplace.dfm +++ b/Unitplace.dfm @@ -1,9 +1,9 @@ object FormPlace: TFormPlace - Left = 313 - Top = 116 + Left = 368 + Top = 142 BorderStyle = bsDialog Caption = 'Placement des trains' - ClientHeight = 442 + ClientHeight = 449 ClientWidth = 307 Color = clBtnFace Font.Charset = DEFAULT_CHARSET @@ -31,59 +31,68 @@ object FormPlace: TFormPlace ParentFont = False end object LabelTrain1: TLabel - Left = 152 - Top = 56 + Left = 8 + Top = 64 Width = 30 Height = 13 Caption = 'Train1' end object LabelTrain2: TLabel - Left = 152 - Top = 80 + Left = 8 + Top = 88 Width = 30 Height = 13 Caption = 'Train2' end object LabelTrain3: TLabel - Left = 152 - Top = 104 + Left = 8 + Top = 112 Width = 30 Height = 13 Caption = 'Train3' end object LabelTrain4: TLabel - Left = 152 - Top = 128 + Left = 8 + Top = 136 Width = 30 Height = 13 Caption = 'Train4' end object LabelTrain5: TLabel - Left = 152 - Top = 152 + Left = 8 + Top = 160 Width = 30 Height = 13 Caption = 'Train5' end object LabelTrain6: TLabel - Left = 152 - Top = 176 + Left = 8 + Top = 184 Width = 30 Height = 13 - Caption = 'Train7' + Caption = 'Train6' end object Label2: TLabel - Left = 96 - Top = 40 - Width = 52 - Height = 13 - Caption = 'D'#233'tecteurs' + Left = 91 + Top = 32 + Width = 70 + Height = 26 + Alignment = taRightJustify + Caption = 'D'#233'tecteurs de placement' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + WordWrap = True end object LabelTexte: TLabel - Left = 19 - Top = 224 - Width = 3 + Left = 9 + Top = 232 + Width = 120 Height = 13 + Caption = '. ' end object Label3: TLabel Left = 8 @@ -92,9 +101,30 @@ object FormPlace: TFormPlace Height = 13 Caption = 'Pour ne pas placer un train, mettre 0 en face de son d'#233'tecteur' end + object Label4: TLabel + Left = 168 + Top = 32 + Width = 54 + Height = 26 + Caption = 'D'#233'tecteurs destinataire' + WordWrap = True + end + object Label5: TLabel + Left = 8 + Top = 40 + Width = 73 + Height = 13 + Caption = 'Nom du train' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + end object Buttonferme: TButton Left = 16 - Top = 400 + Top = 416 Width = 75 Height = 25 Caption = 'Fermer' @@ -103,7 +133,7 @@ object FormPlace: TFormPlace end object ButtonInitAig: TButton Left = 16 - Top = 272 + Top = 248 Width = 273 Height = 25 Caption = 'Positionner les aiguillages en position initiale' @@ -112,64 +142,82 @@ object FormPlace: TFormPlace end object ButtonSauve: TButton Left = 16 - Top = 368 + Top = 376 Width = 273 Height = 25 - Caption = 'Enregistrer la configuration de roulage' + Caption = 'Enregistrer la configuration de placement' TabOrder = 2 OnClick = ButtonSauveClick end object Edit1: TEdit - Left = 96 - Top = 56 - Width = 49 + Left = 128 + Top = 64 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 1' + ParentShowHint = False + ShowHint = True TabOrder = 3 OnChange = Edit1Change end object Edit2: TEdit - Left = 96 - Top = 80 - Width = 49 + Left = 128 + Top = 88 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 2' + ParentShowHint = False + ShowHint = True TabOrder = 4 OnChange = Edit2Change end object Edit3: TEdit - Left = 96 - Top = 104 - Width = 49 + Left = 128 + Top = 112 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 3' + ParentShowHint = False + ShowHint = True TabOrder = 5 OnChange = Edit3Change end object Edit4: TEdit - Left = 96 - Top = 128 - Width = 49 + Left = 128 + Top = 136 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 4' + ParentShowHint = False + ShowHint = True TabOrder = 6 OnChange = Edit4Change end object Edit5: TEdit - Left = 96 - Top = 152 - Width = 49 + Left = 128 + Top = 160 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 5' + ParentShowHint = False + ShowHint = True TabOrder = 7 OnChange = Edit5Change end object Edit6: TEdit - Left = 96 - Top = 176 - Width = 49 + Left = 128 + Top = 184 + Width = 33 Height = 21 + Hint = 'D'#233'tecteur recevant le train 6' + ParentShowHint = False + ShowHint = True TabOrder = 8 OnChange = Edit6Change end object ButtonPlace: TButton Left = 16 - Top = 240 + Top = 280 Width = 273 Height = 25 Caption = 'Placer les trains sur les d'#233'tecteurs ci-dessus' @@ -178,7 +226,7 @@ object FormPlace: TFormPlace end object ButtonLanceRoutage: TButton Left = 16 - Top = 304 + Top = 312 Width = 273 Height = 25 Caption = 'Lancer le roulage' @@ -193,7 +241,7 @@ object FormPlace: TFormPlace end object Button1: TButton Left = 208 - Top = 400 + Top = 416 Width = 81 Height = 25 Caption = 'Config trains' @@ -202,11 +250,149 @@ object FormPlace: TFormPlace end object ButtonArretroutage: TButton Left = 16 - Top = 336 + Top = 344 Width = 273 Height = 25 Caption = 'Arr'#234't du roulage' TabOrder = 12 OnClick = ButtonArretroutageClick end + object CheckInverse1: TCheckBox + Left = 208 + Top = 64 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 13 + OnClick = CheckInverse1Click + end + object CheckInverse2: TCheckBox + Left = 208 + Top = 88 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 14 + OnClick = CheckInverse2Click + end + object CheckInverse3: TCheckBox + Left = 208 + Top = 112 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 15 + OnClick = CheckInverse3Click + end + object CheckInverse4: TCheckBox + Left = 208 + Top = 136 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 16 + OnClick = CheckInverse4Click + end + object CheckInverse5: TCheckBox + Left = 208 + Top = 160 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 17 + OnClick = CheckInverse5Click + end + object CheckInverse6: TCheckBox + Left = 208 + Top = 184 + Width = 89 + Height = 17 + Hint = 'Pilotage en sens inverse' + Caption = 'sens inverse' + ParentShowHint = False + ShowHint = True + TabOrder = 18 + OnClick = CheckInverse6Click + end + object EditDir1: TEdit + Left = 168 + Top = 64 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 1' + ParentShowHint = False + ShowHint = True + TabOrder = 19 + OnChange = EditDir1Change + end + object EditDir2: TEdit + Left = 168 + Top = 88 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 2' + ParentShowHint = False + ShowHint = True + TabOrder = 20 + OnChange = EditDir2Change + end + object EditDir3: TEdit + Left = 168 + Top = 112 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 3' + ParentShowHint = False + ShowHint = True + TabOrder = 21 + OnChange = EditDir3Change + end + object EditDir4: TEdit + Left = 168 + Top = 136 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 4' + ParentShowHint = False + ShowHint = True + TabOrder = 22 + OnChange = EditDir4Change + end + object EditDir5: TEdit + Left = 168 + Top = 160 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 5' + ParentShowHint = False + ShowHint = True + TabOrder = 23 + OnChange = EditDir5Change + end + object EditDir6: TEdit + Left = 168 + Top = 184 + Width = 33 + Height = 21 + Hint = 'D'#233'tecteur suivant vers lequel doit se diriger le train 6' + ParentShowHint = False + ShowHint = True + TabOrder = 24 + OnChange = EditDir6Change + end end diff --git a/Unitplace.pas b/Unitplace.pas index d1f2a33..5423c67 100644 --- a/Unitplace.pas +++ b/Unitplace.pas @@ -30,6 +30,20 @@ type ButtonLanceRoutage: TButton; Button1: TButton; ButtonArretroutage: TButton; + CheckInverse1: TCheckBox; + CheckInverse2: TCheckBox; + CheckInverse3: TCheckBox; + CheckInverse4: TCheckBox; + CheckInverse5: TCheckBox; + CheckInverse6: TCheckBox; + EditDir1: TEdit; + Label4: TLabel; + EditDir2: TEdit; + EditDir3: TEdit; + EditDir4: TEdit; + EditDir5: TEdit; + EditDir6: TEdit; + Label5: TLabel; procedure ButtonfermeClick(Sender: TObject); procedure ButtonInitAigClick(Sender: TObject); procedure FormActivate(Sender: TObject); @@ -45,6 +59,18 @@ type procedure FormKeyPress(Sender: TObject; var Key: Char); procedure ButtonLanceRoutageClick(Sender: TObject); procedure ButtonArretroutageClick(Sender: TObject); + procedure CheckInverse1Click(Sender: TObject); + procedure CheckInverse2Click(Sender: TObject); + procedure CheckInverse3Click(Sender: TObject); + procedure CheckInverse4Click(Sender: TObject); + procedure CheckInverse5Click(Sender: TObject); + procedure CheckInverse6Click(Sender: TObject); + procedure EditDir1Change(Sender: TObject); + procedure EditDir2Change(Sender: TObject); + procedure EditDir3Change(Sender: TObject); + procedure EditDir4Change(Sender: TObject); + procedure EditDir5Change(Sender: TObject); + procedure EditDir6Change(Sender: TObject); private { Déclarations privées } public @@ -78,24 +104,35 @@ begin end; procedure TFormPlace.FormActivate(Sender: TObject); -var i : integer; begin LabelTrain1.Caption:=trains[1].nom_train; Edit1.text:=intToSTR(placement[1].detecteur); + EditDir1.Text:=IntToSTR(placement[1].detdir); + CheckInverse1.Checked:=placement[1].inverse; LabelTrain2.Caption:=trains[2].nom_train; + EditDir2.Text:=IntToSTR(placement[2].detdir); + CheckInverse2.Checked:=placement[2].inverse; Edit2.text:=intToSTR(placement[2].detecteur); + CheckInverse3.Checked:=placement[3].inverse; + EditDir3.Text:=IntToSTR(placement[3].detdir); LabelTrain3.Caption:=trains[3].nom_train; Edit3.text:=intToSTR(placement[3].detecteur); LabelTrain4.Caption:=trains[4].nom_train; + EditDir4.Text:=IntToSTR(placement[4].detdir); Edit4.text:=intToSTR(placement[4].detecteur); + CheckInverse4.Checked:=placement[4].inverse; LabelTrain5.Caption:=trains[5].nom_train; + EditDir5.Text:=IntToSTR(placement[5].detdir); Edit5.text:=intToSTR(placement[5].detecteur); + CheckInverse5.Checked:=placement[5].inverse; LabelTrain6.Caption:=trains[6].nom_train; + EditDir6.Text:=IntToSTR(placement[6].detdir); Edit6.text:=intToSTR(placement[6].detecteur); + CheckInverse6.Checked:=placement[6].inverse; end; procedure TFormPlace.ButtonPlaceClick(Sender: TObject); -var detect,erreur : integer; +var suiv,detect,erreur : integer; s : string; begin if cdm_connecte then @@ -104,6 +141,12 @@ begin exit; end; + for detect:=1 to NbMemZone do + begin + detecteur[detect].train:=''; + detecteur[detect].AdrTrain:=0; + end; + s:=edit1.Text; if s<>'' then begin @@ -113,7 +156,7 @@ begin begin detecteur[detect].adrTrain:=trains[1].adresse; event_detecteur(detect,true,trains[1].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir1.Text,clLime); end else begin @@ -132,7 +175,7 @@ begin begin detecteur[detect].adrTrain:=trains[2].adresse; event_detecteur(detect,true,trains[2].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir2.Text,clLime); end else begin @@ -151,7 +194,7 @@ begin begin detecteur[detect].adrTrain:=trains[3].adresse; event_detecteur(detect,true,trains[3].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir3.Text,clLime); end else begin @@ -168,15 +211,20 @@ begin if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 4'; if detect<>0 then begin - detecteur[detect].adrTrain:=trains[4].adresse; - event_detecteur(detect,true,trains[4].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); - end - else - begin - detecteur[detect].etat:=false; - detecteur[detect].train:=''; - detecteur[detect].adrTrain:=0; + det_adj(detect); + val(editDir4.Text,Suiv,erreur); + if detect<>0 then + begin + detecteur[detect].adrTrain:=trains[4].adresse; + event_detecteur(detect,true,trains[4].nom_train); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir4.Text,clLime); + end + else + begin + detecteur[detect].etat:=false; + detecteur[detect].train:=''; + detecteur[detect].adrTrain:=0; + end; end; end; @@ -189,7 +237,7 @@ begin begin detecteur[detect].adrTrain:=trains[5].adresse; event_detecteur(detect,true,trains[5].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir5.Text,clLime); end else begin @@ -208,7 +256,7 @@ begin begin detecteur[detect].adrTrain:=trains[6].adresse; event_detecteur(detect,true,trains[6].nom_train); - Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime); + Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect)+' vers '+EditDir6.Text,clLime); end else begin @@ -221,6 +269,7 @@ begin begin affiche_tco; end; + end; procedure TFormPlace.Edit1Change(Sender: TObject); @@ -349,10 +398,19 @@ begin Affiche('Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet),clYellow); AdrTrain:=detecteur[AdrDet].AdrTrain; j:=index_train_adresse(AdrTrain); - vitesse_loco('',adrTrain,trains[j].VitNominale,true); + vitesse_loco('',adrTrain,trains[j].VitNominale,not(placement[j].inverse)); trouve:=true; + roulage:=true; + maj_feux; + reserve_canton(AdrDet,placement[j].detdir,adrtrain); + end; end; + if trouve then + begin + Maj_feux; + Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours'; + end; if not(trouve) then Affiche('Pas de train placé',clOrange); end; @@ -361,8 +419,125 @@ var i : integer; begin roulage:=false; Affiche('Arrêt du roulage de tous les trains',clorange); + Formprinc.LabelTitre.caption:=titre+' '; for i:=1 to ntrains do vitesse_loco('',trains[i].adresse,0,true); end; +procedure TFormPlace.CheckInverse1Click(Sender: TObject); +begin + placement[1].inverse:=CheckInverse1.Checked; +end; + +procedure TFormPlace.CheckInverse2Click(Sender: TObject); +begin + placement[2].inverse:=CheckInverse2.Checked; +end; + +procedure TFormPlace.CheckInverse3Click(Sender: TObject); +begin + placement[3].inverse:=CheckInverse3.Checked; +end; + +procedure TFormPlace.CheckInverse4Click(Sender: TObject); +begin + placement[4].inverse:=CheckInverse4.Checked; +end; + +procedure TFormPlace.CheckInverse5Click(Sender: TObject); +begin + placement[5].inverse:=CheckInverse4.Checked; +end; + +procedure TFormPlace.CheckInverse6Click(Sender: TObject); +begin + placement[6].inverse:=CheckInverse6.Checked; +end; + +procedure TFormPlace.EditDir1Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir1.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[1].detdir:=i; +end; + +procedure TFormPlace.EditDir2Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir2.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[2].detdir:=i; +end; + +procedure TFormPlace.EditDir3Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir3.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[3].detdir:=i; +end; + + + +procedure TFormPlace.EditDir4Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir4.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[4].detdir:=i; +end; + +procedure TFormPlace.EditDir5Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir5.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[5].detdir:=i; +end; + +procedure TFormPlace.EditDir6Change(Sender: TObject); +var i,erreur : integer; +begin + val(editDir6.Text,i,erreur); + if erreur<>0 then exit; + if index_adresse_detecteur(i)=0 then + begin + LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant'; + exit; + end; + labelTexte.caption:=''; + placement[6].detdir:=i; +end; + end. diff --git a/tco.cfg b/tco.cfg index c2503d0..148ac90 100644 --- a/tco.cfg +++ b/tco.cfg @@ -15,16 +15,16 @@ Ratio=10 /Matrice TCO [Matrice] / inutilisé,adresse,image,inversion aiguillage,Orientation du feu, pied du feu , [texte], representation, fonte, taille fonte, couleur fonte, style -(0,358,30,0,1,1,,2,,0,FFFFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,497,30,0,1,2,,2,,0,FFFFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,TCO GARE PRINCIPALE,1,ARIAL,20,00FFFF,GI)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,FFFFFF,)(0,0,0,0,0,0,,0,,0,000000,) +(0,358,30,0,1,1,,2,,0,FFFFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,497,30,0,1,2,,2,,0,FFFFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,TCO GARE PRINCIPALE,1,ARIAL,20,00FFFF,GI)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,FFFFFF,)(0,0,0,0,0,0,,0,,0,000000,) (0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,8,00FF00,)(0,0,0,0,0,0,,2,,8,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,9,0,0,0,,2,,0,000000,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,0,0,0,0,,0,,0,000000,) (0,0,0,0,0,0,,2,,0,000000,)(0,517,20,0,0,0,,2,,0,00FFFF,)(0,531,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,6,2,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,9,0,0,0,,2,,0,000000,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,0,0,0,0,,0,,0,000000,) -(0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,232,30,0,3,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,FFFFFF,)(0,288,30,0,2,1,,2,,0,FFFFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,MS SANS SERIF,10,00FFFF,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) -(0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,4,15,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,514,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,522,1,0,0,0,,2,,0,00FFFF,)(0,0,7,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,232,30,0,3,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,FFFFFF,)(0,288,30,0,2,1,,2,,0,FFFFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,MS SANS SERIF,10,00FFFF,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,372,30,0,1,1,,2,,0,FFFFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,4,15,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,514,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,522,1,0,0,0,,2,,0,00FFFF,)(0,0,7,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) (0,0,0,0,0,0,,2,,0,000000,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,20,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,3,15,0,0,0,,2,,0,00FF00,)(0,5,2,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,515,1,0,0,0,,2,,0,00FFFF,)(0,515,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,7,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) -(0,0,0,0,0,0,,2,,0,000000,)(0,0,19,0,0,0,,2,,0,00FFFF,)(0,0,19,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,260,30,0,2,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,316,30,0,3,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,QUAI 1,1,ARIAL,12,FFFFFF,G)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,190,30,0,2,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) -(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,11,0,0,0,,2,,0,00FFFF,)(0,0,6,0,0,0,,2,,0,000000,)(0,518,1,0,0,0,,0,,0,00FFFF,)(0,518,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,1,3,0,0,0,,2,,0,00FF00,)(0,100,21,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,VOIE 2,2,ARIAL,10,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,523,1,0,0,0,,0,,0,00FFFF,)(0,523,1,0,0,0,,0,,0,00FFFF,)(0,523,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,0,0,0,0,0,,2,,0,000000,)(0,0,19,0,0,0,,2,,0,00FFFF,)(0,0,19,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,520,30,0,2,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,10,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,316,30,0,3,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,QUAI 1,1,ARIAL,12,FFFFFF,G)(0,0,23,0,0,0,,2,,8,00FF00,)(0,0,23,0,0,0,,2,,8,00FF00,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,23,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,190,30,0,2,1,,2,,0,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,11,0,0,0,,2,,0,00FFFF,)(0,0,6,0,0,0,,2,,0,000000,)(0,518,1,0,0,0,,0,,0,00FFFF,)(0,518,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,1,3,0,0,0,,2,,8,00FF00,)(0,100,21,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,VOIE 2,2,ARIAL,10,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,523,1,0,0,0,,0,,0,00FFFF,)(0,523,1,0,0,0,,0,,0,00FFFF,)(0,523,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) (0,530,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,8,0,0,0,,2,,0,00FFFF,)(0,0,6,0,0,0,,2,,0,000000,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,12,4,1,0,0,,2,,0,00FF00,)(0,2,3,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,519,1,0,0,0,,2,,0,00FFFF,)(0,519,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,VOIE 1,2,ARIAL,10,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,8,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,7,2,0,0,0,,2,,0,00FF00,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,527,1,0,0,0,,2,,8,00FFFF,)(0,0,1,0,0,0,,3,,8,00FFFF,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) -(0,529,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,26,22,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,8,0,0,0,,0,,0,000000,)(0,0,11,0,0,0,,0,,0,000000,)(0,330,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,QUAI 2,0,ARIAL,12,FFFFFF,G)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,10,0,0,0,,0,,0,000000,)(0,204,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,529,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,26,22,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,8,0,0,0,,0,,0,000000,)(0,0,11,0,0,0,,0,,0,000000,)(0,330,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,QUAI 2,1,ARIAL,12,FFFFFF,G)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,23,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,10,0,0,0,,0,,0,000000,)(0,204,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) (0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,6,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,21,5,0,0,0,,0,,0,00FF00,)(0,20,5,0,0,0,,0,,0,00FF00,)(0,520,1,0,0,0,,2,,8,00FFFF,)(0,520,1,0,0,0,,0,,0,00FFFF,)(0,520,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,8,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,8,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,8,00FFFF,)(0,0,1,0,0,0,,2,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,8,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,8,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,1,0,0,0,,0,,0,00FFFF,)(0,0,7,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) -(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,176,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,3,,8,00FF00,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) +(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,176,30,0,3,1,,0,,0,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,3,,8,00FF00,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,8,00FF00,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) (0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,2,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,)(0,0,0,0,0,0,,0,,0,000000,) diff --git a/verif_version.dcu b/verif_version.dcu index de0d4d0..d048250 100644 Binary files a/verif_version.dcu and b/verif_version.dcu differ diff --git a/verif_version.pas b/verif_version.pas index 4653218..6188737 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -23,7 +23,7 @@ var Lance_verif : integer; verifVersion,notificationVersion : boolean; -Const Version='5.2'; // sert à la comparaison de la version publiée +Const Version='5.3'; // sert à la comparaison de la version publiée SousVersion=' '; // en cas d'absence de sous version mettre un espace implementation @@ -66,6 +66,8 @@ var begin Result:=False; DeleteFile(s); + //Affiche('VV1',clLime); + Application.ProcessMessages; Try Fs:=TFileStream.Create(s,fmCreate,fmShareDenyNone); hSession:=InternetOpen('MyApp',INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); try @@ -73,6 +75,8 @@ begin begin // fonction longue dwTimeout:=2000; //2s + //Affiche('VV2',clLime); + Application.ProcessMessages; InternetSetOption(hSession,INTERNET_OPTION_CONNECT_TIMEOUT,@dwTimeOut, SizeOf(dwTimeOut)); hService:=InternetOpenUrl(hSession, PChar(aUrl), nil, 0, INTERNET_FLAG_RELOAD, 0); if Assigned(hService) then @@ -240,8 +244,11 @@ begin else formVersion.Free; end; - if (V_utile=V_publie) and notificationVersion then Affiche('Votre version '+Version_p+SousVersion+' est à jour',clLime); - + if notificationVersion then + begin + if V_utile=V_publie then Affiche('Votre version '+Version_p+SousVersion+' est à jour',clLime); + if V_utile>V_publie then Affiche('Votre version '+version+SousVersion+' est plus récente que la version publiée '+Version_p+SV_publie,clLime); + end; end; end else diff --git a/versions.txt b/versions.txt index bfd397f..d7b23e4 100644 --- a/versions.txt +++ b/versions.txt @@ -134,4 +134,11 @@ version 5.2 : Nouvel algorithme pour le d Suivi des trains sur les détecteurs enclenchés en mode autonome Fermeture des fenêtres secondaires par appui sur Esc/Echap Correction bug ouverture des PN par actionneurs +version 5.3 : Informations sur les états des signaux par clic droit sur le signal. + Correction éventuelle fenêtre de violation au démarrage. + Renforcement du suivi des trains: + (prise en compte des changements d'aiguillages) + (détection simultanée d'un train sur deux détecteurs) + +