diff --git a/Notice d'utilisation des signaux_complexes_GL_V8.21.pdf b/Notice d'utilisation des signaux_complexes_GL_V8.21.pdf index ea3cf8e..b9e6454 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V8.21.pdf and b/Notice d'utilisation des signaux_complexes_GL_V8.21.pdf differ diff --git a/Signaux_complexes_GL.map b/Signaux_complexes_GL.map index 8eede3d..6aff3a5 100644 --- a/Signaux_complexes_GL.map +++ b/Signaux_complexes_GL.map @@ -1,104 +1,104 @@ Start Length Name Class - 0001:00000000 001603C8H .text CODE - 0002:00000000 00002BCCH .data DATA - 0002:00002BCC 041A0B89H .bss BSS + 0001:00000000 00160C9CH .text CODE + 0002:00000000 00002C00H .data DATA + 0002:00002C00 041A0B91H .bss BSS Detailed map of segments - 0001:00000000 00005DF3 C=CODE S=.text G=(none) M=System ACBP=A9 - 0001:00005DF4 00000140 C=CODE S=.text G=(none) M=SysInit ACBP=A9 - 0001:00005F34 00000108 C=CODE S=.text G=(none) M=Types ACBP=A9 - 0001:0000603C 00000ED8 C=CODE S=.text G=(none) M=Windows ACBP=A9 - 0001:00006F14 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9 - 0001:00006F4C 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9 - 0001:00007284 00006E28 C=CODE S=.text G=(none) M=SysUtils ACBP=A9 - 0001:0000E0AC 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9 - 0001:0000E8C8 00008042 C=CODE S=.text G=(none) M=Variants ACBP=A9 - 0001:0001690C 00000188 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9 - 0001:00016A94 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9 - 0001:000172D0 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9 - 0001:00017628 0000A236 C=CODE S=.text G=(none) M=Classes ACBP=A9 - 0001:00021860 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9 - 0001:00021BD0 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9 - 0001:0002B7CC 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9 - 0001:0002B8F0 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9 - 0001:0002BBA8 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9 - 0001:0002BD40 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9 - 0001:0002C4C8 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9 - 0001:0002C500 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9 - 0001:0002D4F8 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9 - 0001:0002D550 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9 - 0001:0002E618 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9 - 0001:0002E938 000001A4 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9 - 0001:0002EADC 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9 - 0001:0002F498 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9 - 0001:0002F4D0 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9 - 0001:0002F508 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9 - 0001:0002F548 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9 - 0001:0002F580 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9 - 0001:0002F5D8 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9 - 0001:0002F610 0000006C C=CODE S=.text G=(none) M=ShlObj ACBP=A9 - 0001:0002F67C 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9 - 0001:0002F6DC 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9 - 0001:0002F714 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9 - 0001:00032DE8 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9 - 0001:000378C4 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9 - 0001:00037954 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9 - 0001:000380F4 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9 - 0001:0003821C 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9 - 0001:0003BA40 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9 - 0001:0003BA78 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9 - 0001:0003BAE0 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9 - 0001:0003BB48 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9 - 0001:0003BBB4 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9 - 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 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 + 0001:00000000 00005DFB C=CODE S=.text G=(none) M=System ACBP=A9 + 0001:00005DFC 00000140 C=CODE S=.text G=(none) M=SysInit ACBP=A9 + 0001:00005F3C 00000108 C=CODE S=.text G=(none) M=Types ACBP=A9 + 0001:00006044 00000EF8 C=CODE S=.text G=(none) M=Windows ACBP=A9 + 0001:00006F3C 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9 + 0001:00006F74 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9 + 0001:000072AC 00006E28 C=CODE S=.text G=(none) M=SysUtils ACBP=A9 + 0001:0000E0D4 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9 + 0001:0000E8F0 00008042 C=CODE S=.text G=(none) M=Variants ACBP=A9 + 0001:00016934 00000198 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9 + 0001:00016ACC 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9 + 0001:00017308 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9 + 0001:00017660 0000A236 C=CODE S=.text G=(none) M=Classes ACBP=A9 + 0001:00021898 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9 + 0001:00021C08 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9 + 0001:0002B804 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9 + 0001:0002B928 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9 + 0001:0002BBE0 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9 + 0001:0002BD78 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9 + 0001:0002C500 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9 + 0001:0002C538 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9 + 0001:0002D530 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9 + 0001:0002D588 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9 + 0001:0002E650 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9 + 0001:0002E970 000001A4 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9 + 0001:0002EB14 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9 + 0001:0002F4D0 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9 + 0001:0002F508 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9 + 0001:0002F540 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9 + 0001:0002F580 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9 + 0001:0002F5B8 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9 + 0001:0002F610 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9 + 0001:0002F648 0000006C C=CODE S=.text G=(none) M=ShlObj ACBP=A9 + 0001:0002F6B4 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9 + 0001:0002F714 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9 + 0001:0002F74C 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9 + 0001:00032E20 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9 + 0001:000378FC 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9 + 0001:0003798C 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9 + 0001:0003812C 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9 + 0001:00038254 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9 + 0001:0003BA78 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9 + 0001:0003BAB0 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9 + 0001:0003BB18 00000690 C=CODE S=.text G=(none) M=Registry ACBP=A9 + 0001:0003C1A8 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9 + 0001:0003C214 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9 + 0001:0003C26C 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9 + 0001:0003C2A4 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9 + 0001:00045BEC 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9 + 0001:00046A8C 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9 + 0001:00053124 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9 + 0001:0005328C 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9 + 0001:00053FAC 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9 + 0001:000653B0 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9 + 0001:00066644 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9 + 0001:000681E0 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9 + 0001:0006E8C4 0000CEFC C=CODE S=.text G=(none) M=Forms ACBP=A9 + 0001:0007B7C0 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9 + 0001:0007B820 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9 + 0001:0007CA7C 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9 + 0001:0007CAB4 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9 + 0001:0007E248 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9 + 0001:0007E2A8 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9 + 0001:000817C4 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9 + 0001:00081814 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9 + 0001:00094C00 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9 + 0001:00094F14 000000D8 C=CODE S=.text G=(none) M=WinSock ACBP=A9 + 0001:00094FEC 00001F40 C=CODE S=.text G=(none) M=ScktComp ACBP=A9 + 0001:00096F2C 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9 + 0001:00097818 000005A0 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9 + 0001:00097DB8 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9 + 0001:00097DF8 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9 + 0001:00097E30 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9 + 0001:00098848 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9 + 0001:0009A950 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9 + 0001:000A3B9C 000015B4 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9 + 0001:000A5150 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9 + 0001:000A5620 0000FE58 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9 + 0001:000B5478 000025F4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 + 0001:000B7A6C 000009C0 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 + 0001:000B842C 00003450 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 + 0001:000BB87C 0002B264 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 + 0001:000E6AE0 00002C18 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 + 0001:000E96F8 00002404 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 + 0001:000EBAFC 000015DB C=CODE S=.text G=(none) M=verif_version ACBP=A9 + 0001:000ED0D8 0000114C C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 + 0001:000EE224 00034A3C C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 + 0001:00122C60 00002904 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 + 0001:00125564 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 + 0001:00126164 00002390 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 + 0001:001284F4 00038318 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 + 0001:0016080C 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 @@ -125,12 +125,12 @@ Detailed map of segments 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:00001B98 00000080 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9 + 0002:00001C18 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9 + 0002:00001C24 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9 + 0002:00001C28 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9 + 0002:00001C30 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9 + 0002:00001D04 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 @@ -215,13 +215,13 @@ Detailed map of segments 0002:00007C7C 00041DA4 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 0002:00049A20 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 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 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 + 0002:00049A44 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 + 0002:00049A5C 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 + 0002:00049A60 00000450 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 + 0002:00049EB0 00000028 C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 + 0002:00049ED8 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 + 0002:00049EE4 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 + 0002:00049EEC 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:00160248 +Program entry point at 0001:00160B1C diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 3bba10e..1298884 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -668,7 +668,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 497 - ActivePage = TabSheetAccessoires + ActivePage = TabSheetPeriph Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -2295,7 +2295,7 @@ object FormConfig: TFormConfig Width = 129 Height = 21 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 TabOrder = 1 OnChange = ComboBoxDecChange end @@ -2402,7 +2402,7 @@ object FormConfig: TFormConfig Width = 129 Height = 21 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 TabOrder = 2 OnChange = ComboBoxAspChange end @@ -2688,7 +2688,7 @@ object FormConfig: TFormConfig Top = 56 Width = 193 Height = 21 - ItemHeight = 13 + ItemHeight = 0 TabOrder = 0 OnChange = ComboBoxDecodeurPersoChange end @@ -2707,7 +2707,7 @@ object FormConfig: TFormConfig Width = 145 Height = 21 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 TabOrder = 2 OnChange = ComboBoxNationChange end @@ -2916,8 +2916,8 @@ object FormConfig: TFormConfig end end object GroupBox19: TGroupBox - Left = 8 - Top = 176 + Left = 16 + Top = 136 Width = 217 Height = 137 Caption = 'Destinataire de l'#39'action ' @@ -2930,7 +2930,7 @@ object FormConfig: TFormConfig Caption = 'Tempo (ms)' end object LabelFonction: TLabel - Left = 24 + Left = 8 Top = 18 Width = 80 Height = 13 @@ -3110,7 +3110,7 @@ object FormConfig: TFormConfig Height = 21 Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 ParentShowHint = False ShowHint = True TabOrder = 6 @@ -3148,7 +3148,7 @@ object FormConfig: TFormConfig end object GroupBoxPN: TGroupBox Left = 8 - Top = 112 + Top = 56 Width = 241 Height = 193 Caption = 'Action gestion passage '#224' niveau' @@ -3291,7 +3291,7 @@ object FormConfig: TFormConfig Height = 21 Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 ParentShowHint = False ShowHint = True TabOrder = 10 @@ -3893,17 +3893,20 @@ object FormConfig: TFormConfig OnMouseDown = ListBoxTrainsMouseDown end end - object TabSheetAccessoires: TTabSheet + object TabSheetPeriph: TTabSheet Caption = 'COM/USB/Socket' ImageIndex = 9 object Label73: TLabel Left = 8 Top = 8 - Width = 574 - Height = 13 + Width = 580 + Height = 26 Caption = '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' + 'iv'#233's par un actionneur et leur envoyer des ordres ASCII. On peut' + + ' '#233'galement leur envoyer des informations sur les '#233'v'#232'nements aigu' + + 'illage, d'#233'tecteurs et actionneurs via les services.' + WordWrap = True end object LabelInfoAcc: TLabel Left = 272 @@ -3913,9 +3916,9 @@ object FormConfig: TFormConfig end object ListBoxAcc: TListBox Left = 8 - Top = 64 + Top = 72 Width = 233 - Height = 281 + Height = 273 Color = clBlack Font.Charset = DEFAULT_CHARSET Font.Color = clAqua @@ -3932,7 +3935,7 @@ object FormConfig: TFormConfig end object ButtonAjAccCom: TButton Left = 8 - Top = 40 + Top = 48 Width = 65 Height = 17 Caption = 'Nouveau' @@ -3941,7 +3944,7 @@ object FormConfig: TFormConfig end object ButtonSupAccCom: TButton Left = 80 - Top = 40 + Top = 48 Width = 65 Height = 17 Caption = 'Supprime' @@ -3950,7 +3953,7 @@ object FormConfig: TFormConfig end object GroupBoxDesc: TGroupBox Left = 264 - Top = 64 + Top = 72 Width = 329 Height = 129 Caption = 'Description du p'#233'riph'#233'rique' @@ -3963,9 +3966,9 @@ object FormConfig: TFormConfig Caption = 'Nom du p'#233'riph'#233'rique' end object EditNomAcc: TEdit - Left = 168 + Left = 150 Top = 24 - Width = 121 + Width = 170 Height = 21 Hint = 'Nom au choix du p'#233'riph'#233'rique' ParentShowHint = False diff --git a/UnitConfig.pas b/UnitConfig.pas index 464498f..5d21df0 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -311,7 +311,7 @@ type outcopierentatquetexte1: TMenuItem; CheckBoxAffMemo: TCheckBox; RadioButtonCde: TRadioButton; - TabSheetAccessoires: TTabSheet; + TabSheetPeriph: TTabSheet; ListBoxAcc: TListBox; ButtonAjAccCom: TButton; ButtonSupAccCom: TButton; @@ -515,6 +515,7 @@ type procedure modif_ComboL(Sender : TObject); procedure cb_onclick(Sender : Tobject); procedure tb_onChange(sender : TObject); + procedure Bt_onclick(sender : Tobject); end; const @@ -590,7 +591,7 @@ var portCDM,TempoOctet,TimoutMaxInterface,Valeur_entete,PortInterface,prot_serie,NumPort,debug, LigneCliqueePN,AncLigneCliqueePN,clicMemo,Nb_cantons_Sig,protocole,Port, ligneclicAig,AncLigneClicAig,ligneClicSig,AncligneClicSig,EnvAigDccpp,AdrBaseDetDccpp, - ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Adressefeuclic,NumTrameCDM, + ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Indexfeuclic,NumTrameCDM, Algo_localisation,Verif_AdrXpressNet,ligneclicTrain,AncligneclicTrain,AntiTimeoutEthLenz, ligneDCC,decCourant,AffMemoFenetre,ligneClicAccCOM,AncligneClicAccCOM : integer; @@ -611,6 +612,7 @@ var LabelPortCde,LbPnVoie1,LbAPnVoie1,LbAPnVoie2,LbAPnVoie3,LbAPnVoie4,LbAPnVoie5,LbATitre, LbZTitre,LbZPnVoie1,LbZPnVoie2,LbZPnVoie3,LbZPnVoie4,LbZPnVoie5 : Tlabel; shape1,ShapeZ : Tshape; + BoutonCom : Tbutton; EditT : Array[1..10] of Tedit; ComboL1,ComboL2,ComboTS1,ComboTS2 : Array[1..10] of TComboBox; ShapeT : array[1..10] of TShape; @@ -634,6 +636,8 @@ implementation uses UnitDebug,UnitTCO, UnitSR, UnitCDF,UnitAnalyseSegCDM, unitPilote; +var ListCom : tstrings; + {$R *.dfm} // envoi d'une chaîne Com_IPC à CDM par socket, puis attend l'ack ou le nack @@ -1575,7 +1579,7 @@ begin if Tablo_Actionneur[i].son then s:=s+','+IntToSTR(Tablo_Actionneur[i].Etat)+','+Tablo_Actionneur[i].trainDecl+',"'+Tablo_Actionneur[i].FichierSon+'"'; - if Tablo_Actionneur[i].cde then + if Tablo_Actionneur[i].periph then s:=s+','+IntToSTR(Tablo_Actionneur[i].Etat)+','+Tablo_Actionneur[i].trainDecl+',ACC'+IntToSTR(Tablo_Actionneur[i].fonction)+','+Tablo_Actionneur[i].trainDest; encode_act_loc_son:=s; @@ -2018,7 +2022,7 @@ var s,sa,SOrigine: string; Tablo_actionneur[i].loco:=false; Tablo_actionneur[i].act:=false; Tablo_actionneur[i].son:=false; - Tablo_actionneur[i].cde:=false; + Tablo_actionneur[i].periph:=false; end; @@ -2095,7 +2099,7 @@ var s,sa,SOrigine: string; Tablo_actionneur[maxtablo_act].act:=false; Tablo_actionneur[maxtablo_act].loco:=true; Tablo_actionneur[maxtablo_act].son:=false; - Tablo_actionneur[maxtablo_act].cde:=false; + Tablo_actionneur[maxtablo_act].periph:=false; delete(s,1,1); val(s,j,erreur); @@ -2118,7 +2122,7 @@ var s,sa,SOrigine: string; Tablo_actionneur[maxtablo_act].act:=false; Tablo_actionneur[maxtablo_act].loco:=false; Tablo_actionneur[maxtablo_act].son:=false; - Tablo_actionneur[maxtablo_act].cde:=true; + Tablo_actionneur[maxtablo_act].periph:=true; delete(s,1,3); val(s,j,erreur); @@ -2146,7 +2150,7 @@ var s,sa,SOrigine: string; Tablo_actionneur[maxtablo_act].act:=false; Tablo_actionneur[maxtablo_act].son:=true; Tablo_actionneur[maxtablo_act].loco:=false; - Tablo_actionneur[maxtablo_act].cde:=false; + Tablo_actionneur[maxtablo_act].periph:=false; delete(s,1,1); i:=pos('"',s); s:=copy(s,1,i-1); @@ -2161,7 +2165,7 @@ var s,sa,SOrigine: string; Tablo_actionneur[maxtablo_act].act:=true; Tablo_actionneur[maxtablo_act].son:=false; Tablo_actionneur[maxtablo_act].loco:=false; - Tablo_actionneur[maxtablo_act].cde:=false; + Tablo_actionneur[maxtablo_act].periph:=false; delete(s,1,1); val(s,j,erreur); @@ -3826,33 +3830,32 @@ begin end; end; -// affiche les champs du signal lc -// LC=Adresse du signal -procedure clicListeSignal(lc : integer); -var AncAdresse,index,adresse,erreur : integer; +// affiche les champs du signal index +// LC=index du signal +procedure clicListeSignal(index : integer); +var AncAdresse,adresse,erreur,i : integer; s : string; begin - index:=index_Signal(lc)-1; if index<1 then exit; - s:=Uppercase(FormConfig.ListBoxSig.Items[index]); // ligne cliquée + s:=Uppercase(FormConfig.ListBoxSig.Items[index-1]); // ligne cliquée if s='' then begin ligneclicSig:=-1; exit; end; - { ne pas déselectionner tout!! + // ne pas déselectionner tout!! with FormConfig.ListBoxSig do begin for i:=0 to Count-1 do Selected[i]:=false; - FormConfig.ListBoxSig.Selected[index]:=true; + FormConfig.ListBoxSig.Selected[index-1]:=true; end; - } - Feu_Sauve:=feux[index+1]; // sauvegarde + + Feu_Sauve:=feux[index]; // sauvegarde AncLigneClicSig:=ligneclicSig; - ligneClicSig:=index; + ligneClicSig:=index-1; // Mettre en rouge le signal modifié quand on clique sur un autre signal if AncligneclicSig<>-1 then @@ -3865,7 +3868,7 @@ begin FormConfig.EditAdrSig.Color:=clWindow; - aff_champs_sig_feux(index+1); // affiche les champs du feu + aff_champs_sig_feux(index); // affiche les champs du feu clicliste:=false; end; @@ -3977,7 +3980,7 @@ begin clicListe:=false; activ:=false; - if clicproprietes then clicListeSignal(Adressefeuclic); + if clicproprietes then clicListeSignal(Indexfeuclic); clicproprietes:=false; end; @@ -4048,6 +4051,11 @@ begin end; end; +procedure TformConfig.Bt_onclick(sender : TObject); +begin + liste_portcom; +end; + procedure TformConfig.cb_onclick(sender : TObject); var s : string; cb : TCheckBox; @@ -4138,14 +4146,14 @@ begin if v=1 then begin inc(NbPeriph_COMUSB); - if NbPeriph_COMUSB>MaxComUSBCde then labelInfo.Caption:='Nombre maxi de périphériques COM/USB atteint'; + if NbPeriph_COMUSB>MaxComUSBPeriph then labelInfo.Caption:='Nombre maxi de périphériques COM/USB atteint'; Tablo_acc_COMUSB[i].numComposant:=NbPeriph_COMUSB; Tablo_com_cde[i].NumAcc:=NbPeriph_COMUSB; end; if v=2 then begin inc(NbPeriph_Socket); - if NbPeriph_Socket>2 then labelInfo.Caption:='Nombre maxi de périphériques socket atteint'; + if NbPeriph_Socket>MaxComSocketPeriph then labelInfo.Caption:='Nombre maxi de périphériques socket atteint'; Tablo_acc_COMUSB[NbPeriph].numComposant:=NbPeriph_socket; Tablo_com_cde[i].NumAcc:=NbPeriph_Socket; end; @@ -4816,7 +4824,7 @@ begin GroupBoxAct.Visible:=false; GroupBoxPN.Visible:=false; - if clicproprietes then clicListeSignal(Adressefeuclic); + if clicproprietes then clicListeSignal(Indexfeuclic); clicproprietes:=false; i:=1; @@ -4854,16 +4862,16 @@ begin // composants dynamiques car on ne peut plus ajouter de composants en mode conception! //--------- groupbox - gp1:=TgroupBox.Create(FormConfig.TabSheetAccessoires); + gp1:=TgroupBox.Create(FormConfig.TabSheetPeriph); with gp1 do begin Left:=264;Top:=groupBoxDesc.top+groupBoxDesc.Height+10;Width:=groupBoxDesc.Width;Height:=90; - parent:=TabSheetAccessoires; + parent:=TabSheetPeriph; caption:='Services envoyés au périphérique'; Name:='Gp1'; end; - cb2:=TCheckBox.Create(FormConfig.TabSheetAccessoires); + cb2:=TCheckBox.Create(FormConfig.TabSheetPeriph); with cb2 do begin Left:=10;Top:=25;Width:=100;Height:=12; @@ -4874,7 +4882,7 @@ begin ShowHint:=true; onclick:=formconfig.cb_onclick; end; - cb3:=TCheckBox.Create(FormConfig.TabSheetAccessoires); + cb3:=TCheckBox.Create(FormConfig.TabSheetPeriph); with cb3 do begin Left:=10;Top:=45;Width:=100;Height:=12; @@ -4885,22 +4893,59 @@ begin ShowHint:=true; onclick:=formconfig.cb_onclick; end; - cb1:=TCheckBox.Create(FormConfig.TabSheetAccessoires); + cb1:=TCheckBox.Create(FormConfig.TabSheetPeriph); with cb1 do begin - Left:=10;Top:=65;Width:=100;Height:=12; - caption:='Aiguillages'; + Left:=10;Top:=65;Width:=170;Height:=12; + caption:='Aiguillages et accessoires'; name:='cbAig'; parent:=gp1; - hint:='Envoie les évènements aiguillages'; + hint:='Envoie les évènements aiguillages (accessoires)'; ShowHint:=true; onclick:=formconfig.cb_onclick; end; - CheckBoxCR:=TCheckBox.Create(FormConfig.TabSheetAccessoires); + BoutonCom:=Tbutton.Create(FormConfig.TabSheetPeriph); + with BoutonCom do + begin + Left:=100;Top:=357;Width:=75;Height:=20; + caption:='Lister COMs'; + name:='BoutonCom'; + parent:=FormConfig.TabSheetPeriph; + hint:='Affiche les ports COM/USB disponibles'; + ShowHint:=true; + onclick:=formconfig.Bt_onclick; + end; + + EditPortCde:=TEdit.Create(FormConfig.TabSheetPeriph); + with EditPortCde do + begin + Left:=150;Top:=EditNomAcc.top+30;Width:=170;Height:=12; + name:='EditPortCde'; + text:=''; + parent:=GroupBoxDesc; + hint:='Port COM/USB : COMX:vitesse,parité,nombre de bits de données, nombre de bits de stop ou'+#13+ + '________________________________'+#13+#13+ + 'Socket : AdresseIPV4:port'; + ShowHint:=true; + OnChange:=formconfig.tb_onChange; + end; + + LabelPortCde:=TLabel.Create(FormConfig.TabSheetPeriph); + with LabelPortCde do + begin + Left:=10;Top:=EditNomAcc.top+32;Width:=170;Height:=12; + caption:='Protocole de communication'; + name:='LabelPortCde'; + parent:=GroupBoxDesc; + hint:='Protocole de communication'; + ShowHint:=true; + end; + + CheckBoxCR:=TCheckBox.Create(FormConfig.TabSheetPeriph); with CheckBoxCR do begin - Left:=10;Top:=56;Width:=170;Height:=12; + Left:=10;Top:=LabelPortCde.Top+30;width:=150;Height:=12; caption:='Envoyer CR (retour chariot)'; name:='CheckBoxCR'; parent:=GroupBoxDesc; @@ -4909,35 +4954,11 @@ begin onclick:=formconfig.cb_onclick; end; - EditPortCde:=TEdit.Create(FormConfig.TabSheetAccessoires); - with EditPortCde do - begin - Left:=150;Top:=95;Width:=170;Height:=12; - name:='EditPortCde'; - text:=''; - parent:=GroupBoxDesc; - hint:='COMX:vitesse,parité,nombre de bits de données, nombre de bits de stop ou'+#13+ - 'AdresseIPV4:port'; - ShowHint:=true; - OnChange:=formconfig.tb_onChange; - end; - - LabelPortCde:=TLabel.Create(FormConfig.TabSheetAccessoires); - with LabelPortCde do - begin - Left:=10;Top:=98;Width:=170;Height:=12; - caption:='Protocole de communication'; - name:='LabelPortCde'; - parent:=GroupBoxDesc; - hint:='Protocole de communication'; - ShowHint:=true; - end; - - cbVis:=TCheckBox.Create(FormConfig.TabSheetAccessoires); + cbVis:=TCheckBox.Create(FormConfig.TabSheetPeriph); with cbVis do begin parent:=groupBoxDesc; - Left:=10;Top:=75;Width:=100;Height:=12; + Left:=10;Top:=CheckBoxCR.top+20;Width:=100;Height:=12; caption:='Mode visible'; name:='cbVis'; hint:='Affiche le texte à l''écran lors des envoi'; @@ -4946,7 +4967,6 @@ begin end; - {if FileExists('Image_Signaux.jpg') then ImageSignaux.Picture.LoadFromFile('Image_Signaux.jpg') else Affiche('Manque fichier "Image_Signaux.jpg"',clOrange); @@ -4967,6 +4987,7 @@ end; // décode un morceau d'une chaine d'aiguillage ('P5S') +// // si erreur, B='?' procedure decodeAig(s : string;var adr : integer;var B : char); var erreur,i : integer; @@ -5864,7 +5885,7 @@ begin end; end; - if Tablo_actionneur[i].cde then + if Tablo_actionneur[i].periph then begin champs_type_cde; with formConfig do @@ -5988,7 +6009,7 @@ begin until trouve or (i>NbrePN); if not(trouve) then exit; - with formConfig do //zizi + with formConfig do begin RadioGroupActPN.itemindex:=Tablo_PN[i].TypeCde; @@ -7584,6 +7605,8 @@ begin if not(verif_dec_sig(false)) then labelInfo.Caption:='Combinaison décodeur / aspect incompatible'; + ListBoxSig.Selected[ligneClicSig]:=true; + // change l'image du feu dans la feuille graphique principale bm:=Select_dessin_feu(feux[index].aspect); if bm=nil then exit; @@ -7667,7 +7690,7 @@ begin Tablo_Actionneur[i].loco:=true; Tablo_Actionneur[i].Act:=false; Tablo_Actionneur[i].Son:=false; - Tablo_Actionneur[i].Cde:=false; + Tablo_Actionneur[i].periph:=false; champs_type_loco; val(editact.Text,champ,erreur); @@ -7699,7 +7722,7 @@ begin Tablo_Actionneur[i].loco:=false; Tablo_Actionneur[i].Act:=true; Tablo_Actionneur[i].Son:=false; - Tablo_Actionneur[i].Cde:=false; + Tablo_Actionneur[i].periph:=false; champs_type_act; val(editact.Text,champ,erreur); @@ -7732,7 +7755,7 @@ begin Tablo_Actionneur[i].loco:=false; Tablo_Actionneur[i].Act:=false; Tablo_Actionneur[i].Son:=true; - Tablo_Actionneur[i].Cde:=false; + Tablo_Actionneur[i].periph:=false; champs_type_son; @@ -7763,7 +7786,7 @@ begin Tablo_Actionneur[i].loco:=false; Tablo_Actionneur[i].Act:=false; Tablo_Actionneur[i].Son:=false; - Tablo_Actionneur[i].Cde:=true; + Tablo_Actionneur[i].periph:=true; champs_type_Cde; val(editact.Text,champ,erreur); @@ -8178,7 +8201,6 @@ begin ligneclicAct:=-1; AncligneclicAct:=-1; - clicliste:=false; end; @@ -8838,7 +8860,7 @@ begin begin ok:=false; Affiche('Erreur 9.6: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; + end; end; end; @@ -8926,7 +8948,7 @@ begin extr:=aiguillage[index2].ADroit; if adr<>extr then Affiche('Erreur 10.23: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'D différent de '+intToSTR(extr),clred); end; - if c='S' then + if c='S' then begin extr:=aiguillage[index2].ADevie; if adr<>extr then Affiche('Erreur 10.24: Discordance de déclaration aiguillages '+intToSTR(adr)+'S: '+intToSTR(adr2)+'S différent de '+intToSTR(extr),clred); @@ -9279,7 +9301,7 @@ begin end; end; - if Tablo_actionneur[i].cde then + if Tablo_actionneur[i].periph then begin j:=Tablo_actionneur[i].fonction; if j>10 then begin Affiche('Erreur 15.1 pilotage actionneur '+intToSTR(Tablo_actionneur[i].adresse),clred);ok:=false;end; @@ -9309,7 +9331,7 @@ begin // actionneurs for i:=1 to maxTablo_act do begin - if tablo_actionneur[i].cde then + if tablo_actionneur[i].periph then begin adresse:=tablo_actionneur[i].fonction; if adresse>NbPeriph then @@ -9762,7 +9784,7 @@ begin //aiguillage[index].DdroitB:=B; aiguillage[index].Ddevie:=adr; aiguillage[index].DdevieB:=B; - + s:=encode_aig(index); formconfig.ListBoxAig.items[ligneClicAig]:=s; @@ -10386,6 +10408,7 @@ begin end; procedure TFormConfig.PageControlChange(Sender: TObject); +var i : integer; begin Label20.Visible:=false; LabelInfo.caption:=''; @@ -11800,120 +11823,6 @@ begin clicListe:=false; end; -{ -procedure TFormConfig.ListBoxAigKeyDown(Sender: TObject; var Key: Word; - Shift: TShiftState); -var lc,curseur,i : integer; -begin - if key=VK_delete then supprime_aig; - - if ord(Key)=VK_UP then - begin - if clicListe then exit; - clicListe:=true; - if affevt then affiche('Evt ListBoxAig keydown',clyellow); - with Formconfig.ListBoxAig do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if lc>0 then - begin - dec(lc); - AncligneClicAig:=ligneClicAig; - ligneClicAig:=lc; - curseur:=SelStart; // position initiale du curseur - if AncligneClicAig<>ligneClicAig then - begin - if AncligneClicAig<>-1 then - begin - RE_ColorLine(ListBoxAig,AncligneClicAig,ClAqua); - end; - RE_ColorLine(ListBoxAig,ligneClicAig,ClYellow); - selStart:=curseur; // remettre le curseur en position initiale - aff_champs_Aig_tablo(lc+1); - end; - end; - end; - end; - - if ord(Key)=VK_DOWN then - begin - if clicListe then exit; - clicListe:=true; - if affevt then affiche('Evt ListBoxAig keydown',clyellow); - with Formconfig.ListBoxAig do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - if lcligneClicAig then - begin - if AncligneClicAig<>-1 then - begin - RE_ColorLine(ListBoxAig,AncligneClicAig,ClAqua); - end; - RE_ColorLine(ListBoxAig,ligneClicAig,ClYellow); - selStart:=curseur; // remettre le curseur en position initiale - aff_champs_Aig_tablo(lc+1); - end; - end; - end; - end; - clicListe:=false; - end; -} -{ - -procedure TFormConfig.ListBoxAigMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var i,lc,adresse,erreur : integer; - s : string; -begin - clicliste:=true; - // HideCaret(ListBoxAig.Handle); - raz_champs_aig; - ComboBoxAig.ItemIndex:=-1; - formconfig.ComboBoxDD.ItemIndex:=-1; - - with Formconfig.ListBoxAig do - begin - i:=Selstart; - lc:=Perform(EM_LINEFROMCHAR,i,0); // numéro de la lignée cliquée - //Affiche('numéro de la ligne cliquée '+intToStr(lc),clyellow); - s:=Uppercase(Lines[lc]); // ligne cliquée - if s='' then - begin - RE_ColorLine(Formconfig.ListBoxAig,ligneclicAig,ClAqua); - ligneclicAig:=-1; - exit; - end; - - Aig_sauve:=Aiguillage[lc+1]; // sauvegarde - AncligneclicAig:=ligneclicAig; - ligneclicAig:=lc; - - if AncligneclicAig<>-1 then - begin - if aiguillage[ligneclicAig+1].modifie then RE_ColorLine(Formconfig.ListBoxAig,AncligneclicAig,ClWhite) else - RE_ColorLine(Formconfig.ListBoxAig,AncligneclicAig,ClAqua); - end; - end; - - Val(s,Adresse,erreur); // Adresse de l'aguillage - if adresse=0 then exit; - - RE_ColorLine(Formconfig.ListBoxAig,ligneclicAig,Clyellow); - i:=index_aig(Adresse); - - aff_champs_Aig_tablo(i); - clicliste:=false; -end; -} procedure TFormConfig.ListBoxAigDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); @@ -11937,7 +11846,7 @@ begin with Formconfig.ListBoxSig do begin ligneClicSig:=itemindex; - clicListeSignal(feux[ligneClicSig+1].adresse); + clicListeSignal(ligneClicSig+1); end; end; @@ -12059,11 +11968,7 @@ procedure TFormConfig.Slectionnertout1Click(Sender: TObject); var tl: TListBox; begin tl:=(Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TlistBox ; - //Affiche(tl.name,clLime); - with tl do - begin - SelectAll; - end; + tl.SelectAll; end; // supprimer un périphérique @@ -12084,7 +11989,7 @@ var ss,s : string; if ss='' then exit; s:='Voulez-vous supprimer '; - if n=1 then s:=s+' l''accessoire COM/USB ' else s:=s+' les accessoires COM/USB '; + if n=1 then s:=s+' le périphérique ' else s:=s+' les périphériques '; s:=s+ss+' ?'; if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit; @@ -12166,11 +12071,11 @@ begin perform(WM_VSCROLL,SB_BOTTOM,0); end; - formconfig.LabelInfo.caption:='Accessoire COM/USB créé'; + formconfig.LabelInfo.caption:='Périphérique COM/USB/Socket créé'; ligneClicAccCOM:=i-1; AncligneClicAccCOM:=ligneClicAccCom; Aff_champs_accCOMUSB_tablo(i); - s:='nouveau'; + s:='Nouveau périphérique'; formConfig.ComboBoxAccComUSB.Items.Add(s); formconfig.ComboBoxPNCom.Items.Add(s); formconfig.EditNomAcc.text:=s; @@ -12179,7 +12084,6 @@ begin end; - procedure TFormConfig.Supprimer1Click(Sender: TObject); var tl: TListBox; s : string; @@ -12248,17 +12152,18 @@ begin begin index:=tablo_com_cde[i].NumAcc; - if com_socket(i)=1 then + if com_socket(i)=1 then // si port comusb begin - if connecte_port_usb_acc(index) then + if connecte_port_usb_periph(index) then Affiche('COM'+intToSTR(tablo_acc_comusb[index].numcom)+' périphérique ouvert',clLime) else Affiche('COM'+intToSTR(tablo_acc_comusb[index].numcom)+' périphérique non ouvert',clOrange); end else - begin - connecte_socket_acc(i); + begin // si port com socket + if connecte_socket_periph(i) then Affiche('Socket '+tablo_acc_comusb[i].protocole+' demande ouverture ',clLime) + else + Affiche('Socket '+tablo_acc_comusb[i].protocole+' commande périphérique non ouvert',clOrange); end; - end; end; @@ -12284,8 +12189,6 @@ begin end; end; - - procedure TFormConfig.ListBoxAccMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var i,lc : integer; @@ -12309,13 +12212,11 @@ begin ligneclicAccCom:=lc; end; - Aff_champs_accCOMUSB_tablo(lc+1); clicliste:=false; end; - procedure TFormConfig.ComboBoxAccComUSBChange(Sender: TObject); var s : string; begin diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index 645ef3b..793f8e3 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -1,6 +1,6 @@ object FormPrinc: TFormPrinc - Left = 55 - Top = 179 + Left = 51 + Top = 236 Width = 1222 Height = 653 Caption = 'Signaux complexes' @@ -36,8 +36,8 @@ object FormPrinc: TFormPrinc ParentFont = False end object Image9feux: TImage - Left = 528 - Top = 8 + Left = 944 + Top = -8 Width = 57 Height = 105 Picture.Data = { @@ -667,8 +667,8 @@ object FormPrinc: TFormPrinc Visible = False end object Image2feux: TImage - Left = 904 - Top = 136 + Left = 1104 + Top = 8 Width = 33 Height = 57 Picture.Data = { @@ -741,8 +741,8 @@ object FormPrinc: TFormPrinc Visible = False end object Image2Dir: TImage - Left = 984 - Top = 120 + Left = 656 + Top = 0 Width = 41 Height = 25 Picture.Data = { @@ -816,86 +816,86 @@ object FormPrinc: TFormPrinc Visible = False end object Image3Dir: TImage - Left = 928 - Top = 168 + Left = 848 + Top = 0 Width = 49 Height = 25 Picture.Data = { 07544269746D6170AE080000424DAE0800000000000036040000280000002C00 - 00001A000000010008000000000078040000C40E0000C40E0000000100000001 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 + 00001A000000010008000000000078040000C40E0000C40E0000000100000000 + 000000000000000080000080000000808000800000008000800080800000C0C0 + C000C0DCC000F0CAA6000020400000206000002080000020A0000020C0000020 + E00000400000004020000040400000406000004080000040A0000040C0000040 + E00000600000006020000060400000606000006080000060A0000060C0000060 + E00000800000008020000080400000806000008080000080A0000080C0000080 + E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0C00000A0 + E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0C00000C0 + E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0C00000E0 + E00040000000400020004000400040006000400080004000A0004000C0004000 + E00040200000402020004020400040206000402080004020A0004020C0004020 + E00040400000404020004040400040406000404080004040A0004040C0004040 + E00040600000406020004060400040606000406080004060A0004060C0004060 + E00040800000408020004080400040806000408080004080A0004080C0004080 + E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0C00040A0 + E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0C00040C0 + E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0C00040E0 + E00080000000800020008000400080006000800080008000A0008000C0008000 + E00080200000802020008020400080206000802080008020A0008020C0008020 + E00080400000804020008040400080406000804080008040A0008040C0008040 + E00080600000806020008060400080606000806080008060A0008060C0008060 + E00080800000808020008080400080806000808080008080A0008080C0008080 + E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0C00080A0 + E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0C00080C0 + E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0C00080E0 + E000C0000000C0002000C0004000C0006000C0008000C000A000C000C000C000 + E000C0200000C0202000C0204000C0206000C0208000C020A000C020C000C020 + E000C0400000C0402000C0404000C0406000C0408000C040A000C040C000C040 + E000C0600000C0602000C0604000C0606000C0608000C060A000C060C000C060 + E000C0800000C0802000C0804000C0806000C0808000C080A000C080C000C080 + E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0 + E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0 + A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF + FF00FCFCFCFCFCFCFCFC00000000000000000000000000000000000000000000 + 000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFC000000000000000000000000 + 0000000000000000000000000000000000000000FCFCFCFCFCFCFCFCFCFCFC00 + 000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000 + 00FCFCFCFCFCFCFCFCFC000000FFFF0000000000000000000000000000000000 + 000000000000000000FFFF000000FCFCFCFCFCFCFC000000FF00000000000000 + 0000000000000000000000000000000000000000000000FF000000FCFCFCFCFC + 000000FF00000000000000000000000000000000000000000000000000000000 + 00000000FF000000FCFCFCFC0000FF0000000000000000000000000000000000 + 0000000000000000000000000000000000FF0000FCFCFC000000FF0000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 00FCFC0000FF0000000000000000000000000000000000000000000000000000 + 00000000000000000000FF0000FC000000FF0000000000525252520000000000 + 00005252525200000000000000525252520000000000FF0000000000FF000000 + 0000525252525252000000000052525252525200000000005252525252520000 + 000000FF00000000FF0000000052525252525252520000005252525252525252 + 000000525252525252525200000000FF00000000FF0000000052525252525252 + 520000005252525252525252000000525252525252525200000000FF00000000 + FF00000000525252525252525200000052525252525252520000005252525252 + 52525200000000FF00000000FF00000000525252525252525200000052525252 + 52525252000000525252525252525200000000FF00000000FF00000000005252 + 52525252000000000052525252525200000000005252525252520000000000FF + 0000000000FF0000000000525252520000000000000052525252000000000000 + 00525252520000000000FF000000FC0000FF0000000000000000000000000000 + 00000000000000000000000000000000000000000000FF0000FCFC000000FF00 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000C0C0C0C0C0C0C0C00000000000000000000000000000000000000000000 - 0000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C000000000000000000000000 - 00000000000000000000000000000000000000000C0C0C0C0C0C0C0C0C0C0C00 - 0000000F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F000000 - 000C0C0C0C0C0C0C0C0C0000000F0F0000000000000000000000000000000000 - 0000000000000000000F0F0000000C0C0C0C0C0C0C0000000F00000000000000 - 00000000000000000000000000000000000000000000000F0000000C0C0C0C0C - 0000000F00000000000000000000000000000000000000000000000000000000 - 000000000F0000000C0C0C0C00000F0000000000000000000000000000000000 - 00000000000000000000000000000000000F00000C0C0C0000000F0000000000 - 00000000000000000000000000000000000000000000000000000000000F0000 - 000C0C00000F0000000000000000000000000000000000000000000000000000 - 000000000000000000000F00000C0000000F0000000000070707070000000000 - 000007070707000000000000000707070700000000000F00000000000F000000 - 0000070707070707000000000007070707070700000000000707070707070000 - 0000000F000000000F0000000007070707070707070000000707070707070707 - 0000000707070707070707000000000F000000000F0000000007070707070707 - 0700000007070707070707070000000707070707070707000000000F00000000 - 0F00000000070707070707070700000007070707070707070000000707070707 - 070707000000000F000000000F00000000070707070707070700000007070707 - 070707070000000707070707070707000000000F000000000F00000000000707 - 070707070000000000070707070707000000000007070707070700000000000F - 00000000000F0000000000070707070000000000000007070707000000000000 - 000707070700000000000F0000000C00000F0000000000000000000000000000 - 000000000000000000000000000000000000000000000F00000C0C0000000F00 - 0000000000000000000000000000000000000000000000000000000000000000 - 000F0000000C0C0C00000F000000000000000000000000000000000000000000 - 000000000000000000000000000F00000C0C0C0C0000000F0000000000000000 - 0000000000000000000000000000000000000000000000000F0000000C0C0C0C - 0C0000000F000000000000000000000000000000000000000000000000000000 - 0000000F0000000C0C0C0C0C0C0C0000000F0F00000000000000000000000000 - 000000000000000000000000000F0F0000000C0C0C0C0C0C0C0C0C000000000F - 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F000000000C0C0C - 0C0C0C0C0C0C0C0C000000000000000000000000000000000000000000000000 - 00000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C00000000000000000000 - 0000000000000000000000000000000000000C0C0C0C0C0C0C0C} + 00FF000000FCFCFC0000FF000000000000000000000000000000000000000000 + 00000000000000000000000000FF0000FCFCFCFC000000FF0000000000000000 + 000000000000000000000000000000000000000000000000FF000000FCFCFCFC + FC000000FF000000000000000000000000000000000000000000000000000000 + 000000FF000000FCFCFCFCFCFCFC000000FFFF00000000000000000000000000 + 00000000000000000000000000FFFF000000FCFCFCFCFCFCFCFCFC00000000FF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FCFCFC + FCFCFCFCFCFCFCFC000000000000000000000000000000000000000000000000 + 0000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000 + 000000000000000000000000000000000000FCFCFCFCFCFCFCFC} Visible = False end object Image4Dir: TImage - Left = 1032 - Top = 120 + Left = 792 + Top = 0 Width = 57 Height = 25 Picture.Data = { @@ -982,7 +982,7 @@ object FormPrinc: TFormPrinc Visible = False end object Image5Dir: TImage - Left = 960 + Left = 880 Top = 0 Width = 65 Height = 25 @@ -1080,110 +1080,110 @@ object FormPrinc: TFormPrinc Visible = False end object Image6Dir: TImage - Left = 896 - Top = 120 + Left = 1016 + Top = 0 Width = 81 Height = 25 Picture.Data = { 07544269746D6170560C0000424D560C00000000000036040000280000004D00 - 00001A000000010008000000000020080000C40E0000C40E0000000100000001 - 0000000000000000800000800000008080008000000080008000808000008080 - 8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF - FF00000000000000000000000000000000000000000000000000000000000000 + 00001A000000010008000000000020080000C40E0000C40E0000000100000000 + 000000000000000080000080000000808000800000008000800080800000C0C0 + C000C0DCC000F0CAA6000020400000206000002080000020A0000020C0000020 + E00000400000004020000040400000406000004080000040A0000040C0000040 + E00000600000006020000060400000606000006080000060A0000060C0000060 + E00000800000008020000080400000806000008080000080A0000080C0000080 + E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0C00000A0 + E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0C00000C0 + E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0C00000E0 + E00040000000400020004000400040006000400080004000A0004000C0004000 + E00040200000402020004020400040206000402080004020A0004020C0004020 + E00040400000404020004040400040406000404080004040A0004040C0004040 + E00040600000406020004060400040606000406080004060A0004060C0004060 + E00040800000408020004080400040806000408080004080A0004080C0004080 + E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0C00040A0 + E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0C00040C0 + E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0C00040E0 + E00080000000800020008000400080006000800080008000A0008000C0008000 + E00080200000802020008020400080206000802080008020A0008020C0008020 + E00080400000804020008040400080406000804080008040A0008040C0008040 + E00080600000806020008060400080606000806080008060A0008060C0008060 + E00080800000808020008080400080806000808080008080A0008080C0008080 + E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0C00080A0 + E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0C00080C0 + E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0C00080E0 + E000C0000000C0002000C0004000C0006000C0008000C000A000C000C000C000 + E000C0200000C0202000C0204000C0206000C0208000C020A000C020C000C020 + E000C0400000C0402000C0404000C0406000C0408000C040A000C040C000C040 + E000C0600000C0602000C0604000C0606000C0608000C060A000C060C000C060 + E000C0800000C0802000C0804000C0806000C0808000C080A000C080C000C080 + E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0 + E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0 + A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF + FF00FCFCFCFCFCFCFCFC00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000FCFCFCFCFCFCFCFC000000FCFCFCFCFCFC0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000FCFCFCFCFCFC00 + 0000FCFCFCFCFC00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFF00000000FCFCFCFCFC000000FCFCFCFC000000FFFF0000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000FFFF000000FCFCFCFC00 + 0000FCFCFC000000FF0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000FF000000FCFCFC000000FCFC000000FF0000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000FF000000FCFC00 + 0000FCFC0000FF00000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000FF0000FCFC000000FC000000FF000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF000000FC00 + 0000FC0000FF0000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000FF0000FC000000000000FF00000000005252525200 + 0000000000005252525200000000000000525252520000000000000052525252 + 000000000000005252525200000000000000525252520000000000FF00000000 + 00000000FF000000000052525252525200000000005252525252520000000000 + 5252525252520000000000525252525252000000000052525252525200000000 + 005252525252520000000000FF00000000000000FF0000000052525252525252 + 5200000052525252525252520000005252525252525252000000525252525252 + 52520000005252525252525252000000525252525252525200000000FF000000 + 00000000FF000000005252525252525252000000525252525252525200000052 + 5252525252525200000052525252525252520000005252525252525252000000 + 525252525252525200000000FF00000000000000FF0000000052525252525252 + 5200000052525252525252520000005252525252525252000000525252525252 + 52520000005252525252525252000000525252525252525200000000FF000000 + 00000000FF000000005252525252525252000000525252525252525200000052 + 5252525252525200000052525252525252520000005252525252525252000000 + 525252525252525200000000FF00000000000000FF0000000000525252525252 + 0000000000525252525252000000000052525252525200000000005252525252 + 52000000000052525252525200000000005252525252520000000000FF000000 + 0000000000FF0000000000525252520000000000000052525252000000000000 + 0052525252000000000000005252525200000000000000525252520000000000 + 0000525252520000000000FF000000000000FC0000FF00000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000000000FF0000FC00 + 0000FC000000FF00000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000FF000000FC000000FCFC0000FF000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000FF0000FCFC00 + 0000FCFC000000FF000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FCFC000000FCFCFC000000FF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000000FF000000FCFCFC00 + 0000FCFCFCFC000000FFFF000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000FFFF000000FCFCFCFC000000FCFCFCFCFC00000000FFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FCFCFCFCFC00 + 0000FCFCFCFCFCFC000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000FCFCFCFCFCFC000000FCFCFCFCFCFCFCFC000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000C0C0C0C0C0C0C0C00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000C0C0C0C0C0C0C0C0000000C0C0C0C0C0C0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000C0C0C0C0C0C00 - 00000C0C0C0C0C000000000F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F - 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F - 0F0F0F0F0F0F000000000C0C0C0C0C0000000C0C0C0C0000000F0F0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000F0F0000000C0C0C0C00 - 00000C0C0C0000000F0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000F0000000C0C0C0000000C0C0000000F0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000F0000000C0C00 - 00000C0C00000F00000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000F00000C0C0000000C0000000F000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000F0000000C00 - 00000C00000F0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000F00000C0000000000000F00000000000202050200 - 0000000000000202050200000000000000020205020000000000000002020502 - 0000000000000002020502000000000000000202050200000000000F00000000 - 000000000F000000000002050202050200000000000205020205020000000000 - 0205020205020000000000020502020502000000000002050202050200000000 - 0002050202050200000000000F000000000000000F0000000000070002050200 - 0200000000070002050200020000000007000205020002000000000700020502 - 000200000000070002050200020000000007000205020002000000000F000000 - 000000000F000000000202070002070502000000020207000207050200000002 - 0207000207050200000002020700020705020000000202070002070502000000 - 0202070002070502000000000F000000000000000F0000000005020007020002 - 0200000005020007020002020000000502000702000202000000050200070200 - 020200000005020007020002020000000502000702000202000000000F000000 - 000000000F000000000205020007000700000000020502000700070000000002 - 0502000700070000000002050200070007000000000205020007000700000000 - 0205020007000700000000000F000000000000000F0000000000020502070002 - 0000000000020502070002000000000002050207000200000000000205020700 - 020000000000020502070002000000000002050207000200000000000F000000 - 00000000000F0000000000020002070000000000000002000207000000000000 - 0002000207000000000000000200020700000000000000020002070000000000 - 00000200020700000000000F0000000000000C00000F00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000F00000C00 - 00000C0000000F00000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000F0000000C0000000C0C00000F000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000F00000C0C00 - 00000C0C0000000F000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000F0000000C0C0000000C0C0C0000000F00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000F0000000C0C0C00 - 00000C0C0C0C0000000F0F000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000F0F0000000C0C0C0C0000000C0C0C0C0C000000000F0F0F0F0F - 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F - 0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F000000000C0C0C0C0C00 - 00000C0C0C0C0C0C000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000C0C0C0C0C0C0000000C0C0C0C0C0C0C0C000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000C0C0C0C0C0C0C0C00 + 0000000000000000000000000000000000000000000000FCFCFCFCFCFCFCFC00 0000} Visible = False end @@ -1202,8 +1202,8 @@ object FormPrinc: TFormPrinc ParentFont = False end object ImageSignal20: TImage - Left = 384 - Top = 8 + Left = 1016 + Top = 0 Width = 57 Height = 105 Picture.Data = { @@ -1478,26 +1478,6 @@ object FormPrinc: TFormPrinc 2143341208000000ED030000ED03000001568A64000006000000010000040000 00020000802500000000080000000000000000003F00000011000000} end - object ButtonEnv: TButton - Left = 1073 - Top = 160 - Width = 113 - Height = 33 - Anchors = [akTop, akRight] - Caption = 'Envoi vers centrale DCC++' - TabOrder = 2 - WordWrap = True - OnClick = ButtonEnvClick - end - object EditEnvoi: TEdit - Left = 945 - Top = 168 - Width = 121 - Height = 21 - Anchors = [akTop, akRight] - TabOrder = 3 - Text = '<1>' - end object Button1: TButton Left = 489 Top = 0 @@ -1505,20 +1485,20 @@ object FormPrinc: TFormPrinc Height = 25 Anchors = [akTop, akRight] Caption = 'Button1' - TabOrder = 4 + TabOrder = 2 Visible = False OnClick = Button1Click end object Panel2: TPanel - Left = 8 + Left = 0 Top = 32 - Width = 1122 - Height = 513 + Width = 1057 + Height = 473 Anchors = [akLeft, akTop, akRight] - TabOrder = 5 + TabOrder = 3 DesignSize = ( - 1122 - 513) + 1057 + 473) object SplitterV: TSplitter Left = 1 Top = 1 @@ -1533,10 +1513,10 @@ object FormPrinc: TFormPrinc OnMoved = SplitterVMoved end object FenRich: TRichEdit - Left = 24 - Top = 8 - Width = 553 - Height = 441 + Left = 16 + Top = 16 + Width = 425 + Height = 409 Color = clBlack Font.Charset = DEFAULT_CHARSET Font.Color = clYellow @@ -1553,10 +1533,10 @@ object FormPrinc: TFormPrinc OnMouseDown = FenRichMouseDown end object ScrollBox1: TScrollBox - Left = 615 - Top = 140 + Left = 550 + Top = 192 Width = 563 - Height = 373 + Height = 321 HorzScrollBar.Increment = 48 HorzScrollBar.Tracking = True VertScrollBar.Smooth = True @@ -1567,7 +1547,7 @@ object FormPrinc: TFormPrinc TabOrder = 1 end object GroupBox1: TGroupBox - Left = 626 + Left = 489 Top = 5 Width = 265 Height = 52 @@ -1614,8 +1594,8 @@ object FormPrinc: TFormPrinc end end object GroupBox3: TGroupBox - Left = 626 - Top = 64 + Left = 505 + Top = 32 Width = 265 Height = 129 Anchors = [akTop, akRight] @@ -1850,22 +1830,25 @@ object FormPrinc: TFormPrinc end end object Panel1: TPanel - Left = 906 + Left = 753 Top = 5 Width = 296 - Height = 148 + Height = 180 Anchors = [akTop, akRight] TabOrder = 4 + DesignSize = ( + 296 + 180) object Label1: TLabel - Left = 64 - Top = 128 + Left = 152 + Top = 136 Width = 89 Height = 13 Caption = 'Nombre de trains : ' end object LabelNbTrains: TLabel - Left = 240 - Top = 124 + Left = 256 + Top = 132 Width = 9 Height = 19 Caption = '0' @@ -1919,9 +1902,9 @@ object FormPrinc: TFormPrinc OnClick = ButtonLanceCDMClick end object ButtonLocCV: TButton - Left = 8 + Left = 104 Top = 88 - Width = 89 + Width = 81 Height = 33 Hint = 'Affichage du panneau de contr'#244'le des trains ou des CV' Caption = 'Trains / CVs' @@ -1962,10 +1945,30 @@ object FormPrinc: TFormPrinc WordWrap = True OnClick = ButtonCDMClick end + object EditEnvoi: TEdit + Left = 7 + Top = 127 + Width = 121 + Height = 21 + Anchors = [akTop, akRight] + TabOrder = 8 + Text = '<1>' + end + object ButtonEnv: TButton + Left = 8 + Top = 88 + Width = 88 + Height = 33 + Anchors = [akTop, akRight] + Caption = 'Envoi vers centrale DCC++' + TabOrder = 9 + WordWrap = True + OnClick = ButtonEnvClick + end end object GroupBox2: TGroupBox - Left = 626 - Top = 48 + Left = 489 + Top = 64 Width = 265 Height = 105 Anchors = [akTop, akRight] @@ -2027,12 +2030,12 @@ object FormPrinc: TFormPrinc end end object ButtonIndex: TButton - Left = 720 - Top = 8 + Left = 712 + Top = 0 Width = 75 Height = 25 Caption = 'Indexs' - TabOrder = 6 + TabOrder = 4 OnClick = ButtonIndexClick end object MSCommCde1: TMSComm diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 27c9b17..4b9e8d1 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -21,7 +21,7 @@ Unit UnitPrinc; vitesse port com lenz=57600 - ligne de commande en mode administrateur pour valider le socket: + ligne de commande en mode administrateur pour valider le socket du pare feu: netsh advfirewall firewall add rule name="cdm rail" dir=in action=allow program="C:\Program Files (x86)\CDM-Rail\cdr.exe" enable=yes *) @@ -119,8 +119,6 @@ type RepriseDCC1: TMenuItem; Demandetataccessoires1: TMenuItem; LancerCDMrail1: TMenuItem; - ButtonEnv: TButton; - EditEnvoi: TEdit; Roulage1: TMenuItem; Placerlestrains1: TMenuItem; Demandetatdtecteurs1: TMenuItem; @@ -214,6 +212,8 @@ type MSCommCde2: TMSComm; ClientSocketCde1: TClientSocket; ClientSocketCde2: TClientSocket; + EditEnvoi: TEdit; + ButtonEnv: TButton; procedure FormCreate(Sender: TObject); procedure MSCommUSBLenzComm(Sender: TObject); @@ -377,7 +377,8 @@ NbreMaxiSignaux=200; NbreMaxiDecPers=10; // nombre maxi de décodeurs personnalisés 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 +MaxComUSBPeriph=2; // Nombre maxi de périphériques USB périphériques +MaxComSocketPeriph=2; const_droit=2; // positions aiguillages transmises par la centrale LENZ const_devie=1; // positions aiguillages transmises par la centrale LENZ const_devieG_CDM=3; // positions aiguillages transmises par cdm @@ -390,7 +391,7 @@ ClBleuClair=$FF7070 ; clRose=$AAAAFF; Cyan=$FF6060; clviolet=$FF00FF; -GrisF=$414141; +GrisF=$333333; clOrange=$0077FF; couleurTrain : array[0..NbCouleurTrain] of Tcolor = (clRose,clYellow,clLime,clOrange,clAqua,clFuchsia,clLtGray,clred,clWhite); Max_Simule=10000; @@ -640,7 +641,7 @@ var Tablo_actionneur : array[0..Max_actionneurs] of record - loco,act,son,cde : boolean; // destinataire loco acessoire son ou périphérique + loco,act,son,periph : 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 périphérique @@ -776,9 +777,9 @@ procedure Affiche(s : string;lacouleur : TColor); procedure envoi_signal(Adr : integer); procedure pilote_direction(Adr,nbre : integer); procedure connecte_USB; -function connecte_port_usb_acc(index : integer) : boolean; +function connecte_port_usb_periph(index : integer) : boolean; procedure deconnecte_usb_periph(index : integer); -procedure connecte_socket_acc(index : integer); +function connecte_socket_periph(index : integer) : boolean; procedure deconnecte_socket_periph(index : integer); procedure deconnecte_usb; function IsWow64Process: Boolean; @@ -829,6 +830,7 @@ procedure ferme_pn_usb(i : integer); procedure ouvre_pn_socket(i : integer); procedure ferme_pn_socket(i : integer); function com_socket(i : integer) : integer; +function liste_portcom : tStrings; implementation @@ -1005,7 +1007,6 @@ begin end; - // dessine un cercle plein dans le feu procedure cercle(ACanvas : Tcanvas;x,y,rayon : integer;couleur : Tcolor); begin @@ -1017,7 +1018,7 @@ begin pen.Width:=1; pen.Mode:=pmCopy; Ellipse(x-rayon,y-rayon,x+rayon,y+rayon); - end; + end; end; // dessine les feux sur une cible à 2 feux dans le canvas spécifié @@ -1519,6 +1520,7 @@ begin end; // inverse une image horizontale (miroir) et la met dans dest +// Utilisé pour les signaux belges procedure inverse_image(imageDest,ImageSrc : Timage); var mrect,nrect : trect; larg,haut : integer; @@ -1762,7 +1764,7 @@ begin HtImage:=Height; end; 5 : with Formprinc.Image5Dir.Picture.Bitmap do - begin + begin LgImage:=Width; HtImage:=Height; end; @@ -1816,8 +1818,8 @@ begin if EtatSignal=1 then begin cercle(ACanvas,x1,y1,rayon,clWhite); - cercle(ACanvas,x2,y2,rayon,GrisF); - if N>2 then cercle(ACanvas,x3,y3,rayon,GrisF); + cercle(ACanvas,x2,y2,rayon,grisF); + if N>2 then cercle(ACanvas,x3,y3,rayon,grisF); if N>3 then cercle(ACanvas,x4,y4,rayon,GrisF); if N>4 then cercle(ACanvas,x5,y5,rayon,GrisF); if N>5 then cercle(ACanvas,x6,y6,rayon,GrisF); @@ -10215,8 +10217,8 @@ begin 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); +// envoi le texte traindest de l'accessoire sur le socket de l'actionneur i +procedure envoi_socket_periph_act(i : integer); var v,numacc : integer; s : string; begin @@ -10324,13 +10326,15 @@ begin end; // 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 - v:=tablo_actionneur[i].fonction; + if adresseOK and (Tablo_actionneur[i].periph) and ((s=trainDecl) or (s='X') or (trainDecl='X') or (trainDecl='')) and (etatValide) then + begin // zizi + trainDest:=Tablo_actionneur[i].trainDest; + v:=tablo_actionneur[i].fonction; // numéro d'accessoire + Affiche(st+' TrainDecl='+trainDecl+' Envoi commande '+TrainDest,clWhite); 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); + if af=1 then envoi_periph_usb(i); // numéro d'actionneur + if af=2 then envoi_socket_periph_act(i); // numéro d'actionneur + end; end; @@ -10453,34 +10457,31 @@ begin if (adr>650) then for i:=1 to NbPeriph do begin - v:=com_socket(i); - if v=1 then + s:='A'+intToSTR(adr)+','+intToSTR(etat)+','+trainDecl; + if Tablo_acc_COMUSB[i].ScvAct then 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 - 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 Tablo_acc_COMUSB[i].cr then s:=s+#13; + typ:=Tablo_acc_COMUSB[i].numComposant; + if typ=1 then Formprinc.MSCommCde1.Output:=s; + if typ=2 then Formprinc.MSCommCde2.Output:=s; end; end; - end; - if v=2 then - begin - if (Tablo_acc_COMUSB[i].ScvDet) then + if v=2 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.ClientSocketCde1.Socket.SendText(s); - if i=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); + if Tablo_acc_COMUSB[i].cr then s:=s+#13; + typ:=Tablo_acc_COMUSB[i].numComposant; + if typ=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); + if typ=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); end; - end; + end; end; end; @@ -10674,10 +10675,11 @@ begin 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,clWhite); - if i=1 then Formprinc.MSCommCde1.Output:=s; - if i=2 then Formprinc.MSCommCde2.Output:=s; + if Tablo_acc_COMUSB[i].cr then s:=s+#13; + index:=Tablo_acc_COMUSB[i].NumComposant; + if index=1 then Formprinc.MSCommCde1.Output:=s; + if index=2 then Formprinc.MSCommCde2.Output:=s; end; end; if dr=2 then @@ -10685,10 +10687,11 @@ 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); + if Tablo_acc_COMUSB[i].cr then s:=s+#13; + index:=Tablo_acc_COMUSB[i].NumComposant; + if index=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); + if index=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); end; end; @@ -10789,10 +10792,11 @@ 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; + if Tablo_acc_COMUSB[i].cr then s:=s+#13; + index:=Tablo_acc_COMUSB[i].NumComposant; + if index=1 then Formprinc.MSCommCde1.Output:=s; + if index=2 then Formprinc.MSCommCde2.Output:=s; end; end; end; @@ -10801,10 +10805,11 @@ 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.ClientSocketCde1.Socket.SendText(s); - if i=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); + if Tablo_acc_COMUSB[i].cr then s:=s+#13; + index:=Tablo_acc_COMUSB[i].NumComposant; + if index=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); + if index=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); end; end; end; @@ -11743,15 +11748,15 @@ 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_acc(index : integer) : boolean; +function connecte_port_usb_periph(index : integer) : boolean; var i,j,numport,vitesse,erreur : integer; trouve : boolean; s,sc,portComCde : string; com : TMSComm; begin - if (index<0) or (index>MaxComUSBCde) then + if (index<0) or (index>MaxComUSBPeriph) 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); + affiche('Le nombre maxi de portCom périphériques est atteint - Le port COM'+inttostr(tablo_acc_comusb[index].NumCom)+' ne sera pas ouvert',clred); result:=false; exit; end; @@ -11770,6 +11775,13 @@ begin 2 : com:=formprinc.MSCommCde2; end; + if index>MaxComUSBPeriph then + begin + affiche('Le nombre maxi de portCom périphériques est atteint - Le port COM'+inttostr(tablo_acc_comusb[index].NumCom)+' ne sera pas ouvert',clred); + result:=false; + exit; + end; + With com do begin @@ -11828,14 +11840,14 @@ begin if length(s)>1 then if upcase(s[1])='C' then result:=1 else result:=2; end; -procedure connecte_socket_acc(index :integer); +function connecte_socket_periph(index :integer) : boolean; 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); + affiche('Le nombre maxi de Sockets périphériques est atteint - Le socket '+Tablo_acc_COMUSB[index].protocole+' ne sera pas ouvert',clred); exit; end; @@ -11851,6 +11863,13 @@ begin 2 : com:=formprinc.ClientSocketCde2; end; + if NumSocket>MaxComSocketPeriph then + begin + affiche('Le nombre maxi de Sockets périphériques est atteint - Le socket '+Tablo_acc_COMUSB[index].protocole+' ne sera pas ouvert',clred); + result:=false; + exit; + end; + s:=tablo_acc_comusb[index].protocole; i:=pos(':',s); com.address:=copy(s,1,i-1); @@ -11858,7 +11877,8 @@ begin val(s,i,erreur); com.port:=i; com.open; - Affiche('Demande d''ouverture du socket '+tablo_acc_comusb[index].protocole,clYellow); +// Affiche('Demande d''ouverture du socket '+tablo_acc_comusb[index].protocole,clYellow); + result:=true; end; // connecte un port usb interface. Si le port n'est pas ouvert, renvoie 0, sinon renvoie @@ -12723,13 +12743,16 @@ begin 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); + if connecte_port_usb_periph(i) then + Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande périphérique ouvert',clLime) + else Affiche('COM'+intToSTR(tablo_acc_comusb[i].numcom)+' commande périphérique non ouvert',clOrange); end; if index=2 then begin - connecte_socket_acc(i); + if connecte_socket_periph(i) then + Affiche('Socket '+tablo_acc_comusb[i].protocole+' demande ouverture ',clLime) + else + Affiche('Socket '+tablo_acc_comusb[i].protocole+' commande périphérique non ouvert',clOrange) end; end; @@ -13125,7 +13148,7 @@ end; // timer à 100 ms procedure TFormPrinc.Timer1Timer(Sender: TObject); -var aspect,i,a,x,y,Bimage,combine,adresse,TailleX,TailleY,orientation,indexTCO : integer; +var i,a,combine,adresse,TailleX,TailleY,orientation,indexTCO,x,y,Bimage,aspect : integer; imageFeu : Timage; frx,fry : real; faire : boolean; @@ -15221,9 +15244,9 @@ procedure TFormPrinc.Proprits1Click(Sender: TObject); var s: string; begin clicliste:=false; - s:=((Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TImage).name; // nom du composant, pout récupérer l'adresse du feu (ex: ImageFeu260) - //Affiche(s,clOrange); // nom de l'image du signal (ex: ImageFeu260) - adresseFeuClic:=extract_int(s); // extraire l'adresse (ex 260) + s:=((Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TImage).name; // nom du composant, pout récupérer l'index du feu (ex: ImageFeu2) + //Affiche(s,clOrange); // nom de l'image du signal (ex: ImageFeu2) + IndexFeuClic:=extract_int(s); // extraire l'adresse (ex 2) formconfig.PageControl.ActivePage:=formconfig.TabSheetSig; clicproprietes:=true; formconfig.showmodal; @@ -15580,13 +15603,40 @@ begin end; procedure TFormPrinc.Button1Click(Sender: TObject); -begin - placement_trains; +begin +// placement_trains; //ouvre_simulation('C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL\2trains_autonome.txt'); //ouvre_simulation('C:\Program Files\Borland\Delphi7\Projects\Signaux_complexes_GL\2trains_autonome.txt'); - ouvre_simulation('C:\temp\Signaux_complexes_GL\2trains_autonome.txt'); +// ouvre_simulation('C:\temp\Signaux_complexes_GL\2trains_autonome.txt'); end; + +function liste_portcom : tStrings; +var + reg: TRegistry; + I:Integer; + ts : tStrings; +begin + Reg := TRegistry.Create(KEY_READ); + try + Reg.RootKey := HKEY_LOCAL_MACHINE; + if Reg.OpenKey('HARDWARE\DEVICEMAP\SERIALCOMM', false) then //Ordinateur\HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM + begin + ts:=TStringList.Create; + Reg.GetValueNames(ts); + for I := 0 to ts.Count - 1 do + begin + ts[i]:= Reg.ReadString(ts[i]); + Affiche(ts[i],clWhite); + end; + end; + finally + Reg.Free; + end; + if ts.count=0 then Affiche('Aucun port COM/USB',clyellow); + + result:=tS; +end; procedure TFormPrinc.Evenementsdetecteurspartrain1Click(Sender: TObject); var i,j,train,pos : integer; @@ -15697,6 +15747,7 @@ begin if v_publie>0 then begin val(version,V_utile,erreur); + Affiche('Nt='+nombre_tel,clLime); if V_utile=V_publie then Affiche('Votre version '+Version+SousVersion+' publiée le '+date_creation+' est à jour',clLime); if V_utile>V_publie then Affiche('Votre version '+version+SousVersion+' est plus récente que la version publiée '+s,clLime); end @@ -16706,5 +16757,7 @@ begin Affiche(CLientSocketCde2.Socket.ReceiveText,clWhite); end; + + end. diff --git a/verif_version.pas b/verif_version.pas index b6e38ce..f4d4825 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -23,7 +23,7 @@ var FormVersion: TFormVersion; Lance_verif : integer; verifVersion,notificationVersion : boolean; - date_creation : string; + date_creation,nombre_tel : string; 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 @@ -115,7 +115,7 @@ end; // renvoie le numéro de version depuis le site github function verifie_version : real; -var description,s,s2,s3,Version_p,Url,LocalFile,nomfichier,nombre_tel,date_creation_ang +var description,s,s2,s3,Version_p,Url,LocalFile,nomfichier,date_creation_ang : string; trouve_version,trouve_zip,zone_comm,LocZip : boolean; fichier : text; diff --git a/versions.txt b/versions.txt index 25fe3ca..7db9e6b 100644 --- a/versions.txt +++ b/versions.txt @@ -192,6 +192,6 @@ version 8.2 : Optimisation de la rapidit 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) + Ajout de l'envoi des commandes/services sur un socket (réseau Ethernet/wifi)