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
|
||||
Avec_roulage=1
|
||||
Debug=0
|
||||
Filtrage_det=3
|
||||
Fonte=12
|
||||
Filtrage_det=0
|
||||
AntiTimeoutEthLenz=0
|
||||
Fonte=10
|
||||
Protocole=1
|
||||
Verif_AdrXpressNet=1
|
||||
IpV4_PC=127.0.0.1:9999
|
||||
ServicesCDM=15
|
||||
Ipv4_interface=192.168.1.23:5550
|
||||
MaxCom=30
|
||||
Protocole_serie=COM22:115200,N,8,1,0
|
||||
Protocole_serie=COMX:115200,N,8,1,0
|
||||
Inter_car=50
|
||||
Tempo_maxi=7
|
||||
Tempo_maxi=15
|
||||
Entete=1
|
||||
Init_Aig=0
|
||||
Init_Dem_Aig=0
|
||||
Tempo_Aig=20
|
||||
Tempo_Aig=50
|
||||
Init_demUSBCOM=0
|
||||
Init_demETH=1
|
||||
Init_demETH=0
|
||||
Fenetre=0
|
||||
nb_det_dist=3
|
||||
verif_version=0
|
||||
@@ -25,6 +29,7 @@ TCO=0
|
||||
MasqueBandeauTCO=0
|
||||
CDM=0
|
||||
Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
|
||||
NomModuleCDM=reseau_gily_signal_ajoute_top.cdm
|
||||
Serveur_interface=1
|
||||
retro=1
|
||||
RazSignaux=0
|
||||
@@ -33,10 +38,10 @@ Nb_cantons_Sig=3
|
||||
Alg_Unisemaf=1
|
||||
/------------
|
||||
[section_aig]
|
||||
1,P518,D100D,S3P,V30,I0,INIT(2,3)
|
||||
2,P12S,D519,S100S,V0,I0,INIT(1,3)
|
||||
1,P518,D100D,S3P,V30,I0,INIT(2,2)
|
||||
2,P12S,D519,S100S,V0,I0,INIT(1,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)
|
||||
6,P516,D0,S4D,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)
|
||||
19,P101D,D22P,S531,V0,I0,INIT(1,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)
|
||||
23,P18D,D538,S534,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)
|
||||
32,P22S,D34S,S24D,V0,I0,INIT(1,2)
|
||||
34,P0,D31D,S32D,V0,I0,INIT(2,2)
|
||||
100CROI,D(1D,523Z),S(2S,5S)
|
||||
101CROI,D(11S,525Z),S(19P,10P)
|
||||
102CROI,D(22P,10D),S(517,18S)
|
||||
100CROI,D(1D,523),S(2S,5S)
|
||||
101CROI,D(11S,525),S(19P,10P)
|
||||
102CROI,D(22P,19D),S(517,18S)
|
||||
103CROI,D(513,9D),S(522,8S)
|
||||
104CROI,D(0,32D),S(25P,31S)
|
||||
0
|
||||
@@ -78,15 +83,15 @@ A9,515,A5
|
||||
A11,A101,525,A17,528,A10
|
||||
A17,535,533,A24,538,A23
|
||||
A7,520,A20,A21,A28,A26,530,A27,A25,A104,A31,534,A23,A18
|
||||
A26,529,A25
|
||||
A22,537,A27
|
||||
A26,529,A25,A104
|
||||
A22,537,A27,A25
|
||||
A22,A32,A24
|
||||
A6,516,0
|
||||
A31,A34,0
|
||||
0
|
||||
/------------
|
||||
[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
|
||||
204,9,0,1,(527,A7),1,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
|
||||
TGV,2,120,50,30
|
||||
BB16024,3,120,60,50
|
||||
CC406526,4,120,80,70
|
||||
CAMERA,10,120,0,0
|
||||
CC406526,4,120,50,30
|
||||
CAMERA,0,120,0,0
|
||||
0
|
||||
/------------
|
||||
[section_placement]
|
||||
@@ -146,6 +151,6 @@ TRAINELECTRIQUE,0,0,0
|
||||
BB25531,0,0,0
|
||||
TGV,0,0,0
|
||||
BB16024,523,526,0
|
||||
CC406526,528,531,0
|
||||
CC406526,0,0,0
|
||||
CAMERA,0,0,0
|
||||
0
|
||||
|
||||
Binary file not shown.
@@ -12,7 +12,7 @@
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$O-
|
||||
-$P+
|
||||
-$Q+
|
||||
-$R+
|
||||
|
||||
@@ -15,7 +15,7 @@ K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
O=0
|
||||
P=1
|
||||
Q=1
|
||||
R=1
|
||||
|
||||
@@ -16,11 +16,13 @@ uses
|
||||
UnitCDF in 'UnitCDF.pas' {FormCDF},
|
||||
Unitplace in 'Unitplace.pas' {FormPlace},
|
||||
UnitPareFeu in 'UnitPareFeu.pas',
|
||||
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM};
|
||||
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM},
|
||||
Importation in 'Importation.pas' {FormImportation};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
// la form TCO ne doit pas etre créée ici!!
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TFormPrinc, FormPrinc);
|
||||
Application.CreateForm(TFormVersion, FormVersion);
|
||||
@@ -35,5 +37,6 @@ begin
|
||||
Application.CreateForm(TFormPlace, FormPlace);
|
||||
Application.CreateForm(TFormDebug, FormDebug);
|
||||
Application.CreateForm(TFormAnalyseCDM, FormAnalyseCDM);
|
||||
Application.CreateForm(TFormImportation, FormImportation);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
+197
-109
@@ -1,10 +1,10 @@
|
||||
object FormAnalyseCDM: TFormAnalyseCDM
|
||||
Left = 154
|
||||
Top = 36
|
||||
Left = 206
|
||||
Top = 0
|
||||
AutoScroll = False
|
||||
Caption = 'FormAnalyseCDM'
|
||||
ClientHeight = 660
|
||||
ClientWidth = 1032
|
||||
Caption = 'Fen'#234'tre r'#233'seau CDM'
|
||||
ClientHeight = 648
|
||||
ClientWidth = 1041
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@@ -12,18 +12,55 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
OnMouseWheel = FormMouseWheel
|
||||
OnResize = FormResize
|
||||
DesignSize = (
|
||||
1032
|
||||
660)
|
||||
1041
|
||||
648)
|
||||
PixelsPerInch = 96
|
||||
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
|
||||
Left = 8
|
||||
Top = 16
|
||||
Width = 977
|
||||
Height = 537
|
||||
Width = 986
|
||||
Height = 509
|
||||
HorzScrollBar.Tracking = True
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
AutoScroll = False
|
||||
@@ -31,29 +68,41 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
object ImageCDM: TImage
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 937
|
||||
Height = 512
|
||||
Left = 24
|
||||
Top = 8
|
||||
Width = 873
|
||||
Height = 465
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = ImageCDMClick
|
||||
OnMouseMove = ImageCDMMouseMove
|
||||
end
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 16
|
||||
Top = 560
|
||||
Width = 257
|
||||
Height = 89
|
||||
Left = 8
|
||||
Top = 536
|
||||
Width = 385
|
||||
Height = 109
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Affichages '
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 24
|
||||
Top = 56
|
||||
Width = 81
|
||||
Left = 8
|
||||
Top = 50
|
||||
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
|
||||
Caption = 'Afficher le port n'#176
|
||||
Caption = 'Allumer d'#233'tecteur'
|
||||
end
|
||||
object CheckConnexions: TCheckBox
|
||||
Left = 24
|
||||
Left = 8
|
||||
Top = 16
|
||||
Width = 97
|
||||
Height = 17
|
||||
@@ -65,7 +114,7 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
||||
OnClick = CheckConnexionsClick
|
||||
end
|
||||
object CheckAdresses: TCheckBox
|
||||
Left = 24
|
||||
Left = 8
|
||||
Top = 32
|
||||
Width = 97
|
||||
Height = 17
|
||||
@@ -77,18 +126,18 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
||||
OnClick = CheckAdressesClick
|
||||
end
|
||||
object CheckSegments: TCheckBox
|
||||
Left = 112
|
||||
Left = 128
|
||||
Top = 16
|
||||
Width = 81
|
||||
Height = 25
|
||||
Height = 17
|
||||
Caption = 'segments'
|
||||
TabOrder = 2
|
||||
OnClick = CheckSegmentsClick
|
||||
end
|
||||
object CheckPorts: TCheckBox
|
||||
Left = 112
|
||||
Left = 128
|
||||
Top = 32
|
||||
Width = 121
|
||||
Width = 65
|
||||
Height = 17
|
||||
Hint = 'Affiche le num'#233'ro de segment et le port de CDM'
|
||||
Caption = 'Ports'
|
||||
@@ -98,118 +147,157 @@ object FormAnalyseCDM: TFormAnalyseCDM
|
||||
OnClick = CheckPortsClick
|
||||
end
|
||||
object EditPort: TEdit
|
||||
Left = 112
|
||||
Left = 96
|
||||
Top = 56
|
||||
Width = 57
|
||||
Width = 49
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
end
|
||||
object ButtonAffPort: TButton
|
||||
Left = 176
|
||||
Left = 152
|
||||
Top = 56
|
||||
Width = 73
|
||||
Height = 25
|
||||
Caption = 'Afficher le port'
|
||||
Caption = 'Afficher'
|
||||
TabOrder = 5
|
||||
OnClick = ButtonAffPortClick
|
||||
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
|
||||
object TrackBar1: TTrackBar
|
||||
Left = 992
|
||||
Left = 1001
|
||||
Top = 16
|
||||
Width = 37
|
||||
Height = 553
|
||||
Height = 489
|
||||
Hint = 'Curseur de Zoom'
|
||||
Anchors = [akTop, akRight]
|
||||
Max = 200
|
||||
Max = 90
|
||||
Min = 50
|
||||
Orientation = trVertical
|
||||
Position = 200
|
||||
ParentShowHint = False
|
||||
Position = 90
|
||||
ShowHint = True
|
||||
TabOrder = 2
|
||||
OnChange = TrackBar1Change
|
||||
end
|
||||
object GroupBox2: TGroupBox
|
||||
Left = 280
|
||||
Top = 560
|
||||
object GroupBoxSegment: TGroupBox
|
||||
Left = 400
|
||||
Top = 536
|
||||
Width = 145
|
||||
Height = 89
|
||||
Height = 109
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Strat'#233'gies d'#39'importation'
|
||||
Caption = 'Segment'
|
||||
TabOrder = 3
|
||||
object CheckDebugAnalyse: TCheckBox
|
||||
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
|
||||
object Label2: TLabel
|
||||
Left = 8
|
||||
Top = 24
|
||||
Width = 305
|
||||
Height = 57
|
||||
Caption = 'Adressage des croisements'
|
||||
TabOrder = 1
|
||||
Top = 22
|
||||
Width = 42
|
||||
Height = 13
|
||||
Caption = 'Segment'
|
||||
end
|
||||
object RadioCroisSuite: TRadioButton
|
||||
Left = 24
|
||||
Top = 40
|
||||
Width = 217
|
||||
Height = 17
|
||||
Caption = 'Croisements '#224' la suite des aiguillages'
|
||||
TabOrder = 2
|
||||
object LabelAdresse: TLabel
|
||||
Left = 11
|
||||
Top = 48
|
||||
Width = 44
|
||||
Height = 13
|
||||
Caption = 'Adresse :'
|
||||
end
|
||||
object RadioCroisBase: TRadioButton
|
||||
Left = 24
|
||||
Top = 56
|
||||
Width = 217
|
||||
Height = 17
|
||||
Caption = 'Croisements '#224' partir de l'#39'adresse de base'
|
||||
TabOrder = 3
|
||||
object LabelPorts: TLabel
|
||||
Left = 11
|
||||
Top = 74
|
||||
Width = 33
|
||||
Height = 13
|
||||
Caption = 'Ports : '
|
||||
WordWrap = True
|
||||
end
|
||||
object EditBaseCrois: TEdit
|
||||
Left = 240
|
||||
Top = 54
|
||||
object EditSegment: TEdit
|
||||
Left = 80
|
||||
Top = 16
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
Text = '100'
|
||||
OnChange = EditBaseCroisChange
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
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
|
||||
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
|
||||
|
||||
+2122
-343
File diff suppressed because it is too large
Load Diff
+2
-3
@@ -1,5 +1,7 @@
|
||||
unit UnitCDF;
|
||||
|
||||
// configuration des décodeurs CDM et Digikeijs
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@@ -97,9 +99,6 @@ procedure dessine_feu_CDF;
|
||||
implementation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
procedure TFormCDF.FormActivate(Sender: TObject);
|
||||
var erreur : integer;
|
||||
begin
|
||||
|
||||
+21
-15
@@ -33,7 +33,7 @@ object FormConfig: TFormConfig
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
end
|
||||
object Image1: TImage
|
||||
object ImageSignaux: TImage
|
||||
Left = 648
|
||||
Top = 128
|
||||
Width = 249
|
||||
@@ -1571,7 +1571,7 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 633
|
||||
Height = 505
|
||||
ActivePage = TabSheetAig
|
||||
ActivePage = TabSheetTrains
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
@@ -1911,7 +1911,12 @@ object FormConfig: TFormConfig
|
||||
Top = 48
|
||||
Width = 145
|
||||
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
|
||||
end
|
||||
object CheckBoxSrvSig: TCheckBox
|
||||
@@ -2119,7 +2124,7 @@ object FormConfig: TFormConfig
|
||||
Top = 200
|
||||
Width = 297
|
||||
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
|
||||
object Label7: TLabel
|
||||
Left = 14
|
||||
@@ -2795,9 +2800,9 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RichAig: TRichEdit
|
||||
Left = 0
|
||||
Top = 56
|
||||
Top = 64
|
||||
Width = 321
|
||||
Height = 369
|
||||
Height = 385
|
||||
Color = clBlack
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clYellow
|
||||
@@ -2832,7 +2837,7 @@ object FormConfig: TFormConfig
|
||||
OnClick = BoutSupAigClick
|
||||
end
|
||||
object ButtonAjSup: TButton
|
||||
Left = 144
|
||||
Left = 152
|
||||
Top = 32
|
||||
Width = 121
|
||||
Height = 17
|
||||
@@ -2922,6 +2927,7 @@ object FormConfig: TFormConfig
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
HideSelection = False
|
||||
Lines.Strings = (
|
||||
'RichBranche')
|
||||
ParentFont = False
|
||||
@@ -3101,7 +3107,7 @@ object FormConfig: TFormConfig
|
||||
Visible = False
|
||||
end
|
||||
object Label43: TLabel
|
||||
Left = 40
|
||||
Left = 48
|
||||
Top = 160
|
||||
Width = 38
|
||||
Height = 16
|
||||
@@ -3755,8 +3761,8 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
end
|
||||
object GroupBoxPN: TGroupBox
|
||||
Left = 224
|
||||
Top = 176
|
||||
Left = 152
|
||||
Top = 16
|
||||
Width = 233
|
||||
Height = 401
|
||||
Caption = 'Action gestion passage '#224' niveau'
|
||||
@@ -4136,7 +4142,7 @@ object FormConfig: TFormConfig
|
||||
TabOrder = 31
|
||||
OnChange = EditZdet2V4OChange
|
||||
end
|
||||
object Button1: TButton
|
||||
object ButtonTestFerme: TButton
|
||||
Left = 200
|
||||
Top = 16
|
||||
Width = 27
|
||||
@@ -4146,9 +4152,9 @@ object FormConfig: TFormConfig
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 36
|
||||
OnClick = Button1Click
|
||||
OnClick = ButtonTestFermeClick
|
||||
end
|
||||
object Button3: TButton
|
||||
object ButtonTestOuvre: TButton
|
||||
Left = 200
|
||||
Top = 40
|
||||
Width = 27
|
||||
@@ -4158,7 +4164,7 @@ object FormConfig: TFormConfig
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 37
|
||||
OnClick = Button3Click
|
||||
OnClick = ButtonTestOuvreClick
|
||||
end
|
||||
object CheckPnPulse: TCheckBox
|
||||
Left = 8
|
||||
@@ -4566,7 +4572,7 @@ object FormConfig: TFormConfig
|
||||
'age'
|
||||
WordWrap = True
|
||||
end
|
||||
object Image3: TImage
|
||||
object ImageTrain: TImage
|
||||
Left = 384
|
||||
Top = 312
|
||||
Width = 153
|
||||
|
||||
+175
-73
@@ -5,14 +5,13 @@ interface
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, StdCtrls , jpeg, ComCtrls ,StrUtils, Unitprinc,
|
||||
MMSystem, Buttons , UnitPareFeu, verif_version,
|
||||
Menus;
|
||||
MMSystem, Buttons , UnitPareFeu, verif_version, Menus ;
|
||||
|
||||
type
|
||||
TFormConfig = class(TForm)
|
||||
ButtonAppliquerEtFermer: TButton;
|
||||
LabelInfo: TLabel;
|
||||
Image1: TImage;
|
||||
ImageSignaux: TImage;
|
||||
PageControl: TPageControl;
|
||||
TabSheetCDM: TTabSheet;
|
||||
TabSheetAutonome: TTabSheet;
|
||||
@@ -279,8 +278,8 @@ type
|
||||
Memo5: TMemo;
|
||||
EditLAY: TEdit;
|
||||
Label13: TLabel;
|
||||
Button1: TButton;
|
||||
Button3: TButton;
|
||||
ButtonTestFerme: TButton;
|
||||
ButtonTestOuvre: TButton;
|
||||
CheckPnPulse: TCheckBox;
|
||||
CheckFVC: TCheckBox;
|
||||
CheckFRC: TCheckBox;
|
||||
@@ -324,7 +323,7 @@ type
|
||||
EditFiltrDet: TEdit;
|
||||
CheckBoxVerifXpressNet: TCheckBox;
|
||||
LabelCrois: TLabel;
|
||||
Image3: TImage;
|
||||
ImageTrain: TImage;
|
||||
ButtonPFCDM: TButton;
|
||||
Label59: TLabel;
|
||||
EditV5F: TEdit;
|
||||
@@ -458,8 +457,8 @@ type
|
||||
procedure EditZdet1V4FChange(Sender: TObject);
|
||||
procedure EditZdet1V4OChange(Sender: TObject);
|
||||
procedure EditZdet2V4OChange(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure ButtonTestFermeClick(Sender: TObject);
|
||||
procedure ButtonTestOuvreClick(Sender: TObject);
|
||||
procedure CheckPnPulseClick(Sender: TObject);
|
||||
procedure CheckFVCClick(Sender: TObject);
|
||||
procedure CheckFRCClick(Sender: TObject);
|
||||
@@ -512,6 +511,7 @@ Algo_localisation_ch='Algo_localisation';
|
||||
Avec_roulage_ch='Avec_roulage';
|
||||
nb_det_dist_ch='nb_det_dist';
|
||||
IpV4_PC_ch='IpV4_PC';
|
||||
ServicesCDM_ch='ServicesCDM';
|
||||
retro_ch='retro';
|
||||
Init_aig_ch='Init_Aig';
|
||||
LAY_ch='Lay';
|
||||
@@ -541,6 +541,7 @@ Raz_signaux_ch='RazSignaux';
|
||||
EnvAigDccpp_ch='EnvAigDccpp';
|
||||
AdrBaseDetDccpp_ch='AdrBaseDetDccpp';
|
||||
AvecVerifIconesTCO_ch='AvecVerifIconesTCO';
|
||||
NomModuleCDM_ch='NomModuleCDM';
|
||||
|
||||
// sections de config
|
||||
section_aig_ch='[section_aig]';
|
||||
@@ -584,7 +585,7 @@ procedure trier_aig;
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitDebug,UnitTCO, UnitSR, UnitCDF;
|
||||
uses UnitDebug,UnitTCO, UnitSR, UnitCDF,UnitAnalyseSegCDM;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
@@ -619,10 +620,10 @@ begin
|
||||
place_id:=s;
|
||||
end;
|
||||
|
||||
procedure Maj_Hint_feu(i : integer);
|
||||
procedure Maj_Hint_Signal(i : integer);
|
||||
var s : string;
|
||||
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)+
|
||||
' Adresse élement suivant='+intToSTR(feux[i].Adr_el_suiv1);
|
||||
if feux[i].Btype_suiv1=aig then s:=s+' (aig)';
|
||||
@@ -630,18 +631,19 @@ begin
|
||||
end;
|
||||
|
||||
// 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;
|
||||
var s,ss : string;
|
||||
i : integer;
|
||||
begin
|
||||
//s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;');
|
||||
s:=place_id('C-C-00-0002-RQSERV-RTSIM|xxx|xx|');
|
||||
i:=0;
|
||||
if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end;
|
||||
if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end;
|
||||
if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end;
|
||||
if Srvc_PosTrain then begin s:=s+'SRV=TSXY;';inc(i);end ;
|
||||
if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end;
|
||||
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; // service actionneurs
|
||||
if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end; // service détecteurs
|
||||
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; // service signaux
|
||||
|
||||
// insère le nombre de paramètres
|
||||
ss:=format('%.*d',[2,i]) ;
|
||||
@@ -662,7 +664,7 @@ begin
|
||||
if Srvc_Aig then s:=s+'- aiguillages ';
|
||||
if Srvc_Act then s:=s+'- actionneurs ';
|
||||
if Srvc_Det then s:=s+'- détecteurs ';
|
||||
if Srvc_PosTrain then s:=s+'- position des trains ';
|
||||
if Srvc_Pos then s:=s+'- position des trains ';
|
||||
if Srvc_sig then s:=s+'- état des signaux ';
|
||||
Affiche(s,clYellow);
|
||||
end;
|
||||
@@ -1436,7 +1438,6 @@ begin
|
||||
end;
|
||||
|
||||
// modifie le fichier de config en fonction du paramétrage
|
||||
// recopie les commentaires du fichier "fichier"
|
||||
procedure genere_config;
|
||||
var s: string;
|
||||
fichierN : text;
|
||||
@@ -1466,6 +1467,15 @@ begin
|
||||
// adresse ip et port de CDM
|
||||
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
|
||||
writeln(fichierN,IPV4_Interface_ch+'=',adresseIP+':'+intToSTR(portInterface));
|
||||
|
||||
@@ -1531,6 +1541,8 @@ begin
|
||||
// Nom du lay
|
||||
writeln(fichierN,lay_ch+'=',Lay);
|
||||
|
||||
writeln(fichierN,NomModuleCDM_ch+'=',NomModuleCDM);
|
||||
|
||||
// Serveur d'interface de CDM
|
||||
writeln(fichierN,Serveur_interface_ch+'=',intToSTR(ServeurInterfaceCDM));
|
||||
|
||||
@@ -1645,7 +1657,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure lit_config;
|
||||
|
||||
var s,sa,SOrigine: string;
|
||||
c : char;
|
||||
tec,tjdC,tjsC,s2,triC,debugConfig,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro,trouve_protocole,
|
||||
@@ -2443,7 +2454,11 @@ begin
|
||||
delete(s,i,length(sa));
|
||||
val(s,TailleFonte,erreur);
|
||||
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;
|
||||
|
||||
sa:=uppercase(Protocole_ch)+'=';
|
||||
@@ -2475,6 +2490,21 @@ begin
|
||||
else affiche('Erreur adresse ip cdm rail '+s,clred);
|
||||
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
|
||||
sa:=uppercase(IPV4_INTERFACE_ch)+'=';
|
||||
i:=pos(sa,s);
|
||||
@@ -2503,7 +2533,7 @@ begin
|
||||
trouve_MaxPort:=true;
|
||||
val(s,MaxPortCom,erreur);
|
||||
if erreur<>0 then Affiche('Erreur MaxCom: '+sOrigine,clred);
|
||||
if (MaxPortCom<1) or (MaxPortCom>99) then MaxPortCom:=30;
|
||||
if (MaxPortCom<1) or (MaxPortCom>255) then MaxPortCom:=30;
|
||||
end;
|
||||
|
||||
// configuration du port com
|
||||
@@ -2570,7 +2600,7 @@ begin
|
||||
delete(s,i,length(sa));
|
||||
AvecInitAiguillages:=s='1';
|
||||
end;
|
||||
|
||||
|
||||
// avec demande de position des aiguillages en mode autonome au démarrage
|
||||
sa:=uppercase(Init_dem_aig_ch)+'=';
|
||||
i:=pos(sa,s);
|
||||
@@ -2742,6 +2772,15 @@ begin
|
||||
lay:=s;
|
||||
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)+'=';
|
||||
i:=pos(sa,s);
|
||||
if i=1 then
|
||||
@@ -2961,6 +3000,11 @@ begin
|
||||
verifVersion:=true;
|
||||
Valeur_entete:=1;
|
||||
TempoOctet:=50;
|
||||
Srvc_Aig:=true;
|
||||
Srvc_Act:=true;
|
||||
Srvc_Det:=true;
|
||||
Srvc_Pos:=false;
|
||||
Srvc_Sig:=false;
|
||||
TimoutMaxInterface:=7;
|
||||
AvecInitAiguillages:=true;
|
||||
AvecDemandeInterfaceUSB:=true;
|
||||
@@ -2972,7 +3016,7 @@ begin
|
||||
Nb_cantons_Sig:=3;
|
||||
ServeurRetroCDM:=1;
|
||||
algo_Unisemaf:=1;
|
||||
TailleFonte:=12;
|
||||
TailleFonte:=10;
|
||||
Nb_Det_Dist:=3;
|
||||
genere_config;
|
||||
assign(fichier,NomConfig);
|
||||
@@ -3180,13 +3224,13 @@ begin
|
||||
change_srv:=Srvc_Aig<>CheckBoxServAig.checked;
|
||||
change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv;
|
||||
change_srv:=Srvc_Act<>CheckBoxServAct.checked or change_srv;
|
||||
change_srv:=Srvc_PosTrain<>CheckServPosTrains.checked or change_srv;
|
||||
change_srv:=Srvc_Pos<>CheckServPosTrains.checked or change_srv;
|
||||
change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv;
|
||||
|
||||
Srvc_Aig:=CheckBoxServAig.checked;
|
||||
Srvc_Det:=CheckBoxServDet.checked;
|
||||
Srvc_Act:=CheckBoxServAct.checked;
|
||||
Srvc_PosTrain:=CheckServPosTrains.checked;
|
||||
Srvc_Pos:=CheckServPosTrains.checked;
|
||||
Srvc_Sig:=CheckBoxSrvSig.checked;
|
||||
Raz_Acc_signaux:=CheckBoxRazSignaux.checked;
|
||||
AvecInitAiguillages:=CheckBoxInitAig.Checked;
|
||||
@@ -3227,8 +3271,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// LC=Adresse du feu
|
||||
procedure clicListeFeu(lc : integer);
|
||||
// LC=Adresse du signal
|
||||
procedure clicListeSignal(lc : integer);
|
||||
var AncAdresse,index,adresse,erreur : integer;
|
||||
s : string;
|
||||
begin
|
||||
@@ -3350,7 +3394,9 @@ begin
|
||||
CheckBoxServAig.checked:=Srvc_Aig;
|
||||
CheckBoxServDet.checked:=Srvc_Det;
|
||||
CheckBoxServAct.checked:=Srvc_Act;
|
||||
CheckServPosTrains.checked:=Srvc_PosTrain;
|
||||
CheckServPosTrains.checked:=Srvc_Pos;
|
||||
CheckBoxSrvSig.Checked:=Srvc_Sig;
|
||||
|
||||
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
|
||||
CheckBoxInitAig.checked:=AvecInitAiguillages;
|
||||
CheckPosAig.checked:=AvecDemandeAiguillages;
|
||||
@@ -3466,7 +3512,7 @@ begin
|
||||
Perform(EM_SCROLLCARET,0,0);
|
||||
end;
|
||||
|
||||
if clicproprietes then clicListeFeu(Adressefeuclic);
|
||||
if clicproprietes then clicListeSignal(Adressefeuclic);
|
||||
clicproprietes:=false;
|
||||
|
||||
i:=1;
|
||||
@@ -3509,9 +3555,12 @@ begin
|
||||
clicListe:=false;
|
||||
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
|
||||
ConfigPrete:=true;
|
||||
|
||||
richBranche.HideSelection:=false; // pour pouvoir copier coller la fenetre
|
||||
groupBox21.Top:=304;
|
||||
GroupBox21.Left:=8;
|
||||
|
||||
// création de l'icone de déplacement du train
|
||||
|
||||
end;
|
||||
|
||||
|
||||
@@ -3906,6 +3955,7 @@ begin
|
||||
editact2.Visible:=false;
|
||||
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||
EditEtatActionneur.Hint:='0 ou 1';
|
||||
EditAct.Hint:='Actionneur/Détecteur ';
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -3921,6 +3971,7 @@ begin
|
||||
editact2.Visible:=true;
|
||||
LabelActionneur.Caption:='Mémoire de Zone';
|
||||
EditEtatActionneur.Hint:='0 ou 1';
|
||||
EditAct.Hint:='Détecteur ';
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -3937,6 +3988,7 @@ begin
|
||||
editact2.Visible:=false;
|
||||
LabelActionneur.Caption:='Aiguillage';
|
||||
EditEtatActionneur.Hint:='1 ou S=dévié 2 ou D=droit';
|
||||
EditAct.Hint:='Aiguillage ';
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -4054,7 +4106,7 @@ begin
|
||||
begin
|
||||
Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(feux[i].Btype_suiv2)+IntToSTR(feux[i].Adr_el_suiv2);
|
||||
EditSuiv2.Hint:=chaine_element(feux[i].Btype_suiv2,feux[i].Adr_el_suiv2);
|
||||
end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end;
|
||||
end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end;
|
||||
j:=feux[i].Adr_det3;
|
||||
if j<>0 then
|
||||
begin
|
||||
@@ -4164,11 +4216,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
//if det then s2:='Détecteur ' else s2:='Actionneur ';
|
||||
s2:='Détecteur ou actionneur ';
|
||||
s2:=s2+intToSTR(Tablo_actionneur[i].adresse);
|
||||
FormConfig.EditAct.Hint:=s2;
|
||||
|
||||
s2:=FormConfig.EditAct.Hint;
|
||||
FormConfig.EditAct.Hint:=s2+intToSTR(Tablo_actionneur[i].adresse);
|
||||
|
||||
// Actionneur fonction F loco
|
||||
if Tablo_actionneur[i].loco then
|
||||
@@ -4246,7 +4295,7 @@ begin
|
||||
radioButtonActDet.Checked:=true;
|
||||
radioButtonZones.Checked:=false;
|
||||
editAct2.Visible:=false;
|
||||
LabelActionneur.Caption:='Actionneur DétecteurZ';
|
||||
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||
end;
|
||||
if typ=1 then with formconfig do
|
||||
begin
|
||||
@@ -4962,7 +5011,7 @@ begin
|
||||
if i<1 then exit;
|
||||
decodeur:=ComboBoxDec.ItemIndex;
|
||||
feux[i].decodeur:=decodeur;
|
||||
Maj_Hint_feu(i);
|
||||
Maj_Hint_Signal(i);
|
||||
|
||||
s:=encode_sig_feux(i);
|
||||
formconfig.RichSig.Lines[ligneclicSig]:=s;
|
||||
@@ -4982,7 +5031,7 @@ begin
|
||||
begin
|
||||
i:=Selstart;
|
||||
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;
|
||||
@@ -5002,7 +5051,7 @@ begin
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det1:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
feux[ligneClicSig+1].modifie:=true;
|
||||
@@ -5020,11 +5069,12 @@ begin
|
||||
tempo_feu:=i;
|
||||
end;
|
||||
|
||||
|
||||
procedure Suiv1;
|
||||
var s : string;
|
||||
i,erreur : integer;
|
||||
bt : Tequipement;
|
||||
begin
|
||||
begin
|
||||
if clicliste or (ligneClicSig<0) then exit;
|
||||
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;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det2:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
feux[ligneClicSig+1].modifie:=true;
|
||||
@@ -5093,7 +5143,7 @@ procedure TFormConfig.EditDet2Change(Sender: TObject);
|
||||
begin
|
||||
det2;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject);
|
||||
var s : string;
|
||||
@@ -5185,7 +5235,7 @@ begin
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det3:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
feux[ligneClicSig+1].modifie:=true;
|
||||
@@ -5260,7 +5310,7 @@ begin
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det4:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
feux[ligneClicSig+1].modifie:=true;
|
||||
@@ -5322,8 +5372,9 @@ end;
|
||||
|
||||
procedure TFormConfig.EditActChange(Sender: TObject);
|
||||
var s,s2 : string;
|
||||
act,erreur : integer;
|
||||
det : boolean;
|
||||
act,erreur,det1,det2,suiv : integer;
|
||||
elsuiv : tEquipement;
|
||||
de : boolean;
|
||||
begin
|
||||
if clicliste then exit;
|
||||
if affevt then affiche('Evt Edit act Change',clyellow);
|
||||
@@ -5336,11 +5387,19 @@ begin
|
||||
begin
|
||||
Val(s,act,erreur);
|
||||
if s='' then exit;
|
||||
det:=pos('Z',s)<>0; // si détecteur
|
||||
if det then s2:='Détecteur ' else s2:='Actionneur ';
|
||||
s2:=s2+intToSTR(act);
|
||||
EditAct.Hint:=s2;
|
||||
if det then delete(s,erreur,1);
|
||||
|
||||
// 0=actionneur/détecteur 2=evt aig 3=MemZone
|
||||
if (Tablo_Actionneur[ligneClicAct+1].typdeclenche=3) or (Tablo_Actionneur[ligneClicAct+1].typdeclenche=0) then
|
||||
s2:='Actionneur/Détecteur ';
|
||||
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);
|
||||
if erreur<>0 then
|
||||
begin
|
||||
@@ -5350,6 +5409,18 @@ begin
|
||||
tablo_actionneur[ligneClicAct+1].adresse:=act;
|
||||
s:=encode_act_loc_son(ligneClicAct+1);
|
||||
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;
|
||||
@@ -5357,7 +5428,8 @@ end;
|
||||
|
||||
procedure TFormConfig.EditAct2Change(Sender: TObject);
|
||||
var s : string;
|
||||
det2,erreur : integer;
|
||||
det1,det2,erreur,suiv : integer;
|
||||
elSuiv : Tequipement;
|
||||
begin
|
||||
if clicliste then exit;
|
||||
if affevt then affiche('Evt Edit act2 Change',clyellow);
|
||||
@@ -5378,6 +5450,14 @@ begin
|
||||
tablo_actionneur[ligneClicAct+1].adresse2:=det2;
|
||||
s:=encode_act_loc_son(ligneClicAct+1);
|
||||
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;
|
||||
@@ -5650,7 +5730,7 @@ begin
|
||||
feux[ligneClicSig+1].adresse:=i;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
Maj_Hint_feu(ligneClicSig+1);
|
||||
Maj_Hint_Signal(ligneClicSig+1);
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -5823,8 +5903,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
||||
var index : integer;
|
||||
begin
|
||||
@@ -5835,7 +5913,7 @@ begin
|
||||
feux[index]:=Feu_sauve;
|
||||
RichSig.Lines[ligneClicSig]:=encode_sig_feux(index);
|
||||
aff_champs_sig_feux(index); // réaffiche les champs
|
||||
Maj_Hint_feu(index);
|
||||
Maj_Hint_Signal(index);
|
||||
// change l'image du feu dans la feuille graphique principale
|
||||
Feux[index].Img.picture.Bitmap:=Select_dessin_feu(feux[index].aspect);
|
||||
dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal
|
||||
@@ -5941,7 +6019,6 @@ var i,ligne : integer;
|
||||
begin
|
||||
clicliste:=true;
|
||||
|
||||
|
||||
// désactive la sélection des actionneurs
|
||||
RE_ColorLine(Formconfig.RichAct,ligneclicAct,ClAqua);
|
||||
ligneclicAct:=-1;
|
||||
@@ -6408,7 +6485,7 @@ begin
|
||||
with formconfig do begin
|
||||
RichAct.Lines.Add(s);
|
||||
RE_ColorLine(RichAct,RichAct.lines.count-1,ClAqua);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
AncligneClicAct:=-1;
|
||||
ligneClicAct:=-1;
|
||||
@@ -6766,11 +6843,12 @@ end;
|
||||
|
||||
function verif_coherence : boolean;
|
||||
var AncAdr,i,j,k,l,Indexaig,adr,adr2,extr,detect,condcarre,nc,index2,SuivAdr,
|
||||
x,y,extr2,adr3,index3,det1Br,det2Br,det1index,det2index,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;
|
||||
c : char;
|
||||
vitesse : longint;
|
||||
ok,trouveSuiv,TrouvePrec,AdrOk : boolean;
|
||||
s : string;
|
||||
begin
|
||||
// vérification de la cohérence1
|
||||
// parcoure les branches jusqu'à trouver un aiguillage pour voir s'il a été décrit
|
||||
@@ -6857,7 +6935,7 @@ 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);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
adr:=aiguillage[Indexaig].Apointe;
|
||||
if ( ((aiguillage[Indexaig].ApointeB='Z') or (aiguillage[Indexaig].ApointeB=#0)) and (aiguillage[Indexaig].modele=aig) ) then
|
||||
@@ -6898,7 +6976,7 @@ begin
|
||||
end;
|
||||
for i:=Indexaig+1 to maxaiguillage do
|
||||
begin
|
||||
if adr=aiguillage[i].Adresse then
|
||||
if adr=aiguillage[i].Adresse then
|
||||
begin
|
||||
affiche('Erreur 6.2: aiguillage '+intToSTR(adr)+' défini deux fois',clred);
|
||||
ok:=false;
|
||||
@@ -7274,7 +7352,7 @@ begin
|
||||
extr:=aiguillage[index2].ADroit;
|
||||
if adr<>extr then Affiche('Erreur 10.33: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred);
|
||||
end;
|
||||
if c='S' then
|
||||
if c='S' then
|
||||
begin
|
||||
extr:=aiguillage[index2].ADevie;
|
||||
if adr<>extr then Affiche('Erreur 10.34: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred);
|
||||
@@ -7326,7 +7404,7 @@ begin
|
||||
extr:=aiguillage[index2].ADroit;
|
||||
if adr<>extr then Affiche('Erreur 10.43: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred);
|
||||
end;
|
||||
if c='S' then
|
||||
if c='S' then
|
||||
begin
|
||||
extr:=aiguillage[index2].ADevie;
|
||||
if adr<>extr then Affiche('Erreur 10.44: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred);
|
||||
@@ -7342,7 +7420,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
// cohérence 8
|
||||
// parcoure les branches pour voir si les aiguillages aux extrémités sont cohérentes avec leurs déclarations
|
||||
for i:=1 to NbreBranches do
|
||||
@@ -7517,6 +7595,7 @@ begin
|
||||
AdrOk:=True;
|
||||
if Verif_AdrXpressNet=1 then
|
||||
begin
|
||||
|
||||
for i:=1 to maxaiguillage do
|
||||
begin
|
||||
adresse:=aiguillage[i].Adresse ;
|
||||
@@ -7570,6 +7649,24 @@ begin
|
||||
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;
|
||||
end;
|
||||
|
||||
@@ -8117,8 +8214,6 @@ begin
|
||||
clicliste:=true;
|
||||
Aff_champs_aig_tablo(i);
|
||||
clicliste:=false;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure valide_branches;
|
||||
@@ -8784,14 +8879,14 @@ begin
|
||||
i:=ligneClicAct+1;
|
||||
if AffEvt then Affiche('RadioBoutonActDet '+IntToSTR(i),clyellow);
|
||||
Tablo_Actionneur[i].typdeclenche:=0;
|
||||
LabelActionneur.Caption:='Actionneur DétecteurZ';
|
||||
LabelActionneur.Caption:='Actionneur Détecteur';
|
||||
editAct2.Visible:=false;
|
||||
EditTrainDecl.Visible:=true;
|
||||
LabelTrain.Visible:=true;
|
||||
EditEtatActionneur.Hint:='Etat 0 ou 1';
|
||||
Tablo_Actionneur[i].trainDecl:=trainSauve;
|
||||
EditTrainDecl.Text:=trainSauve;
|
||||
|
||||
|
||||
val(editact.Text,champ,erreur);
|
||||
Tablo_actionneur[i].adresse:=champ ;
|
||||
val(editEtatActionneur.Text,champ,erreur);
|
||||
@@ -8807,6 +8902,8 @@ begin
|
||||
s:=encode_act_loc_son(i);
|
||||
RichAct.Lines[ligneClicAct]:=s;
|
||||
|
||||
EditAct.Hint:='Actionneur/Détecteur '+intToSTR(Tablo_actionneur[i].adresse);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
@@ -8839,6 +8936,9 @@ begin
|
||||
tablo_actionneur[i].Raz:=checkRaz.checked;
|
||||
s:=encode_act_loc_son(i);
|
||||
RichAct.Lines[ligneClicAct]:=s;
|
||||
|
||||
EditAct.Hint:='Actionneur/Détecteur '+intToSTR(Tablo_actionneur[i].adresse);
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormConfig.RadioButtonAigClick(Sender: TObject);
|
||||
@@ -8870,6 +8970,7 @@ begin
|
||||
tablo_actionneur[i].Raz:=checkRaz.checked;
|
||||
s:=encode_act_loc_son(i);
|
||||
RichAct.Lines[ligneClicAct]:=s;
|
||||
EditAct.Hint:='Aiguillage '+intToSTR(Tablo_actionneur[i].adresse);
|
||||
end;
|
||||
|
||||
|
||||
@@ -9589,7 +9690,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormConfig.Button1Click(Sender: TObject);
|
||||
procedure TFormConfig.ButtonTestFermeClick(Sender: TObject);
|
||||
var adr,cmd,erreur : integer;
|
||||
ts : Taccessoire;
|
||||
begin
|
||||
@@ -9602,7 +9703,7 @@ begin
|
||||
aff_acc:=false;
|
||||
end;
|
||||
|
||||
procedure TFormConfig.Button3Click(Sender: TObject);
|
||||
procedure TFormConfig.ButtonTestOuvreClick(Sender: TObject);
|
||||
var adr,cmd,erreur : integer;
|
||||
ts : Taccessoire;
|
||||
begin
|
||||
@@ -9898,7 +9999,7 @@ begin
|
||||
config_modifie:=true;
|
||||
FormConfig.RichEdittrains.Clear;
|
||||
|
||||
// réafficher le richsig
|
||||
// réafficher le richEditTrains
|
||||
for i:=1 to ntrains do
|
||||
begin
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@@ -426,7 +426,6 @@ begin
|
||||
ok:=false;
|
||||
end;
|
||||
|
||||
|
||||
AvecGrille:=checkDessineGrille.Checked;
|
||||
if ok then
|
||||
begin
|
||||
|
||||
+25
-25
@@ -9,17 +9,17 @@ implementation
|
||||
uses
|
||||
SysUtils,ActiveX,ComObj,Variants,UnitPrinc,Graphics,unitConfig,verif_version;
|
||||
Const
|
||||
NET_FW_ACTION_ALLOW = 1;
|
||||
NET_FW_IP_PROTOCOL_TCP = 6;
|
||||
NET_FW_IP_PROTOCOL_UDP = 17;
|
||||
NET_FW_IP_PROTOCOL_ANY = 256;
|
||||
NET_FW_ACTION_ALLOW=1;
|
||||
NET_FW_IP_PROTOCOL_TCP=6;
|
||||
NET_FW_IP_PROTOCOL_UDP=17;
|
||||
NET_FW_IP_PROTOCOL_ANY=256;
|
||||
net_fw_profile2_private=2;
|
||||
net_fw_profile2_public=4;
|
||||
net_fw_rule_dir_out=2;
|
||||
net_fw_rule_dir_in=1;
|
||||
NET_FW_MODIFY_STATE_OK = 0;
|
||||
NET_FW_MODIFY_STATE_GP_OVERRIDE = 1;
|
||||
NET_FW_MODIFY_STATE_INBOUND_BLOCKED = 2;
|
||||
NET_FW_MODIFY_STATE_OK=0;
|
||||
NET_FW_MODIFY_STATE_GP_OVERRIDE=1;
|
||||
NET_FW_MODIFY_STATE_INBOUND_BLOCKED=2;
|
||||
nom_regle_cdm='CDM rail';
|
||||
|
||||
// Ajoute une règle à un programme en utilisant Microsoft Windows Firewall APIs.
|
||||
@@ -34,7 +34,7 @@ begin
|
||||
// Crée l'objet FwPolicy2
|
||||
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
||||
RulesObject:=fwPolicy2.Rules;
|
||||
CurrentProfiles:= fwPolicy2.CurrentProfileTypes;
|
||||
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||
//CurrentProfiles:=net_fw_profile2_private or net_fw_profile2_public;
|
||||
|
||||
//Crée l'objet de la règle.
|
||||
@@ -110,41 +110,41 @@ end;
|
||||
// =2 oui et active
|
||||
function CheckingRuleEnabled : integer;
|
||||
var
|
||||
fwPolicy2,RulesObject,rule : OleVariant;
|
||||
PolicyModifyState,CurrentProfiles : Integer;
|
||||
fwPolicy2,RulesObject,regle : OleVariant;
|
||||
CurrentProfiles : Integer;
|
||||
bIsEnabled,trouve : Boolean;
|
||||
oEnum : IEnumvariant;
|
||||
iValue : LongWord;
|
||||
s : string;
|
||||
begin
|
||||
fwPolicy2:= CreateOleObject('HNetCfg.FwPolicy2');
|
||||
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
||||
RulesObject:=fwPolicy2.Rules;
|
||||
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||
trouve:=false ;
|
||||
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
|
||||
if (rule.Profiles And CurrentProfiles)<>0 then
|
||||
if (regle.Profiles And CurrentProfiles)<>0 then
|
||||
begin
|
||||
s:=rule.Name;
|
||||
s:=regle.Name;
|
||||
trouve:=s=nom_regle_cdm;
|
||||
if trouve then
|
||||
begin
|
||||
Affiche('Description de l''autorisation socket pour CDM rail dans le pare-feu Windows',clyellow);
|
||||
Affiche('Nom : ' + s,clLime);
|
||||
Affiche('Description : ' + rule.Description,clLime);
|
||||
Affiche('Nom d''application: ' + rule.ApplicationName,clLime);
|
||||
Affiche('Nom du service: ' + rule.ServiceName,clLime);
|
||||
bIsEnabled:=rule.enabled;
|
||||
Affiche('Description : ' + regle.Description,clLime);
|
||||
Affiche('Nom d''application: ' + regle.ApplicationName,clLime);
|
||||
Affiche('Nom du service: ' + regle.ServiceName,clLime);
|
||||
bIsEnabled:=regle.enabled;
|
||||
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
|
||||
if (rule.Protocol=NET_FW_IP_PROTOCOL_TCP) then Affiche('Protocole : TCP',clLime);
|
||||
if (rule.Protocol=NET_FW_IP_PROTOCOL_UDP) then Affiche('Protocole : UDP',clLime);
|
||||
Affiche('Ports locaux : ' + rule.LocalPorts,clLime);
|
||||
Affiche('Ports distants : ' + rule.RemotePorts,clLime);
|
||||
Affiche('Adresses locales : ' + rule.LocalAddresses,clLime);
|
||||
Affiche('Adresses distantes : ' + rule.RemoteAddresses,clLime);
|
||||
if (regle.Protocol=NET_FW_IP_PROTOCOL_TCP) then Affiche('Protocole : TCP',clLime);
|
||||
if (regle.Protocol=NET_FW_IP_PROTOCOL_UDP) then Affiche('Protocole : UDP',clLime);
|
||||
Affiche('Ports locaux : ' + regle.LocalPorts,clLime);
|
||||
Affiche('Ports distants : ' + regle.RemotePorts,clLime);
|
||||
Affiche('Adresses locales : ' + regle.LocalAddresses,clLime);
|
||||
Affiche('Adresses distantes : ' + regle.RemoteAddresses,clLime);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
+26
-20
@@ -1,6 +1,6 @@
|
||||
object FormPrinc: TFormPrinc
|
||||
Left = 86
|
||||
Top = 188
|
||||
Left = 22
|
||||
Top = 241
|
||||
Width = 1227
|
||||
Height = 671
|
||||
Caption = 'Signaux complexes'
|
||||
@@ -17,8 +17,8 @@ object FormPrinc: TFormPrinc
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
DesignSize = (
|
||||
1211
|
||||
612)
|
||||
1219
|
||||
620)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelTitre: TLabel
|
||||
@@ -1203,12 +1203,12 @@ object FormPrinc: TFormPrinc
|
||||
object SplitterH: TSplitter
|
||||
Left = 0
|
||||
Top = 0
|
||||
Height = 590
|
||||
Height = 598
|
||||
end
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 646
|
||||
Left = 630
|
||||
Top = 200
|
||||
Width = 546
|
||||
Width = 563
|
||||
Height = 392
|
||||
HorzScrollBar.Increment = 48
|
||||
HorzScrollBar.Tracking = True
|
||||
@@ -1220,9 +1220,9 @@ object FormPrinc: TFormPrinc
|
||||
TabOrder = 0
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 646
|
||||
Left = 630
|
||||
Top = 5
|
||||
Width = 266
|
||||
Width = 265
|
||||
Height = 52
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Commande d'#39'accessoires'
|
||||
@@ -1268,8 +1268,8 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 590
|
||||
Width = 1211
|
||||
Top = 598
|
||||
Width = 1219
|
||||
Height = 22
|
||||
Panels = <>
|
||||
SimplePanel = True
|
||||
@@ -1324,9 +1324,9 @@ object FormPrinc: TFormPrinc
|
||||
OnClick = BoutonRafClick
|
||||
end
|
||||
object ButtonArretSimu: TButton
|
||||
Left = 8
|
||||
Top = 48
|
||||
Width = 89
|
||||
Left = 192
|
||||
Top = 88
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Arret simulation'
|
||||
TabOrder = 1
|
||||
@@ -1377,11 +1377,11 @@ object FormPrinc: TFormPrinc
|
||||
OnClick = BoutonRazTrainsClick
|
||||
end
|
||||
object ButtonAffAnalyseCDM: TButton
|
||||
Left = 184
|
||||
Top = 88
|
||||
Left = 8
|
||||
Top = 48
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Affiche fen'#234'tre analyse CDM'
|
||||
Caption = 'Affiche le r'#233'seau CDM'
|
||||
TabOrder = 6
|
||||
Visible = False
|
||||
WordWrap = True
|
||||
@@ -1460,7 +1460,7 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
end
|
||||
object GroupBox3: TGroupBox
|
||||
Left = 646
|
||||
Left = 630
|
||||
Top = 64
|
||||
Width = 265
|
||||
Height = 129
|
||||
@@ -1927,9 +1927,15 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
object Analyser1: TMenuItem
|
||||
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
|
||||
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
|
||||
Caption = '-'
|
||||
end
|
||||
@@ -1990,7 +1996,7 @@ object FormPrinc: TFormPrinc
|
||||
OnClick = Copier1Click
|
||||
end
|
||||
object Coller1: TMenuItem
|
||||
Caption = 'Coller'
|
||||
Caption = 'Coller, compiler et importer le r'#233'seau CDM rail'
|
||||
OnClick = Coller1Click
|
||||
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
|
||||
// d'état sont renvoyés par la centrale.
|
||||
|
||||
{$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
|
||||
//{$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
|
||||
|
||||
interface
|
||||
|
||||
@@ -168,6 +168,7 @@ type
|
||||
Analyser1: TMenuItem;
|
||||
Coller1: TMenuItem;
|
||||
ButtonAffAnalyseCDM: TButton;
|
||||
Affiche_fenetre_CDM: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MSCommUSBLenzComm(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
@@ -250,6 +251,7 @@ type
|
||||
procedure Analyser1Click(Sender: TObject);
|
||||
procedure Coller1Click(Sender: TObject);
|
||||
procedure ButtonAffAnalyseCDMClick(Sender: TObject);
|
||||
procedure Affiche_fenetre_CDMClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
procedure DoHint(Sender : Tobject);
|
||||
@@ -351,7 +353,7 @@ Taiguillage = record
|
||||
end;
|
||||
|
||||
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
|
||||
Lbl : TLabel; // pointeur sur structure Tlabel du feu
|
||||
checkFB : TCheckBox; // pointeur sur structure Checkbox "demande feu blanc"
|
||||
@@ -409,13 +411,13 @@ var
|
||||
|
||||
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
|
||||
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,
|
||||
NackCDM,MsgSim,StopSimu,succes,recu_cv,AffAigDet,AffTiers,AvecDemandeAiguillages,
|
||||
TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM,AvecInitAiguillages,
|
||||
AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro,
|
||||
retEtatDet,roulage,init_aig_cours,affevt,placeAffiche,clicComboTrain,clicAdrTrain,
|
||||
avec_splitter : boolean;
|
||||
avec_splitter,fichier_module_cdm,Diffusion : boolean;
|
||||
|
||||
tick,Premier_tick : longint;
|
||||
|
||||
@@ -478,8 +480,8 @@ var
|
||||
record
|
||||
etat : boolean; // mémoires de zones des détecteurs
|
||||
train : string;
|
||||
NumTrain // index du tableau de tous les trains
|
||||
,AdrTrain : integer;
|
||||
NumTrain, // index du tableau de tous les trains
|
||||
AdrTrain : integer;
|
||||
end;
|
||||
|
||||
Tablo_actionneur : array[0..Max_actionneurs] of
|
||||
@@ -504,9 +506,9 @@ var
|
||||
commandeOuvre : integer; // commande d'ouverture (1 ou 2)
|
||||
NbVoies : integer; // Nombre de voies du PN
|
||||
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
|
||||
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
|
||||
end;
|
||||
end;
|
||||
@@ -540,6 +542,9 @@ var
|
||||
TempoArret : integer; // tempo d'arret pour le timer
|
||||
TempoDemarre : integer;
|
||||
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;
|
||||
|
||||
// éléments scannés et/ou verrouillés
|
||||
@@ -548,12 +553,14 @@ var
|
||||
typ : Tequipement;
|
||||
end;
|
||||
|
||||
// liste des trains placés
|
||||
Placement : array[1..10] of record
|
||||
train : string;
|
||||
detecteur,detdir : integer;
|
||||
inverse : boolean;
|
||||
end;
|
||||
|
||||
// liste des évènements détecteurs
|
||||
event_det : array[1..Max_event_det] of record
|
||||
adresse : integer;
|
||||
etat : boolean;
|
||||
@@ -561,7 +568,7 @@ var
|
||||
|
||||
event_det_train : array[0..Max_Trains] of record
|
||||
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
|
||||
suivant : integer; // suivant prévisionnel à det1 et det2
|
||||
Det : array[1..2] of record
|
||||
@@ -571,7 +578,6 @@ var
|
||||
end;
|
||||
Feu_supprime,Feu_sauve : Tfeu;
|
||||
Aig_supprime,Aig_sauve : TAiguillage;
|
||||
Fimage : Timage;
|
||||
BrancheN : array[1..MaxBranches,1..MaxElBranches] of TBranche;
|
||||
|
||||
{$R *.dfm}
|
||||
@@ -627,6 +633,8 @@ function signal_detecteur(detecteur : integer) : integer;
|
||||
function det_suiv_cont(det1,det2,alg : integer) : integer;
|
||||
function BTypeToChaine(BT : TEquipement) : string;
|
||||
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
|
||||
|
||||
@@ -4096,7 +4104,7 @@ begin
|
||||
Adr:=aiguillage[index].Adroit;
|
||||
if adr<>0 then
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||
end
|
||||
@@ -4127,7 +4135,7 @@ begin
|
||||
Adr:=aiguillage[index].Adevie;
|
||||
if adr<>0 then
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||
end
|
||||
@@ -4198,7 +4206,7 @@ begin
|
||||
if adr<>0 then
|
||||
begin
|
||||
// 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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype;
|
||||
end
|
||||
@@ -4304,7 +4312,7 @@ begin
|
||||
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;
|
||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||
exit;
|
||||
@@ -4322,7 +4330,7 @@ begin
|
||||
Adr:=aiguillage[index].Ddevie;
|
||||
A:=aiguillage[index].DdevieB;
|
||||
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;
|
||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||
exit;
|
||||
@@ -4354,7 +4362,7 @@ begin
|
||||
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;
|
||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||
exit;
|
||||
@@ -4372,7 +4380,7 @@ begin
|
||||
Adr:=aiguillage[index].Ddroit;
|
||||
A:=aiguillage[index].DdroitB;
|
||||
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;
|
||||
if nivDebug=3 then Affichedebug('le port de destination de la tjd 2 états est '+IntToSTR(adr)+a,clyellow);
|
||||
exit;
|
||||
@@ -4432,7 +4440,7 @@ begin
|
||||
A:=aiguillage[index2].AdevieB;
|
||||
end;
|
||||
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;
|
||||
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);
|
||||
@@ -4499,7 +4507,7 @@ begin
|
||||
Adr:=aiguillage[index2].Adroit;
|
||||
A:=aiguillage[index2].AdroitB;
|
||||
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;
|
||||
suivant_alg3:=adr;
|
||||
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;
|
||||
A:=aiguillage[index2].AdroitB;
|
||||
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;
|
||||
suivant_alg3:=adr;
|
||||
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;
|
||||
end;
|
||||
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;
|
||||
suivant_alg3:=adr;
|
||||
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);
|
||||
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
||||
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;
|
||||
suivant_alg3:=adr;
|
||||
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);
|
||||
A:=aiguillage[index_aig(AdrTjdP)].AdevieB;
|
||||
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;
|
||||
Actuel:=aiguillage[index2].Adresse;
|
||||
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].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;
|
||||
if a='' then a:=' ';
|
||||
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);
|
||||
A:=aiguillage[index].AdroitB;
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||
suivant_alg3:=adr;exit;
|
||||
@@ -4719,7 +4727,7 @@ begin
|
||||
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié1 (à gauche)',clYellow);
|
||||
A:=aiguillage[index].AdevieB;
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||
suivant_alg3:=adr;exit;
|
||||
@@ -4729,7 +4737,7 @@ begin
|
||||
if NivDebug=3 then AfficheDebug('Aiguillage triple dévié2 (à droite)',clYellow);
|
||||
A:=aiguillage[index].Adevie2B;
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||
suivant_alg3:=adr;
|
||||
@@ -4790,7 +4798,7 @@ begin
|
||||
end;
|
||||
A:=aiguillage[index].ApointeB;
|
||||
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
|
||||
typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].BType;
|
||||
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
|
||||
// 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
|
||||
// s'ils ne sont pas contigus, renvoie 0
|
||||
// Si un élément est inconnu, renvoie 9999
|
||||
@@ -5237,6 +5246,7 @@ begin
|
||||
end;
|
||||
|
||||
// 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
|
||||
procedure Det_Adj(adresse : integer);
|
||||
var Adr,AdrFonc,Branche,AdrPrec,IndexBranche,i,Dir : integer;
|
||||
@@ -7383,13 +7393,16 @@ begin
|
||||
if i<MaxTrainZone then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre+1;
|
||||
if n>MaxZones then n:=1;
|
||||
with TrainZone[i] do
|
||||
if n>0 then
|
||||
begin
|
||||
Nbre:=n;
|
||||
Zone[n].det1:=det3;
|
||||
Zone[n].det2:=AdrSuiv;
|
||||
Nbre:=n;
|
||||
if n>MaxZones then n:=1;
|
||||
with TrainZone[i] do
|
||||
begin
|
||||
Nbre:=n;
|
||||
Zone[n].det1:=det3;
|
||||
Zone[n].det2:=AdrSuiv;
|
||||
Nbre:=n;
|
||||
end;
|
||||
end;
|
||||
// zone suivante en prévision
|
||||
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);
|
||||
// vérifier si l'élément du tableau et le nouveau sont contigus
|
||||
Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2
|
||||
suivok:=(Adj1=det3) or (Adj2=det3);
|
||||
suivok:=((Adj1=det3) and (adj1<9999)) or ((Adj2=det3) and (adj2<9990));
|
||||
if suivok then
|
||||
begin
|
||||
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
|
||||
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);
|
||||
SuivOk:=det_suiv=det3;
|
||||
SuivOk:=(det_suiv=det3) and (det_suiv<9990);
|
||||
CasAig:=false;
|
||||
|
||||
if not(SuivOk) then
|
||||
@@ -7768,7 +7781,7 @@ begin
|
||||
// ici on cherche le suivant à det2 det3, algo=1
|
||||
event_det_tick[N_event_tick].train:=i;
|
||||
if not(casAig) then AdrSuiv:=detecteur_suivant_el(det2,det,det3,det,0); // dans le cas de CasAig, alors adrSuiv=9996 donc AdrSuiv est calculé plus haut
|
||||
event_det_train[i].suivant:=AdrSuiv;
|
||||
if AdrSuiv<9990 then event_det_train[i].suivant:=AdrSuiv;
|
||||
if TraceListe then AfficheDebug('le sursuivant est '+intToSTR(adrsuiv),couleur);
|
||||
if (Adrsuiv>=9990) and not(casaig) then
|
||||
begin
|
||||
@@ -7943,7 +7956,7 @@ begin
|
||||
// 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)
|
||||
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
|
||||
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);
|
||||
@@ -7987,17 +8000,20 @@ begin
|
||||
if i<MaxTrainZone then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre;
|
||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||
if n>0 then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre+1;
|
||||
if n>MaxZones then n:=1;
|
||||
TrainZone[i].Nbre:=n;
|
||||
TrainZone[i].Zone[n].det1:=det2;
|
||||
TrainZone[i].Zone[n].det2:=det3;
|
||||
TrainZone[i].Nbre:=n;
|
||||
// zone suivante en prévision
|
||||
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
||||
TrainPrevZone[i][1]:=det4;
|
||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre+1;
|
||||
if n>MaxZones then n:=1;
|
||||
TrainZone[i].Nbre:=n;
|
||||
TrainZone[i].Zone[n].det1:=det2;
|
||||
TrainZone[i].Zone[n].det2:=det3;
|
||||
TrainZone[i].Nbre:=n;
|
||||
// zone suivante en prévision
|
||||
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
||||
TrainPrevZone[i][1]:=det4;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
// affichages
|
||||
@@ -8045,6 +8061,7 @@ begin
|
||||
for i:=1 to N_trains do
|
||||
begin
|
||||
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 ;
|
||||
det_adj(det3);
|
||||
if (adj1=i2) or (adj2=i2) then
|
||||
@@ -8664,14 +8681,17 @@ begin
|
||||
if i<MaxTrainZone then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre;
|
||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||
if n>0 then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre+1;
|
||||
if n>MaxZones then n:=1;
|
||||
TrainZone[i].Nbre:=n;
|
||||
TrainZone[i].Zone[n].det1:=det2;
|
||||
TrainZone[i].Zone[n].det2:=det3;
|
||||
TrainZone[i].Nbre:=n;
|
||||
if (TrainZone[i].Zone[n].det1<>det2) or (TrainZone[i].Zone[n].det2<>det3) then
|
||||
begin
|
||||
n:=TrainZone[i].Nbre+1;
|
||||
if n>MaxZones then n:=1;
|
||||
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
|
||||
det4:=detecteur_suivant_EL(det2,det,det3,det,1);
|
||||
TrainPrevZone[i][1]:=det4;
|
||||
@@ -9994,7 +10014,7 @@ begin
|
||||
result:='';
|
||||
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
|
||||
function decode_chaine_retro_Xpress(chaineINT : string) : string ;
|
||||
var msg : string;
|
||||
@@ -10369,24 +10389,24 @@ begin
|
||||
InputMode:=comInputModeBinary;
|
||||
end;
|
||||
|
||||
portCommOuvert:=true;
|
||||
try
|
||||
Formprinc.MSCommUSBLenz.portopen:=true;
|
||||
except
|
||||
portCommOuvert:=false;
|
||||
end;
|
||||
portCommOuvert:=true;
|
||||
try
|
||||
Formprinc.MSCommUSBLenz.portopen:=true;
|
||||
except
|
||||
portCommOuvert:=false;
|
||||
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
|
||||
Affiche('Port COM'+intToSTR(port)+' ouvert',clLime);
|
||||
sleep(1000);
|
||||
trouve:=test_protocole;
|
||||
if not(trouve) then
|
||||
begin
|
||||
portCommOuvert:=false;
|
||||
Formprinc.MSCommUSBLenz.portopen:=false;
|
||||
end;
|
||||
portCommOuvert:=false;
|
||||
Formprinc.MSCommUSBLenz.portopen:=false;
|
||||
end;
|
||||
end;
|
||||
if trouve then result:=port else result:=0;
|
||||
end;
|
||||
|
||||
@@ -10422,7 +10442,7 @@ end;
|
||||
procedure connecte_interface_ethernet;
|
||||
begin
|
||||
etat_init_interface:=0;
|
||||
// sinon ouvrir socket vers la centrale
|
||||
// ouvrir socket vers la centrale
|
||||
// Initialisation de la comm socket LENZ
|
||||
if AdresseIP<>'0' then
|
||||
begin
|
||||
@@ -10439,6 +10459,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// connecte la centrale en USB/COM en explorant les ports USB/COM de 1 à MaxComPort
|
||||
procedure connecte_usb;
|
||||
var numport,erreur : integer;
|
||||
s : string;
|
||||
@@ -10496,6 +10517,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// renvoie le handle de la frnêtre du programme de processID (CDMrail)
|
||||
Function GetWindowFromID(ProcessID : Cardinal): THandle;
|
||||
Var TestID : Cardinal;
|
||||
TestHandle : Thandle;
|
||||
@@ -10661,7 +10683,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
ShowMessage('CDM rail introuvable : '+#13#10+'Erreur='+intToSTR(retour));
|
||||
Affiche('CDM rail introuvable. Erreur='+intToSTR(retour),clred);
|
||||
lance_CDM:=false;
|
||||
exit;
|
||||
end;
|
||||
@@ -10674,7 +10696,7 @@ begin
|
||||
Affiche('Lance les fonctions automatiques de CDM',clyellow);
|
||||
Sleep(3000);
|
||||
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;
|
||||
|
||||
// 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 ;
|
||||
var i : integer;
|
||||
begin
|
||||
// raz des réservations
|
||||
// raz des réservations
|
||||
for i:=1 to MaxAiguillage do
|
||||
aiguillage[i].AdrTrain:=0;
|
||||
end;
|
||||
@@ -10916,24 +10938,21 @@ function GetMACAdress: string;
|
||||
var
|
||||
NCB: PNCB;
|
||||
Adapter: PAdapterStatus;
|
||||
|
||||
URetCode: PChar;
|
||||
RetCode: char;
|
||||
RetCode: Ansichar;
|
||||
I: integer;
|
||||
Lenum: PlanaEnum;
|
||||
_SystemID: string;
|
||||
TMPSTR: string;
|
||||
begin
|
||||
Result := '';
|
||||
_SystemID := '';
|
||||
Getmem(NCB, SizeOf(TNCB));
|
||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
||||
Result:='';
|
||||
_SystemID:='';
|
||||
Getmem(NCB,SizeOf(TNCB));
|
||||
Fillchar(NCB^,SizeOf(TNCB),0);
|
||||
|
||||
Getmem(Lenum, SizeOf(TLanaEnum));
|
||||
Fillchar(Lenum^, SizeOf(TLanaEnum), 0);
|
||||
Getmem(Lenum,SizeOf(TLanaEnum));
|
||||
Fillchar(Lenum^,SizeOf(TLanaEnum),0);
|
||||
|
||||
Getmem(Adapter, SizeOf(TAdapterStatus));
|
||||
Fillchar(Adapter^, SizeOf(TAdapterStatus), 0);
|
||||
Getmem(Adapter,SizeOf(TAdapterStatus));
|
||||
Fillchar(Adapter^,SizeOf(TAdapterStatus),0);
|
||||
|
||||
Lenum.Length := chr(0);
|
||||
NCB.ncb_command := chr(NCBENUM);
|
||||
@@ -10941,76 +10960,76 @@ begin
|
||||
NCB.ncb_length := SizeOf(Lenum);
|
||||
RetCode := Netbios(NCB);
|
||||
|
||||
i := 0;
|
||||
i:=0;
|
||||
repeat
|
||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
||||
Ncb.ncb_command := chr(NCBRESET);
|
||||
Ncb.ncb_lana_num := lenum.lana[I];
|
||||
RetCode := Netbios(Ncb);
|
||||
Fillchar(NCB^,SizeOf(TNCB), 0);
|
||||
Ncb.ncb_command:=chr(NCBRESET);
|
||||
Ncb.ncb_lana_num:=lenum.lana[I];
|
||||
RetCode:=Netbios(Ncb);
|
||||
|
||||
Fillchar(NCB^, SizeOf(TNCB), 0);
|
||||
Ncb.ncb_command := chr(NCBASTAT);
|
||||
Ncb.ncb_lana_num := lenum.lana[I];
|
||||
Fillchar(NCB^,SizeOf(TNCB), 0);
|
||||
Ncb.ncb_command:=chr(NCBASTAT);
|
||||
Ncb.ncb_lana_num:=lenum.lana[I];
|
||||
// Must be 16
|
||||
Ncb.ncb_callname := '* ';
|
||||
Ncb.ncb_callname:='* ';
|
||||
|
||||
Ncb.ncb_buffer := Pointer(Adapter);
|
||||
Ncb.ncb_buffer:=Pointer(Adapter);
|
||||
|
||||
Ncb.ncb_length := SizeOf(TAdapterStatus);
|
||||
RetCode := Netbios(Ncb);
|
||||
//---- calc _systemId from mac-address[2-5] XOR mac-address[1]...
|
||||
if (RetCode = chr(0)) or (RetCode = chr(6)) then
|
||||
Ncb.ncb_length:=SizeOf(TAdapterStatus);
|
||||
RetCode:=Netbios(Ncb);
|
||||
//---- calc _systemId de la mac-address[2-5] XOR mac-address[1]...
|
||||
if (RetCode=chr(0)) or (RetCode=chr(6)) then
|
||||
begin
|
||||
_SystemId := IntToHex(Ord(Adapter.adapter_address[0]), 2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[1]), 2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[2]), 2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[3]), 2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[4]), 2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[5]), 2);
|
||||
IntToHex(Ord(Adapter.adapter_address[1]),2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[2]),2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[3]),2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[4]),2) + '-' +
|
||||
IntToHex(Ord(Adapter.adapter_address[5]),2);
|
||||
end;
|
||||
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(Adapter);
|
||||
FreeMem(Lenum);
|
||||
GetMacAdress := _SystemID;
|
||||
GetMacAdress:=_SystemID;
|
||||
end;
|
||||
|
||||
// ex2
|
||||
function GetAdapterInfo(Lana: Char): String;
|
||||
function GetAdapterInfo(Lana: AnsiChar): String;
|
||||
var
|
||||
Adapter: TAdapterStatus;
|
||||
NCB: TNCB;
|
||||
begin
|
||||
FillChar(NCB, SizeOf(NCB), 0);
|
||||
NCB.ncb_command := Char(NCBRESET);
|
||||
NCB.ncb_lana_num := Lana;
|
||||
if Netbios(@NCB) <> Char(NRC_GOODRET) then
|
||||
FillChar(NCB,SizeOf(NCB),0);
|
||||
NCB.ncb_command:=Char(NCBRESET);
|
||||
NCB.ncb_lana_num:=Lana;
|
||||
if Netbios(@NCB)<>Char(NRC_GOODRET) then
|
||||
begin
|
||||
Result := 'mac not found';
|
||||
Result:='mac non trouvée';
|
||||
Exit;
|
||||
end;
|
||||
|
||||
FillChar(NCB, SizeOf(NCB), 0);
|
||||
NCB.ncb_command := Char(NCBASTAT);
|
||||
NCB.ncb_lana_num := Lana;
|
||||
NCB.ncb_callname := '*';
|
||||
FillChar(NCB,SizeOf(NCB), 0);
|
||||
NCB.ncb_command:=Char(NCBASTAT);
|
||||
NCB.ncb_lana_num:=Lana;
|
||||
NCB.ncb_callname:='*';
|
||||
|
||||
FillChar(Adapter, SizeOf(Adapter), 0);
|
||||
NCB.ncb_buffer := @Adapter;
|
||||
NCB.ncb_length := SizeOf(Adapter);
|
||||
if Netbios(@NCB) <> Char(NRC_GOODRET) then
|
||||
FillChar(Adapter,SizeOf(Adapter), 0);
|
||||
NCB.ncb_buffer:=@Adapter;
|
||||
NCB.ncb_length:=SizeOf(Adapter);
|
||||
if Netbios(@NCB)<>Char(NRC_GOODRET) then
|
||||
begin
|
||||
Result := 'mac not found';
|
||||
Result:='mac non trouvée';
|
||||
Exit;
|
||||
end;
|
||||
Result :=
|
||||
IntToHex(Byte(Adapter.adapter_address[0]), 2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[1]), 2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[2]), 2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[3]), 2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[4]), 2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[5]), 2);
|
||||
Result:=
|
||||
IntToHex(Byte(Adapter.adapter_address[0]),2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[1]),2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[2]),2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[3]),2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[4]),2) + '-' +
|
||||
IntToHex(Byte(Adapter.adapter_address[5]),2);
|
||||
end;
|
||||
|
||||
function GetMACAddress: string;
|
||||
@@ -11018,15 +11037,15 @@ var
|
||||
AdapterList: TLanaEnum;
|
||||
NCB: TNCB;
|
||||
begin
|
||||
FillChar(NCB, SizeOf(NCB), 0);
|
||||
NCB.ncb_command := Char(NCBENUM);
|
||||
NCB.ncb_buffer := @AdapterList;
|
||||
NCB.ncb_length := SizeOf(AdapterList);
|
||||
FillChar(NCB,SizeOf(NCB),0);
|
||||
NCB.ncb_command:=Char(NCBENUM);
|
||||
NCB.ncb_buffer:=@AdapterList;
|
||||
NCB.ncb_length:=SizeOf(AdapterList);
|
||||
Netbios(@NCB);
|
||||
if Byte(AdapterList.length) > 0 then
|
||||
Result := GetAdapterInfo(AdapterList.lana[0])
|
||||
if Byte(AdapterList.length)>0 then
|
||||
Result:=GetAdapterInfo(AdapterList.lana[0])
|
||||
else
|
||||
Result := 'mac not found';
|
||||
Result:='mac non trouvée';
|
||||
end;
|
||||
|
||||
// démarrage principal du programme signaux_complexes
|
||||
@@ -11049,7 +11068,7 @@ begin
|
||||
Srvc_Aig:=true;
|
||||
Srvc_Det:=true;
|
||||
Srvc_Act:=true;
|
||||
Srvc_PosTrain:=false;
|
||||
Srvc_Pos:=false;
|
||||
Srvc_sig:=false;
|
||||
|
||||
DebugAffiche:=false;
|
||||
@@ -11066,7 +11085,9 @@ begin
|
||||
// box3=vitesses et fonctions F
|
||||
GroupBox3.Left:=633;
|
||||
GroupBox3.Top:=60;
|
||||
GroupBox1.Left:=633;
|
||||
GroupBox3.visible:=true;
|
||||
ScrollBox1.Left:=633;
|
||||
|
||||
procetape(''); //0
|
||||
|
||||
@@ -11092,14 +11113,14 @@ begin
|
||||
avecRoulage:=0;
|
||||
formatY:=-1;
|
||||
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;
|
||||
FenRich.MaxLength:=$7FFFFFF0;
|
||||
|
||||
OsBits:=0;
|
||||
if IsWow64Process then
|
||||
begin
|
||||
OsBits:=64;
|
||||
OsBits:=64;
|
||||
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)');
|
||||
end
|
||||
else
|
||||
@@ -11108,6 +11129,8 @@ begin
|
||||
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES');
|
||||
end;
|
||||
// version d'OS pour info
|
||||
application.ProcessMessages;
|
||||
|
||||
if OsBits=64 then s:='OS 64 Bits' else s:='OS 32 Bits';
|
||||
s:=DateToStr(date)+' '+TimeToStr(Time)+' '+s;
|
||||
Affiche(s,clLime);
|
||||
@@ -11226,6 +11249,8 @@ begin
|
||||
end;
|
||||
|
||||
Application.HintHidePause:=30000;
|
||||
Application.HintColor:=$70FFFF;
|
||||
Application.HintPause:=400;
|
||||
visible:=true; // rend la form visible plus tot
|
||||
|
||||
for i:=1 to MaxCdeDccpp do CdeDccpp[i]:='';
|
||||
@@ -11289,6 +11314,14 @@ begin
|
||||
Affiche_memoire;
|
||||
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
|
||||
procetape('Test CDM et son lancement');
|
||||
@@ -11382,6 +11415,16 @@ begin
|
||||
procetape('Terminé !!');
|
||||
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
|
||||
begin
|
||||
ReadOnly:=false;
|
||||
@@ -12484,8 +12527,8 @@ begin
|
||||
begin
|
||||
train:=copy(commandeCDM,i+6,l-i-6);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
i:=posEx('STATE=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||
if (i<>0) and (l<>0) then
|
||||
begin
|
||||
@@ -12493,14 +12536,14 @@ begin
|
||||
val(ss,etat,erreur);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
|
||||
i:=posEx('NAME=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||
if (i<>0) and (l<>0) then
|
||||
begin
|
||||
nom:=copy(commandeCDM,i+6,l-i-6);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
|
||||
i:=posEx('OBJ=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||
if (i<>0) and (l<>0) then
|
||||
begin
|
||||
@@ -12508,7 +12551,7 @@ begin
|
||||
val(ss,objet,erreur);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
|
||||
Event_detecteur(Adr,etat=1,train);
|
||||
end ;
|
||||
|
||||
@@ -12615,7 +12658,7 @@ begin
|
||||
|
||||
// é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;
|
||||
i:=pos('CDMTRN-SPDXY',commandeCDM);
|
||||
i:=pos('CMDTRN-SPDXY',commandeCDM);
|
||||
if i<>0 then
|
||||
begin
|
||||
Delete(commandeCDM,i,12);
|
||||
@@ -12680,13 +12723,13 @@ begin
|
||||
s:=s+' Y2='+IntTostr(y2);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
if fichier_module_CDM then Aff_train(adr,train,x,y,x2,y2);
|
||||
if afftiers then afficheDebug(s,clAqua);
|
||||
end;
|
||||
|
||||
// é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;
|
||||
i:=pos('CDMTRN-SPEED',commandeCDM);
|
||||
i:=pos('CMDTRN-SPEED',commandeCDM);
|
||||
if i<>0 then
|
||||
begin
|
||||
Delete(commandeCDM,i,12);
|
||||
@@ -12715,7 +12758,7 @@ begin
|
||||
s:=s+' SPEED='+IntToSTR(vitesse);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
|
||||
i:=posEx('RMAX=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||
if (i<>0) and (l<>0) then
|
||||
begin
|
||||
@@ -12744,12 +12787,12 @@ begin
|
||||
end;
|
||||
|
||||
if afftiers then afficheDebug(s,clAqua);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
// é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;
|
||||
i:=pos('CDMTRN-P_CDM',commandeCDM);
|
||||
i:=pos('CMDTRN-P_CDM',commandeCDM);
|
||||
if i<>0 then
|
||||
begin
|
||||
Delete(commandeCDM,i,12);
|
||||
@@ -12778,7 +12821,7 @@ begin
|
||||
s:=s+' SPEED='+IntToSTR(vitesse);
|
||||
Delete(commandeCDM,i,l-i+1);
|
||||
end;
|
||||
|
||||
|
||||
i:=posEx('SEG=',commandeCDM,1);l:=posEx(';',commandeCDM,i);
|
||||
if (i<>0) and (l<>0) then
|
||||
begin
|
||||
@@ -13900,11 +13943,13 @@ begin
|
||||
begin
|
||||
Affiche('Pas de module détecté',clyellow);
|
||||
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('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('Dans la fenêtre graphique d''importation cliquer sur importer',clLime);
|
||||
Affiche('Attention : nécessite la version >=23.05 de CDM',clLime);
|
||||
Affiche(' ',clLime);
|
||||
Affiche('Dans Signaux complexes, clic droit et "coller, compiler et importer le réseau CDM rail" ',clLime);
|
||||
Affiche('Dans la fenêtre graphique d''importation cliquer sur "compiler"',clLime);
|
||||
|
||||
|
||||
|
||||
if lance_cdm(false) then
|
||||
@@ -13923,7 +13968,7 @@ begin
|
||||
|
||||
KeybdInput(VK_DOWN,0);
|
||||
KeybdInput(VK_DOWN,KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_RETURN,0); // valide le menu "track drawing"
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
@@ -13942,7 +13987,6 @@ begin
|
||||
exit;
|
||||
|
||||
end;
|
||||
Analyse_seg;
|
||||
|
||||
end;
|
||||
|
||||
@@ -13956,16 +14000,24 @@ begin
|
||||
PasteFromClipboard;
|
||||
SetFocus;
|
||||
ReadOnly:=true;
|
||||
end;
|
||||
end;
|
||||
compilation;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.ButtonAffAnalyseCDMClick(Sender: TObject);
|
||||
begin
|
||||
FormAnalyseCDM.WindowState:=wsMaximized;
|
||||
//FormAnalyseCDM.WindowState:=wsMaximized;
|
||||
formAnalyseCDM.Show;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.Affiche_fenetre_CDMClick(Sender: TObject);
|
||||
begin
|
||||
formAnalyseCDM.Show;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
||||
+19
-22
@@ -428,7 +428,6 @@ begin
|
||||
labelCV26.Caption:='CV='+IntToSTR(etat2);
|
||||
feux[indexSig].SR[7].sortie1:=i;
|
||||
maj_db;
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormSR.ComboBoxAdr14Change(Sender: TObject);
|
||||
@@ -464,30 +463,28 @@ begin
|
||||
maj_db;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormSR.FormCreate(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
for i:=0 to 19 do
|
||||
begin
|
||||
ComboBoxAdr1.items.add(etats[i]);
|
||||
ComboBoxAdr2.items.add(etats[i]);
|
||||
ComboBoxAdr3.items.add(etats[i]);
|
||||
ComboBoxAdr4.items.add(etats[i]);
|
||||
ComboBoxAdr5.items.add(etats[i]);
|
||||
ComboBoxAdr6.items.add(etats[i]);
|
||||
ComboBoxAdr7.items.add(etats[i]);
|
||||
ComboBoxAdr8.items.add(etats[i]);
|
||||
ComboBoxAdr9.items.add(etats[i]);
|
||||
ComboBoxAdr10.items.add(etats[i]);
|
||||
ComboBoxAdr11.items.add(etats[i]);
|
||||
ComboBoxAdr12.items.add(etats[i]);
|
||||
ComboBoxAdr13.items.add(etats[i]);
|
||||
ComboBoxAdr14.items.add(etats[i]);
|
||||
ComboBoxAdr15.items.add(etats[i]);
|
||||
ComboBoxAdr16.items.add(etats[i]);
|
||||
end;
|
||||
for i:=0 to 19 do
|
||||
begin
|
||||
ComboBoxAdr1.items.add(etats[i]);
|
||||
ComboBoxAdr2.items.add(etats[i]);
|
||||
ComboBoxAdr3.items.add(etats[i]);
|
||||
ComboBoxAdr4.items.add(etats[i]);
|
||||
ComboBoxAdr5.items.add(etats[i]);
|
||||
ComboBoxAdr6.items.add(etats[i]);
|
||||
ComboBoxAdr7.items.add(etats[i]);
|
||||
ComboBoxAdr8.items.add(etats[i]);
|
||||
ComboBoxAdr9.items.add(etats[i]);
|
||||
ComboBoxAdr10.items.add(etats[i]);
|
||||
ComboBoxAdr11.items.add(etats[i]);
|
||||
ComboBoxAdr12.items.add(etats[i]);
|
||||
ComboBoxAdr13.items.add(etats[i]);
|
||||
ComboBoxAdr14.items.add(etats[i]);
|
||||
ComboBoxAdr15.items.add(etats[i]);
|
||||
ComboBoxAdr16.items.add(etats[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormSR.BitBtnokClick(Sender: TObject);
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
object FormTCO: TFormTCO
|
||||
Left = 155
|
||||
Top = 53
|
||||
Left = 163
|
||||
Top = 46
|
||||
Width = 1142
|
||||
Height = 678
|
||||
VertScrollBar.Visible = False
|
||||
@@ -22,8 +22,8 @@ object FormTCO: TFormTCO
|
||||
OnKeyPress = FormKeyPress
|
||||
OnMouseWheel = FormMouseWheel
|
||||
DesignSize = (
|
||||
1126
|
||||
639)
|
||||
1134
|
||||
647)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelCoord: TLabel
|
||||
@@ -81,13 +81,13 @@ object FormTCO: TFormTCO
|
||||
ParentFont = False
|
||||
end
|
||||
object ImageTemp: TImage
|
||||
Left = 976
|
||||
Left = 888
|
||||
Top = 96
|
||||
Width = 97
|
||||
Height = 97
|
||||
end
|
||||
object ImageTemp2: TImage
|
||||
Left = 976
|
||||
Left = 888
|
||||
Top = 208
|
||||
Width = 97
|
||||
Height = 97
|
||||
|
||||
+24
-18
@@ -383,7 +383,7 @@ var
|
||||
|
||||
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,
|
||||
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;
|
||||
s : string;
|
||||
begin
|
||||
//if tco[x,y].BImage=0 then exit;
|
||||
//Affiche('Affiche_cellule',clLime);
|
||||
PcanvasTCO.pen.Mode:=PmCopy;
|
||||
adresse:=tco[x,y].Adresse;
|
||||
@@ -5286,27 +5287,28 @@ begin
|
||||
if XclicCell>NbreCellX then exit;
|
||||
if YclicCell>NbreCellY then exit;
|
||||
Bimage:=tco[XClicCell,YClicCell].Bimage;
|
||||
|
||||
if formConfCellTCOAff then
|
||||
begin
|
||||
|
||||
// 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)
|
||||
or (bimage=14) or (bimage=15) or (bimage=24) then
|
||||
begin
|
||||
// aiguillage inversé
|
||||
with FormConfCellTCO.CheckPinv do
|
||||
// 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)
|
||||
or (bimage=14) or (bimage=15) or (bimage=24) then
|
||||
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;
|
||||
CheckPinv.checked:=TCO[XClicCell,YClicCell].inverse;
|
||||
CheckPinv.enabled:=true ;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CheckPinv.enabled:=false;
|
||||
FormConfCellTCO.checkPinv.enabled:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
// si voie ou rien ou signal ou quai
|
||||
@@ -5333,6 +5335,10 @@ begin
|
||||
ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr;
|
||||
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;
|
||||
actualise; // actualise la fenetre de config cellule
|
||||
clicTCO:=false;
|
||||
|
||||
+1
-15
@@ -174,20 +174,6 @@ begin
|
||||
if (prec<9990) then
|
||||
begin
|
||||
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].AdrTrain:=trains[i].adresse;
|
||||
@@ -366,7 +352,7 @@ begin
|
||||
trouve:=true;
|
||||
roulage:=true;
|
||||
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?
|
||||
if adrFeu<>0 then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -23,7 +23,7 @@ var
|
||||
Lance_verif : integer;
|
||||
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
|
||||
|
||||
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
||||
@@ -111,7 +111,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
// renvoie le numéro de version depuis le forum CDM
|
||||
function verifie_version : real;
|
||||
var s,s2,s3,Version_p,Url,LocalFile,nomfichier : string;
|
||||
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.
|
||||
Importation des aiguillages et des branches depuis 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