This commit is contained in:
f1iwq2
2023-10-08 11:28:52 +02:00
parent 2a08783a14
commit 07a2af695d
8 changed files with 1817 additions and 1829 deletions
+66 -66
View File
@@ -1,8 +1,8 @@
Start Length Name Class
0001:00000000 00160048H .text CODE
0002:00000000 00002BECH .data DATA
0002:00002BEC 041A05F1H .bss BSS
0001:00000000 001603C8H .text CODE
0002:00000000 00002BCCH .data DATA
0002:00002BCC 041A0B89H .bss BSS
Detailed map of segments
@@ -56,49 +56,49 @@ Detailed map of segments
0001:0003BC0C 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9
0001:0003BC44 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9
0001:0004558C 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9
0001:0004642C 0000D390 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
0001:000537BC 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
0001:00053924 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
0001:00054644 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
0001:00065A48 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
0001:00066CDC 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9
0001:00068878 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
0001:0006EF5C 0000CEFC C=CODE S=.text G=(none) M=Forms ACBP=A9
0001:0007BE58 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
0001:0007BEB8 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
0001:0007D114 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
0001:0007D14C 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
0001:0007E8E0 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
0001:0007E940 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
0001:00081E5C 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
0001:00081EAC 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
0001:00095298 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
0001:000955AC 000000D8 C=CODE S=.text G=(none) M=WinSock ACBP=A9
0001:00095684 00001F40 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
0001:000975C4 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
0001:00097EB0 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
0001:00098448 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
0001:00098488 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
0001:000984C0 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
0001:00098ED8 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
0001:0009AFE0 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9
0001:000A422C 000015B4 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
0001:000A57E0 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9
0001:000A5CB0 0000FE58 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
0001:000B5B08 000025F4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
0001:000B80FC 000009C0 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
0001:000B8ABC 00003450 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
0001:000BBF0C 0002B264 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
0001:000E7170 00002C18 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
0001:000E9D88 00002404 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
0001:000EC18C 000015C7 C=CODE S=.text G=(none) M=verif_version ACBP=A9
0001:000ED754 0000114C C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
0001:000EE8A0 00035068 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
0001:00123908 00002904 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
0001:0012620C 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
0001:00126E0C 00002390 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
0001:0012919C 00036A1C C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
0001:0015FBB8 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
0001:0004642C 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
0001:00052AC4 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
0001:00052C2C 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
0001:0005394C 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
0001:00064D50 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
0001:00065FE4 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9
0001:00067B80 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
0001:0006E264 0000CEFC C=CODE S=.text G=(none) M=Forms ACBP=A9
0001:0007B160 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
0001:0007B1C0 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
0001:0007C41C 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
0001:0007C454 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
0001:0007DBE8 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
0001:0007DC48 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
0001:00081164 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
0001:000811B4 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
0001:000945A0 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
0001:000948B4 000000D8 C=CODE S=.text G=(none) M=WinSock ACBP=A9
0001:0009498C 00001F40 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
0001:000968CC 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
0001:000971B8 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
0001:00097750 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
0001:00097790 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
0001:000977C8 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
0001:000981E0 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
0001:0009A2E8 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9
0001:000A3534 000015B4 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
0001:000A4AE8 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9
0001:000A4FB8 0000FE58 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
0001:000B4E10 000025F4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
0001:000B7404 000009C0 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
0001:000B7DC4 00003450 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
0001:000BB214 0002B264 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
0001:000E6478 00002C18 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
0001:000E9090 00002404 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
0001:000EB494 000015D3 C=CODE S=.text G=(none) M=verif_version ACBP=A9
0001:000ECA68 0000114C C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
0001:000EDBB4 00034770 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
0001:00122324 00002904 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
0001:00124C28 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
0001:00125828 00002390 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
0001:00127BB8 00038380 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
0001:0015FF38 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9
0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9
0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9
@@ -117,20 +117,20 @@ Detailed map of segments
0002:00000C48 00000008 C=DATA S=.data G=DGROUP M=Mapi ACBP=A9
0002:00000C50 000000B9 C=DATA S=.data G=DGROUP M=ComCtrls ACBP=A9
0002:00000D0C 00000068 C=DATA S=.data G=DGROUP M=Themes ACBP=A9
0002:00000D74 00000178 C=DATA S=.data G=DGROUP M=StdCtrls ACBP=A9
0002:00000EEC 0000013C C=DATA S=.data G=DGROUP M=Controls ACBP=A9
0002:00001028 00000020 C=DATA S=.data G=DGROUP M=ImgList ACBP=A9
0002:00001048 000000EC C=DATA S=.data G=DGROUP M=Menus ACBP=A9
0002:00001134 00000124 C=DATA S=.data G=DGROUP M=Forms ACBP=A9
0002:00001258 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9
0002:00001288 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9
0002:000012B4 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9
0002:00001BBC 00000058 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9
0002:00001C14 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9
0002:00001C20 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9
0002:00001C24 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9
0002:00001C2C 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
0002:00001D00 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9
0002:00000D74 00000154 C=DATA S=.data G=DGROUP M=StdCtrls ACBP=A9
0002:00000EC8 0000013C C=DATA S=.data G=DGROUP M=Controls ACBP=A9
0002:00001004 00000020 C=DATA S=.data G=DGROUP M=ImgList ACBP=A9
0002:00001024 000000EC C=DATA S=.data G=DGROUP M=Menus ACBP=A9
0002:00001110 00000124 C=DATA S=.data G=DGROUP M=Forms ACBP=A9
0002:00001234 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9
0002:00001264 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9
0002:00001290 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9
0002:00001B98 00000058 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9
0002:00001BF0 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9
0002:00001BFC 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9
0002:00001C00 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9
0002:00001C08 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
0002:00001CDC 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9
0002:00003000 00000664 C=BSS S=.bss G=DGROUP M=System ACBP=A9
0002:00003664 00000010 C=BSS S=.bss G=DGROUP M=SysInit ACBP=A9
0002:00003674 00000004 C=BSS S=.bss G=DGROUP M=Types ACBP=A9
@@ -217,11 +217,11 @@ Detailed map of segments
0002:00049A30 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
0002:00049A44 00000014 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
0002:00049A58 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
0002:00049A5C 000003A0 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
0002:00049DFC 00000028 C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
0002:00049E24 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
0002:00049E30 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
0002:00049E38 041597B8 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9
0002:00049A5C 0000044C C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
0002:00049EA8 00000028 C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
0002:00049ED0 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
0002:00049EDC 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
0002:00049EE4 04159CA4 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9
Bound resource files
@@ -247,4 +247,4 @@ Signaux_complexes_GL.res
Signaux_complexes_GL.drf
Program entry point at 0001:0015FEC8
Program entry point at 0001:00160248
+112 -414
View File
@@ -1,6 +1,6 @@
object FormConfig: TFormConfig
Left = 260
Top = 147
Left = 331
Top = 136
Hint = 'Modifie la configuration selon les s'#233'lections choisies'
BorderStyle = bsDialog
Caption = 'Configuration g'#233'n'#233'rale'
@@ -668,7 +668,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 497
ActivePage = TabSheetCDM
ActivePage = TabSheetAccessoires
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -1119,7 +1119,7 @@ object FormConfig: TFormConfig
end
object CheckBoxVerifXpressNet: TCheckBox
Left = 8
Top = 108
Top = 116
Width = 233
Height = 17
Hint =
@@ -2295,7 +2295,7 @@ object FormConfig: TFormConfig
Width = 129
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 1
OnChange = ComboBoxDecChange
end
@@ -2402,7 +2402,7 @@ object FormConfig: TFormConfig
Width = 129
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 2
OnChange = ComboBoxAspChange
end
@@ -2688,7 +2688,7 @@ object FormConfig: TFormConfig
Top = 56
Width = 193
Height = 21
ItemHeight = 0
ItemHeight = 13
TabOrder = 0
OnChange = ComboBoxDecodeurPersoChange
end
@@ -2707,7 +2707,7 @@ object FormConfig: TFormConfig
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 2
OnChange = ComboBoxNationChange
end
@@ -2758,7 +2758,7 @@ object FormConfig: TFormConfig
TabOrder = 0
object GroupBoxRadio: TGroupBox
Left = 8
Top = 16
Top = 24
Width = 225
Height = 89
Caption = 'Type d'#39'action'
@@ -2793,16 +2793,16 @@ object FormConfig: TFormConfig
object RadioButtonCde: TRadioButton
Left = 24
Top = 64
Width = 137
Width = 177
Height = 17
Caption = 'Commande COM/USB'
Caption = 'Commande COM/USB/Socket'
TabOrder = 3
OnClick = RadioButtonCdeClick
end
end
object GroupBoxAct: TGroupBox
Left = 8
Top = 96
Left = 16
Top = 128
Width = 233
Height = 321
Caption = 'Action fonction de locomotive '
@@ -2864,7 +2864,8 @@ object FormConfig: TFormConfig
Height = 21
Hint =
'Train d'#233'clencheur pour lequel la condition s'#39'applique (mettre X ' +
'pour tous les trains) - d'#233'clenchement par actionneur uniquement'
'pour tous les trains) #13 d'#233'clenchement par actionneur uniquemen' +
't'
ParentShowHint = False
ShowHint = True
TabOrder = 2
@@ -3103,12 +3104,13 @@ object FormConfig: TFormConfig
OnChange = EditTrainDestChange
end
object ComboBoxAccComUSB: TComboBox
Left = 24
Left = 8
Top = 32
Width = 169
Width = 201
Height = 21
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "accessoires COM/USB"'
ItemHeight = 0
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 6
@@ -3128,128 +3130,48 @@ object FormConfig: TFormConfig
OnClick = ButtonTestActClick
end
end
object GroupBoxPNA: TGroupBox
Left = 32
Top = 120
Width = 169
Height = 121
Caption = 'Actionneurs PN simples'
TabOrder = 2
end
object GroupBoxPNZ: TGroupBox
Left = 56
Top = 136
Width = 169
Height = 65
Caption = 'Zones de d'#233'tection'
TabOrder = 3
end
object GroupBoxPN: TGroupBox
Left = 216
Top = 24
Width = 233
Height = 401
Left = 8
Top = 112
Width = 241
Height = 193
Caption = 'Action gestion passage '#224' niveau'
ParentShowHint = False
ShowHint = False
TabOrder = 2
TabOrder = 4
object Label21: TLabel
Left = 8
Top = 20
Top = 84
Width = 100
Height = 13
Caption = 'Adresse de fermeture'
end
object Label22: TLabel
Left = 8
Top = 44
Top = 108
Width = 94
Height = 13
Caption = 'Adresse d'#39'ouverture'
end
object Label23: TLabel
Left = 8
Top = 116
Width = 30
Height = 13
Caption = 'Voie 1'
end
object LabelV2: TLabel
Left = 8
Top = 140
Width = 30
Height = 13
Caption = 'Voie 2'
end
object LabelV3: TLabel
Left = 8
Top = 164
Width = 30
Height = 13
Caption = 'Voie 3'
end
object Shape1: TShape
Left = 64
Top = 105
Width = 137
Height = 2
end
object Label39: TLabel
Left = 8
Top = 188
Width = 30
Height = 13
Caption = 'Voie 4'
end
object Label45: TLabel
Left = 64
Top = 240
Width = 54
Height = 13
Caption = 'Zone ferme'
end
object Label46: TLabel
Left = 152
Top = 240
Width = 55
Height = 13
Caption = 'Zone ouvre'
end
object Label47: TLabel
Left = 8
Top = 268
Width = 30
Height = 13
Caption = 'Voie 1'
end
object Label48: TLabel
Left = 8
Top = 292
Width = 30
Height = 13
Caption = 'Voie 2'
end
object Label49: TLabel
Left = 8
Top = 316
Width = 30
Height = 13
Caption = 'Voie 3'
end
object Label50: TLabel
Left = 8
Top = 340
Width = 30
Height = 13
Caption = 'Voie 4'
end
object Shape2: TShape
Left = 64
Top = 257
Width = 150
Height = 2
end
object Label59: TLabel
Left = 8
Top = 212
Width = 30
Height = 13
Caption = 'Voie 5'
end
object Label60: TLabel
Left = 8
Top = 364
Width = 30
Height = 13
Caption = 'Voie 5'
end
object EditAdrFerme: TEdit
Left = 120
Top = 16
Top = 80
Width = 41
Height = 21
TabOrder = 0
@@ -3257,26 +3179,26 @@ object FormConfig: TFormConfig
end
object EditAdrOuvre: TEdit
Left = 120
Top = 40
Top = 104
Width = 41
Height = 21
TabOrder = 2
OnChange = EditAdrOuvreChange
end
object EditCmdFerme: TEdit
object EditCdeFerme: TEdit
Left = 168
Top = 16
Top = 80
Width = 25
Height = 21
Hint = 'Commande de fermeture (0 '#224' 2)'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnChange = EditCmdFermeChange
OnChange = EditCdeFermeChange
end
object EditCdeOuvre: TEdit
Left = 168
Top = 40
Top = 104
Width = 25
Height = 21
Hint = 'Commande d'#39'ouverture (0 '#224' 2)'
@@ -3285,259 +3207,33 @@ object FormConfig: TFormConfig
TabOrder = 3
OnChange = EditCdeOuvreChange
end
object EditV1F: TEdit
Left = 64
Top = 112
Width = 41
Height = 21
Hint = 'Actionneur 1 fermeture'
ParentShowHint = False
ShowHint = True
TabOrder = 4
OnChange = EditV1FChange
end
object StaticText1: TStaticText
Left = 64
Top = 88
Width = 49
Height = 17
Caption = 'Act ferme'
TabOrder = 14
end
object StaticText2: TStaticText
Left = 152
Top = 88
Width = 50
Height = 17
Caption = 'Act ouvre'
TabOrder = 15
end
object EditV2F: TEdit
Left = 64
Top = 136
Width = 41
Height = 21
TabOrder = 6
OnChange = EditV2FChange
end
object EditV3F: TEdit
Left = 64
Top = 160
Width = 41
Height = 21
TabOrder = 8
OnChange = EditV3FChange
end
object EditV1O: TEdit
Left = 152
Top = 112
Width = 41
Height = 21
Hint = 'Actionneur 1 ouverture'
ParentShowHint = False
ShowHint = True
TabOrder = 5
OnChange = EditV1OChange
end
object EditV2O: TEdit
Left = 152
Top = 136
Width = 41
Height = 21
TabOrder = 7
OnChange = EditV2OChange
end
object EditV3O: TEdit
Left = 152
Top = 160
Width = 41
Height = 21
TabOrder = 9
OnChange = EditV3OChange
end
object EditV4F: TEdit
Left = 64
Top = 184
Width = 41
Height = 21
TabOrder = 10
OnChange = EditV4FChange
end
object EditV4O: TEdit
Left = 152
Top = 184
Width = 41
Height = 21
TabOrder = 11
OnChange = EditV4OChange
end
object EditZdet1V1F: TEdit
Left = 64
Top = 264
Width = 33
Height = 21
TabOrder = 16
OnChange = EditZdet1V1FChange
end
object EditZdet1V1O: TEdit
Left = 152
Top = 264
Width = 33
Height = 21
Hint = 'D'#233'tecteur 1 zone d'#39'ouverture'
TabOrder = 18
OnChange = EditZdet1V1OChange
end
object EditZdet2V1F: TEdit
Left = 96
Top = 264
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone de fermeture'
TabOrder = 17
OnChange = EditZdet2V1FChange
end
object EditZdet2V1O: TEdit
Left = 184
Top = 264
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone d'#39'ouverture'
TabOrder = 19
OnChange = EditZdet2V1OChange
end
object EditZdet1V2F: TEdit
Left = 64
Top = 288
Width = 33
Height = 21
TabOrder = 20
OnChange = EditZdet1V2FChange
end
object EditZdet2V2F: TEdit
Left = 96
Top = 288
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone de fermeture'
TabOrder = 21
OnChange = EditZdet2V2FChange
end
object EditZdet1V2O: TEdit
Left = 152
Top = 288
Width = 33
Height = 21
Hint = 'D'#233'tecteur 1 zone d'#39'ouverture'
TabOrder = 22
OnChange = EditZdet1V2OChange
end
object EditZdet2V2O: TEdit
Left = 184
Top = 288
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone d'#39'ouverture'
TabOrder = 23
OnChange = EditZdet2V2OChange
end
object EditZdet1V3F: TEdit
Left = 64
Top = 312
Width = 33
Height = 21
TabOrder = 24
OnChange = EditZdet1V3FChange
end
object EditZdet2V3F: TEdit
Left = 96
Top = 312
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone de fermeture'
TabOrder = 25
OnChange = EditZdet2V3FChange
end
object EditZdet1V3O: TEdit
Left = 152
Top = 312
Width = 33
Height = 21
Hint = 'D'#233'tecteur 1 zone d'#39'ouverture'
TabOrder = 26
OnChange = EditZdet1V3OChange
end
object EditZdet2V3O: TEdit
Left = 184
Top = 312
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone d'#39'ouverture'
TabOrder = 27
OnChange = EditZdet2V3OChange
end
object EditZdet1V4F: TEdit
Left = 64
Top = 336
Width = 33
Height = 21
TabOrder = 28
OnChange = EditZdet1V4FChange
end
object EditZdet2V4F: TEdit
Left = 96
Top = 336
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone de fermeture'
TabOrder = 29
OnChange = EditZdet2V4FChange
end
object EditZdet1V4O: TEdit
Left = 152
Top = 336
Width = 33
Height = 21
Hint = 'D'#233'tecteur 1 zone d'#39'ouverture'
TabOrder = 30
OnChange = EditZdet1V4OChange
end
object EditZdet2V4O: TEdit
Left = 184
Top = 336
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone d'#39'ouverture'
TabOrder = 31
OnChange = EditZdet2V4OChange
end
object ButtonTestFerme: TButton
Left = 200
Top = 16
Top = 80
Width = 27
Height = 21
Hint = 'Test de fermeture (mode CDM ou connect'#233' '#224' l'#39'interface)'
Caption = 'test'
ParentShowHint = False
ShowHint = True
TabOrder = 36
TabOrder = 4
OnClick = ButtonTestFermeClick
end
object ButtonTestOuvre: TButton
Left = 200
Top = 40
Top = 104
Width = 27
Height = 21
Hint = 'Test d'#39'ouverture (mode CDM ou connect'#233' '#224' l'#39'interface)'
Caption = 'test'
ParentShowHint = False
ShowHint = True
TabOrder = 37
TabOrder = 5
OnClick = ButtonTestOuvreClick
end
object CheckPnPulse: TCheckBox
Left = 8
Top = 64
Top = 128
Width = 97
Height = 17
Hint =
@@ -3546,59 +3242,60 @@ object FormConfig: TFormConfig
Caption = 'Impulsionnel'
ParentShowHint = False
ShowHint = True
TabOrder = 38
TabOrder = 6
OnClick = CheckPnPulseClick
end
object EditV5F: TEdit
Left = 64
Top = 208
Width = 41
Height = 21
TabOrder = 12
OnChange = EditV5FChange
object RadioButtonSimple: TRadioButton
Left = 24
Top = 152
Width = 113
Height = 17
Hint = 'PN command'#233' par actionneurs'
Caption = 'Actionneurs simples'
ParentShowHint = False
ShowHint = True
TabOrder = 7
OnClick = RadioButtonSimpleClick
end
object EditV5O: TEdit
Left = 152
Top = 208
Width = 41
Height = 21
TabOrder = 13
OnChange = EditV5OChange
object RadioButtonZone: TRadioButton
Left = 24
Top = 168
Width = 113
Height = 17
Hint = 'PN command'#233' par m'#233'moires de zone'
Caption = 'Zones de d'#233'tection'
ParentShowHint = False
ShowHint = True
TabOrder = 8
OnClick = RadioButtonZoneClick
end
object EditZdet1V5F: TEdit
Left = 64
Top = 360
Width = 33
Height = 21
TabOrder = 32
OnChange = EditZdet1V5FChange
object RadioGroupActPN: TRadioGroup
Left = 8
Top = 16
Width = 217
Height = 57
Hint = 'action par accessoire DCC ou commande COM/USB'
Caption = 'Type d'#39'action'
Items.Strings = (
'Accessoire'
'Commande COM/USB ou Socket')
ParentShowHint = False
ShowHint = True
TabOrder = 9
OnClick = RadioGroupActPNClick
end
object EditZdet2V5F: TEdit
Left = 96
Top = 360
Width = 33
object ComboBoxPNCom: TComboBox
Left = 8
Top = 104
Width = 129
Height = 21
Hint = 'D'#233'tecteur 2 zone de fermeture'
TabOrder = 33
OnChange = EditZdet2V5FChange
end
object EditZdet1V5O: TEdit
Left = 152
Top = 360
Width = 33
Height = 21
Hint = 'D'#233'tecteur 1 zone d'#39'ouverture'
TabOrder = 34
OnChange = EditZdet1V5OChange
end
object EditZdet2V5O: TEdit
Left = 184
Top = 360
Width = 33
Height = 21
Hint = 'D'#233'tecteur 2 zone d'#39'ouverture'
TabOrder = 35
OnChange = EditZdet2V5OChange
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 10
OnChange = ComboBoxPNComChange
end
end
end
@@ -3655,7 +3352,7 @@ object FormConfig: TFormConfig
Top = 272
Width = 345
Height = 193
Caption = 'Actionneurs passage '#224' niveau'
Caption = 'Actionneurs/d'#233'tecteurs passage '#224' niveau'
TabOrder = 2
object ButtonNouvPN: TButton
Left = 8
@@ -4197,16 +3894,16 @@ object FormConfig: TFormConfig
end
end
object TabSheetAccessoires: TTabSheet
Caption = 'P'#233'riph'#233'riques COM/USB'
Caption = 'COM/USB/Socket'
ImageIndex = 9
object Label73: TLabel
Left = 8
Top = 8
Width = 355
Width = 574
Height = 13
Caption =
'Les accessoires COM/USB sont utilis'#233's pour '#234'tre activ'#233's par un a' +
'ctionneur'
'Les p'#233'riph'#233'riques COM/USB ou Sockets sont utilis'#233's pour '#234'tre act' +
'iv'#233's par un actionneur et leur envoyer des ordres ASCII'
end
object LabelInfoAcc: TLabel
Left = 272
@@ -4230,6 +3927,7 @@ object FormConfig: TFormConfig
ParentFont = False
PopupMenu = PopupMenuListes
TabOrder = 0
OnKeyDown = ListBoxAccKeyDown
OnMouseDown = ListBoxAccMouseDown
end
object ButtonAjAccCom: TButton
@@ -4254,12 +3952,12 @@ object FormConfig: TFormConfig
Left = 264
Top = 64
Width = 329
Height = 113
Caption = 'Description de l'#39'accessoire'
Height = 129
Caption = 'Description du p'#233'riph'#233'rique'
TabOrder = 3
object Label71: TLabel
Left = 10
Top = 32
Top = 28
Width = 98
Height = 13
Caption = 'Nom du p'#233'riph'#233'rique'
@@ -4281,7 +3979,7 @@ object FormConfig: TFormConfig
Top = 357
Width = 75
Height = 20
Hint = 'R'#233'ouvre les ports COMs demand'#233's'
Hint = 'R'#233'ouvre les ports COMs et Sockets demand'#233's'
Caption = 'Ouvre COMs'
ParentShowHint = False
ShowHint = True
+1209 -1263
View File
File diff suppressed because it is too large Load Diff
+20
View File
@@ -2437,4 +2437,24 @@ object FormPrinc: TFormPrinc
OnClick = Informationsdusignal1Click
end
end
object ClientSocketCde1: TClientSocket
Active = False
ClientType = ctNonBlocking
Port = 0
OnConnect = ClientSocketCde1Connect
OnRead = ClientSocketCde1Read
OnError = ClientSocketCde1Error
Left = 1152
Top = 344
end
object ClientSocketCde2: TClientSocket
Active = False
ClientType = ctNonBlocking
Port = 0
OnConnect = ClientSocketCde2Connect
OnRead = ClientSocketCde2Read
OnError = ClientSocketCde2Error
Left = 1152
Top = 384
end
end
+402 -74
View File
@@ -212,6 +212,8 @@ type
ButtonIndex: TButton;
MSCommCde1: TMSComm;
MSCommCde2: TMSComm;
ClientSocketCde1: TClientSocket;
ClientSocketCde2: TClientSocket;
procedure FormCreate(Sender: TObject);
procedure MSCommUSBLenzComm(Sender: TObject);
@@ -330,6 +332,20 @@ type
Panel: TStatusPanel; const Rect: TRect);
procedure MSCommCde1Comm(Sender: TObject);
procedure MSCommCde2Comm(Sender: TObject);
procedure ClientSocketCde1Connect(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocketCde1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
procedure ClientSocketCde1Read(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocketCde2Connect(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocketCde2Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
procedure ClientSocketCde2Read(Sender: TObject;
Socket: TCustomWinSocket);
// procedure MSCommCdeComm(Sender: TObject);
private
{ Déclarations privées }
@@ -359,7 +375,7 @@ MaxElBranches=200;
NbreMaxiAiguillages=200;
NbreMaxiSignaux=200;
NbreMaxiDecPers=10; // nombre maxi de décodeurs personnalisés
NbAccMaxi_USBCOM=10; // nombre maxi d'accessoires COM
NbMaxi_Periph=10; // nombre maxi de périphériques
LargImg=50;HtImg=91; // Dimensions image des feux
MaxComUSBCde=2; // Nombre maxi de périphériques USB commande
const_droit=2; // positions aiguillages transmises par la centrale LENZ
@@ -524,7 +540,7 @@ var
ServeurRetroCDM,TailleFonte,Nb_Det_Dist,Tdoubleclic,algo_Unisemaf,fA,fB,
etape,idEl,avecRoulage,intervalle_courant,filtrageDet0,SauvefiltrageDet0,
TpsTimeoutSL,formatY,OsBits,NbreDecPers,NbDecodeur,NbDecodeurdeBase,
LargeurF,HauteurF,OffsetXF,OffsetYF,PosSplitter,NbAcc_USBCOM : integer;
LargeurF,HauteurF,OffsetXF,OffsetYF,PosSplitter,NbPeriph,NbPeriph_COMUSB,NbPeriph_Socket : integer;
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO,
@@ -594,9 +610,10 @@ var
Index_Accessoire : array[0..MaxAcc] of integer; // tableau d'index des accessoires aiguillages et signaux sur le bus DCC
// tableau des accessoires
Tablo_acc_COMUSB : array[1..NbAccMaxi_USBCOM] of record
Tablo_acc_COMUSB : array[1..NbMaxi_Periph] of record
nom : string;
NumCom : integer; // numéro de port COM
NumCom : integer; // numéro de port COM si c'est une liaison com usb
numComposant : integer ; // numéro de composant MSCOM ou clientSocket
ScvAig,ScvDet,ScvAct,ScvVis,cr : boolean ; // services, visible, avecCR
protocole: string;
end;
@@ -623,17 +640,17 @@ var
Tablo_actionneur : array[0..Max_actionneurs] of
record
loco,act,son,cde: boolean; // destinataire loco acessoire ou son
loco,act,son,cde : boolean; // destinataire loco acessoire son ou périphérique
adresse,adresse2, // adresse: adresse de base ; adresse2=cas d'une Zone
etat,
fonction, // fonction F de train ou accessoire
fonction, // fonction F de train ou périphérique
tempo,TempoCourante,
accessoire,sortie,
typdeclenche : integer; // déclencheur: 0=actionneur/détecteur 2=evt aig 3=MemZone
typdeclenche : integer; // déclencheur: 0=actionneur/détecteur 2=evt aig 3=MemZone
Raz : boolean;
FichierSon,trainDecl,
TrainDest, // train destinataire ou Commande
TrainCourant : string;
TrainCourant : string;
end;
decodeur_pers : array[1..NbreMaxiDecPers] of
@@ -652,12 +669,14 @@ var
KeyInputs: array of TInput;
Tablo_PN : array[0..Max_actionneurs] of
record
AdresseFerme : integer; // adresse de pilotage DCC pour la fermeture
AdresseFerme : integer; // adresse de pilotage DCC pour la fermeture ou numéro de périphérique pour pilotage usb
commandeFerme : integer; // commande de fermeture (1 ou 2)
AdresseOuvre : integer; // adresse de pilotage DCC pour l'ouverture
commandeOuvre : integer; // commande d'ouverture (1 ou 2)
NbVoies : integer; // Nombre de voies du PN
Pulse : integer; // 0=commande maintenue 1=Impulsionnel
TypeCde : integer; // 0=par accessoire / 1=par COMUSB
commandeF,CommandeO : string;
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
@@ -757,8 +776,10 @@ procedure Affiche(s : string;lacouleur : TColor);
procedure envoi_signal(Adr : integer);
procedure pilote_direction(Adr,nbre : integer);
procedure connecte_USB;
function connecte_port_usb_cde(index : integer) : boolean;
procedure deconnecte_usb_cde(index : integer);
function connecte_port_usb_acc(index : integer) : boolean;
procedure deconnecte_usb_periph(index : integer);
procedure connecte_socket_acc(index : integer);
procedure deconnecte_socket_periph(index : integer);
procedure deconnecte_usb;
function IsWow64Process: Boolean;
procedure Dessine_signal_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : real;adresse : integer;orientation : integer);
@@ -803,6 +824,11 @@ function extract_int(s : string) : integer;
Procedure Menu_tco(i : integer);
procedure Affiche_Fenetre_TCO(i : integer;laisseOuvert : boolean);
procedure positionne_elements(i : integer);
procedure ouvre_pn_usb(i : integer);
procedure ferme_pn_usb(i : integer);
procedure ouvre_pn_socket(i : integer);
procedure ferme_pn_socket(i : integer);
function com_socket(i : integer) : integer;
implementation
@@ -10104,10 +10130,109 @@ begin
end;
// ouvre le PN index dans le tablo_pn
procedure ferme_pn_usb(i : integer);
var numacc,v : integer;
s : string;
begin
numacc:=Tablo_pn[i].AdresseFerme; // numéro de périphérique
if numacc=0 then exit;
v:=Tablo_acc_COMUSB[numacc].NumCom; // numéro de com
if v=0 then exit;
if Tablo_com_cde[numacc].PortOuvert then
begin
s:=Tablo_PN[i].CommandeF;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.MSCommCde1.Output:=s;
if numacc=2 then Formprinc.MSCommCde2.Output:=s;
Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite);
end
else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred);
end;
procedure ouvre_pn_usb(i : integer);
var numacc,v : integer;
s : string;
begin
numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire
if numacc=0 then exit;
v:=Tablo_acc_COMUSB[numacc].NumCom; // numéro de com
if v=0 then exit;
if Tablo_com_cde[numacc].PortOuvert then
begin
s:=Tablo_PN[i].CommandeO;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.MSCommCde1.Output:=s;
if numacc=2 then Formprinc.MSCommCde2.Output:=s;
Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite);
end
else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred);
end;
procedure ouvre_pn_socket(i : integer);
var numacc : integer;
s : string;
begin
numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire
if numacc=0 then exit;
s:=Tablo_PN[i].CommandeO;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.ClientSocketCde1.Socket.SendText(s);
if numacc=2 then Formprinc.ClientSocketCde2.Socket.SendText(s);
Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite);
end;
procedure ferme_pn_socket(i : integer);
var numacc : integer;
s : string;
begin
numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire
if numacc=0 then exit;
s:=Tablo_PN[i].CommandeF;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.ClientSocketCde1.Socket.SendText(s);
if numacc=2 then Formprinc.ClientSocketCde2.Socket.SendText(s);
Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite);
end;
procedure envoi_periph_usb(i : integer);
var numacc,v : integer;
s : string;
begin
numacc:=Tablo_actionneur[i].fonction; // numéro de périphérique
if numacc=0 then exit;
v:=Tablo_acc_COMUSB[numacc].NumCom; // numéro de com
if v=0 then exit;
if Tablo_com_cde[numacc].PortOuvert then
begin
s:=Tablo_actionneur[i].trainDest;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.MSCommCde1.Output:=s;
if numacc=2 then Formprinc.MSCommCde2.Output:=s;
end
else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred);
end;
// envoi le texte traindest de l'accessoire sur le socket du périphérique i
procedure envoi_socket_periph(i : integer);
var v,numacc : integer;
s : string;
begin
v:=Tablo_actionneur[i].fonction; // numéro de périphérique
numacc:=Tablo_acc_COMUSB[v].numComposant; //numéro de composant
s:=Tablo_actionneur[i].trainDest;
if Tablo_acc_COMUSB[numacc].cr then s:=s+#13;
if numacc=1 then Formprinc.ClientSocketCde1.socket.SendText(s);
if numacc=2 then Formprinc.ClientSocketCde2.socket.SendText(s);
Affiche('Envoi socket '+s,clYellow);
end;
// traitement des évènements actionneurs (detecteurs aussi)
// adr adr2 : pour mémoire de zone
procedure Event_act(adr,adr2,etat : integer;trainDecl : string);
var typ,i,v,etatAct,Af,Ao,Access,sortie,dZ1F,dZ2F,dZ1O,dZ2O,numacc : integer;
var typ,i,v,etatAct,Af,Ao,Access,sortie,dZ1F,dZ2F,dZ1O,dZ2O : integer;
s,st,trainDest : string;
fm,fd,adresseOk,etatvalide : boolean;
Ts : TAccessoire;
@@ -10198,26 +10323,15 @@ begin
PlaySound(pchar(Tablo_actionneur[i].FichierSon),0,SND_ASYNC);
end;
// commande COM/USB
// commande COM/USB socket
if adresseOK and (Tablo_actionneur[i].cde) and ((s=trainDecl) or (s='X') or (trainDecl='X') or (trainDecl='')) and (etatValide) then
begin
numacc:=Tablo_actionneur[i].fonction; // numéro d'accessoire
if numacc=0 then exit;
v:=Tablo_acc_COMUSB[numacc].NumCom; // numéro de com
if v=0 then exit;
if Tablo_com_cde[numacc].PortOuvert then
begin
trainDest:=Tablo_actionneur[i].trainDest;
if Tablo_acc_COMUSB[numacc].cr then trainDest:=TrainDest+#13;
if numacc=1 then Formprinc.MSCommCde1.Output:=TrainDest;
if numacc=2 then Formprinc.MSCommCde2.Output:=TrainDest;
Affiche(st+' TrainDecl='+trainDecl+' Envoie port COM'+intToSTR(v)+' commande: '+TrainDest,clyellow);
end
else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred);
v:=tablo_actionneur[i].fonction;
af:=com_socket(v);
if af=1 then envoi_periph_usb(i); // numéro d'actionneur
if af=2 then envoi_socket_periph(i); // numéro de périphérique,numéro d'actionneur
Affiche(st+' TrainDecl='+trainDecl+' Envoie port COM'+intToSTR(v)+' commande: '+TrainDest,clWhite);
end;
end;
// dans le tableau des PN
@@ -10237,8 +10351,18 @@ begin
if tablo_pn[i].compteur=1 then // compteur du nombre de trains sur le PN
begin
Affiche('Ouverture PN'+intToSTR(i)+' par act '+intToSTr(adr)+' (train voie '+IntToSTR(v)+')',clOrange);
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseOuvre,Tablo_PN[i].CommandeOuvre,ts);
if tablo_pn[i].TypeCde=0 then
begin
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseOuvre,Tablo_PN[i].CommandeOuvre,ts);
end
else
begin
typ:=Tablo_PN[i].AdresseFerme; // numéro accessoire
typ:=com_socket(v);
if typ=1 then ouvre_pn_usb(i);
if typ=2 then ouvre_pn_socket(i);
end;
end;
if tablo_pn[i].compteur>0 then dec(tablo_pn[i].compteur);
end;
@@ -10250,8 +10374,18 @@ begin
begin
s:='Fermeture PN'+IntToSTR(i)+' par act '+intToSTr(adr)+' (train voie '+IntToSTR(v)+')';
Affiche(s,clOrange);
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseFerme,Tablo_PN[i].CommandeFerme,ts);
if tablo_pn[i].TypeCde=0 then
begin
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseFerme,Tablo_PN[i].CommandeFerme,ts);
end
else
begin
typ:=Tablo_PN[i].AdresseFerme; // numéro accessoire
typ:=com_socket(v);
if typ=1 then ferme_pn_usb(i);
if typ=2 then ferme_pn_socket(i);
end;
end;
end;
end
@@ -10274,8 +10408,18 @@ begin
s:='Ouverture PN'+intToSTR(i)+' par zone '+intToSTr(adr)+' '+intToSTR(adr2);
Affiche(s,clorange);
//if AffAigDet then AfficheDebug(s,clorange);
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseOuvre,Tablo_PN[i].CommandeOuvre,ts);
if tablo_pn[i].TypeCde=0 then
begin
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseOuvre,Tablo_PN[i].CommandeOuvre,ts);
end
else
begin
typ:=Tablo_PN[i].AdresseFerme; // numéro accessoire
typ:=com_socket(v);
if typ=1 then ouvre_pn_usb(i);
if typ=2 then ouvre_pn_socket(i);
end;
if tablo_pn[i].compteur>0 then dec(tablo_pn[i].compteur);
end;
end;
@@ -10287,30 +10431,56 @@ begin
begin
s:='Fermeture PN'+IntToSTR(i)+' par zone '+intToSTr(adr)+' '+intToSTR(adr2)+' (train voie '+IntToSTR(v)+')';
affiche(s,clorange);
//if AffAigDet then AfficheDebug(s,clorange);
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseFerme,Tablo_PN[i].CommandeFerme,ts);
if tablo_pn[i].TypeCde=0 then
begin
if Tablo_PN[i].pulse=1 then ts:=aigP else ts:=feu;
pilote_acc(Tablo_PN[i].AdresseFerme,Tablo_PN[i].CommandeFerme,ts);
end
else
begin
typ:=Tablo_PN[i].AdresseFerme; // numéro accessoire
typ:=com_socket(v);
if typ=1 then ferme_pn_usb(i);
if typ=2 then ferme_pn_socket(i);
end;
end;
end;
end;
end;
end;
// service actionneur
if (adr>650) then
for i:=1 to NbAcc_USBCOM do
for i:=1 to NbPeriph do
begin
if tablo_com_cde[i].portOuvert then
v:=com_socket(i);
if v=1 then
begin
// envoyer event det à accessoire
if Tablo_acc_COMUSB[i].ScvAct then
if tablo_com_cde[i].portOuvert then
begin
// envoyer event det à accessoire
if Tablo_acc_COMUSB[i].ScvAct then
begin
s:='A'+intToSTR(adr)+','+intToSTR(etat)+','+trainDecl;
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.MSCommCde1.Output:=s;
if i=2 then Formprinc.MSCommCde2.Output:=s;
end;
end;
end;
if v=2 then
begin
if (Tablo_acc_COMUSB[i].ScvDet) then
begin
s:='A'+intToSTR(adr)+','+intToSTR(etat)+','+trainDecl;
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.MSCommCde1.Output:=s;
if i=2 then Formprinc.MSCommCde2.Output:=s;
if i=1 then Formprinc.ClientSocketCde1.Socket.SendText(s);
if i=2 then Formprinc.ClientSocketCde2.Socket.SendText(s);
end;
end;
end;
end;
end;
@@ -10494,21 +10664,35 @@ begin
FormDebug.MemoEvtDet.lines.add('Raz sur débordement');
end;
// vers accessoires
for i:=1 to NbAcc_USBCOM do
// vers périphériques
for i:=1 to NbPeriph do
begin
// envoyer event act à accessoire
if tablo_com_cde[i].portOuvert then
dr:=com_socket(i);
// envoyer event act au périphérique
if dr=1 then
begin
if Tablo_acc_COMUSB[i].ScvDet then
if (tablo_com_cde[i].portOuvert) and (Tablo_acc_COMUSB[i].ScvDet) then
begin
s:='D'+intToSTR(adresse)+','+intToSTR(etat01)+','+train;
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clOrange);
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.MSCommCde1.Output:=s;
if i=2 then Formprinc.MSCommCde2.Output:=s;
end;
end;
if dr=2 then
begin
if (Tablo_acc_COMUSB[i].ScvDet) then
begin
s:='D'+intToSTR(adresse)+','+intToSTR(etat01)+','+train;
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.ClientSocketCde1.Socket.SendText(s);
if i=2 then Formprinc.ClientSocketCde2.Socket.SendText(s);
end;
end;
end;
// attention à partir de cette section le code est susceptible de ne pas être exécuté??
@@ -10593,22 +10777,37 @@ begin
if (typ=2) and (Adr=adresse) then event_act(Adresse,0,pos,''); // évent aig
end;
// pour accessoires
for i:=1 to NbAcc_USBCOM do
// pour périphériques
for i:=1 to NbPeriph do
begin
// envoyer event act à accessoire
if tablo_com_cde[i].portOuvert then
typ:=com_socket(i);
if typ=1 then
begin
if tablo_com_cde[i].portOuvert then
begin
if Tablo_acc_COMUSB[i].ScvAig then
begin
s:='T'+intToSTR(adresse)+','+intToSTR(pos);
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.MSCommCde1.Output:=s;
if i=2 then Formprinc.MSCommCde2.Output:=s;
end;
end;
end;
if typ=2 then
begin
if Tablo_acc_COMUSB[i].ScvAig then
begin
s:='T'+intToSTR(adresse)+','+intToSTR(pos);
if Tablo_acc_COMUSB[i].cr then s:=s+#13;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clOrange);
if i=1 then Formprinc.MSCommCde1.Output:=s;
if i=2 then Formprinc.MSCommCde2.Output:=s;
end;
end;
end;
if Tablo_acc_COMUSB[i].ScvVis then Affiche(s,clWhite);
if i=1 then Formprinc.ClientSocketCde1.Socket.SendText(s);
if i=2 then Formprinc.ClientSocketCde2.Socket.SendText(s);
end;
end;
end;
end;
// pilote une sortie à 0 à l'interface dont l'adresse est à 1 ou 2 (octet)
@@ -11544,7 +11743,7 @@ end;
// connecte un port usb pour la comm actionneurs. Si le port n'est pas ouvert, renvoie false
// index= index du tableau tablo_com_cde
function connecte_port_usb_cde(index : integer) : boolean;
function connecte_port_usb_acc(index : integer) : boolean;
var i,j,numport,vitesse,erreur : integer;
trouve : boolean;
s,sc,portComCde : string;
@@ -11618,6 +11817,50 @@ begin
result:=tablo_com_cde[index].PortOuvert;
end;
// détermine si l'accessoire i est un comusb ou un socket
// =1 comusb
// =2 socket
function com_socket(i : integer) : integer;
var s : string;
begin
result:=0;
s:=Tablo_acc_COMUSB[i].protocole;
if length(s)>1 then if upcase(s[1])='C' then result:=1 else result:=2;
end;
procedure connecte_socket_acc(index :integer);
var s: string;
i,erreur,NumSocket : integer;
com : TClientSocket;
begin
if (index<0) or (index>10) then
begin
affiche('Le nombre maxi de portCom acc comusb est atteint - Le port COM'+inttostr(tablo_acc_comusb[index].NumCom)+' ne sera pas ouvert',clred);
exit;
end;
// déterminer dans l'index le numéro de client
NumSocket:=0;
for i:=1 to index do
begin
if com_socket(i)=2 then inc(NumSocket);
end;
case numSocket of
1 : com:=formprinc.ClientsocketCde1;
2 : com:=formprinc.ClientSocketCde2;
end;
s:=tablo_acc_comusb[index].protocole;
i:=pos(':',s);
com.address:=copy(s,1,i-1);
delete(s,1,i);
val(s,i,erreur);
com.port:=i;
com.open;
Affiche('Demande d''ouverture du socket '+tablo_acc_comusb[index].protocole,clYellow);
end;
// connecte un port usb interface. Si le port n'est pas ouvert, renvoie 0, sinon renvoie
// le numéro de port
function connecte_port_usb(port : integer) : integer;
@@ -12384,7 +12627,6 @@ begin
ScrollBox1.Left:=633;
procetape(''); //0
NbreTCO:=1;
N_Trains:=0;
NivDebug:=0;
@@ -12392,7 +12634,7 @@ begin
EnvAigDccpp:=0;
debugtrames:=false;
algo_Unisemaf:=1;
NbAcc_USBCOM:=0;
NbPeriph:=0;
MaxPortCom:=30;
roulage:=false;
espY:=15;
@@ -12420,7 +12662,7 @@ begin
Decodeur[9]:='LS-DEC-NMBS';Decodeur[10]:='B-models';
OsBits:=0;
if IsWow64Process then
if IsWow64Process then
begin
OsBits:=64;
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)');
@@ -12429,7 +12671,7 @@ begin
begin
OsBits:=32;
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES');
end;
end;
// version d'OS pour info
application.ProcessMessages;
@@ -12475,12 +12717,20 @@ begin
lit_config;
// ouvre com commandes actionneurs, car on a lu les com dans la config
for i:=1 to NbreComCde do
for i:=1 to NbPeriph do
begin
//index:=tablo_acc_comUSB[i].NumAcc; // numéro d'accessoire
if connecte_port_usb_cde(i) then
Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande actionneurs ouvert',clLime)
else Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande actionneurs non ouvert',clOrange);
index:=com_socket(i); // comusb ou socket ?
if index=1 then
begin
if connecte_port_usb_acc(i) then
Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande actionneurs ouvert',clLime)
else Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande actionneurs non ouvert',clOrange);
end;
if index=2 then
begin
connecte_socket_acc(i);
end;
end;
Menu_tco(NbreTCO);
@@ -12838,7 +13088,7 @@ begin
end;
procedure TFormPrinc.FormClose(Sender: TObject; var Action: TCloseAction);
var res : integer ;
var i,res : integer ;
begin
Ferme:=true;
@@ -12849,7 +13099,9 @@ begin
end;
for res:=1 to 10 do
begin
deconnecte_USB_cde(res);
i:=com_socket(res);
if i=1 then deconnecte_USB_periph(res);
if i=2 then deconnecte_socket_periph(res);
end;
ClientSocketCDM.close;
ClientSocketInterface.close;
@@ -13384,14 +13636,27 @@ begin
end;
end;
procedure deconnecte_usb_cde(index : integer);
procedure deconnecte_usb_periph(index : integer);
begin
if tablo_com_cde[index].PortOuvert then
begin
tablo_com_cde[index].PortOuvert:=false;
if index=1 then Formprinc.MscommCde1.Portopen:=false;
if index=2 then Formprinc.MscommCde2.Portopen:=false;
if debug>0 then Affiche('Port COM'+intToSTR(tablo_acc_comusb[index].NumCom)+' actionneurs déconnecté',clyellow);
if debug>0 then Affiche('Port COM'+intToSTR(tablo_acc_comusb[index].NumCom)+' périphérique déconnecté',clyellow);
Formprinc.StatusBar1.Panels[3].Text:='';
end;
end;
// déconnecte le périphérique socket
procedure deconnecte_socket_periph(index : integer);
begin
if tablo_com_cde[index].PortOuvert then
begin
tablo_com_cde[index].PortOuvert:=false;
if index=1 then Formprinc.ClientSocketCde1.Close;
if index=2 then Formprinc.ClientSocketCde1.close;
if debug>0 then Affiche('Socket '+intToSTR(tablo_acc_comusb[index].NumCom)+' périphérique déconnecté',clyellow);
Formprinc.StatusBar1.Panels[3].Text:='';
end;
end;
@@ -16312,7 +16577,6 @@ begin
v:=index_accessoire[i];
if v<>0 then affiche('adresse='+intToSTR(i)+' index = '+intToSTR(v),clLime);
end;
end;
procedure TFormPrinc.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect);
@@ -16378,5 +16642,69 @@ begin
end;
end;
procedure TFormPrinc.ClientSocketCde1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Affiche('Socket '+ClientSocketCde1.Address+':'+intToSTR(ClientSocketCde1.port)+' connecté ',clYellow);
end;
procedure TFormPrinc.ClientSocketCde1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;var ErrorCode: Integer);
var s : string;
begin
s:='Erreur '+IntToSTR(ErrorCode)+' socket '+ClientSocketCde1.Address+':'+intToSTR(ClientSocketCde1.port);
case ErrorCode of
10053 : s:=s+': Connexion avortée - Timeout';
10054 : s:=s+': Connexion avortée par un tiers';
10060 : s:=s+': Timeout';
10061 : s:=s+': Connexion refusée';
10065 : s:=s+': Port non connecté';
end;
if nivDebug=3 then
begin
afficheDebug(s,clOrange);
end;
affiche(s,clOrange);
ErrorCode:=0;
end;
procedure TFormPrinc.ClientSocketCde1Read(Sender: TObject; Socket: TCustomWinSocket);
begin
Affiche(CLientSocketCde1.Socket.ReceiveText,clWhite);
end;
procedure TFormPrinc.ClientSocketCde2Connect(Sender: TObject;Socket: TCustomWinSocket);
begin
Affiche('Socket '+ClientSocketCde2.Address+':'+intToSTR(ClientSocketCde2.port)+' connecté ',clYellow);
end;
procedure TFormPrinc.ClientSocketCde2Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;var ErrorCode: Integer);
var s : string;
begin
s:='Erreur '+IntToSTR(ErrorCode)+' socket '+ClientSocketCde2.Address+':'+intToSTR(ClientSocketCde2.port);
case ErrorCode of
10053 : s:=s+': Connexion avortée - Timeout';
10054 : s:=s+': Connexion avortée par un tiers';
10060 : s:=s+': Timeout';
10061 : s:=s+': Connexion refusée';
10065 : s:=s+': Port non connecté';
end;
if nivDebug=3 then
begin
afficheDebug(s,clOrange);
end;
affiche(s,clOrange);
ErrorCode:=0;
end;
procedure TFormPrinc.ClientSocketCde2Read(Sender: TObject;
Socket: TCustomWinSocket);
begin
Affiche(CLientSocketCde2.Socket.ReceiveText,clWhite);
end;
end.
+5 -5
View File
@@ -25,7 +25,7 @@ var
verifVersion,notificationVersion : boolean;
date_creation : string;
Const Version='8.2'; // sert à la comparaison de la version publiée
Const Version='8.21'; // 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;
@@ -72,15 +72,15 @@ var
i : integer;
t : longint;
begin
Result := False;
Result:=False;
t:=0;
Try Fs := TFileStream.Create(s,fmCreate);
Try Fs:=TFileStream.Create(s,fmCreate);
//hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY, nil, nil, 0);
hSession:=InternetOpen('MyApp',INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY,nil,nil,0);
try
if Assigned(hSession) then
begin
hService := InternetOpenUrl(hSession, PChar(aUrl), nil, 0, INTERNET_FLAG_RELOAD, 0);
hService:=InternetOpenUrl(hSession,PChar(aUrl),nil,0,INTERNET_FLAG_RELOAD,0);
i:=getLastError;
if i<>0 then
case i of
+3 -7
View File
@@ -190,12 +190,8 @@ version 8.2 : Optimisation de la rapidit
Epaisseur des voies des TCOs paramétrable.
Possibilité d'envoyer des commandes sur un port COM/USB sur évènement
actionneur/détecteur/aiguillage.
version 8.21 : Correction passage en majuscule de la commande port COM/USB.
Ajout du pilotage des passage à niveaux par COM/USB.
Ajout de l'envoi des commandes sur un socket (réseau Ethernet/wifi)