V6.1
This commit is contained in:
+25
-20
@@ -1,22 +1,26 @@
|
|||||||
/ Fichier de configuration de signaux_complexes_GL
|
/ Fichier de configuration de signaux_complexes_GL version 6.1
|
||||||
|
AvecVerifIconesTCO=1
|
||||||
Algo_localisation=1
|
Algo_localisation=1
|
||||||
Avec_roulage=1
|
Avec_roulage=1
|
||||||
Debug=0
|
Debug=0
|
||||||
Filtrage_det=3
|
Filtrage_det=0
|
||||||
Fonte=12
|
AntiTimeoutEthLenz=0
|
||||||
|
Fonte=10
|
||||||
Protocole=1
|
Protocole=1
|
||||||
|
Verif_AdrXpressNet=1
|
||||||
IpV4_PC=127.0.0.1:9999
|
IpV4_PC=127.0.0.1:9999
|
||||||
|
ServicesCDM=15
|
||||||
Ipv4_interface=192.168.1.23:5550
|
Ipv4_interface=192.168.1.23:5550
|
||||||
MaxCom=30
|
MaxCom=30
|
||||||
Protocole_serie=COM22:115200,N,8,1,0
|
Protocole_serie=COMX:115200,N,8,1,0
|
||||||
Inter_car=50
|
Inter_car=50
|
||||||
Tempo_maxi=7
|
Tempo_maxi=15
|
||||||
Entete=1
|
Entete=1
|
||||||
Init_Aig=0
|
Init_Aig=0
|
||||||
Init_Dem_Aig=0
|
Init_Dem_Aig=0
|
||||||
Tempo_Aig=20
|
Tempo_Aig=50
|
||||||
Init_demUSBCOM=0
|
Init_demUSBCOM=0
|
||||||
Init_demETH=1
|
Init_demETH=0
|
||||||
Fenetre=0
|
Fenetre=0
|
||||||
nb_det_dist=3
|
nb_det_dist=3
|
||||||
verif_version=0
|
verif_version=0
|
||||||
@@ -25,6 +29,7 @@ TCO=0
|
|||||||
MasqueBandeauTCO=0
|
MasqueBandeauTCO=0
|
||||||
CDM=0
|
CDM=0
|
||||||
Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
||||||
|
NomModuleCDM=reseau_gily_signal_ajoute_top.cdm
|
||||||
Serveur_interface=1
|
Serveur_interface=1
|
||||||
retro=1
|
retro=1
|
||||||
RazSignaux=0
|
RazSignaux=0
|
||||||
@@ -33,10 +38,10 @@ Nb_cantons_Sig=3
|
|||||||
Alg_Unisemaf=1
|
Alg_Unisemaf=1
|
||||||
/------------
|
/------------
|
||||||
[section_aig]
|
[section_aig]
|
||||||
1,P518,D100D,S3P,V30,I0,INIT(2,3)
|
1,P518,D100D,S3P,V30,I0,INIT(2,2)
|
||||||
2,P12S,D519,S100S,V0,I0,INIT(1,3)
|
2,P12S,D519,S100S,V0,I0,INIT(1,2)
|
||||||
3,P1S,D4P,S5D,V0,I0,INIT(2,2)
|
3,P1S,D4P,S5D,V0,I0,INIT(2,2)
|
||||||
4,P3D,D6S,S514,V0,I0,INIT(1,2)
|
4,P3D,D6S,S514,V0,I0,INIT(2,2)
|
||||||
5,P515,D3S,S100S,V0,I0,INIT(1,2)
|
5,P515,D3S,S100S,V0,I0,INIT(1,2)
|
||||||
6,P516,D0,S4D,V0,I0,INIT(2,2)
|
6,P516,D0,S4D,V0,I0,INIT(2,2)
|
||||||
7,P527,D519,S520,V0,I0,INIT(2,2)
|
7,P527,D519,S520,V0,I0,INIT(2,2)
|
||||||
@@ -49,7 +54,7 @@ Alg_Unisemaf=1
|
|||||||
18,P11P,D23P,S102S,V0,I0,INIT(1,2)
|
18,P11P,D23P,S102S,V0,I0,INIT(1,2)
|
||||||
19,P101D,D22P,S531,V0,I0,INIT(1,2)
|
19,P101D,D22P,S531,V0,I0,INIT(1,2)
|
||||||
20,P520,D21P,S12D,V0,I0,INIT(2,2)
|
20,P520,D21P,S12D,V0,I0,INIT(2,2)
|
||||||
21,P20D,D28D,S28D,V0,I0,INIT(2,2)
|
21,P20D,D28S,S28D,V0,I0,INIT(2,2)
|
||||||
22,P19D,D537,S32P,V0,I0,INIT(2,2)
|
22,P19D,D537,S32P,V0,I0,INIT(2,2)
|
||||||
23,P18D,D538,S534,V0,I0,INIT(2,2)
|
23,P18D,D538,S534,V0,I0,INIT(2,2)
|
||||||
24,P538,D32S,S533,V0,I0,INIT(2,2)
|
24,P538,D32S,S533,V0,I0,INIT(2,2)
|
||||||
@@ -62,9 +67,9 @@ Alg_Unisemaf=1
|
|||||||
31,P534,D34D,S104S,V0,I0,INIT(1,2)
|
31,P534,D34D,S104S,V0,I0,INIT(1,2)
|
||||||
32,P22S,D34S,S24D,V0,I0,INIT(1,2)
|
32,P22S,D34S,S24D,V0,I0,INIT(1,2)
|
||||||
34,P0,D31D,S32D,V0,I0,INIT(2,2)
|
34,P0,D31D,S32D,V0,I0,INIT(2,2)
|
||||||
100CROI,D(1D,523Z),S(2S,5S)
|
100CROI,D(1D,523),S(2S,5S)
|
||||||
101CROI,D(11S,525Z),S(19P,10P)
|
101CROI,D(11S,525),S(19P,10P)
|
||||||
102CROI,D(22P,10D),S(517,18S)
|
102CROI,D(22P,19D),S(517,18S)
|
||||||
103CROI,D(513,9D),S(522,8S)
|
103CROI,D(513,9D),S(522,8S)
|
||||||
104CROI,D(0,32D),S(25P,31S)
|
104CROI,D(0,32D),S(25P,31S)
|
||||||
0
|
0
|
||||||
@@ -78,15 +83,15 @@ A9,515,A5
|
|||||||
A11,A101,525,A17,528,A10
|
A11,A101,525,A17,528,A10
|
||||||
A17,535,533,A24,538,A23
|
A17,535,533,A24,538,A23
|
||||||
A7,520,A20,A21,A28,A26,530,A27,A25,A104,A31,534,A23,A18
|
A7,520,A20,A21,A28,A26,530,A27,A25,A104,A31,534,A23,A18
|
||||||
A26,529,A25
|
A26,529,A25,A104
|
||||||
A22,537,A27
|
A22,537,A27,A25
|
||||||
A22,A32,A24
|
A22,A32,A24
|
||||||
A6,516,0
|
A6,516,0
|
||||||
A31,A34,0
|
A31,A34,0
|
||||||
0
|
0
|
||||||
/------------
|
/------------
|
||||||
[section_sig]
|
[section_sig]
|
||||||
176,7,0,1,(520,A20),0,FVC0,FRC0
|
176,7,0,1,(520,A20),1,FVC0,FRC0
|
||||||
190,7,0,1,(523,526),0,FVC0,FRC0
|
190,7,0,1,(523,526),0,FVC0,FRC0
|
||||||
204,9,0,1,(527,A7),1,FVC0,FRC0
|
204,9,0,1,(527,A7),1,FVC0,FRC0
|
||||||
218,7,0,1,(525,A17),0,FVC0,FRC0
|
218,7,0,1,(525,A17),0,FVC0,FRC0
|
||||||
@@ -137,8 +142,8 @@ TrainElectrique,11,110,40,30
|
|||||||
BB25531,1,120,50,40
|
BB25531,1,120,50,40
|
||||||
TGV,2,120,50,30
|
TGV,2,120,50,30
|
||||||
BB16024,3,120,60,50
|
BB16024,3,120,60,50
|
||||||
CC406526,4,120,80,70
|
CC406526,4,120,50,30
|
||||||
CAMERA,10,120,0,0
|
CAMERA,0,120,0,0
|
||||||
0
|
0
|
||||||
/------------
|
/------------
|
||||||
[section_placement]
|
[section_placement]
|
||||||
@@ -146,6 +151,6 @@ TRAINELECTRIQUE,0,0,0
|
|||||||
BB25531,0,0,0
|
BB25531,0,0,0
|
||||||
TGV,0,0,0
|
TGV,0,0,0
|
||||||
BB16024,523,526,0
|
BB16024,523,526,0
|
||||||
CC406526,528,531,0
|
CC406526,0,0,0
|
||||||
CAMERA,0,0,0
|
CAMERA,0,0,0
|
||||||
0
|
0
|
||||||
|
|||||||
Binary file not shown.
@@ -12,7 +12,7 @@
|
|||||||
-$L+
|
-$L+
|
||||||
-$M-
|
-$M-
|
||||||
-$N+
|
-$N+
|
||||||
-$O+
|
-$O-
|
||||||
-$P+
|
-$P+
|
||||||
-$Q+
|
-$Q+
|
||||||
-$R+
|
-$R+
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ K=0
|
|||||||
L=1
|
L=1
|
||||||
M=0
|
M=0
|
||||||
N=1
|
N=1
|
||||||
O=1
|
O=0
|
||||||
P=1
|
P=1
|
||||||
Q=1
|
Q=1
|
||||||
R=1
|
R=1
|
||||||
|
|||||||
@@ -16,11 +16,13 @@ uses
|
|||||||
UnitCDF in 'UnitCDF.pas' {FormCDF},
|
UnitCDF in 'UnitCDF.pas' {FormCDF},
|
||||||
Unitplace in 'Unitplace.pas' {FormPlace},
|
Unitplace in 'Unitplace.pas' {FormPlace},
|
||||||
UnitPareFeu in 'UnitPareFeu.pas',
|
UnitPareFeu in 'UnitPareFeu.pas',
|
||||||
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM};
|
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM},
|
||||||
|
Importation in 'Importation.pas' {FormImportation};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
// la form TCO ne doit pas etre créée ici!!
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TFormPrinc, FormPrinc);
|
Application.CreateForm(TFormPrinc, FormPrinc);
|
||||||
Application.CreateForm(TFormVersion, FormVersion);
|
Application.CreateForm(TFormVersion, FormVersion);
|
||||||
@@ -35,5 +37,6 @@ begin
|
|||||||
Application.CreateForm(TFormPlace, FormPlace);
|
Application.CreateForm(TFormPlace, FormPlace);
|
||||||
Application.CreateForm(TFormDebug, FormDebug);
|
Application.CreateForm(TFormDebug, FormDebug);
|
||||||
Application.CreateForm(TFormAnalyseCDM, FormAnalyseCDM);
|
Application.CreateForm(TFormAnalyseCDM, FormAnalyseCDM);
|
||||||
|
Application.CreateForm(TFormImportation, FormImportation);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|||||||
+197
-109
@@ -1,10 +1,10 @@
|
|||||||
object FormAnalyseCDM: TFormAnalyseCDM
|
object FormAnalyseCDM: TFormAnalyseCDM
|
||||||
Left = 154
|
Left = 206
|
||||||
Top = 36
|
Top = 0
|
||||||
AutoScroll = False
|
AutoScroll = False
|
||||||
Caption = 'FormAnalyseCDM'
|
Caption = 'Fen'#234'tre r'#233'seau CDM'
|
||||||
ClientHeight = 660
|
ClientHeight = 648
|
||||||
ClientWidth = 1032
|
ClientWidth = 1041
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@@ -12,18 +12,55 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
|||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnMouseWheel = FormMouseWheel
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1032
|
1041
|
||||||
660)
|
648)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 1001
|
||||||
|
Top = 520
|
||||||
|
Width = 27
|
||||||
|
Height = 13
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Zoom'
|
||||||
|
end
|
||||||
|
object ImageLoco: TImage
|
||||||
|
Left = 688
|
||||||
|
Top = 600
|
||||||
|
Width = 65
|
||||||
|
Height = 25
|
||||||
|
Picture.Data = {
|
||||||
|
07544269746D61701A020000424D1A0200000000000076000000280000003100
|
||||||
|
00000F0000000100040000000000A40100000000000000000000100000000000
|
||||||
|
0000000000000000800000800000008080008000000080008000808000008080
|
||||||
|
8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
|
||||||
|
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000FFFF
|
||||||
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000FFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000FFF77777BBB777777777
|
||||||
|
777777777777777777BBB77777FFF0000000FF777777B7B77777777777777777
|
||||||
|
7777777777B7B777777FF0000000FF777777BBB7999999999999999999977777
|
||||||
|
77BBB777777FF0000000FF777777BBBBBBB7777777777777779777BBBBBBB777
|
||||||
|
777FF0000000FF777777BBBBBBBBBB7777777777779BBBBBBBBBB777777FF000
|
||||||
|
0000FF777777BBB7BBBB77777777777777977BBBB7BBB777777FF0000000FF77
|
||||||
|
7777BBBB7777777777777777779999997BBBB777777FF0000000FF777777B7B7
|
||||||
|
77777777777777777777777777B7B777777FF0000000FFF77777BBB777777777
|
||||||
|
777777777777777777BBB77777FFF0000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFFFFFFFFFFF0000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFFF0000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFF0000000}
|
||||||
|
Transparent = True
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
object ScrollBox1: TScrollBox
|
object ScrollBox1: TScrollBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 977
|
Width = 986
|
||||||
Height = 537
|
Height = 509
|
||||||
HorzScrollBar.Tracking = True
|
HorzScrollBar.Tracking = True
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
AutoScroll = False
|
AutoScroll = False
|
||||||
@@ -31,29 +68,41 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object ImageCDM: TImage
|
object ImageCDM: TImage
|
||||||
Left = 0
|
Left = 24
|
||||||
Top = 0
|
Top = 8
|
||||||
Width = 937
|
Width = 873
|
||||||
Height = 512
|
Height = 465
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = ImageCDMClick
|
||||||
|
OnMouseMove = ImageCDMMouseMove
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
Left = 16
|
Left = 8
|
||||||
Top = 560
|
Top = 536
|
||||||
Width = 257
|
Width = 385
|
||||||
Height = 89
|
Height = 109
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Affichages '
|
Caption = 'Affichages '
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 24
|
Left = 8
|
||||||
Top = 56
|
Top = 50
|
||||||
Width = 81
|
Width = 76
|
||||||
|
Height = 26
|
||||||
|
Caption = 'Afficher le segment/port n'#176
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 84
|
||||||
|
Width = 82
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Afficher le port n'#176
|
Caption = 'Allumer d'#233'tecteur'
|
||||||
end
|
end
|
||||||
object CheckConnexions: TCheckBox
|
object CheckConnexions: TCheckBox
|
||||||
Left = 24
|
Left = 8
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -65,7 +114,7 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
|||||||
OnClick = CheckConnexionsClick
|
OnClick = CheckConnexionsClick
|
||||||
end
|
end
|
||||||
object CheckAdresses: TCheckBox
|
object CheckAdresses: TCheckBox
|
||||||
Left = 24
|
Left = 8
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -77,18 +126,18 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
|||||||
OnClick = CheckAdressesClick
|
OnClick = CheckAdressesClick
|
||||||
end
|
end
|
||||||
object CheckSegments: TCheckBox
|
object CheckSegments: TCheckBox
|
||||||
Left = 112
|
Left = 128
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 81
|
Width = 81
|
||||||
Height = 25
|
Height = 17
|
||||||
Caption = 'segments'
|
Caption = 'segments'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnClick = CheckSegmentsClick
|
OnClick = CheckSegmentsClick
|
||||||
end
|
end
|
||||||
object CheckPorts: TCheckBox
|
object CheckPorts: TCheckBox
|
||||||
Left = 112
|
Left = 128
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 121
|
Width = 65
|
||||||
Height = 17
|
Height = 17
|
||||||
Hint = 'Affiche le num'#233'ro de segment et le port de CDM'
|
Hint = 'Affiche le num'#233'ro de segment et le port de CDM'
|
||||||
Caption = 'Ports'
|
Caption = 'Ports'
|
||||||
@@ -98,118 +147,157 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
|||||||
OnClick = CheckPortsClick
|
OnClick = CheckPortsClick
|
||||||
end
|
end
|
||||||
object EditPort: TEdit
|
object EditPort: TEdit
|
||||||
Left = 112
|
Left = 96
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 57
|
Width = 49
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object ButtonAffPort: TButton
|
object ButtonAffPort: TButton
|
||||||
Left = 176
|
Left = 152
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 73
|
Width = 73
|
||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Afficher le port'
|
Caption = 'Afficher'
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnClick = ButtonAffPortClick
|
OnClick = ButtonAffPortClick
|
||||||
end
|
end
|
||||||
|
object EditDetecteur: TEdit
|
||||||
|
Left = 96
|
||||||
|
Top = 80
|
||||||
|
Width = 33
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object ButtonAffDet: TButton
|
||||||
|
Left = 152
|
||||||
|
Top = 80
|
||||||
|
Width = 73
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Allumer'
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = ButtonAffDetClick
|
||||||
|
end
|
||||||
|
object CheckColorationDiff: TCheckBox
|
||||||
|
Left = 232
|
||||||
|
Top = 16
|
||||||
|
Width = 137
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Coloration diff'#233'renti'#233'e'
|
||||||
|
TabOrder = 8
|
||||||
|
OnClick = CheckColorationDiffClick
|
||||||
|
end
|
||||||
|
object ButtonAllumeTs: TButton
|
||||||
|
Left = 232
|
||||||
|
Top = 80
|
||||||
|
Width = 129
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Allume tous les d'#233'tecteurs'
|
||||||
|
TabOrder = 9
|
||||||
|
OnClick = ButtonAllumeTsClick
|
||||||
|
end
|
||||||
|
object ButtonImprime: TButton
|
||||||
|
Left = 232
|
||||||
|
Top = 48
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Imprimer'
|
||||||
|
TabOrder = 10
|
||||||
|
OnClick = ButtonImprimeClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object TrackBar1: TTrackBar
|
object TrackBar1: TTrackBar
|
||||||
Left = 992
|
Left = 1001
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 37
|
Width = 37
|
||||||
Height = 553
|
Height = 489
|
||||||
|
Hint = 'Curseur de Zoom'
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Max = 200
|
Max = 90
|
||||||
Min = 50
|
Min = 50
|
||||||
Orientation = trVertical
|
Orientation = trVertical
|
||||||
Position = 200
|
ParentShowHint = False
|
||||||
|
Position = 90
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnChange = TrackBar1Change
|
OnChange = TrackBar1Change
|
||||||
end
|
end
|
||||||
object GroupBox2: TGroupBox
|
object GroupBoxSegment: TGroupBox
|
||||||
Left = 280
|
Left = 400
|
||||||
Top = 560
|
Top = 536
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 89
|
Height = 109
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Strat'#233'gies d'#39'importation'
|
Caption = 'Segment'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object CheckDebugAnalyse: TCheckBox
|
object Label2: TLabel
|
||||||
Left = 16
|
|
||||||
Top = 24
|
|
||||||
Width = 121
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Debug importation'
|
|
||||||
TabOrder = 0
|
|
||||||
OnClick = CheckDebugAnalyseClick
|
|
||||||
end
|
|
||||||
object CheckDebugBranches: TCheckBox
|
|
||||||
Left = 16
|
|
||||||
Top = 48
|
|
||||||
Width = 97
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Debug branches'
|
|
||||||
TabOrder = 1
|
|
||||||
OnClick = CheckDebugBranchesClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object GroupBox3: TGroupBox
|
|
||||||
Left = 432
|
|
||||||
Top = 560
|
|
||||||
Width = 537
|
|
||||||
Height = 89
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
Caption = 'Param'#232'tres'
|
|
||||||
TabOrder = 4
|
|
||||||
DesignSize = (
|
|
||||||
537
|
|
||||||
89)
|
|
||||||
object ButtonImporter: TButton
|
|
||||||
Left = 382
|
|
||||||
Top = 40
|
|
||||||
Width = 75
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Lancement de l'#39'importation'
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
Caption = 'Importer'
|
|
||||||
ParentShowHint = False
|
|
||||||
ShowHint = True
|
|
||||||
TabOrder = 0
|
|
||||||
OnClick = ButtonImporterClick
|
|
||||||
end
|
|
||||||
object RadioGroup1: TRadioGroup
|
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 24
|
Top = 22
|
||||||
Width = 305
|
Width = 42
|
||||||
Height = 57
|
Height = 13
|
||||||
Caption = 'Adressage des croisements'
|
Caption = 'Segment'
|
||||||
TabOrder = 1
|
|
||||||
end
|
end
|
||||||
object RadioCroisSuite: TRadioButton
|
object LabelAdresse: TLabel
|
||||||
Left = 24
|
Left = 11
|
||||||
Top = 40
|
Top = 48
|
||||||
Width = 217
|
Width = 44
|
||||||
Height = 17
|
Height = 13
|
||||||
Caption = 'Croisements '#224' la suite des aiguillages'
|
Caption = 'Adresse :'
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
object RadioCroisBase: TRadioButton
|
object LabelPorts: TLabel
|
||||||
Left = 24
|
Left = 11
|
||||||
Top = 56
|
Top = 74
|
||||||
Width = 217
|
Width = 33
|
||||||
Height = 17
|
Height = 13
|
||||||
Caption = 'Croisements '#224' partir de l'#39'adresse de base'
|
Caption = 'Ports : '
|
||||||
TabOrder = 3
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object EditBaseCrois: TEdit
|
object EditSegment: TEdit
|
||||||
Left = 240
|
Left = 80
|
||||||
Top = 54
|
Top = 16
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 4
|
ReadOnly = True
|
||||||
Text = '100'
|
TabOrder = 0
|
||||||
OnChange = EditBaseCroisChange
|
end
|
||||||
|
object EditAdresse: TEdit
|
||||||
|
Left = 64
|
||||||
|
Top = 44
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Changement de l'#39'adresse de l'#39'aiguillage'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = EditAdresseChange
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object Memo1: TMemo
|
||||||
|
Left = 552
|
||||||
|
Top = 544
|
||||||
|
Width = 105
|
||||||
|
Height = 93
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
Lines.Strings = (
|
||||||
|
'cliquez sur un '
|
||||||
|
'segment du r'#233'seau '
|
||||||
|
'pour avoir d'#39'autres '
|
||||||
|
'informations')
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object ButtonAnime: TButton
|
||||||
|
Left = 752
|
||||||
|
Top = 548
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
Caption = 'Test anime'
|
||||||
|
TabOrder = 5
|
||||||
|
OnClick = ButtonAnimeClick
|
||||||
|
end
|
||||||
|
object PrintDialog1: TPrintDialog
|
||||||
|
Left = 688
|
||||||
|
Top = 560
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+2122
-343
File diff suppressed because it is too large
Load Diff
+2
-3
@@ -1,5 +1,7 @@
|
|||||||
unit UnitCDF;
|
unit UnitCDF;
|
||||||
|
|
||||||
|
// configuration des décodeurs CDM et Digikeijs
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@@ -97,9 +99,6 @@ procedure dessine_feu_CDF;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFormCDF.FormActivate(Sender: TObject);
|
procedure TFormCDF.FormActivate(Sender: TObject);
|
||||||
var erreur : integer;
|
var erreur : integer;
|
||||||
begin
|
begin
|
||||||
|
|||||||
+21
-15
@@ -33,7 +33,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object Image1: TImage
|
object ImageSignaux: TImage
|
||||||
Left = 648
|
Left = 648
|
||||||
Top = 128
|
Top = 128
|
||||||
Width = 249
|
Width = 249
|
||||||
@@ -1571,7 +1571,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 633
|
Width = 633
|
||||||
Height = 505
|
Height = 505
|
||||||
ActivePage = TabSheetAig
|
ActivePage = TabSheetTrains
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -1911,7 +1911,12 @@ object FormConfig: TFormConfig
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Position trains (non utilis'#233')'
|
Hint =
|
||||||
|
'Utilis'#233' avec la fenetre CDM de signaux complexes pour afficher l' +
|
||||||
|
'es trains'
|
||||||
|
Caption = 'Position trains'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object CheckBoxSrvSig: TCheckBox
|
object CheckBoxSrvSig: TCheckBox
|
||||||
@@ -2119,7 +2124,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 200
|
Top = 200
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 73
|
Height = 73
|
||||||
Caption = 'Acc'#232's Ethernet '#224' l'#39'interface vers la centrale'
|
Caption = 'Acc'#232's r'#233'seau '#224' l'#39'interface vers la centrale'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
@@ -2795,9 +2800,9 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object RichAig: TRichEdit
|
object RichAig: TRichEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 56
|
Top = 64
|
||||||
Width = 321
|
Width = 321
|
||||||
Height = 369
|
Height = 385
|
||||||
Color = clBlack
|
Color = clBlack
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clYellow
|
Font.Color = clYellow
|
||||||
@@ -2832,7 +2837,7 @@ object FormConfig: TFormConfig
|
|||||||
OnClick = BoutSupAigClick
|
OnClick = BoutSupAigClick
|
||||||
end
|
end
|
||||||
object ButtonAjSup: TButton
|
object ButtonAjSup: TButton
|
||||||
Left = 144
|
Left = 152
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -2922,6 +2927,7 @@ object FormConfig: TFormConfig
|
|||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
|
HideSelection = False
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'RichBranche')
|
'RichBranche')
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
@@ -3101,7 +3107,7 @@ object FormConfig: TFormConfig
|
|||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label43: TLabel
|
object Label43: TLabel
|
||||||
Left = 40
|
Left = 48
|
||||||
Top = 160
|
Top = 160
|
||||||
Width = 38
|
Width = 38
|
||||||
Height = 16
|
Height = 16
|
||||||
@@ -3755,8 +3761,8 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBoxPN: TGroupBox
|
object GroupBoxPN: TGroupBox
|
||||||
Left = 224
|
Left = 152
|
||||||
Top = 176
|
Top = 16
|
||||||
Width = 233
|
Width = 233
|
||||||
Height = 401
|
Height = 401
|
||||||
Caption = 'Action gestion passage '#224' niveau'
|
Caption = 'Action gestion passage '#224' niveau'
|
||||||
@@ -4136,7 +4142,7 @@ object FormConfig: TFormConfig
|
|||||||
TabOrder = 31
|
TabOrder = 31
|
||||||
OnChange = EditZdet2V4OChange
|
OnChange = EditZdet2V4OChange
|
||||||
end
|
end
|
||||||
object Button1: TButton
|
object ButtonTestFerme: TButton
|
||||||
Left = 200
|
Left = 200
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 27
|
Width = 27
|
||||||
@@ -4146,9 +4152,9 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 36
|
TabOrder = 36
|
||||||
OnClick = Button1Click
|
OnClick = ButtonTestFermeClick
|
||||||
end
|
end
|
||||||
object Button3: TButton
|
object ButtonTestOuvre: TButton
|
||||||
Left = 200
|
Left = 200
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 27
|
Width = 27
|
||||||
@@ -4158,7 +4164,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 37
|
TabOrder = 37
|
||||||
OnClick = Button3Click
|
OnClick = ButtonTestOuvreClick
|
||||||
end
|
end
|
||||||
object CheckPnPulse: TCheckBox
|
object CheckPnPulse: TCheckBox
|
||||||
Left = 8
|
Left = 8
|
||||||
@@ -4566,7 +4572,7 @@ object FormConfig: TFormConfig
|
|||||||
'age'
|
'age'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object Image3: TImage
|
object ImageTrain: TImage
|
||||||
Left = 384
|
Left = 384
|
||||||
Top = 312
|
Top = 312
|
||||||
Width = 153
|
Width = 153
|
||||||
|
|||||||
+175
-73
@@ -5,14 +5,13 @@ interface
|
|||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, ExtCtrls, StdCtrls , jpeg, ComCtrls ,StrUtils, Unitprinc,
|
Dialogs, ExtCtrls, StdCtrls , jpeg, ComCtrls ,StrUtils, Unitprinc,
|
||||||
MMSystem, Buttons , UnitPareFeu, verif_version,
|
MMSystem, Buttons , UnitPareFeu, verif_version, Menus ;
|
||||||
Menus;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TFormConfig = class(TForm)
|
TFormConfig = class(TForm)
|
||||||
ButtonAppliquerEtFermer: TButton;
|
ButtonAppliquerEtFermer: TButton;
|
||||||
LabelInfo: TLabel;
|
LabelInfo: TLabel;
|
||||||
Image1: TImage;
|
ImageSignaux: TImage;
|
||||||
PageControl: TPageControl;
|
PageControl: TPageControl;
|
||||||
TabSheetCDM: TTabSheet;
|
TabSheetCDM: TTabSheet;
|
||||||
TabSheetAutonome: TTabSheet;
|
TabSheetAutonome: TTabSheet;
|
||||||
@@ -279,8 +278,8 @@ type
|
|||||||
Memo5: TMemo;
|
Memo5: TMemo;
|
||||||
EditLAY: TEdit;
|
EditLAY: TEdit;
|
||||||
Label13: TLabel;
|
Label13: TLabel;
|
||||||
Button1: TButton;
|
ButtonTestFerme: TButton;
|
||||||
Button3: TButton;
|
ButtonTestOuvre: TButton;
|
||||||
CheckPnPulse: TCheckBox;
|
CheckPnPulse: TCheckBox;
|
||||||
CheckFVC: TCheckBox;
|
CheckFVC: TCheckBox;
|
||||||
CheckFRC: TCheckBox;
|
CheckFRC: TCheckBox;
|
||||||
@@ -324,7 +323,7 @@ type
|
|||||||
EditFiltrDet: TEdit;
|
EditFiltrDet: TEdit;
|
||||||
CheckBoxVerifXpressNet: TCheckBox;
|
CheckBoxVerifXpressNet: TCheckBox;
|
||||||
LabelCrois: TLabel;
|
LabelCrois: TLabel;
|
||||||
Image3: TImage;
|
ImageTrain: TImage;
|
||||||
ButtonPFCDM: TButton;
|
ButtonPFCDM: TButton;
|
||||||
Label59: TLabel;
|
Label59: TLabel;
|
||||||
EditV5F: TEdit;
|
EditV5F: TEdit;
|
||||||
@@ -458,8 +457,8 @@ type
|
|||||||
procedure EditZdet1V4FChange(Sender: TObject);
|
procedure EditZdet1V4FChange(Sender: TObject);
|
||||||
procedure EditZdet1V4OChange(Sender: TObject);
|
procedure EditZdet1V4OChange(Sender: TObject);
|
||||||
procedure EditZdet2V4OChange(Sender: TObject);
|
procedure EditZdet2V4OChange(Sender: TObject);
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure ButtonTestFermeClick(Sender: TObject);
|
||||||
procedure Button3Click(Sender: TObject);
|
procedure ButtonTestOuvreClick(Sender: TObject);
|
||||||
procedure CheckPnPulseClick(Sender: TObject);
|
procedure CheckPnPulseClick(Sender: TObject);
|
||||||
procedure CheckFVCClick(Sender: TObject);
|
procedure CheckFVCClick(Sender: TObject);
|
||||||
procedure CheckFRCClick(Sender: TObject);
|
procedure CheckFRCClick(Sender: TObject);
|
||||||
@@ -512,6 +511,7 @@ Algo_localisation_ch='Algo_localisation';
|
|||||||
Avec_roulage_ch='Avec_roulage';
|
Avec_roulage_ch='Avec_roulage';
|
||||||
nb_det_dist_ch='nb_det_dist';
|
nb_det_dist_ch='nb_det_dist';
|
||||||
IpV4_PC_ch='IpV4_PC';
|
IpV4_PC_ch='IpV4_PC';
|
||||||
|
ServicesCDM_ch='ServicesCDM';
|
||||||
retro_ch='retro';
|
retro_ch='retro';
|
||||||
Init_aig_ch='Init_Aig';
|
Init_aig_ch='Init_Aig';
|
||||||
LAY_ch='Lay';
|
LAY_ch='Lay';
|
||||||
@@ -541,6 +541,7 @@ Raz_signaux_ch='RazSignaux';
|
|||||||
EnvAigDccpp_ch='EnvAigDccpp';
|
EnvAigDccpp_ch='EnvAigDccpp';
|
||||||
AdrBaseDetDccpp_ch='AdrBaseDetDccpp';
|
AdrBaseDetDccpp_ch='AdrBaseDetDccpp';
|
||||||
AvecVerifIconesTCO_ch='AvecVerifIconesTCO';
|
AvecVerifIconesTCO_ch='AvecVerifIconesTCO';
|
||||||
|
NomModuleCDM_ch='NomModuleCDM';
|
||||||
|
|
||||||
// sections de config
|
// sections de config
|
||||||
section_aig_ch='[section_aig]';
|
section_aig_ch='[section_aig]';
|
||||||
@@ -584,7 +585,7 @@ procedure trier_aig;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses UnitDebug,UnitTCO, UnitSR, UnitCDF;
|
uses UnitDebug,UnitTCO, UnitSR, UnitCDF,UnitAnalyseSegCDM;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@@ -619,10 +620,10 @@ begin
|
|||||||
place_id:=s;
|
place_id:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Maj_Hint_feu(i : integer);
|
procedure Maj_Hint_Signal(i : integer);
|
||||||
var s : string;
|
var s : string;
|
||||||
begin
|
begin
|
||||||
// ne pas supprimer le @ espace et = qui sert de marqueur pour identifier le feu
|
// ne pas supprimer le @= 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)+
|
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);
|
' 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)';
|
||||||
@@ -630,18 +631,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// demande les services Com-IP à CDM
|
// demande les services Com-IP à CDM
|
||||||
|
// demande à CDM d'envoyer les états sur changements des services demandés.
|
||||||
|
// exemple: si on demande le service aiguillage, CDM renverra la position d'un aiguillage qui change d'état.
|
||||||
function services_CDM : boolean;
|
function services_CDM : boolean;
|
||||||
var s,ss : string;
|
var s,ss : string;
|
||||||
i : integer;
|
i : integer;
|
||||||
begin
|
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|');
|
s:=place_id('C-C-00-0002-RQSERV-RTSIM|xxx|xx|');
|
||||||
i:=0;
|
i:=0;
|
||||||
if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end;
|
if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end; // service changement aiguillage
|
||||||
if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end;
|
if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end; // service actionneurs
|
||||||
if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end;
|
if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end; // service détecteurs
|
||||||
if Srvc_PosTrain then begin s:=s+'SRV=TSXY;';inc(i);end ;
|
if Srvc_Pos then begin s:=s+'SRV=TSXY;';inc(i);end ; // service position des trains
|
||||||
if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end;
|
if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end; // service signaux
|
||||||
|
|
||||||
// insère le nombre de paramètres
|
// insère le nombre de paramètres
|
||||||
ss:=format('%.*d',[2,i]) ;
|
ss:=format('%.*d',[2,i]) ;
|
||||||
@@ -662,7 +664,7 @@ begin
|
|||||||
if Srvc_Aig then s:=s+'- aiguillages ';
|
if Srvc_Aig then s:=s+'- aiguillages ';
|
||||||
if Srvc_Act then s:=s+'- actionneurs ';
|
if Srvc_Act then s:=s+'- actionneurs ';
|
||||||
if Srvc_Det then s:=s+'- détecteurs ';
|
if Srvc_Det then s:=s+'- détecteurs ';
|
||||||
if Srvc_PosTrain then s:=s+'- position des trains ';
|
if Srvc_Pos then s:=s+'- position des trains ';
|
||||||
if Srvc_sig then s:=s+'- état des signaux ';
|
if Srvc_sig then s:=s+'- état des signaux ';
|
||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
end;
|
end;
|
||||||
@@ -1436,7 +1438,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// modifie le fichier de config en fonction du paramétrage
|
// modifie le fichier de config en fonction du paramétrage
|
||||||
// recopie les commentaires du fichier "fichier"
|
|
||||||
procedure genere_config;
|
procedure genere_config;
|
||||||
var s: string;
|
var s: string;
|
||||||
fichierN : text;
|
fichierN : text;
|
||||||
@@ -1466,6 +1467,15 @@ begin
|
|||||||
// adresse ip et port de CDM
|
// adresse ip et port de CDM
|
||||||
writeln(fichierN,IpV4_PC_ch+'=',adresseIPCDM+':'+intToSTR(portCDM));
|
writeln(fichierN,IpV4_PC_ch+'=',adresseIPCDM+':'+intToSTR(portCDM));
|
||||||
|
|
||||||
|
// services CDM
|
||||||
|
i:=0;
|
||||||
|
if Srvc_Aig then i:=setbit(i,0);
|
||||||
|
if Srvc_Act then i:=setbit(i,1);
|
||||||
|
if Srvc_Det then i:=setbit(i,2);
|
||||||
|
if Srvc_Pos then i:=setbit(i,3);
|
||||||
|
if Srvc_Sig then i:=setbit(i,4);
|
||||||
|
writeln(fichierN,ServicesCDM_ch+'=',i);
|
||||||
|
|
||||||
// adresse ip interface XpressNet
|
// adresse ip interface XpressNet
|
||||||
writeln(fichierN,IPV4_Interface_ch+'=',adresseIP+':'+intToSTR(portInterface));
|
writeln(fichierN,IPV4_Interface_ch+'=',adresseIP+':'+intToSTR(portInterface));
|
||||||
|
|
||||||
@@ -1531,6 +1541,8 @@ begin
|
|||||||
// Nom du lay
|
// Nom du lay
|
||||||
writeln(fichierN,lay_ch+'=',Lay);
|
writeln(fichierN,lay_ch+'=',Lay);
|
||||||
|
|
||||||
|
writeln(fichierN,NomModuleCDM_ch+'=',NomModuleCDM);
|
||||||
|
|
||||||
// Serveur d'interface de CDM
|
// Serveur d'interface de CDM
|
||||||
writeln(fichierN,Serveur_interface_ch+'=',intToSTR(ServeurInterfaceCDM));
|
writeln(fichierN,Serveur_interface_ch+'=',intToSTR(ServeurInterfaceCDM));
|
||||||
|
|
||||||
@@ -1645,7 +1657,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure lit_config;
|
procedure lit_config;
|
||||||
|
|
||||||
var s,sa,SOrigine: string;
|
var s,sa,SOrigine: string;
|
||||||
c : char;
|
c : char;
|
||||||
tec,tjdC,tjsC,s2,triC,debugConfig,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,trouve_protocole,
|
tec,tjdC,tjsC,s2,triC,debugConfig,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,trouve_protocole,
|
||||||
@@ -2443,7 +2454,11 @@ begin
|
|||||||
delete(s,i,length(sa));
|
delete(s,i,length(sa));
|
||||||
val(s,TailleFonte,erreur);
|
val(s,TailleFonte,erreur);
|
||||||
if (TailleFonte<8) or (tailleFonte>25) then taillefonte:=10;
|
if (TailleFonte<8) or (tailleFonte>25) then taillefonte:=10;
|
||||||
FormPrinc.FenRich.Font.Size:=TailleFonte;
|
with FormPrinc.FenRich do
|
||||||
|
begin
|
||||||
|
clear;
|
||||||
|
Font.Size:=TailleFonte;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
sa:=uppercase(Protocole_ch)+'=';
|
sa:=uppercase(Protocole_ch)+'=';
|
||||||
@@ -2475,6 +2490,21 @@ begin
|
|||||||
else affiche('Erreur adresse ip cdm rail '+s,clred);
|
else affiche('Erreur adresse ip cdm rail '+s,clred);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Services CDM
|
||||||
|
sa:=uppercase(ServicesCDM_ch)+'=';
|
||||||
|
i:=pos(sa,s);
|
||||||
|
if i=1 then
|
||||||
|
begin
|
||||||
|
inc(nv);
|
||||||
|
delete(s,i,length(sa));
|
||||||
|
val(s,i,erreur);
|
||||||
|
Srvc_aig:=testbit(i,0);
|
||||||
|
Srvc_act:=testbit(i,1);
|
||||||
|
Srvc_det:=testbit(i,2);
|
||||||
|
Srvc_pos:=testbit(i,3);
|
||||||
|
Srvc_sig:=testbit(i,4);
|
||||||
|
end;
|
||||||
|
|
||||||
// adresse ip et port de la centrale
|
// adresse ip et port de la centrale
|
||||||
sa:=uppercase(IPV4_INTERFACE_ch)+'=';
|
sa:=uppercase(IPV4_INTERFACE_ch)+'=';
|
||||||
i:=pos(sa,s);
|
i:=pos(sa,s);
|
||||||
@@ -2503,7 +2533,7 @@ begin
|
|||||||
trouve_MaxPort:=true;
|
trouve_MaxPort:=true;
|
||||||
val(s,MaxPortCom,erreur);
|
val(s,MaxPortCom,erreur);
|
||||||
if erreur<>0 then Affiche('Erreur MaxCom: '+sOrigine,clred);
|
if erreur<>0 then Affiche('Erreur MaxCom: '+sOrigine,clred);
|
||||||
if (MaxPortCom<1) or (MaxPortCom>99) then MaxPortCom:=30;
|
if (MaxPortCom<1) or (MaxPortCom>255) then MaxPortCom:=30;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// configuration du port com
|
// configuration du port com
|
||||||
@@ -2570,7 +2600,7 @@ begin
|
|||||||
delete(s,i,length(sa));
|
delete(s,i,length(sa));
|
||||||
AvecInitAiguillages:=s='1';
|
AvecInitAiguillages:=s='1';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// avec demande de position des aiguillages en mode autonome au démarrage
|
// avec demande de position des aiguillages en mode autonome au démarrage
|
||||||
sa:=uppercase(Init_dem_aig_ch)+'=';
|
sa:=uppercase(Init_dem_aig_ch)+'=';
|
||||||
i:=pos(sa,s);
|
i:=pos(sa,s);
|
||||||
@@ -2742,6 +2772,15 @@ begin
|
|||||||
lay:=s;
|
lay:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
sa:=uppercase(NomModuleCDM_ch)+'=';
|
||||||
|
i:=pos(sa,s);
|
||||||
|
if i=1 then
|
||||||
|
begin
|
||||||
|
inc(nv);
|
||||||
|
delete(s,i,length(sa));
|
||||||
|
NomModuleCDM:=s;
|
||||||
|
end;
|
||||||
|
|
||||||
sa:=uppercase(SERVEUR_INTERFACE_ch)+'=';
|
sa:=uppercase(SERVEUR_INTERFACE_ch)+'=';
|
||||||
i:=pos(sa,s);
|
i:=pos(sa,s);
|
||||||
if i=1 then
|
if i=1 then
|
||||||
@@ -2961,6 +3000,11 @@ begin
|
|||||||
verifVersion:=true;
|
verifVersion:=true;
|
||||||
Valeur_entete:=1;
|
Valeur_entete:=1;
|
||||||
TempoOctet:=50;
|
TempoOctet:=50;
|
||||||
|
Srvc_Aig:=true;
|
||||||
|
Srvc_Act:=true;
|
||||||
|
Srvc_Det:=true;
|
||||||
|
Srvc_Pos:=false;
|
||||||
|
Srvc_Sig:=false;
|
||||||
TimoutMaxInterface:=7;
|
TimoutMaxInterface:=7;
|
||||||
AvecInitAiguillages:=true;
|
AvecInitAiguillages:=true;
|
||||||
AvecDemandeInterfaceUSB:=true;
|
AvecDemandeInterfaceUSB:=true;
|
||||||
@@ -2972,7 +3016,7 @@ begin
|
|||||||
Nb_cantons_Sig:=3;
|
Nb_cantons_Sig:=3;
|
||||||
ServeurRetroCDM:=1;
|
ServeurRetroCDM:=1;
|
||||||
algo_Unisemaf:=1;
|
algo_Unisemaf:=1;
|
||||||
TailleFonte:=12;
|
TailleFonte:=10;
|
||||||
Nb_Det_Dist:=3;
|
Nb_Det_Dist:=3;
|
||||||
genere_config;
|
genere_config;
|
||||||
assign(fichier,NomConfig);
|
assign(fichier,NomConfig);
|
||||||
@@ -3180,13 +3224,13 @@ begin
|
|||||||
change_srv:=Srvc_Aig<>CheckBoxServAig.checked;
|
change_srv:=Srvc_Aig<>CheckBoxServAig.checked;
|
||||||
change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv;
|
change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv;
|
||||||
change_srv:=Srvc_Act<>CheckBoxServAct.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_Pos<>CheckServPosTrains.checked or change_srv;
|
||||||
change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv;
|
change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv;
|
||||||
|
|
||||||
Srvc_Aig:=CheckBoxServAig.checked;
|
Srvc_Aig:=CheckBoxServAig.checked;
|
||||||
Srvc_Det:=CheckBoxServDet.checked;
|
Srvc_Det:=CheckBoxServDet.checked;
|
||||||
Srvc_Act:=CheckBoxServAct.checked;
|
Srvc_Act:=CheckBoxServAct.checked;
|
||||||
Srvc_PosTrain:=CheckServPosTrains.checked;
|
Srvc_Pos:=CheckServPosTrains.checked;
|
||||||
Srvc_Sig:=CheckBoxSrvSig.checked;
|
Srvc_Sig:=CheckBoxSrvSig.checked;
|
||||||
Raz_Acc_signaux:=CheckBoxRazSignaux.checked;
|
Raz_Acc_signaux:=CheckBoxRazSignaux.checked;
|
||||||
AvecInitAiguillages:=CheckBoxInitAig.Checked;
|
AvecInitAiguillages:=CheckBoxInitAig.Checked;
|
||||||
@@ -3227,8 +3271,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// LC=Adresse du feu
|
// LC=Adresse du signal
|
||||||
procedure clicListeFeu(lc : integer);
|
procedure clicListeSignal(lc : integer);
|
||||||
var AncAdresse,index,adresse,erreur : integer;
|
var AncAdresse,index,adresse,erreur : integer;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
@@ -3350,7 +3394,9 @@ begin
|
|||||||
CheckBoxServAig.checked:=Srvc_Aig;
|
CheckBoxServAig.checked:=Srvc_Aig;
|
||||||
CheckBoxServDet.checked:=Srvc_Det;
|
CheckBoxServDet.checked:=Srvc_Det;
|
||||||
CheckBoxServAct.checked:=Srvc_Act;
|
CheckBoxServAct.checked:=Srvc_Act;
|
||||||
CheckServPosTrains.checked:=Srvc_PosTrain;
|
CheckServPosTrains.checked:=Srvc_Pos;
|
||||||
|
CheckBoxSrvSig.Checked:=Srvc_Sig;
|
||||||
|
|
||||||
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
|
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
|
||||||
CheckBoxInitAig.checked:=AvecInitAiguillages;
|
CheckBoxInitAig.checked:=AvecInitAiguillages;
|
||||||
CheckPosAig.checked:=AvecDemandeAiguillages;
|
CheckPosAig.checked:=AvecDemandeAiguillages;
|
||||||
@@ -3466,7 +3512,7 @@ begin
|
|||||||
Perform(EM_SCROLLCARET,0,0);
|
Perform(EM_SCROLLCARET,0,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if clicproprietes then clicListeFeu(Adressefeuclic);
|
if clicproprietes then clicListeSignal(Adressefeuclic);
|
||||||
clicproprietes:=false;
|
clicproprietes:=false;
|
||||||
|
|
||||||
i:=1;
|
i:=1;
|
||||||
@@ -3509,9 +3555,12 @@ begin
|
|||||||
clicListe:=false;
|
clicListe:=false;
|
||||||
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
|
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
|
||||||
ConfigPrete:=true;
|
ConfigPrete:=true;
|
||||||
|
richBranche.HideSelection:=false; // pour pouvoir copier coller la fenetre
|
||||||
groupBox21.Top:=304;
|
groupBox21.Top:=304;
|
||||||
GroupBox21.Left:=8;
|
GroupBox21.Left:=8;
|
||||||
|
|
||||||
|
// création de l'icone de déplacement du train
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -3906,6 +3955,7 @@ begin
|
|||||||
editact2.Visible:=false;
|
editact2.Visible:=false;
|
||||||
LabelActionneur.Caption:='Actionneur Détecteur';
|
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||||
EditEtatActionneur.Hint:='0 ou 1';
|
EditEtatActionneur.Hint:='0 ou 1';
|
||||||
|
EditAct.Hint:='Actionneur/Détecteur ';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3921,6 +3971,7 @@ begin
|
|||||||
editact2.Visible:=true;
|
editact2.Visible:=true;
|
||||||
LabelActionneur.Caption:='Mémoire de Zone';
|
LabelActionneur.Caption:='Mémoire de Zone';
|
||||||
EditEtatActionneur.Hint:='0 ou 1';
|
EditEtatActionneur.Hint:='0 ou 1';
|
||||||
|
EditAct.Hint:='Détecteur ';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3937,6 +3988,7 @@ begin
|
|||||||
editact2.Visible:=false;
|
editact2.Visible:=false;
|
||||||
LabelActionneur.Caption:='Aiguillage';
|
LabelActionneur.Caption:='Aiguillage';
|
||||||
EditEtatActionneur.Hint:='1 ou S=dévié 2 ou D=droit';
|
EditEtatActionneur.Hint:='1 ou S=dévié 2 ou D=droit';
|
||||||
|
EditAct.Hint:='Aiguillage ';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -4054,7 +4106,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(feux[i].Btype_suiv2)+IntToSTR(feux[i].Adr_el_suiv2);
|
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);
|
EditSuiv2.Hint:=chaine_element(feux[i].Btype_suiv2,feux[i].Adr_el_suiv2);
|
||||||
end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end;
|
end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end;
|
||||||
j:=feux[i].Adr_det3;
|
j:=feux[i].Adr_det3;
|
||||||
if j<>0 then
|
if j<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -4164,11 +4216,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//if det then s2:='Détecteur ' else s2:='Actionneur ';
|
s2:=FormConfig.EditAct.Hint;
|
||||||
s2:='Détecteur ou actionneur ';
|
FormConfig.EditAct.Hint:=s2+intToSTR(Tablo_actionneur[i].adresse);
|
||||||
s2:=s2+intToSTR(Tablo_actionneur[i].adresse);
|
|
||||||
FormConfig.EditAct.Hint:=s2;
|
|
||||||
|
|
||||||
|
|
||||||
// Actionneur fonction F loco
|
// Actionneur fonction F loco
|
||||||
if Tablo_actionneur[i].loco then
|
if Tablo_actionneur[i].loco then
|
||||||
@@ -4246,7 +4295,7 @@ begin
|
|||||||
radioButtonActDet.Checked:=true;
|
radioButtonActDet.Checked:=true;
|
||||||
radioButtonZones.Checked:=false;
|
radioButtonZones.Checked:=false;
|
||||||
editAct2.Visible:=false;
|
editAct2.Visible:=false;
|
||||||
LabelActionneur.Caption:='Actionneur DétecteurZ';
|
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||||
end;
|
end;
|
||||||
if typ=1 then with formconfig do
|
if typ=1 then with formconfig do
|
||||||
begin
|
begin
|
||||||
@@ -4962,7 +5011,7 @@ begin
|
|||||||
if i<1 then exit;
|
if i<1 then exit;
|
||||||
decodeur:=ComboBoxDec.ItemIndex;
|
decodeur:=ComboBoxDec.ItemIndex;
|
||||||
feux[i].decodeur:=decodeur;
|
feux[i].decodeur:=decodeur;
|
||||||
Maj_Hint_feu(i);
|
Maj_Hint_Signal(i);
|
||||||
|
|
||||||
s:=encode_sig_feux(i);
|
s:=encode_sig_feux(i);
|
||||||
formconfig.RichSig.Lines[ligneclicSig]:=s;
|
formconfig.RichSig.Lines[ligneclicSig]:=s;
|
||||||
@@ -4982,7 +5031,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
i:=Selstart;
|
i:=Selstart;
|
||||||
lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée
|
lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée
|
||||||
clicListeFeu(feux[lc+1].adresse);
|
clicListeSignal(feux[lc+1].adresse);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@@ -5002,7 +5051,7 @@ begin
|
|||||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end;
|
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end;
|
||||||
LabelInfo.caption:=' ';
|
LabelInfo.caption:=' ';
|
||||||
feux[ligneClicSig+1].Adr_det1:=i;
|
feux[ligneClicSig+1].Adr_det1:=i;
|
||||||
maj_hint_feu(ligneClicSig+1);
|
maj_hint_Signal(ligneClicSig+1);
|
||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
feux[ligneClicSig+1].modifie:=true;
|
feux[ligneClicSig+1].modifie:=true;
|
||||||
@@ -5020,11 +5069,12 @@ begin
|
|||||||
tempo_feu:=i;
|
tempo_feu:=i;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure Suiv1;
|
procedure Suiv1;
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
bt : Tequipement;
|
bt : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt Element suivant1',clOrange);
|
if affevt then Affiche('Evt Element suivant1',clOrange);
|
||||||
|
|
||||||
@@ -5082,7 +5132,7 @@ begin
|
|||||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur2 ';exit;end;
|
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur2 ';exit;end;
|
||||||
LabelInfo.caption:=' ';
|
LabelInfo.caption:=' ';
|
||||||
feux[ligneClicSig+1].Adr_det2:=i;
|
feux[ligneClicSig+1].Adr_det2:=i;
|
||||||
maj_hint_feu(ligneClicSig+1);
|
maj_hint_Signal(ligneClicSig+1);
|
||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
feux[ligneClicSig+1].modifie:=true;
|
feux[ligneClicSig+1].modifie:=true;
|
||||||
@@ -5093,7 +5143,7 @@ procedure TFormConfig.EditDet2Change(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
det2;
|
det2;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject);
|
procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject);
|
||||||
var s : string;
|
var s : string;
|
||||||
@@ -5185,7 +5235,7 @@ begin
|
|||||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end;
|
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end;
|
||||||
LabelInfo.caption:=' ';
|
LabelInfo.caption:=' ';
|
||||||
feux[ligneClicSig+1].Adr_det3:=i;
|
feux[ligneClicSig+1].Adr_det3:=i;
|
||||||
maj_hint_feu(ligneClicSig+1);
|
maj_hint_Signal(ligneClicSig+1);
|
||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
feux[ligneClicSig+1].modifie:=true;
|
feux[ligneClicSig+1].modifie:=true;
|
||||||
@@ -5260,7 +5310,7 @@ begin
|
|||||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end;
|
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end;
|
||||||
LabelInfo.caption:=' ';
|
LabelInfo.caption:=' ';
|
||||||
feux[ligneClicSig+1].Adr_det4:=i;
|
feux[ligneClicSig+1].Adr_det4:=i;
|
||||||
maj_hint_feu(ligneClicSig+1);
|
maj_hint_Signal(ligneClicSig+1);
|
||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
feux[ligneClicSig+1].modifie:=true;
|
feux[ligneClicSig+1].modifie:=true;
|
||||||
@@ -5322,8 +5372,9 @@ end;
|
|||||||
|
|
||||||
procedure TFormConfig.EditActChange(Sender: TObject);
|
procedure TFormConfig.EditActChange(Sender: TObject);
|
||||||
var s,s2 : string;
|
var s,s2 : string;
|
||||||
act,erreur : integer;
|
act,erreur,det1,det2,suiv : integer;
|
||||||
det : boolean;
|
elsuiv : tEquipement;
|
||||||
|
de : boolean;
|
||||||
begin
|
begin
|
||||||
if clicliste then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt Edit act Change',clyellow);
|
if affevt then affiche('Evt Edit act Change',clyellow);
|
||||||
@@ -5336,11 +5387,19 @@ begin
|
|||||||
begin
|
begin
|
||||||
Val(s,act,erreur);
|
Val(s,act,erreur);
|
||||||
if s='' then exit;
|
if s='' then exit;
|
||||||
det:=pos('Z',s)<>0; // si détecteur
|
|
||||||
if det then s2:='Détecteur ' else s2:='Actionneur ';
|
// 0=actionneur/détecteur 2=evt aig 3=MemZone
|
||||||
s2:=s2+intToSTR(act);
|
if (Tablo_Actionneur[ligneClicAct+1].typdeclenche=3) or (Tablo_Actionneur[ligneClicAct+1].typdeclenche=0) then
|
||||||
EditAct.Hint:=s2;
|
s2:='Actionneur/Détecteur ';
|
||||||
if det then delete(s,erreur,1);
|
if (Tablo_Actionneur[ligneClicAct+1].typdeclenche=2) then s2:='Aiguillage ';
|
||||||
|
|
||||||
|
EditAct.Hint:=s2+intToSTR(act);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
de:=pos('Z',s)<>0; // si détecteur
|
||||||
|
if de then delete(s,erreur,1);
|
||||||
Val(s,act,erreur);
|
Val(s,act,erreur);
|
||||||
if erreur<>0 then
|
if erreur<>0 then
|
||||||
begin
|
begin
|
||||||
@@ -5350,6 +5409,18 @@ begin
|
|||||||
tablo_actionneur[ligneClicAct+1].adresse:=act;
|
tablo_actionneur[ligneClicAct+1].adresse:=act;
|
||||||
s:=encode_act_loc_son(ligneClicAct+1);
|
s:=encode_act_loc_son(ligneClicAct+1);
|
||||||
RichAct.Lines[ligneClicAct]:=s;
|
RichAct.Lines[ligneClicAct]:=s;
|
||||||
|
|
||||||
|
// vérifier si les détecteurs sont contigus si on est en zone
|
||||||
|
if Tablo_Actionneur[ligneClicAct+1].typdeclenche=3 then
|
||||||
|
begin
|
||||||
|
Val(EditAct2.Text,det2,erreur);
|
||||||
|
if erreur<>0 then exit;
|
||||||
|
det_contigu(act,det2,suiv,elSuiv);
|
||||||
|
if (suiv=0) or (suiv>9995) then LabelInfo.Caption:='Les détecteurs '+intToSTR(act)+' et '+intToSTR(det2)+' ne sont pas contigus'
|
||||||
|
else LabelInfo.Caption:='';
|
||||||
|
end
|
||||||
|
else LabelInfo.Caption:='';
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -5357,7 +5428,8 @@ end;
|
|||||||
|
|
||||||
procedure TFormConfig.EditAct2Change(Sender: TObject);
|
procedure TFormConfig.EditAct2Change(Sender: TObject);
|
||||||
var s : string;
|
var s : string;
|
||||||
det2,erreur : integer;
|
det1,det2,erreur,suiv : integer;
|
||||||
|
elSuiv : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt Edit act2 Change',clyellow);
|
if affevt then affiche('Evt Edit act2 Change',clyellow);
|
||||||
@@ -5378,6 +5450,14 @@ begin
|
|||||||
tablo_actionneur[ligneClicAct+1].adresse2:=det2;
|
tablo_actionneur[ligneClicAct+1].adresse2:=det2;
|
||||||
s:=encode_act_loc_son(ligneClicAct+1);
|
s:=encode_act_loc_son(ligneClicAct+1);
|
||||||
RichAct.Lines[ligneClicAct]:=s;
|
RichAct.Lines[ligneClicAct]:=s;
|
||||||
|
|
||||||
|
// vérifier si les détecteurs sont contigus
|
||||||
|
Val(EditAct.Text,det1,erreur);
|
||||||
|
if erreur<>0 then exit;
|
||||||
|
det_contigu(det1,det2,suiv,elSuiv);
|
||||||
|
if (suiv=0) or (suiv>9995) then LabelInfo.Caption:='Les détecteurs '+intToSTR(det1)+' et '+intToSTR(det2)+' ne sont pas contigus'
|
||||||
|
else LabelInfo.Caption:='';
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -5650,7 +5730,7 @@ begin
|
|||||||
feux[ligneClicSig+1].adresse:=i;
|
feux[ligneClicSig+1].adresse:=i;
|
||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
Maj_Hint_feu(ligneClicSig+1);
|
Maj_Hint_Signal(ligneClicSig+1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -5823,8 +5903,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
||||||
var index : integer;
|
var index : integer;
|
||||||
begin
|
begin
|
||||||
@@ -5835,7 +5913,7 @@ begin
|
|||||||
feux[index]:=Feu_sauve;
|
feux[index]:=Feu_sauve;
|
||||||
RichSig.Lines[ligneClicSig]:=encode_sig_feux(index);
|
RichSig.Lines[ligneClicSig]:=encode_sig_feux(index);
|
||||||
aff_champs_sig_feux(index); // réaffiche les champs
|
aff_champs_sig_feux(index); // réaffiche les champs
|
||||||
Maj_Hint_feu(index);
|
Maj_Hint_Signal(index);
|
||||||
// change l'image du feu dans la feuille graphique principale
|
// change l'image du feu dans la feuille graphique principale
|
||||||
Feux[index].Img.picture.Bitmap:=Select_dessin_feu(feux[index].aspect);
|
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
|
dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal
|
||||||
@@ -5941,7 +6019,6 @@ var i,ligne : integer;
|
|||||||
begin
|
begin
|
||||||
clicliste:=true;
|
clicliste:=true;
|
||||||
|
|
||||||
|
|
||||||
// désactive la sélection des actionneurs
|
// désactive la sélection des actionneurs
|
||||||
RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua);
|
RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua);
|
||||||
ligneclicAct:=-1;
|
ligneclicAct:=-1;
|
||||||
@@ -6408,7 +6485,7 @@ begin
|
|||||||
with formconfig do begin
|
with formconfig do begin
|
||||||
RichAct.Lines.Add(s);
|
RichAct.Lines.Add(s);
|
||||||
RE_ColorLine(RichAct,RichAct.lines.count-1,ClAqua);
|
RE_ColorLine(RichAct,RichAct.lines.count-1,ClAqua);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
AncligneClicAct:=-1;
|
AncligneClicAct:=-1;
|
||||||
ligneClicAct:=-1;
|
ligneClicAct:=-1;
|
||||||
@@ -6766,11 +6843,12 @@ end;
|
|||||||
|
|
||||||
function verif_coherence : boolean;
|
function verif_coherence : boolean;
|
||||||
var AncAdr,i,j,k,l,Indexaig,adr,adr2,extr,detect,condcarre,nc,index2,SuivAdr,
|
var AncAdr,i,j,k,l,Indexaig,adr,adr2,extr,detect,condcarre,nc,index2,SuivAdr,
|
||||||
x,y,extr2,adr3,index3,det1Br,det2Br,det1index,det2index,adresse,dec,nc2 : integer;
|
x,y,extr2,adr3,index3,det1Br,det2Br,det1index,det2index,adresse,Adresse2,dec,nc2 : integer;
|
||||||
modAig,AncModel,model,km,SuivModel,model2: TEquipement;
|
modAig,AncModel,model,km,SuivModel,model2: TEquipement;
|
||||||
c : char;
|
c : char;
|
||||||
vitesse : longint;
|
vitesse : longint;
|
||||||
ok,trouveSuiv,TrouvePrec,AdrOk : boolean;
|
ok,trouveSuiv,TrouvePrec,AdrOk : boolean;
|
||||||
|
s : string;
|
||||||
begin
|
begin
|
||||||
// vérification de la cohérence1
|
// vérification de la cohérence1
|
||||||
// parcoure les branches jusqu'à trouver un aiguillage pour voir s'il a été décrit
|
// parcoure les branches jusqu'à trouver un aiguillage pour voir s'il a été décrit
|
||||||
@@ -6857,7 +6935,7 @@ begin
|
|||||||
begin
|
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);
|
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;
|
ok:=false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
adr:=aiguillage[Indexaig].Apointe;
|
adr:=aiguillage[Indexaig].Apointe;
|
||||||
if ( ((aiguillage[Indexaig].ApointeB='Z') or (aiguillage[Indexaig].ApointeB=#0)) and (aiguillage[Indexaig].modele=aig) ) then
|
if ( ((aiguillage[Indexaig].ApointeB='Z') or (aiguillage[Indexaig].ApointeB=#0)) and (aiguillage[Indexaig].modele=aig) ) then
|
||||||
@@ -6898,7 +6976,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
for i:=Indexaig+1 to maxaiguillage do
|
for i:=Indexaig+1 to maxaiguillage do
|
||||||
begin
|
begin
|
||||||
if adr=aiguillage[i].Adresse then
|
if adr=aiguillage[i].Adresse then
|
||||||
begin
|
begin
|
||||||
affiche('Erreur 6.2: aiguillage '+intToSTR(adr)+' défini deux fois',clred);
|
affiche('Erreur 6.2: aiguillage '+intToSTR(adr)+' défini deux fois',clred);
|
||||||
ok:=false;
|
ok:=false;
|
||||||
@@ -7274,7 +7352,7 @@ begin
|
|||||||
extr:=aiguillage[index2].ADroit;
|
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);
|
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;
|
end;
|
||||||
if c='S' then
|
if c='S' then
|
||||||
begin
|
begin
|
||||||
extr:=aiguillage[index2].ADevie;
|
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);
|
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);
|
||||||
@@ -7326,7 +7404,7 @@ begin
|
|||||||
extr:=aiguillage[index2].ADroit;
|
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);
|
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;
|
end;
|
||||||
if c='S' then
|
if c='S' then
|
||||||
begin
|
begin
|
||||||
extr:=aiguillage[index2].ADevie;
|
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);
|
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);
|
||||||
@@ -7342,7 +7420,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// cohérence 8
|
// cohérence 8
|
||||||
// parcoure les branches pour voir si les aiguillages aux extrémités sont cohérentes avec leurs déclarations
|
// 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
|
for i:=1 to NbreBranches do
|
||||||
@@ -7517,6 +7595,7 @@ begin
|
|||||||
AdrOk:=True;
|
AdrOk:=True;
|
||||||
if Verif_AdrXpressNet=1 then
|
if Verif_AdrXpressNet=1 then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
for i:=1 to maxaiguillage do
|
for i:=1 to maxaiguillage do
|
||||||
begin
|
begin
|
||||||
adresse:=aiguillage[i].Adresse ;
|
adresse:=aiguillage[i].Adresse ;
|
||||||
@@ -7570,6 +7649,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// actionneurs de zone
|
||||||
|
for i:=1 to maxTablo_act do
|
||||||
|
begin
|
||||||
|
if Tablo_actionneur[i].typdeclenche=3 then // si actionneur de zone
|
||||||
|
begin
|
||||||
|
adresse:=Tablo_actionneur[i].Adresse;
|
||||||
|
adresse2:=Tablo_actionneur[i].Adresse2;
|
||||||
|
det_contigu(adresse,adresse2,suivant,SuivModel);
|
||||||
|
if (suivant=0) or (suivant>9995) then
|
||||||
|
begin
|
||||||
|
ok:=false;
|
||||||
|
s:='Erreur 18: l''actionneur '+IntToSTR(Tablo_actionneur[i].adresse)+' est enclenché par les détecteurs '+intToSTR(adresse)+' ' +intToSTR(adresse2)+' qui ne sont pas contigus';
|
||||||
|
Affiche(s,clred);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
verif_coherence:=ok;
|
verif_coherence:=ok;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -8117,8 +8214,6 @@ begin
|
|||||||
clicliste:=true;
|
clicliste:=true;
|
||||||
Aff_champs_aig_tablo(i);
|
Aff_champs_aig_tablo(i);
|
||||||
clicliste:=false;
|
clicliste:=false;
|
||||||
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure valide_branches;
|
procedure valide_branches;
|
||||||
@@ -8784,14 +8879,14 @@ begin
|
|||||||
i:=ligneClicAct+1;
|
i:=ligneClicAct+1;
|
||||||
if AffEvt then Affiche('RadioBoutonActDet '+IntToSTR(i),clyellow);
|
if AffEvt then Affiche('RadioBoutonActDet '+IntToSTR(i),clyellow);
|
||||||
Tablo_Actionneur[i].typdeclenche:=0;
|
Tablo_Actionneur[i].typdeclenche:=0;
|
||||||
LabelActionneur.Caption:='Actionneur DétecteurZ';
|
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||||
editAct2.Visible:=false;
|
editAct2.Visible:=false;
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
LabelTrain.Visible:=true;
|
LabelTrain.Visible:=true;
|
||||||
EditEtatActionneur.Hint:='Etat 0 ou 1';
|
EditEtatActionneur.Hint:='Etat 0 ou 1';
|
||||||
Tablo_Actionneur[i].trainDecl:=trainSauve;
|
Tablo_Actionneur[i].trainDecl:=trainSauve;
|
||||||
EditTrainDecl.Text:=trainSauve;
|
EditTrainDecl.Text:=trainSauve;
|
||||||
|
|
||||||
val(editact.Text,champ,erreur);
|
val(editact.Text,champ,erreur);
|
||||||
Tablo_actionneur[i].adresse:=champ ;
|
Tablo_actionneur[i].adresse:=champ ;
|
||||||
val(editEtatActionneur.Text,champ,erreur);
|
val(editEtatActionneur.Text,champ,erreur);
|
||||||
@@ -8807,6 +8902,8 @@ begin
|
|||||||
s:=encode_act_loc_son(i);
|
s:=encode_act_loc_son(i);
|
||||||
RichAct.Lines[ligneClicAct]:=s;
|
RichAct.Lines[ligneClicAct]:=s;
|
||||||
|
|
||||||
|
EditAct.Hint:='Actionneur/Détecteur '+intToSTR(Tablo_actionneur[i].adresse);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -8839,6 +8936,9 @@ begin
|
|||||||
tablo_actionneur[i].Raz:=checkRaz.checked;
|
tablo_actionneur[i].Raz:=checkRaz.checked;
|
||||||
s:=encode_act_loc_son(i);
|
s:=encode_act_loc_son(i);
|
||||||
RichAct.Lines[ligneClicAct]:=s;
|
RichAct.Lines[ligneClicAct]:=s;
|
||||||
|
|
||||||
|
EditAct.Hint:='Actionneur/Détecteur '+intToSTR(Tablo_actionneur[i].adresse);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.RadioButtonAigClick(Sender: TObject);
|
procedure TFormConfig.RadioButtonAigClick(Sender: TObject);
|
||||||
@@ -8870,6 +8970,7 @@ begin
|
|||||||
tablo_actionneur[i].Raz:=checkRaz.checked;
|
tablo_actionneur[i].Raz:=checkRaz.checked;
|
||||||
s:=encode_act_loc_son(i);
|
s:=encode_act_loc_son(i);
|
||||||
RichAct.Lines[ligneClicAct]:=s;
|
RichAct.Lines[ligneClicAct]:=s;
|
||||||
|
EditAct.Hint:='Aiguillage '+intToSTR(Tablo_actionneur[i].adresse);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -9589,7 +9690,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.Button1Click(Sender: TObject);
|
procedure TFormConfig.ButtonTestFermeClick(Sender: TObject);
|
||||||
var adr,cmd,erreur : integer;
|
var adr,cmd,erreur : integer;
|
||||||
ts : Taccessoire;
|
ts : Taccessoire;
|
||||||
begin
|
begin
|
||||||
@@ -9602,7 +9703,7 @@ begin
|
|||||||
aff_acc:=false;
|
aff_acc:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.Button3Click(Sender: TObject);
|
procedure TFormConfig.ButtonTestOuvreClick(Sender: TObject);
|
||||||
var adr,cmd,erreur : integer;
|
var adr,cmd,erreur : integer;
|
||||||
ts : Taccessoire;
|
ts : Taccessoire;
|
||||||
begin
|
begin
|
||||||
@@ -9898,7 +9999,7 @@ begin
|
|||||||
config_modifie:=true;
|
config_modifie:=true;
|
||||||
FormConfig.RichEdittrains.Clear;
|
FormConfig.RichEdittrains.Clear;
|
||||||
|
|
||||||
// réafficher le richsig
|
// réafficher le richEditTrains
|
||||||
for i:=1 to ntrains do
|
for i:=1 to ntrains do
|
||||||
begin
|
begin
|
||||||
s:=trains[i].nom_train+','+inttostr(trains[i].adresse)+','+intToSTR(trains[i].vitmax);
|
s:=trains[i].nom_train+','+inttostr(trains[i].adresse)+','+intToSTR(trains[i].vitmax);
|
||||||
@@ -10184,6 +10285,7 @@ procedure TFormConfig.Coller1Click(Sender: TObject);
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -426,7 +426,6 @@ begin
|
|||||||
ok:=false;
|
ok:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
AvecGrille:=checkDessineGrille.Checked;
|
AvecGrille:=checkDessineGrille.Checked;
|
||||||
if ok then
|
if ok then
|
||||||
begin
|
begin
|
||||||
|
|||||||
+25
-25
@@ -9,17 +9,17 @@ implementation
|
|||||||
uses
|
uses
|
||||||
SysUtils,ActiveX,ComObj,Variants,UnitPrinc,Graphics,unitConfig,verif_version;
|
SysUtils,ActiveX,ComObj,Variants,UnitPrinc,Graphics,unitConfig,verif_version;
|
||||||
Const
|
Const
|
||||||
NET_FW_ACTION_ALLOW = 1;
|
NET_FW_ACTION_ALLOW=1;
|
||||||
NET_FW_IP_PROTOCOL_TCP = 6;
|
NET_FW_IP_PROTOCOL_TCP=6;
|
||||||
NET_FW_IP_PROTOCOL_UDP = 17;
|
NET_FW_IP_PROTOCOL_UDP=17;
|
||||||
NET_FW_IP_PROTOCOL_ANY = 256;
|
NET_FW_IP_PROTOCOL_ANY=256;
|
||||||
net_fw_profile2_private=2;
|
net_fw_profile2_private=2;
|
||||||
net_fw_profile2_public=4;
|
net_fw_profile2_public=4;
|
||||||
net_fw_rule_dir_out=2;
|
net_fw_rule_dir_out=2;
|
||||||
net_fw_rule_dir_in=1;
|
net_fw_rule_dir_in=1;
|
||||||
NET_FW_MODIFY_STATE_OK = 0;
|
NET_FW_MODIFY_STATE_OK=0;
|
||||||
NET_FW_MODIFY_STATE_GP_OVERRIDE = 1;
|
NET_FW_MODIFY_STATE_GP_OVERRIDE=1;
|
||||||
NET_FW_MODIFY_STATE_INBOUND_BLOCKED = 2;
|
NET_FW_MODIFY_STATE_INBOUND_BLOCKED=2;
|
||||||
nom_regle_cdm='CDM rail';
|
nom_regle_cdm='CDM rail';
|
||||||
|
|
||||||
// Ajoute une règle à un programme en utilisant Microsoft Windows Firewall APIs.
|
// Ajoute une règle à un programme en utilisant Microsoft Windows Firewall APIs.
|
||||||
@@ -34,7 +34,7 @@ begin
|
|||||||
// Crée l'objet FwPolicy2
|
// Crée l'objet FwPolicy2
|
||||||
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
||||||
RulesObject:=fwPolicy2.Rules;
|
RulesObject:=fwPolicy2.Rules;
|
||||||
CurrentProfiles:= fwPolicy2.CurrentProfileTypes;
|
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||||
//CurrentProfiles:=net_fw_profile2_private or net_fw_profile2_public;
|
//CurrentProfiles:=net_fw_profile2_private or net_fw_profile2_public;
|
||||||
|
|
||||||
//Crée l'objet de la règle.
|
//Crée l'objet de la règle.
|
||||||
@@ -110,41 +110,41 @@ end;
|
|||||||
// =2 oui et active
|
// =2 oui et active
|
||||||
function CheckingRuleEnabled : integer;
|
function CheckingRuleEnabled : integer;
|
||||||
var
|
var
|
||||||
fwPolicy2,RulesObject,rule : OleVariant;
|
fwPolicy2,RulesObject,regle : OleVariant;
|
||||||
PolicyModifyState,CurrentProfiles : Integer;
|
CurrentProfiles : Integer;
|
||||||
bIsEnabled,trouve : Boolean;
|
bIsEnabled,trouve : Boolean;
|
||||||
oEnum : IEnumvariant;
|
oEnum : IEnumvariant;
|
||||||
iValue : LongWord;
|
iValue : LongWord;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
fwPolicy2:= CreateOleObject('HNetCfg.FwPolicy2');
|
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
||||||
RulesObject:=fwPolicy2.Rules;
|
RulesObject:=fwPolicy2.Rules;
|
||||||
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||||
trouve:=false ;
|
trouve:=false ;
|
||||||
oEnum:=IUnknown(Rulesobject._NewEnum) as IEnumVariant;
|
oEnum:=IUnknown(Rulesobject._NewEnum) as IEnumVariant;
|
||||||
while (oEnum.Next(1,rule,iValue)=0) and not(trouve) do
|
while (oEnum.Next(1,regle,iValue)=0) and not(trouve) do
|
||||||
begin
|
begin
|
||||||
if (rule.Profiles And CurrentProfiles)<>0 then
|
if (regle.Profiles And CurrentProfiles)<>0 then
|
||||||
begin
|
begin
|
||||||
s:=rule.Name;
|
s:=regle.Name;
|
||||||
trouve:=s=nom_regle_cdm;
|
trouve:=s=nom_regle_cdm;
|
||||||
if trouve then
|
if trouve then
|
||||||
begin
|
begin
|
||||||
Affiche('Description de l''autorisation socket pour CDM rail dans le pare-feu Windows',clyellow);
|
Affiche('Description de l''autorisation socket pour CDM rail dans le pare-feu Windows',clyellow);
|
||||||
Affiche('Nom : ' + s,clLime);
|
Affiche('Nom : ' + s,clLime);
|
||||||
Affiche('Description : ' + rule.Description,clLime);
|
Affiche('Description : ' + regle.Description,clLime);
|
||||||
Affiche('Nom d''application: ' + rule.ApplicationName,clLime);
|
Affiche('Nom d''application: ' + regle.ApplicationName,clLime);
|
||||||
Affiche('Nom du service: ' + rule.ServiceName,clLime);
|
Affiche('Nom du service: ' + regle.ServiceName,clLime);
|
||||||
bIsEnabled:=rule.enabled;
|
bIsEnabled:=regle.enabled;
|
||||||
if bisEnabled then affiche('Activée',clLime) else affiche('désactivée',clLime) ;
|
if bisEnabled then affiche('Activée',clLime) else affiche('désactivée',clLime) ;
|
||||||
if (rule.Protocol=NET_FW_IP_PROTOCOL_TCP) or (rule.Protocol=NET_FW_IP_PROTOCOL_UDP) then
|
if (regle.Protocol=NET_FW_IP_PROTOCOL_TCP) or (regle.Protocol=NET_FW_IP_PROTOCOL_UDP) then
|
||||||
begin
|
begin
|
||||||
if (rule.Protocol=NET_FW_IP_PROTOCOL_TCP) then Affiche('Protocole : TCP',clLime);
|
if (regle.Protocol=NET_FW_IP_PROTOCOL_TCP) then Affiche('Protocole : TCP',clLime);
|
||||||
if (rule.Protocol=NET_FW_IP_PROTOCOL_UDP) then Affiche('Protocole : UDP',clLime);
|
if (regle.Protocol=NET_FW_IP_PROTOCOL_UDP) then Affiche('Protocole : UDP',clLime);
|
||||||
Affiche('Ports locaux : ' + rule.LocalPorts,clLime);
|
Affiche('Ports locaux : ' + regle.LocalPorts,clLime);
|
||||||
Affiche('Ports distants : ' + rule.RemotePorts,clLime);
|
Affiche('Ports distants : ' + regle.RemotePorts,clLime);
|
||||||
Affiche('Adresses locales : ' + rule.LocalAddresses,clLime);
|
Affiche('Adresses locales : ' + regle.LocalAddresses,clLime);
|
||||||
Affiche('Adresses distantes : ' + rule.RemoteAddresses,clLime);
|
Affiche('Adresses distantes : ' + regle.RemoteAddresses,clLime);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
+26
-20
@@ -1,6 +1,6 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 86
|
Left = 22
|
||||||
Top = 188
|
Top = 241
|
||||||
Width = 1227
|
Width = 1227
|
||||||
Height = 671
|
Height = 671
|
||||||
Caption = 'Signaux complexes'
|
Caption = 'Signaux complexes'
|
||||||
@@ -17,8 +17,8 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1211
|
1219
|
||||||
612)
|
620)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelTitre: TLabel
|
object LabelTitre: TLabel
|
||||||
@@ -1203,12 +1203,12 @@ object FormPrinc: TFormPrinc
|
|||||||
object SplitterH: TSplitter
|
object SplitterH: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Height = 590
|
Height = 598
|
||||||
end
|
end
|
||||||
object ScrollBox1: TScrollBox
|
object ScrollBox1: TScrollBox
|
||||||
Left = 646
|
Left = 630
|
||||||
Top = 200
|
Top = 200
|
||||||
Width = 546
|
Width = 563
|
||||||
Height = 392
|
Height = 392
|
||||||
HorzScrollBar.Increment = 48
|
HorzScrollBar.Increment = 48
|
||||||
HorzScrollBar.Tracking = True
|
HorzScrollBar.Tracking = True
|
||||||
@@ -1220,9 +1220,9 @@ object FormPrinc: TFormPrinc
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
Left = 646
|
Left = 630
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 266
|
Width = 265
|
||||||
Height = 52
|
Height = 52
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Commande d'#39'accessoires'
|
Caption = 'Commande d'#39'accessoires'
|
||||||
@@ -1268,8 +1268,8 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 590
|
Top = 598
|
||||||
Width = 1211
|
Width = 1219
|
||||||
Height = 22
|
Height = 22
|
||||||
Panels = <>
|
Panels = <>
|
||||||
SimplePanel = True
|
SimplePanel = True
|
||||||
@@ -1324,9 +1324,9 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClick = BoutonRafClick
|
OnClick = BoutonRafClick
|
||||||
end
|
end
|
||||||
object ButtonArretSimu: TButton
|
object ButtonArretSimu: TButton
|
||||||
Left = 8
|
Left = 192
|
||||||
Top = 48
|
Top = 88
|
||||||
Width = 89
|
Width = 81
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Arret simulation'
|
Caption = 'Arret simulation'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@@ -1377,11 +1377,11 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClick = BoutonRazTrainsClick
|
OnClick = BoutonRazTrainsClick
|
||||||
end
|
end
|
||||||
object ButtonAffAnalyseCDM: TButton
|
object ButtonAffAnalyseCDM: TButton
|
||||||
Left = 184
|
Left = 8
|
||||||
Top = 88
|
Top = 48
|
||||||
Width = 89
|
Width = 89
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Affiche fen'#234'tre analyse CDM'
|
Caption = 'Affiche le r'#233'seau CDM'
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Visible = False
|
Visible = False
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
@@ -1460,7 +1460,7 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBox3: TGroupBox
|
object GroupBox3: TGroupBox
|
||||||
Left = 646
|
Left = 630
|
||||||
Top = 64
|
Top = 64
|
||||||
Width = 265
|
Width = 265
|
||||||
Height = 129
|
Height = 129
|
||||||
@@ -1927,9 +1927,15 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object Analyser1: TMenuItem
|
object Analyser1: TMenuItem
|
||||||
Caption = 'Importer le r'#233'seau CDM Rail'
|
Caption = 'Importer le r'#233'seau CDM Rail'
|
||||||
Hint = 'Importer le r'#233'seau CDM rail (aiguillages)'
|
Hint =
|
||||||
|
'Importer le r'#233'seau CDM rail (aiguillages, branches) et cr'#233'e le f' +
|
||||||
|
'ichier de segments CDM'
|
||||||
OnClick = Analyser1Click
|
OnClick = Analyser1Click
|
||||||
end
|
end
|
||||||
|
object Affiche_fenetre_CDM: TMenuItem
|
||||||
|
Caption = 'Affiche la fen'#234'tre du r'#233'seau CDM'
|
||||||
|
OnClick = Affiche_fenetre_CDMClick
|
||||||
|
end
|
||||||
object N9: TMenuItem
|
object N9: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
@@ -1990,7 +1996,7 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClick = Copier1Click
|
OnClick = Copier1Click
|
||||||
end
|
end
|
||||||
object Coller1: TMenuItem
|
object Coller1: TMenuItem
|
||||||
Caption = 'Coller'
|
Caption = 'Coller, compiler et importer le r'#233'seau CDM rail'
|
||||||
OnClick = Coller1Click
|
OnClick = Coller1Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+214
-162
@@ -38,8 +38,8 @@ Unit UnitPrinc;
|
|||||||
// Une loco sur un détecteur au lancement ne renvoie pas son état. Seuls les changements
|
// Une loco sur un détecteur au lancement ne renvoie pas son état. Seuls les changements
|
||||||
// d'état sont renvoyés par la centrale.
|
// d'état sont renvoyés par la centrale.
|
||||||
|
|
||||||
{$Q-} // pas de vérification du débordement des opérations de calcul
|
//{$Q-} // pas de vérification du débordement des opérations de calcul
|
||||||
{$R-} // pas de vérification des limites d'index du tableau et des variables
|
//{$R-} // pas de vérification des limites d'index du tableau et des variables
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@@ -168,6 +168,7 @@ type
|
|||||||
Analyser1: TMenuItem;
|
Analyser1: TMenuItem;
|
||||||
Coller1: TMenuItem;
|
Coller1: TMenuItem;
|
||||||
ButtonAffAnalyseCDM: TButton;
|
ButtonAffAnalyseCDM: TButton;
|
||||||
|
Affiche_fenetre_CDM: TMenuItem;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure MSCommUSBLenzComm(Sender: TObject);
|
procedure MSCommUSBLenzComm(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
@@ -250,6 +251,7 @@ type
|
|||||||
procedure Analyser1Click(Sender: TObject);
|
procedure Analyser1Click(Sender: TObject);
|
||||||
procedure Coller1Click(Sender: TObject);
|
procedure Coller1Click(Sender: TObject);
|
||||||
procedure ButtonAffAnalyseCDMClick(Sender: TObject);
|
procedure ButtonAffAnalyseCDMClick(Sender: TObject);
|
||||||
|
procedure Affiche_fenetre_CDMClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
procedure DoHint(Sender : Tobject);
|
procedure DoHint(Sender : Tobject);
|
||||||
@@ -351,7 +353,7 @@ Taiguillage = record
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TFeu = record
|
TFeu = record
|
||||||
adresse, aspect : integer; // adresse du feu, aspect (2 feux..9 feux 12=direction 2 feux .. 16=direction 6 feux)
|
adresse, aspect : integer; // adresse du signal, aspect (2 feux..9 feux 12=direction 2 feux .. 16=direction 6 feux)
|
||||||
Img : TImage; // Pointeur sur structure TImage du feu
|
Img : TImage; // Pointeur sur structure TImage du feu
|
||||||
Lbl : TLabel; // pointeur sur structure Tlabel du feu
|
Lbl : TLabel; // pointeur sur structure Tlabel du feu
|
||||||
checkFB : TCheckBox; // pointeur sur structure Checkbox "demande feu blanc"
|
checkFB : TCheckBox; // pointeur sur structure Checkbox "demande feu blanc"
|
||||||
@@ -409,13 +411,13 @@ var
|
|||||||
|
|
||||||
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
|
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
|
||||||
Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO,
|
Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO,
|
||||||
Srvc_PosTrain,Srvc_Sig,debugtrames,LayParParam,AvecFVR,InverseMotif,
|
Srvc_Pos,Srvc_Sig,debugtrames,LayParParam,AvecFVR,InverseMotif,
|
||||||
Hors_tension,traceSign,TraceZone,Ferme,parSocketLenz,ackCdm,PremierFD,doubleclic,
|
Hors_tension,traceSign,TraceZone,Ferme,parSocketLenz,ackCdm,PremierFD,doubleclic,
|
||||||
NackCDM,MsgSim,StopSimu,succes,recu_cv,AffAigDet,AffTiers,AvecDemandeAiguillages,
|
NackCDM,MsgSim,StopSimu,succes,recu_cv,AffAigDet,AffTiers,AvecDemandeAiguillages,
|
||||||
TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM,AvecInitAiguillages,
|
TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM,AvecInitAiguillages,
|
||||||
AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro,
|
AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro,
|
||||||
retEtatDet,roulage,init_aig_cours,affevt,placeAffiche,clicComboTrain,clicAdrTrain,
|
retEtatDet,roulage,init_aig_cours,affevt,placeAffiche,clicComboTrain,clicAdrTrain,
|
||||||
avec_splitter : boolean;
|
avec_splitter,fichier_module_cdm,Diffusion : boolean;
|
||||||
|
|
||||||
tick,Premier_tick : longint;
|
tick,Premier_tick : longint;
|
||||||
|
|
||||||
@@ -478,8 +480,8 @@ var
|
|||||||
record
|
record
|
||||||
etat : boolean; // mémoires de zones des détecteurs
|
etat : boolean; // mémoires de zones des détecteurs
|
||||||
train : string;
|
train : string;
|
||||||
NumTrain // index du tableau de tous les trains
|
NumTrain, // index du tableau de tous les trains
|
||||||
,AdrTrain : integer;
|
AdrTrain : integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Tablo_actionneur : array[0..Max_actionneurs] of
|
Tablo_actionneur : array[0..Max_actionneurs] of
|
||||||
@@ -504,9 +506,9 @@ var
|
|||||||
commandeOuvre : integer; // commande d'ouverture (1 ou 2)
|
commandeOuvre : integer; // commande d'ouverture (1 ou 2)
|
||||||
NbVoies : integer; // Nombre de voies du PN
|
NbVoies : integer; // Nombre de voies du PN
|
||||||
Pulse : integer; // 0=commande maintenue 1=Impulsionnel
|
Pulse : integer; // 0=commande maintenue 1=Impulsionnel
|
||||||
compteur : integer; // comptage actionneurs fermeture et décomptage actionneurs ouverturef
|
compteur : integer; // comptage actionneurs fermeture et décomptage actionneurs ouverture
|
||||||
Voie : array [1..5] of record
|
Voie : array [1..5] of record
|
||||||
ActFerme,ActOuvre : integer ; // actionneurs provoquant la fermeture et l'ouverture
|
ActFerme,ActOuvre : integer ; // actionneurs provoquant la fermeture et l'ouverture
|
||||||
detZ1F,detZ2F,detZ1O,detZ2O : integer; // Zones de détection
|
detZ1F,detZ2F,detZ1O,detZ2O : integer; // Zones de détection
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -540,6 +542,9 @@ var
|
|||||||
TempoArret : integer; // tempo d'arret pour le timer
|
TempoArret : integer; // tempo d'arret pour le timer
|
||||||
TempoDemarre : integer;
|
TempoDemarre : integer;
|
||||||
index_event_det_train : integer; // index du train en cours de roulage du tableau event_det_train
|
index_event_det_train : integer; // index du train en cours de roulage du tableau event_det_train
|
||||||
|
SbitMap : TBitmap ; // pointeur sur tampon sous l'icone de déplacement du train en page CDM
|
||||||
|
ax,ay,x,y : integer; // coordonnées du train (anciennes et nouvelles) en points windows
|
||||||
|
x0,y0,x1,y1 : integer; // ancien contour du tampon
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// éléments scannés et/ou verrouillés
|
// éléments scannés et/ou verrouillés
|
||||||
@@ -548,12 +553,14 @@ var
|
|||||||
typ : Tequipement;
|
typ : Tequipement;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// liste des trains placés
|
||||||
Placement : array[1..10] of record
|
Placement : array[1..10] of record
|
||||||
train : string;
|
train : string;
|
||||||
detecteur,detdir : integer;
|
detecteur,detdir : integer;
|
||||||
inverse : boolean;
|
inverse : boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// liste des évènements détecteurs
|
||||||
event_det : array[1..Max_event_det] of record
|
event_det : array[1..Max_event_det] of record
|
||||||
adresse : integer;
|
adresse : integer;
|
||||||
etat : boolean;
|
etat : boolean;
|
||||||
@@ -561,7 +568,7 @@ var
|
|||||||
|
|
||||||
event_det_train : array[0..Max_Trains] of record
|
event_det_train : array[0..Max_Trains] of record
|
||||||
NbEl,AdrTrain : integer;
|
NbEl,AdrTrain : integer;
|
||||||
signal_rouge : integer ; // si le train est arreté sur un signal au rouge
|
signal_rouge : integer ; // adresse du signal si le train est arreté sur un signal au rouge
|
||||||
nom_train : string; // nom du train
|
nom_train : string; // nom du train
|
||||||
suivant : integer; // suivant prévisionnel à det1 et det2
|
suivant : integer; // suivant prévisionnel à det1 et det2
|
||||||
Det : array[1..2] of record
|
Det : array[1..2] of record
|
||||||
@@ -571,7 +578,6 @@ var
|
|||||||
end;
|
end;
|
||||||
Feu_supprime,Feu_sauve : Tfeu;
|
Feu_supprime,Feu_sauve : Tfeu;
|
||||||
Aig_supprime,Aig_sauve : TAiguillage;
|
Aig_supprime,Aig_sauve : TAiguillage;
|
||||||
Fimage : Timage;
|
|
||||||
BrancheN : array[1..MaxBranches,1..MaxElBranches] of TBranche;
|
BrancheN : array[1..MaxBranches,1..MaxElBranches] of TBranche;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
@@ -627,6 +633,8 @@ function signal_detecteur(detecteur : integer) : integer;
|
|||||||
function det_suiv_cont(det1,det2,alg : integer) : integer;
|
function det_suiv_cont(det1,det2,alg : integer) : integer;
|
||||||
function BTypeToChaine(BT : TEquipement) : string;
|
function BTypeToChaine(BT : TEquipement) : string;
|
||||||
function testBit(n : word;position : integer) : boolean;
|
function testBit(n : word;position : integer) : boolean;
|
||||||
|
procedure det_contigu(det1,det2 : integer;var suivant : integer;var ElSuiv : TEquipement);
|
||||||
|
Function SetBit(n : word;position : integer) : word;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@@ -4096,7 +4104,7 @@ begin
|
|||||||
Adr:=aiguillage[index].Adroit;
|
Adr:=aiguillage[index].Adroit;
|
||||||
if adr<>0 then
|
if adr<>0 then
|
||||||
begin
|
begin
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
||||||
trouve_element(adr,typeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(adr,typeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||||
end
|
end
|
||||||
@@ -4127,7 +4135,7 @@ begin
|
|||||||
Adr:=aiguillage[index].Adevie;
|
Adr:=aiguillage[index].Adevie;
|
||||||
if adr<>0 then
|
if adr<>0 then
|
||||||
begin
|
begin
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
||||||
trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||||
end
|
end
|
||||||
@@ -4198,7 +4206,7 @@ begin
|
|||||||
if adr<>0 then
|
if adr<>0 then
|
||||||
begin
|
begin
|
||||||
// Affiche('trouvé '+intToSTR(adr),clyellow);
|
// Affiche('trouvé '+intToSTR(adr),clyellow);
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
||||||
trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||||
end
|
end
|
||||||
@@ -4304,7 +4312,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||||
exit;
|
exit;
|
||||||
@@ -4322,7 +4330,7 @@ begin
|
|||||||
Adr:=aiguillage[index].Ddevie;
|
Adr:=aiguillage[index].Ddevie;
|
||||||
A:=aiguillage[index].DdevieB;
|
A:=aiguillage[index].DdevieB;
|
||||||
end;
|
end;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||||
exit;
|
exit;
|
||||||
@@ -4354,7 +4362,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||||
exit;
|
exit;
|
||||||
@@ -4372,7 +4380,7 @@ begin
|
|||||||
Adr:=aiguillage[index].Ddroit;
|
Adr:=aiguillage[index].Ddroit;
|
||||||
A:=aiguillage[index].DdroitB;
|
A:=aiguillage[index].DdroitB;
|
||||||
end;
|
end;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||||
exit;
|
exit;
|
||||||
@@ -4432,7 +4440,7 @@ begin
|
|||||||
A:=aiguillage[index2].AdevieB;
|
A:=aiguillage[index2].AdevieB;
|
||||||
end;
|
end;
|
||||||
if NivDebug=3 then AfficheDebug('cas1.1 tjd/s: '+s+' Adr='+intToSTR(adr)+A,clYellow);
|
if NivDebug=3 then AfficheDebug('cas1.1 tjd/s: '+s+' Adr='+intToSTR(adr)+A,clYellow);
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig; //TypeEL=(1=détécteur 2=aig
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig; //TypeEL=(1=détécteur 2=aig
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
Actuel:=aiguillage[index2].Adresse; // substitution de la TJS
|
Actuel:=aiguillage[index2].Adresse; // substitution de la TJS
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd/s est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd/s est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4499,7 +4507,7 @@ begin
|
|||||||
Adr:=aiguillage[index2].Adroit;
|
Adr:=aiguillage[index2].Adroit;
|
||||||
A:=aiguillage[index2].AdroitB;
|
A:=aiguillage[index2].AdroitB;
|
||||||
end;
|
end;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
Actuel:=aiguillage[index2].Adresse;
|
Actuel:=aiguillage[index2].Adresse;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 4 états est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd 4 états est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4567,7 +4575,7 @@ begin
|
|||||||
Adr:=aiguillage[index2].Adroit;
|
Adr:=aiguillage[index2].Adroit;
|
||||||
A:=aiguillage[index2].AdroitB;
|
A:=aiguillage[index2].AdroitB;
|
||||||
end;
|
end;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
Actuel:=aiguillage[index2].Adresse;
|
Actuel:=aiguillage[index2].Adresse;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4622,7 +4630,7 @@ begin
|
|||||||
A:=aiguillage[index2].AdevieB;
|
A:=aiguillage[index2].AdevieB;
|
||||||
end;
|
end;
|
||||||
if NivDebug=3 then AfficheDebug('cas4.1 tjd: '+s+' Adr='+intToSTR(adr)+A,clYellow);
|
if NivDebug=3 then AfficheDebug('cas4.1 tjd: '+s+' Adr='+intToSTR(adr)+A,clYellow);
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
Actuel:=aiguillage[index2].Adresse;
|
Actuel:=aiguillage[index2].Adresse;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4636,7 +4644,7 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('cas tjs en courbe1',clYellow);
|
if NivDebug=3 then AfficheDebug('cas tjs en courbe1',clYellow);
|
||||||
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
||||||
Adr:=aiguillage[index_aig(AdrTjdP)].Adevie;
|
Adr:=aiguillage[index_aig(AdrTjdP)].Adevie;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
Actuel:=aiguillage[index2].Adresse;
|
Actuel:=aiguillage[index2].Adresse;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4650,7 +4658,7 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('cas1 tjs en courbe 2',clYellow);
|
if NivDebug=3 then AfficheDebug('cas1 tjs en courbe 2',clYellow);
|
||||||
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
||||||
Adr:=aiguillage[index_aig(AdrTjdP)].Adevie;
|
Adr:=aiguillage[index_aig(AdrTjdP)].Adevie;
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
Actuel:=aiguillage[index2].Adresse;
|
Actuel:=aiguillage[index2].Adresse;
|
||||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
if nivDebug=3 then Affichedebug('le port de destination de la tjd est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4681,7 +4689,7 @@ begin
|
|||||||
if aiguillage[index].Ddevie=prec then begin adr:=aiguillage[index].Adevie;A:=aiguillage[index].AdevieB;end;
|
if aiguillage[index].Ddevie=prec then begin adr:=aiguillage[index].Adevie;A:=aiguillage[index].AdevieB;end;
|
||||||
if aiguillage[index].Ddroit=prec then begin adr:=aiguillage[index].Adroit;A:=aiguillage[index].AdroitB;end;
|
if aiguillage[index].Ddroit=prec then begin adr:=aiguillage[index].Adroit;A:=aiguillage[index].AdroitB;end;
|
||||||
|
|
||||||
if A='Z' then typeGen:=det else typeGen:=aig;
|
if (A='Z') or (a=#0) then typeGen:=det else typeGen:=aig;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
if a='' then a:=' ';
|
if a='' then a:=' ';
|
||||||
if (nivdebug>1) then Affichedebug('le port de destination du croisement '+intToSTR(aiguillage[index].adresse)+' est '+IntToSTR(adr)+a,clyellow);
|
if (nivdebug>1) then Affichedebug('le port de destination du croisement '+intToSTR(aiguillage[index].adresse)+' est '+IntToSTR(adr)+a,clyellow);
|
||||||
@@ -4709,7 +4717,7 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('Aiguillage triple pris en pointe droit',clYellow);
|
if NivDebug=3 then AfficheDebug('Aiguillage triple pris en pointe droit',clYellow);
|
||||||
A:=aiguillage[index].AdroitB;
|
A:=aiguillage[index].AdroitB;
|
||||||
Adr:=aiguillage[index].Adroit;
|
Adr:=aiguillage[index].Adroit;
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig
|
||||||
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
@@ -4719,7 +4727,7 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié1 (à gauche)',clYellow);
|
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié1 (à gauche)',clYellow);
|
||||||
A:=aiguillage[index].AdevieB;
|
A:=aiguillage[index].AdevieB;
|
||||||
Adr:=aiguillage[index].Adevie;
|
Adr:=aiguillage[index].Adevie;
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig;
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig;
|
||||||
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
@@ -4729,7 +4737,7 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié2 (à droite)',clYellow);
|
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié2 (à droite)',clYellow);
|
||||||
A:=aiguillage[index].Adevie2B;
|
A:=aiguillage[index].Adevie2B;
|
||||||
Adr:=aiguillage[index].Adevie2;
|
Adr:=aiguillage[index].Adevie2;
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig;
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig;
|
||||||
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
@@ -4790,7 +4798,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
A:=aiguillage[index].ApointeB;
|
A:=aiguillage[index].ApointeB;
|
||||||
Adr:=aiguillage[index].Apointe;
|
Adr:=aiguillage[index].Apointe;
|
||||||
if A='Z' then TypeEl:=det else TypeEL:=aig;
|
if (A='Z') or (a=#0) then TypeEl:=det else TypeEL:=aig;
|
||||||
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
trouve_element(Adr,TypeEl,1); // branche_trouve IndexBranche_trouve
|
||||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||||
suivant_alg3:=Adr;
|
suivant_alg3:=Adr;
|
||||||
@@ -4914,6 +4922,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
// renvoie l'élément avant det2 si det1 et det2 sont contigus ou ne sont séparés que par des aiguillages
|
// renvoie l'élément avant det2 si det1 et det2 sont contigus ou ne sont séparés que par des aiguillages
|
||||||
|
// les aiguillages n'ont pas besoin d'être positionnés
|
||||||
// si det1 et det2 sont contigus sans aiguillages entre eux, çà renvoie det1 sinon renvoie l'aiguillage entre les 2
|
// si det1 et det2 sont contigus sans aiguillages entre eux, çà renvoie det1 sinon renvoie l'aiguillage entre les 2
|
||||||
// s'ils ne sont pas contigus, renvoie 0
|
// s'ils ne sont pas contigus, renvoie 0
|
||||||
// Si un élément est inconnu, renvoie 9999
|
// Si un élément est inconnu, renvoie 9999
|
||||||
@@ -5237,6 +5246,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// renvoie les adresses des détecteurs adjacents au détecteur "adresse" (avant, après)
|
// renvoie les adresses des détecteurs adjacents au détecteur "adresse" (avant, après)
|
||||||
|
// les aiguillages entre det1 et det2 doivent être positionnés
|
||||||
// résultat dans adj1 et adj2 en variable globale
|
// résultat dans adj1 et adj2 en variable globale
|
||||||
procedure Det_Adj(adresse : integer);
|
procedure Det_Adj(adresse : integer);
|
||||||
var Adr,AdrFonc,Branche,AdrPrec,IndexBranche,i,Dir : integer;
|
var Adr,AdrFonc,Branche,AdrPrec,IndexBranche,i,Dir : integer;
|
||||||
@@ -7383,13 +7393,16 @@ begin
|
|||||||
if i<MaxTrainZone then
|
if i<MaxTrainZone then
|
||||||
begin
|
begin
|
||||||
n:=TrainZone[i].Nbre+1;
|
n:=TrainZone[i].Nbre+1;
|
||||||
if n>MaxZones then n:=1;
|
if n>0 then
|
||||||
with TrainZone[i] do
|
|
||||||
begin
|
begin
|
||||||
Nbre:=n;
|
if n>MaxZones then n:=1;
|
||||||
Zone[n].det1:=det3;
|
with TrainZone[i] do
|
||||||
Zone[n].det2:=AdrSuiv;
|
begin
|
||||||
Nbre:=n;
|
Nbre:=n;
|
||||||
|
Zone[n].det1:=det3;
|
||||||
|
Zone[n].det2:=AdrSuiv;
|
||||||
|
Nbre:=n;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
// zone suivante en prévision
|
// zone suivante en prévision
|
||||||
det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1);
|
det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1);
|
||||||
@@ -7665,7 +7678,7 @@ 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);
|
||||||
// vérifier si l'élément du tableau et le nouveau sont contigus
|
// 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
|
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);
|
suivok:=((Adj1=det3) and (adj1<9999)) or ((Adj2=det3) and (adj2<9990));
|
||||||
if suivok then
|
if suivok then
|
||||||
begin
|
begin
|
||||||
Train_ch:=event_det_train[i].nom_train;
|
Train_ch:=event_det_train[i].nom_train;
|
||||||
@@ -7742,7 +7755,7 @@ begin
|
|||||||
// test si det1, det2 et det3 sont contigus malgré aig mal positionnés
|
// test si det1, det2 et det3 sont contigus malgré aig mal positionnés
|
||||||
det_suiv:=det_suiv_cont(det1,det2,1); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3)
|
det_suiv:=det_suiv_cont(det1,det2,1); // 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);
|
if traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),couleur);
|
||||||
SuivOk:=det_suiv=det3;
|
SuivOk:=(det_suiv=det3) and (det_suiv<9990);
|
||||||
CasAig:=false;
|
CasAig:=false;
|
||||||
|
|
||||||
if not(SuivOk) then
|
if not(SuivOk) then
|
||||||
@@ -7768,7 +7781,7 @@ begin
|
|||||||
// ici on cherche le suivant à det2 det3, algo=1
|
// ici on cherche le suivant à det2 det3, algo=1
|
||||||
event_det_tick[N_event_tick].train:=i;
|
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
|
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 AdrSuiv<9990 then event_det_train[i].suivant:=AdrSuiv;
|
||||||
if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),couleur);
|
if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),couleur);
|
||||||
if (Adrsuiv>=9990) and not(casaig) then
|
if (Adrsuiv>=9990) and not(casaig) then
|
||||||
begin
|
begin
|
||||||
@@ -7943,7 +7956,7 @@ begin
|
|||||||
// front descendant sur détecteur 2
|
// front descendant sur détecteur 2
|
||||||
det_suiv:=det_suiv_cont(det1,det2,1); // test si le suivant de det1 à det2 est bien le nouveau détecteur (det3)
|
det_suiv:=det_suiv_cont(det1,det2,1); // 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 traceliste then affichedebug('Le suivant aux '+intToSTR(det1)+' '+intToSTR(det2)+' est '+intToSTR(det_suiv),clWhite);
|
||||||
if (det_suiv=det3) then
|
if (det_suiv=det3) and (det_suiv<9990) then
|
||||||
begin
|
begin
|
||||||
event_det_tick[N_event_tick].train:=i;
|
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 TraceListe then AfficheDebug('La route est valide car les détecteurs '+intToSTR(det2)+' '+intToSTR(det3)+' sont contigus',couleur);
|
||||||
@@ -7987,17 +8000,20 @@ begin
|
|||||||
if i<MaxTrainZone then
|
if i<MaxTrainZone then
|
||||||
begin
|
begin
|
||||||
n:=TrainZone[i].Nbre;
|
n:=TrainZone[i].Nbre;
|
||||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
if n>0 then
|
||||||
begin
|
begin
|
||||||
n:=TrainZone[i].Nbre+1;
|
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||||
if n>MaxZones then n:=1;
|
begin
|
||||||
TrainZone[i].Nbre:=n;
|
n:=TrainZone[i].Nbre+1;
|
||||||
TrainZone[i].Zone[n].det1:=det2;
|
if n>MaxZones then n:=1;
|
||||||
TrainZone[i].Zone[n].det2:=det3;
|
TrainZone[i].Nbre:=n;
|
||||||
TrainZone[i].Nbre:=n;
|
TrainZone[i].Zone[n].det1:=det2;
|
||||||
// zone suivante en prévision
|
TrainZone[i].Zone[n].det2:=det3;
|
||||||
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
TrainZone[i].Nbre:=n;
|
||||||
TrainPrevZone[i][1]:=det4;
|
// zone suivante en prévision
|
||||||
|
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
||||||
|
TrainPrevZone[i][1]:=det4;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// affichages
|
// affichages
|
||||||
@@ -8045,6 +8061,7 @@ begin
|
|||||||
for i:=1 to N_trains do
|
for i:=1 to N_trains do
|
||||||
begin
|
begin
|
||||||
i2:=event_det_train[i].Suivant;
|
i2:=event_det_train[i].Suivant;
|
||||||
|
if i2>NbMemZone then begin AfficheDebug('Erreur 715 : détecteur '+intToSTR(i2)+' trop grand',clred);exit;end;
|
||||||
SuivOk:=event_det_train[i].Det[2].etat ;
|
SuivOk:=event_det_train[i].Det[2].etat ;
|
||||||
det_adj(det3);
|
det_adj(det3);
|
||||||
if (adj1=i2) or (adj2=i2) then
|
if (adj1=i2) or (adj2=i2) then
|
||||||
@@ -8664,14 +8681,17 @@ begin
|
|||||||
if i<MaxTrainZone then
|
if i<MaxTrainZone then
|
||||||
begin
|
begin
|
||||||
n:=TrainZone[i].Nbre;
|
n:=TrainZone[i].Nbre;
|
||||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
if n>0 then
|
||||||
begin
|
begin
|
||||||
n:=TrainZone[i].Nbre+1;
|
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||||
if n>MaxZones then n:=1;
|
begin
|
||||||
TrainZone[i].Nbre:=n;
|
n:=TrainZone[i].Nbre+1;
|
||||||
TrainZone[i].Zone[n].det1:=det2;
|
if n>MaxZones then n:=1;
|
||||||
TrainZone[i].Zone[n].det2:=det3;
|
TrainZone[i].Nbre:=n;
|
||||||
TrainZone[i].Nbre:=n;
|
TrainZone[i].Zone[n].det1:=det2;
|
||||||
|
TrainZone[i].Zone[n].det2:=det3;
|
||||||
|
TrainZone[i].Nbre:=n;
|
||||||
|
end;
|
||||||
// zone suivante en prévision
|
// zone suivante en prévision
|
||||||
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
||||||
TrainPrevZone[i][1]:=det4;
|
TrainPrevZone[i][1]:=det4;
|
||||||
@@ -9994,7 +10014,7 @@ begin
|
|||||||
result:='';
|
result:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// décodage d'une chaine simple de la rétrosignalisation de la centrale
|
// décodage d'une chaine simple Xpressnet de la rétrosignalisation de la centrale
|
||||||
// en sortie, la chaine chaineINT est supprimée de la partie traitée
|
// en sortie, la chaine chaineINT est supprimée de la partie traitée
|
||||||
function decode_chaine_retro_Xpress(chaineINT : string) : string ;
|
function decode_chaine_retro_Xpress(chaineINT : string) : string ;
|
||||||
var msg : string;
|
var msg : string;
|
||||||
@@ -10369,24 +10389,24 @@ begin
|
|||||||
InputMode:=comInputModeBinary;
|
InputMode:=comInputModeBinary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
portCommOuvert:=true;
|
portCommOuvert:=true;
|
||||||
try
|
try
|
||||||
Formprinc.MSCommUSBLenz.portopen:=true;
|
Formprinc.MSCommUSBLenz.portopen:=true;
|
||||||
except
|
except
|
||||||
portCommOuvert:=false;
|
portCommOuvert:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if portCommOuvert then
|
if portCommOuvert then
|
||||||
|
begin
|
||||||
|
Affiche('Port COM'+intToSTR(port)+' ouvert',clLime);
|
||||||
|
sleep(1000);
|
||||||
|
trouve:=test_protocole;
|
||||||
|
if not(trouve) then
|
||||||
begin
|
begin
|
||||||
Affiche('Port COM'+intToSTR(port)+' ouvert',clLime);
|
portCommOuvert:=false;
|
||||||
sleep(1000);
|
Formprinc.MSCommUSBLenz.portopen:=false;
|
||||||
trouve:=test_protocole;
|
|
||||||
if not(trouve) then
|
|
||||||
begin
|
|
||||||
portCommOuvert:=false;
|
|
||||||
Formprinc.MSCommUSBLenz.portopen:=false;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
if trouve then result:=port else result:=0;
|
if trouve then result:=port else result:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -10422,7 +10442,7 @@ end;
|
|||||||
procedure connecte_interface_ethernet;
|
procedure connecte_interface_ethernet;
|
||||||
begin
|
begin
|
||||||
etat_init_interface:=0;
|
etat_init_interface:=0;
|
||||||
// sinon ouvrir socket vers la centrale
|
// ouvrir socket vers la centrale
|
||||||
// Initialisation de la comm socket LENZ
|
// Initialisation de la comm socket LENZ
|
||||||
if AdresseIP<>'0' then
|
if AdresseIP<>'0' then
|
||||||
begin
|
begin
|
||||||
@@ -10439,6 +10459,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// connecte la centrale en USB/COM en explorant les ports USB/COM de 1 à MaxComPort
|
||||||
procedure connecte_usb;
|
procedure connecte_usb;
|
||||||
var numport,erreur : integer;
|
var numport,erreur : integer;
|
||||||
s : string;
|
s : string;
|
||||||
@@ -10496,6 +10517,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// renvoie le handle de la frnêtre du programme de processID (CDMrail)
|
||||||
Function GetWindowFromID(ProcessID : Cardinal): THandle;
|
Function GetWindowFromID(ProcessID : Cardinal): THandle;
|
||||||
Var TestID : Cardinal;
|
Var TestID : Cardinal;
|
||||||
TestHandle : Thandle;
|
TestHandle : Thandle;
|
||||||
@@ -10661,7 +10683,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ShowMessage('CDM rail introuvable : '+#13#10+'Erreur='+intToSTR(retour));
|
Affiche('CDM rail introuvable. Erreur='+intToSTR(retour),clred);
|
||||||
lance_CDM:=false;
|
lance_CDM:=false;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@@ -10674,7 +10696,7 @@ begin
|
|||||||
Affiche('Lance les fonctions automatiques de CDM',clyellow);
|
Affiche('Lance les fonctions automatiques de CDM',clyellow);
|
||||||
Sleep(3000);
|
Sleep(3000);
|
||||||
ProcessRunning(s); // récupérer le handle de CDM
|
ProcessRunning(s); // récupérer le handle de CDM
|
||||||
SetForegroundWindow(CDMhd);
|
SetForegroundWindow(CDMhd); // met CDM en premier plan pour le télécommander par le clavier simulé
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
|
|
||||||
// démarre le serveur IP : il faut avoir chargé un réseau sinon le permier menu est fermé------------------------------------
|
// démarre le serveur IP : il faut avoir chargé un réseau sinon le permier menu est fermé------------------------------------
|
||||||
@@ -10765,7 +10787,7 @@ end;
|
|||||||
procedure Raz_reservations ;
|
procedure Raz_reservations ;
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
// raz des réservations
|
// raz des réservations
|
||||||
for i:=1 to MaxAiguillage do
|
for i:=1 to MaxAiguillage do
|
||||||
aiguillage[i].AdrTrain:=0;
|
aiguillage[i].AdrTrain:=0;
|
||||||
end;
|
end;
|
||||||
@@ -10916,24 +10938,21 @@ function GetMACAdress: string;
|
|||||||
var
|
var
|
||||||
NCB: PNCB;
|
NCB: PNCB;
|
||||||
Adapter: PAdapterStatus;
|
Adapter: PAdapterStatus;
|
||||||
|
RetCode: Ansichar;
|
||||||
URetCode: PChar;
|
|
||||||
RetCode: char;
|
|
||||||
I: integer;
|
I: integer;
|
||||||
Lenum: PlanaEnum;
|
Lenum: PlanaEnum;
|
||||||
_SystemID: string;
|
_SystemID: string;
|
||||||
TMPSTR: string;
|
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result:='';
|
||||||
_SystemID := '';
|
_SystemID:='';
|
||||||
Getmem(NCB, SizeOf(TNCB));
|
Getmem(NCB,SizeOf(TNCB));
|
||||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
Fillchar(NCB^,SizeOf(TNCB),0);
|
||||||
|
|
||||||
Getmem(Lenum, SizeOf(TLanaEnum));
|
Getmem(Lenum,SizeOf(TLanaEnum));
|
||||||
Fillchar(Lenum^, SizeOf(TLanaEnum), 0);
|
Fillchar(Lenum^,SizeOf(TLanaEnum),0);
|
||||||
|
|
||||||
Getmem(Adapter, SizeOf(TAdapterStatus));
|
Getmem(Adapter,SizeOf(TAdapterStatus));
|
||||||
Fillchar(Adapter^, SizeOf(TAdapterStatus), 0);
|
Fillchar(Adapter^,SizeOf(TAdapterStatus),0);
|
||||||
|
|
||||||
Lenum.Length := chr(0);
|
Lenum.Length := chr(0);
|
||||||
NCB.ncb_command := chr(NCBENUM);
|
NCB.ncb_command := chr(NCBENUM);
|
||||||
@@ -10941,76 +10960,76 @@ begin
|
|||||||
NCB.ncb_length := SizeOf(Lenum);
|
NCB.ncb_length := SizeOf(Lenum);
|
||||||
RetCode := Netbios(NCB);
|
RetCode := Netbios(NCB);
|
||||||
|
|
||||||
i := 0;
|
i:=0;
|
||||||
repeat
|
repeat
|
||||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
Fillchar(NCB^,SizeOf(TNCB), 0);
|
||||||
Ncb.ncb_command := chr(NCBRESET);
|
Ncb.ncb_command:=chr(NCBRESET);
|
||||||
Ncb.ncb_lana_num := lenum.lana[I];
|
Ncb.ncb_lana_num:=lenum.lana[I];
|
||||||
RetCode := Netbios(Ncb);
|
RetCode:=Netbios(Ncb);
|
||||||
|
|
||||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
Fillchar(NCB^,SizeOf(TNCB), 0);
|
||||||
Ncb.ncb_command := chr(NCBASTAT);
|
Ncb.ncb_command:=chr(NCBASTAT);
|
||||||
Ncb.ncb_lana_num := lenum.lana[I];
|
Ncb.ncb_lana_num:=lenum.lana[I];
|
||||||
// Must be 16
|
// Must be 16
|
||||||
Ncb.ncb_callname := '* ';
|
Ncb.ncb_callname:='* ';
|
||||||
|
|
||||||
Ncb.ncb_buffer := Pointer(Adapter);
|
Ncb.ncb_buffer:=Pointer(Adapter);
|
||||||
|
|
||||||
Ncb.ncb_length := SizeOf(TAdapterStatus);
|
Ncb.ncb_length:=SizeOf(TAdapterStatus);
|
||||||
RetCode := Netbios(Ncb);
|
RetCode:=Netbios(Ncb);
|
||||||
//---- calc _systemId from mac-address[2-5] XOR mac-address[1]...
|
//---- calc _systemId de la mac-address[2-5] XOR mac-address[1]...
|
||||||
if (RetCode = chr(0)) or (RetCode = chr(6)) then
|
if (RetCode=chr(0)) or (RetCode=chr(6)) then
|
||||||
begin
|
begin
|
||||||
_SystemId := IntToHex(Ord(Adapter.adapter_address[0]), 2) + '-' +
|
_SystemId := IntToHex(Ord(Adapter.adapter_address[0]), 2) + '-' +
|
||||||
IntToHex(Ord(Adapter.adapter_address[1]), 2) + '-' +
|
IntToHex(Ord(Adapter.adapter_address[1]),2) + '-' +
|
||||||
IntToHex(Ord(Adapter.adapter_address[2]), 2) + '-' +
|
IntToHex(Ord(Adapter.adapter_address[2]),2) + '-' +
|
||||||
IntToHex(Ord(Adapter.adapter_address[3]), 2) + '-' +
|
IntToHex(Ord(Adapter.adapter_address[3]),2) + '-' +
|
||||||
IntToHex(Ord(Adapter.adapter_address[4]), 2) + '-' +
|
IntToHex(Ord(Adapter.adapter_address[4]),2) + '-' +
|
||||||
IntToHex(Ord(Adapter.adapter_address[5]), 2);
|
IntToHex(Ord(Adapter.adapter_address[5]),2);
|
||||||
end;
|
end;
|
||||||
Inc(i);
|
Inc(i);
|
||||||
until (I >= Ord(Lenum.Length)) or (_SystemID <> '00-00-00-00-00-00');
|
until (i>=Ord(Lenum.Length)) or (_SystemID<>'00-00-00-00-00-00');
|
||||||
FreeMem(NCB);
|
FreeMem(NCB);
|
||||||
FreeMem(Adapter);
|
FreeMem(Adapter);
|
||||||
FreeMem(Lenum);
|
FreeMem(Lenum);
|
||||||
GetMacAdress := _SystemID;
|
GetMacAdress:=_SystemID;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// ex2
|
// ex2
|
||||||
function GetAdapterInfo(Lana: Char): String;
|
function GetAdapterInfo(Lana: AnsiChar): String;
|
||||||
var
|
var
|
||||||
Adapter: TAdapterStatus;
|
Adapter: TAdapterStatus;
|
||||||
NCB: TNCB;
|
NCB: TNCB;
|
||||||
begin
|
begin
|
||||||
FillChar(NCB, SizeOf(NCB), 0);
|
FillChar(NCB,SizeOf(NCB),0);
|
||||||
NCB.ncb_command := Char(NCBRESET);
|
NCB.ncb_command:=Char(NCBRESET);
|
||||||
NCB.ncb_lana_num := Lana;
|
NCB.ncb_lana_num:=Lana;
|
||||||
if Netbios(@NCB) <> Char(NRC_GOODRET) then
|
if Netbios(@NCB)<>Char(NRC_GOODRET) then
|
||||||
begin
|
begin
|
||||||
Result := 'mac not found';
|
Result:='mac non trouvée';
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FillChar(NCB, SizeOf(NCB), 0);
|
FillChar(NCB,SizeOf(NCB), 0);
|
||||||
NCB.ncb_command := Char(NCBASTAT);
|
NCB.ncb_command:=Char(NCBASTAT);
|
||||||
NCB.ncb_lana_num := Lana;
|
NCB.ncb_lana_num:=Lana;
|
||||||
NCB.ncb_callname := '*';
|
NCB.ncb_callname:='*';
|
||||||
|
|
||||||
FillChar(Adapter, SizeOf(Adapter), 0);
|
FillChar(Adapter,SizeOf(Adapter), 0);
|
||||||
NCB.ncb_buffer := @Adapter;
|
NCB.ncb_buffer:=@Adapter;
|
||||||
NCB.ncb_length := SizeOf(Adapter);
|
NCB.ncb_length:=SizeOf(Adapter);
|
||||||
if Netbios(@NCB) <> Char(NRC_GOODRET) then
|
if Netbios(@NCB)<>Char(NRC_GOODRET) then
|
||||||
begin
|
begin
|
||||||
Result := 'mac not found';
|
Result:='mac non trouvée';
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
Result :=
|
Result:=
|
||||||
IntToHex(Byte(Adapter.adapter_address[0]), 2) + '-' +
|
IntToHex(Byte(Adapter.adapter_address[0]),2) + '-' +
|
||||||
IntToHex(Byte(Adapter.adapter_address[1]), 2) + '-' +
|
IntToHex(Byte(Adapter.adapter_address[1]),2) + '-' +
|
||||||
IntToHex(Byte(Adapter.adapter_address[2]), 2) + '-' +
|
IntToHex(Byte(Adapter.adapter_address[2]),2) + '-' +
|
||||||
IntToHex(Byte(Adapter.adapter_address[3]), 2) + '-' +
|
IntToHex(Byte(Adapter.adapter_address[3]),2) + '-' +
|
||||||
IntToHex(Byte(Adapter.adapter_address[4]), 2) + '-' +
|
IntToHex(Byte(Adapter.adapter_address[4]),2) + '-' +
|
||||||
IntToHex(Byte(Adapter.adapter_address[5]), 2);
|
IntToHex(Byte(Adapter.adapter_address[5]),2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetMACAddress: string;
|
function GetMACAddress: string;
|
||||||
@@ -11018,15 +11037,15 @@ var
|
|||||||
AdapterList: TLanaEnum;
|
AdapterList: TLanaEnum;
|
||||||
NCB: TNCB;
|
NCB: TNCB;
|
||||||
begin
|
begin
|
||||||
FillChar(NCB, SizeOf(NCB), 0);
|
FillChar(NCB,SizeOf(NCB),0);
|
||||||
NCB.ncb_command := Char(NCBENUM);
|
NCB.ncb_command:=Char(NCBENUM);
|
||||||
NCB.ncb_buffer := @AdapterList;
|
NCB.ncb_buffer:=@AdapterList;
|
||||||
NCB.ncb_length := SizeOf(AdapterList);
|
NCB.ncb_length:=SizeOf(AdapterList);
|
||||||
Netbios(@NCB);
|
Netbios(@NCB);
|
||||||
if Byte(AdapterList.length) > 0 then
|
if Byte(AdapterList.length)>0 then
|
||||||
Result := GetAdapterInfo(AdapterList.lana[0])
|
Result:=GetAdapterInfo(AdapterList.lana[0])
|
||||||
else
|
else
|
||||||
Result := 'mac not found';
|
Result:='mac non trouvée';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// démarrage principal du programme signaux_complexes
|
// démarrage principal du programme signaux_complexes
|
||||||
@@ -11049,7 +11068,7 @@ begin
|
|||||||
Srvc_Aig:=true;
|
Srvc_Aig:=true;
|
||||||
Srvc_Det:=true;
|
Srvc_Det:=true;
|
||||||
Srvc_Act:=true;
|
Srvc_Act:=true;
|
||||||
Srvc_PosTrain:=false;
|
Srvc_Pos:=false;
|
||||||
Srvc_sig:=false;
|
Srvc_sig:=false;
|
||||||
|
|
||||||
DebugAffiche:=false;
|
DebugAffiche:=false;
|
||||||
@@ -11066,7 +11085,9 @@ begin
|
|||||||
// box3=vitesses et fonctions F
|
// box3=vitesses et fonctions F
|
||||||
GroupBox3.Left:=633;
|
GroupBox3.Left:=633;
|
||||||
GroupBox3.Top:=60;
|
GroupBox3.Top:=60;
|
||||||
|
GroupBox1.Left:=633;
|
||||||
GroupBox3.visible:=true;
|
GroupBox3.visible:=true;
|
||||||
|
ScrollBox1.Left:=633;
|
||||||
|
|
||||||
procetape(''); //0
|
procetape(''); //0
|
||||||
|
|
||||||
@@ -11092,14 +11113,14 @@ begin
|
|||||||
avecRoulage:=0;
|
avecRoulage:=0;
|
||||||
formatY:=-1;
|
formatY:=-1;
|
||||||
AvecInit:=true; // &&&& avec initialisation des aiguillages ou pas
|
AvecInit:=true; // &&&& avec initialisation des aiguillages ou pas
|
||||||
Diffusion:=AvecInit; // mode diffusion publique
|
Diffusion:=AvecInit; // mode diffusion publique + debug mise au point etc
|
||||||
roulage1.visible:=false;
|
roulage1.visible:=false;
|
||||||
FenRich.MaxLength:=$7FFFFFF0;
|
FenRich.MaxLength:=$7FFFFFF0;
|
||||||
|
|
||||||
OsBits:=0;
|
OsBits:=0;
|
||||||
if IsWow64Process then
|
if IsWow64Process then
|
||||||
begin
|
begin
|
||||||
OsBits:=64;
|
OsBits:=64;
|
||||||
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)');
|
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)');
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -11108,6 +11129,8 @@ begin
|
|||||||
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES');
|
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES');
|
||||||
end;
|
end;
|
||||||
// version d'OS pour info
|
// version d'OS pour info
|
||||||
|
application.ProcessMessages;
|
||||||
|
|
||||||
if OsBits=64 then s:='OS 64 Bits' else s:='OS 32 Bits';
|
if OsBits=64 then s:='OS 64 Bits' else s:='OS 32 Bits';
|
||||||
s:=DateToStr(date)+' '+TimeToStr(Time)+' '+s;
|
s:=DateToStr(date)+' '+TimeToStr(Time)+' '+s;
|
||||||
Affiche(s,clLime);
|
Affiche(s,clLime);
|
||||||
@@ -11226,6 +11249,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Application.HintHidePause:=30000;
|
Application.HintHidePause:=30000;
|
||||||
|
Application.HintColor:=$70FFFF;
|
||||||
|
Application.HintPause:=400;
|
||||||
visible:=true; // rend la form visible plus tot
|
visible:=true; // rend la form visible plus tot
|
||||||
|
|
||||||
for i:=1 to MaxCdeDccpp do CdeDccpp[i]:='';
|
for i:=1 to MaxCdeDccpp do CdeDccpp[i]:='';
|
||||||
@@ -11289,6 +11314,14 @@ begin
|
|||||||
Affiche_memoire;
|
Affiche_memoire;
|
||||||
modeStkRetro:=false;
|
modeStkRetro:=false;
|
||||||
|
|
||||||
|
// création des tampons de sauvegarde graphique pour le mouvement du train sur la fenetre cdm
|
||||||
|
for i:=1 to Max_Trains do
|
||||||
|
begin
|
||||||
|
trains[i].sbitmap:=Tbitmap.Create;
|
||||||
|
trains[i].SbitMap.width:=300;
|
||||||
|
trains[i].SbitMap.height:=300;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// lancer CDM rail et le connecte si on le demande ; à faire après la création des feux et du tco
|
// lancer CDM rail et le connecte si on le demande ; à faire après la création des feux et du tco
|
||||||
procetape('Test CDM et son lancement');
|
procetape('Test CDM et son lancement');
|
||||||
@@ -11382,6 +11415,16 @@ begin
|
|||||||
procetape('Terminé !!');
|
procetape('Terminé !!');
|
||||||
Maj_feux(false);
|
Maj_feux(false);
|
||||||
|
|
||||||
|
// vérifier si le fichier de segments existe
|
||||||
|
fichier_module_CDM:=fileExists(NomModuleCDM);
|
||||||
|
formprinc.ButtonAffAnalyseCDM.Visible:=fichier_module_cdm;
|
||||||
|
if fichier_module_CDM then
|
||||||
|
begin
|
||||||
|
Affiche_fenetre_CDM.Enabled:=true;
|
||||||
|
lit_fichier_segments_cdm;
|
||||||
|
end
|
||||||
|
else Affiche_fenetre_CDM.Enabled:=false;
|
||||||
|
|
||||||
{ With FenRich do
|
{ With FenRich do
|
||||||
begin
|
begin
|
||||||
ReadOnly:=false;
|
ReadOnly:=false;
|
||||||
@@ -12484,8 +12527,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
train:=copy(commandeCDM,i+6,l-i-6);
|
train:=copy(commandeCDM,i+6,l-i-6);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
i:=posEx('STATE=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
i:=posEx('STATE=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||||
if (i<>0) and (l<>0) then
|
if (i<>0) and (l<>0) then
|
||||||
begin
|
begin
|
||||||
@@ -12493,14 +12536,14 @@ begin
|
|||||||
val(ss,etat,erreur);
|
val(ss,etat,erreur);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
i:=posEx('NAME=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
i:=posEx('NAME=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||||
if (i<>0) and (l<>0) then
|
if (i<>0) and (l<>0) then
|
||||||
begin
|
begin
|
||||||
nom:=copy(commandeCDM,i+6,l-i-6);
|
nom:=copy(commandeCDM,i+6,l-i-6);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
i:=posEx('OBJ=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
i:=posEx('OBJ=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||||
if (i<>0) and (l<>0) then
|
if (i<>0) and (l<>0) then
|
||||||
begin
|
begin
|
||||||
@@ -12508,7 +12551,7 @@ begin
|
|||||||
val(ss,objet,erreur);
|
val(ss,objet,erreur);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Event_detecteur(Adr,etat=1,train);
|
Event_detecteur(Adr,etat=1,train);
|
||||||
end ;
|
end ;
|
||||||
|
|
||||||
@@ -12615,7 +12658,7 @@ begin
|
|||||||
|
|
||||||
// évènement position des trains - non stocké ni interprété
|
// évènement position des trains - non stocké ni interprété
|
||||||
// S-E-01-0039-CDMTRN-SPDXY|063|07|NAME=TRAIN_3;AD=0;SPEED=3;X=24735;Y=19630;X2=16874;Y2=19630;
|
// S-E-01-0039-CDMTRN-SPDXY|063|07|NAME=TRAIN_3;AD=0;SPEED=3;X=24735;Y=19630;X2=16874;Y2=19630;
|
||||||
i:=pos('CDMTRN-SPDXY',commandeCDM);
|
i:=pos('CMDTRN-SPDXY',commandeCDM);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(commandeCDM,i,12);
|
Delete(commandeCDM,i,12);
|
||||||
@@ -12680,13 +12723,13 @@ begin
|
|||||||
s:=s+' Y2='+IntTostr(y2);
|
s:=s+' Y2='+IntTostr(y2);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
if fichier_module_CDM then Aff_train(adr,train,x,y,x2,y2);
|
||||||
if afftiers then afficheDebug(s,clAqua);
|
if afftiers then afficheDebug(s,clAqua);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// évènement vitesse des trains - non stocké ni interprété
|
// évènement vitesse des trains - non stocké ni interprété
|
||||||
//S-E-01-0189-CDMTRN-SPEED|054|06|NAME=TRAIN_3;AD=0;SPEED=99;RMAX=120;CMAX=120;REQ=8;
|
//S-E-01-0189-CDMTRN-SPEED|054|06|NAME=TRAIN_3;AD=0;SPEED=99;RMAX=120;CMAX=120;REQ=8;
|
||||||
i:=pos('CDMTRN-SPEED',commandeCDM);
|
i:=pos('CMDTRN-SPEED',commandeCDM);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(commandeCDM,i,12);
|
Delete(commandeCDM,i,12);
|
||||||
@@ -12715,7 +12758,7 @@ begin
|
|||||||
s:=s+' SPEED='+IntToSTR(vitesse);
|
s:=s+' SPEED='+IntToSTR(vitesse);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
i:=posEx('RMAX=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
i:=posEx('RMAX=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||||
if (i<>0) and (l<>0) then
|
if (i<>0) and (l<>0) then
|
||||||
begin
|
begin
|
||||||
@@ -12744,12 +12787,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if afftiers then afficheDebug(s,clAqua);
|
if afftiers then afficheDebug(s,clAqua);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// évènement port CDM - non stocké ni interprété
|
// évènement port CDM - non stocké ni interprété
|
||||||
// S-E-01-0188-CDMTRN-P_CDM|060|07|NAME=TRAIN_3;AD=0;SPEED=99;SEG=38;PORT=1;X=35565;Y=12364;
|
// S-E-01-0188-CDMTRN-P_CDM|060|07|NAME=TRAIN_3;AD=0;SPEED=99;SEG=38;PORT=1;X=35565;Y=12364;
|
||||||
i:=pos('CDMTRN-P_CDM',commandeCDM);
|
i:=pos('CMDTRN-P_CDM',commandeCDM);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(commandeCDM,i,12);
|
Delete(commandeCDM,i,12);
|
||||||
@@ -12778,7 +12821,7 @@ begin
|
|||||||
s:=s+' SPEED='+IntToSTR(vitesse);
|
s:=s+' SPEED='+IntToSTR(vitesse);
|
||||||
Delete(commandeCDM,i,l-i+1);
|
Delete(commandeCDM,i,l-i+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
i:=posEx('SEG=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
i:=posEx('SEG=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||||
if (i<>0) and (l<>0) then
|
if (i<>0) and (l<>0) then
|
||||||
begin
|
begin
|
||||||
@@ -13900,11 +13943,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
Affiche('Pas de module détecté',clyellow);
|
Affiche('Pas de module détecté',clyellow);
|
||||||
Affiche('Procédure: dans CDM RAIL ouvrez votre réseau ; Menu ... / TrackDrawing / Module Display',clLime);
|
Affiche('Procédure: dans CDM RAIL ouvrez votre réseau ; Menu ... / TrackDrawing / Module Display',clLime);
|
||||||
|
Affiche('Attention : nécessite la version >=23.05 de CDM',clLime);
|
||||||
Affiche('Cela ouvre une fenêtre DEBUG dans cdm',clLime);
|
Affiche('Cela ouvre une fenêtre DEBUG dans cdm',clLime);
|
||||||
Affiche('Dans cette fenêtre, faire Clic droit puis "sélectionner tout" et "copier"',clLime);
|
Affiche('Dans cette fenêtre, faire Clic droit puis "sélectionner tout" et "copier"',clLime);
|
||||||
Affiche('Dans Signaux complexes, clic droit et "coller ; puis menu divers / Analyse des modules ',clLime);
|
Affiche(' ',clLime);
|
||||||
Affiche('Dans la fenêtre graphique d''importation cliquer sur importer',clLime);
|
Affiche('Dans Signaux complexes, clic droit et "coller, compiler et importer le réseau CDM rail" ',clLime);
|
||||||
Affiche('Attention : nécessite la version >=23.05 de CDM',clLime);
|
Affiche('Dans la fenêtre graphique d''importation cliquer sur "compiler"',clLime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if lance_cdm(false) then
|
if lance_cdm(false) then
|
||||||
@@ -13923,7 +13968,7 @@ begin
|
|||||||
|
|
||||||
KeybdInput(VK_DOWN,0);
|
KeybdInput(VK_DOWN,0);
|
||||||
KeybdInput(VK_DOWN,KEYEVENTF_KEYUP);
|
KeybdInput(VK_DOWN,KEYEVENTF_KEYUP);
|
||||||
KeybdInput(VK_RETURN,0);
|
KeybdInput(VK_RETURN,0);
|
||||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||||
KeybdInput(VK_RETURN,0); // valide le menu "track drawing"
|
KeybdInput(VK_RETURN,0); // valide le menu "track drawing"
|
||||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||||
@@ -13942,7 +13987,6 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
Analyse_seg;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -13956,16 +14000,24 @@ begin
|
|||||||
PasteFromClipboard;
|
PasteFromClipboard;
|
||||||
SetFocus;
|
SetFocus;
|
||||||
ReadOnly:=true;
|
ReadOnly:=true;
|
||||||
end;
|
end;
|
||||||
|
compilation;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormPrinc.ButtonAffAnalyseCDMClick(Sender: TObject);
|
procedure TFormPrinc.ButtonAffAnalyseCDMClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FormAnalyseCDM.WindowState:=wsMaximized;
|
//FormAnalyseCDM.WindowState:=wsMaximized;
|
||||||
formAnalyseCDM.Show;
|
formAnalyseCDM.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormPrinc.Affiche_fenetre_CDMClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
formAnalyseCDM.Show;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
+19
-22
@@ -428,7 +428,6 @@ begin
|
|||||||
labelCV26.Caption:='CV='+IntToSTR(etat2);
|
labelCV26.Caption:='CV='+IntToSTR(etat2);
|
||||||
feux[indexSig].SR[7].sortie1:=i;
|
feux[indexSig].SR[7].sortie1:=i;
|
||||||
maj_db;
|
maj_db;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormSR.ComboBoxAdr14Change(Sender: TObject);
|
procedure TFormSR.ComboBoxAdr14Change(Sender: TObject);
|
||||||
@@ -464,30 +463,28 @@ begin
|
|||||||
maj_db;
|
maj_db;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFormSR.FormCreate(Sender: TObject);
|
procedure TFormSR.FormCreate(Sender: TObject);
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
for i:=0 to 19 do
|
for i:=0 to 19 do
|
||||||
begin
|
begin
|
||||||
ComboBoxAdr1.items.add(etats[i]);
|
ComboBoxAdr1.items.add(etats[i]);
|
||||||
ComboBoxAdr2.items.add(etats[i]);
|
ComboBoxAdr2.items.add(etats[i]);
|
||||||
ComboBoxAdr3.items.add(etats[i]);
|
ComboBoxAdr3.items.add(etats[i]);
|
||||||
ComboBoxAdr4.items.add(etats[i]);
|
ComboBoxAdr4.items.add(etats[i]);
|
||||||
ComboBoxAdr5.items.add(etats[i]);
|
ComboBoxAdr5.items.add(etats[i]);
|
||||||
ComboBoxAdr6.items.add(etats[i]);
|
ComboBoxAdr6.items.add(etats[i]);
|
||||||
ComboBoxAdr7.items.add(etats[i]);
|
ComboBoxAdr7.items.add(etats[i]);
|
||||||
ComboBoxAdr8.items.add(etats[i]);
|
ComboBoxAdr8.items.add(etats[i]);
|
||||||
ComboBoxAdr9.items.add(etats[i]);
|
ComboBoxAdr9.items.add(etats[i]);
|
||||||
ComboBoxAdr10.items.add(etats[i]);
|
ComboBoxAdr10.items.add(etats[i]);
|
||||||
ComboBoxAdr11.items.add(etats[i]);
|
ComboBoxAdr11.items.add(etats[i]);
|
||||||
ComboBoxAdr12.items.add(etats[i]);
|
ComboBoxAdr12.items.add(etats[i]);
|
||||||
ComboBoxAdr13.items.add(etats[i]);
|
ComboBoxAdr13.items.add(etats[i]);
|
||||||
ComboBoxAdr14.items.add(etats[i]);
|
ComboBoxAdr14.items.add(etats[i]);
|
||||||
ComboBoxAdr15.items.add(etats[i]);
|
ComboBoxAdr15.items.add(etats[i]);
|
||||||
ComboBoxAdr16.items.add(etats[i]);
|
ComboBoxAdr16.items.add(etats[i]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormSR.BitBtnokClick(Sender: TObject);
|
procedure TFormSR.BitBtnokClick(Sender: TObject);
|
||||||
|
|||||||
+6
-6
@@ -1,6 +1,6 @@
|
|||||||
object FormTCO: TFormTCO
|
object FormTCO: TFormTCO
|
||||||
Left = 155
|
Left = 163
|
||||||
Top = 53
|
Top = 46
|
||||||
Width = 1142
|
Width = 1142
|
||||||
Height = 678
|
Height = 678
|
||||||
VertScrollBar.Visible = False
|
VertScrollBar.Visible = False
|
||||||
@@ -22,8 +22,8 @@ object FormTCO: TFormTCO
|
|||||||
OnKeyPress = FormKeyPress
|
OnKeyPress = FormKeyPress
|
||||||
OnMouseWheel = FormMouseWheel
|
OnMouseWheel = FormMouseWheel
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1126
|
1134
|
||||||
639)
|
647)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelCoord: TLabel
|
object LabelCoord: TLabel
|
||||||
@@ -81,13 +81,13 @@ object FormTCO: TFormTCO
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object ImageTemp: TImage
|
object ImageTemp: TImage
|
||||||
Left = 976
|
Left = 888
|
||||||
Top = 96
|
Top = 96
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 97
|
Height = 97
|
||||||
end
|
end
|
||||||
object ImageTemp2: TImage
|
object ImageTemp2: TImage
|
||||||
Left = 976
|
Left = 888
|
||||||
Top = 208
|
Top = 208
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 97
|
Height = 97
|
||||||
|
|||||||
+24
-18
@@ -383,7 +383,7 @@ var
|
|||||||
|
|
||||||
FormTCO: TFormTCO;
|
FormTCO: TFormTCO;
|
||||||
|
|
||||||
Forminit,sourisclic,SelectionAffichee,TamponAffecte,entoure,Diffusion,TCO_modifie,
|
Forminit,sourisclic,SelectionAffichee,TamponAffecte,entoure,TCO_modifie,
|
||||||
clicTCO,piloteAig,BandeauMasque,eval_format,sauve_tco,formConfCellTCOAff,
|
clicTCO,piloteAig,BandeauMasque,eval_format,sauve_tco,formConfCellTCOAff,
|
||||||
drag,TCOActive,TCOCree : boolean;
|
drag,TCOActive,TCOCree : boolean;
|
||||||
|
|
||||||
@@ -3251,6 +3251,7 @@ procedure affiche_cellule(x,y : integer);
|
|||||||
var i,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;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
|
//if tco[x,y].BImage=0 then exit;
|
||||||
//Affiche('Affiche_cellule',clLime);
|
//Affiche('Affiche_cellule',clLime);
|
||||||
PcanvasTCO.pen.Mode:=PmCopy;
|
PcanvasTCO.pen.Mode:=PmCopy;
|
||||||
adresse:=tco[x,y].Adresse;
|
adresse:=tco[x,y].Adresse;
|
||||||
@@ -5286,27 +5287,28 @@ begin
|
|||||||
if XclicCell>NbreCellX then exit;
|
if XclicCell>NbreCellX then exit;
|
||||||
if YclicCell>NbreCellY then exit;
|
if YclicCell>NbreCellY then exit;
|
||||||
Bimage:=tco[XClicCell,YClicCell].Bimage;
|
Bimage:=tco[XClicCell,YClicCell].Bimage;
|
||||||
|
|
||||||
if formConfCellTCOAff then
|
if formConfCellTCOAff then
|
||||||
begin
|
begin
|
||||||
|
// si aiguillage, mettre à jour l'option de pilotage inverse
|
||||||
// si aiguillage, mettre à jour l'option de pilotage inverse
|
if (bimage=2) or (bimage=3) or (bimage=4) or (bimage=5) or (bimage=12) or (bimage=13)
|
||||||
if (bimage=2) or (bimage=3) or (bimage=4) or (bimage=5) or (bimage=12) or (bimage=13)
|
or (bimage=14) or (bimage=15) or (bimage=24) then
|
||||||
or (bimage=14) or (bimage=15) or (bimage=24) then
|
|
||||||
begin
|
|
||||||
// aiguillage inversé
|
|
||||||
with FormConfCellTCO.CheckPinv do
|
|
||||||
begin
|
begin
|
||||||
enabled:=true;
|
|
||||||
checked:=TCO[XClicCell,YClicCell].inverse;
|
// aiguillage inversé
|
||||||
|
with FormConfCellTCO.CheckPinv do
|
||||||
|
begin
|
||||||
|
enabled:=true;
|
||||||
|
checked:=TCO[XClicCell,YClicCell].inverse;
|
||||||
|
end;
|
||||||
|
CheckPinv.checked:=TCO[XClicCell,YClicCell].inverse;
|
||||||
|
CheckPinv.enabled:=true ;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
CheckPinv.enabled:=false;
|
||||||
|
FormConfCellTCO.checkPinv.enabled:=false;
|
||||||
end;
|
end;
|
||||||
CheckPinv.checked:=TCO[XClicCell,YClicCell].inverse;
|
|
||||||
CheckPinv.enabled:=true ;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
CheckPinv.enabled:=false;
|
|
||||||
FormConfCellTCO.checkPinv.enabled:=false;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// si voie ou rien ou signal ou quai
|
// si voie ou rien ou signal ou quai
|
||||||
@@ -5333,6 +5335,10 @@ begin
|
|||||||
ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr;
|
ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr;
|
||||||
ShapeCoulFond.Brush.Color:=tco[XClicCell,yClicCell].CouleurFond;
|
ShapeCoulFond.Brush.Color:=tco[XClicCell,yClicCell].CouleurFond;
|
||||||
|
|
||||||
|
s:='El='+intToSTR(tco[XClicCell,YClicCell].BImage);
|
||||||
|
if tco[XClicCell,YClicCell].adresse<>0 then s:=s+' Adr='+intToSTR(tco[XClicCell,YClicCell].adresse);
|
||||||
|
//hint:=s;
|
||||||
|
|
||||||
if not(selectionaffichee) then _entoure_cell_clic;
|
if not(selectionaffichee) then _entoure_cell_clic;
|
||||||
actualise; // actualise la fenetre de config cellule
|
actualise; // actualise la fenetre de config cellule
|
||||||
clicTCO:=false;
|
clicTCO:=false;
|
||||||
|
|||||||
+1
-15
@@ -174,20 +174,6 @@ begin
|
|||||||
if (prec<9990) then
|
if (prec<9990) then
|
||||||
begin
|
begin
|
||||||
inc(it);
|
inc(it);
|
||||||
//detecteur[detect].adrTrain:=trains[i].adresse;
|
|
||||||
//event_detecteur(detect,true,trains[i].nom_train);
|
|
||||||
{
|
|
||||||
SauvefiltrageDet0:=filtrageDet0;
|
|
||||||
filtrageDet0:=0;
|
|
||||||
Affiche(intToSTR(prec)+' 1',clyellow);
|
|
||||||
event_detecteur(prec,true,NomTrain);
|
|
||||||
Affiche(intToSTR(prec)+' 0',clyellow);
|
|
||||||
event_detecteur(prec,false,NomTrain);
|
|
||||||
|
|
||||||
Affiche(intToSTR(detect)+' 1',clyellow);
|
|
||||||
event_detecteur(detect,true,NomTrain);
|
|
||||||
filtrageDet0:=SauveFiltrageDet0;
|
|
||||||
}
|
|
||||||
|
|
||||||
detecteur[detect].etat:=true;
|
detecteur[detect].etat:=true;
|
||||||
detecteur[detect].AdrTrain:=trains[i].adresse;
|
detecteur[detect].AdrTrain:=trains[i].adresse;
|
||||||
@@ -366,7 +352,7 @@ begin
|
|||||||
trouve:=true;
|
trouve:=true;
|
||||||
roulage:=true;
|
roulage:=true;
|
||||||
AdrTrain:=detecteur[AdrDet].AdrTrain;
|
AdrTrain:=detecteur[AdrDet].AdrTrain;
|
||||||
AdrFeu:=signal_detecteur(AdrDet); // trouve l'adresse du feu correspondant au détecteur
|
AdrFeu:=signal_detecteur(AdrDet); // trouve l'adresse du signal correspondant au détecteur
|
||||||
|
|
||||||
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
|
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
|
||||||
if adrFeu<>0 then
|
if adrFeu<>0 then
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -23,7 +23,7 @@ var
|
|||||||
Lance_verif : integer;
|
Lance_verif : integer;
|
||||||
verifVersion,notificationVersion : boolean;
|
verifVersion,notificationVersion : boolean;
|
||||||
|
|
||||||
Const Version='6.0'; // sert à la comparaison de la version publiée
|
Const Version='6.1'; // sert à la comparaison de la version publiée
|
||||||
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
||||||
|
|
||||||
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
||||||
@@ -111,7 +111,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// renvoie le numéro de version depuis le forum CDM
|
||||||
function verifie_version : real;
|
function verifie_version : real;
|
||||||
var s,s2,s3,Version_p,Url,LocalFile,nomfichier : string;
|
var s,s2,s3,Version_p,Url,LocalFile,nomfichier : string;
|
||||||
trouve_version,trouve_zip,zone_comm,LocZip : boolean;
|
trouve_version,trouve_zip,zone_comm,LocZip : boolean;
|
||||||
|
|||||||
@@ -165,3 +165,5 @@ version 5.74 : Correction bug cr
|
|||||||
version 6.0 : Gestion du décodeur de signaux Arcomora.
|
version 6.0 : Gestion du décodeur de signaux Arcomora.
|
||||||
Importation des aiguillages et des branches depuis CDM Rail.
|
Importation des aiguillages et des branches depuis CDM Rail.
|
||||||
Nécessite la version >=23.04 de CDM rail.
|
Nécessite la version >=23.04 de CDM rail.
|
||||||
|
version 6.1 : Amélioration de la fenêtre réseau CDM.
|
||||||
|
Animation des trains dans la fenêtre réseau CDM.
|
||||||
|
|||||||
Reference in New Issue
Block a user