Diff of /trunk/mqttsparkplug/mqttsparkplug-example/Device_1/Plc Logic/Application2_1/Edge2/svnobj [r889] .. [r890]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/mqttsparkplug/mqttsparkplug-example/Device_1/Plc Logic/Application2_1/Edge2/svnobj
+++ b/trunk/mqttsparkplug/mqttsparkplug-example/Device_1/Plc Logic/Application2_1/Edge2/svnobj
@@ -1,4 +1,4 @@
-Gx_l„7!0…jüo*sÜÃÛÈp9System.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
-TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTextIF Init THEN(    AddAllMetrics();    Scenario();END_IFbGenerateDataTimer( IN := NOT GenerateDataTimer.Q,X                   PT := GenerateDataPeriod,^                   ET => GenerateDataElapsed );6IF GenerateDataTimer.Q THEN,    GenerateEoNData();2    GenerateDeviceData();>TON_DelayStartup( IN := TRUE );€IF NOT StillGettingClientCertificate AND TON_DelayStartup.Q THEN@    EoN( ServerUrl := ServerUrl,D         ServerPort := ServerPort,Ö         PrimaryHostID := "Ignition-Sparky", //"Sparky", , // Please change this to your own PrimaryHostID! @         KeepAlive := KeepAlive,!L         CleanSession := CleanSession,"<         Username := Username,#<         Password := Password,$4         UseTLS := UseTLS,%0         hCert := hCert,&8         GroupId := GroupId,'<         NodeName := NodeName,(P         publishPeriod := publishPeriod,)ļ         // Uncomment this for TLS usage and please alter the initialisation of myTLSContext*æ         //         ITLSContextProvider    := ItfTLSContext, // We provide a reference to an instance of TLSContext+F         IASyncPropertyProvider :=,,X         SessionState => EoNConnectionState,-\         NumberOfDevices => NumberOfDevices );.PELSIF StillGettingClientCertificate THEN/v    //The below method creates a Client Certificate for you0    //It generates a CSR and sends it to test.mosquitto.org to be signed1    AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org();2IF PlugIt THEN3$    ItfEoN := EoN;4ELSE5     ItfEoN := 0;6RMyDevice1( DeviceName := "SomeDevice001",7V           DeviceHealthy := Device1Healthy,8H           ItfEoNInstance := ItfEoN,9:           PluggedIntoEoN =>,:T           SessionState => MyDevice1State,;X           publishPeriod := publishPeriod );<RMyDevice2( DeviceName := "SomeDevice002",=V           DeviceHealthy := Device2Healthy,>T           SessionState => MyDevice2State,?RMyDevice3( DeviceName := "SomeDevice003",@V           DeviceHealthy := Device3Healthy,AT           SessionState => MyDevice3State,BInterfaceCL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}DPROGRAM Edge2EVARF0    Init : BOOL := TRUE;G<    TestScenario : USINT := 8;H8    EoN : Sparkplug.FB_Edge;Iz    EoNConnectionState : Sparkplug.SparkplugSessionStateType;J8    NumberOfDevices : UDINT;KH    MyDevice1 : Sparkplug.FB_Device;LD    Device1Healthy : BOOL := TRUE;MH    MyDevice2 : Sparkplug.FB_Device;ND    Device2Healthy : BOOL := TRUE;OH    MyDevice3 : Sparkplug.FB_Device;PD    Device3Healthy : BOOL := TRUE;Qr    MyDevice1State : Sparkplug.SparkplugSessionStateType;Rr    MyDevice2State : Sparkplug.SparkplugSessionStateType;Sr    MyDevice3State : Sparkplug.SparkplugSessionStateType;T4    PlugIt : BOOL := TRUE;U`    ItfEoN : Sparkplug.ISparkplugDeviceProtocol;V.    ServerUrl : STRING;W,    ServerPort : UINT;X*    KeepAlive : UINT;YB    CleanSession : BOOL := FALSE;Z:    Username : WSTRING := "";[:    Password : WSTRING := "";\6    UseTLS : BOOL := FALSE;]œ    hCert : SysTypes.RTS_IEC_HANDLE := SysTypes.RTS_INVALID_HANDLE; // Handle to the client certificate (optional) only used if UseTLS is TRUE^X    GroupId : WSTRING := "SparkplugBDevice";_B    NodeName : WSTRING := "Ian2";`    publishPeriod : UINT := 500; //  milliseconds interval so 1000 = 1s aŽ    //Encapsulates all the data neccessaray to handle/check  encrypted tcp connectionsbˆ    //Static initialization, as shown in the following code snippet;c    //d    //VAReV    //    commonName : STRING := 'MyRasPi';fļ    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));gX    //    myTLSContext : NBS.TLSContext := (h`    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,iL    //        sUseCaseName:='NBSTest',jB    //        sTLSVersion:='1.3',kJ    //        ciCertInfo:=ciCertInfo,lH    //        udiVerificationMode:=2m    //    );n    //END_VARoJ    commonName : STRING := 'MyRasPi';pō    ciCertInfo : Sparkplug.MQTT.NBS.CERT_INFO := (psInfo := ADR( commonName ), udiSize := TO_UDINT( LEN( commonName ) ));q4    sUseCaseName : STRING;rT    ePurpose : Sparkplug.MQTT.NBS.PURPOSE;sX    sHostname : Sparkplug.MQTT.NBS.HOSTNAME;t@    udiVerificationMode : UDINT;u˜    myTLS : Sparkplug.MQTT.NBS.TLSContext := ( sUseCaseName := sUseCaseName,vˆ                                               ePurpose := ePurpose,wŒ                                               sHostname := sHostname,xļ                                               udiVerificationMode := udiVerificationMode );yf    ItfTLSContext : Sparkplug.MQTT.NBS.ITLSContext;z<    GenerateDataPeriod : TIME;{>    GenerateDataElapsed : TIME;|8    GenerateDataTimer : TON;}J    Timestamp : Sparkplug.T_DateTime;~2    Str : ChangingString;Œ    //These are specific for registering certificates at test.mqtt.org€X    getClientCert : Sparkplug.GetClientCert;N    RegisterCSR : Web_Client.WebClient;‚4    countClientCert : INT;ƒ>    httpPost : WSTRING( 2048 );„R    StillGettingClientCertificate : BOOL;…V    wsCSRorClientCertOut : WSTRING( 2048 );†r    WaitForTheServerToRegisterCert : TON := (PT := T#1S);‡V    TON_DelayStartup : TON := (PT := T#5S);ˆEND_VAR‰"UniqueIdGeneratorŠ5093‹POULevelŒL{8e575c5b-1d37-49c6-941b-5c0ec7874787}StandardŽ ChildObjectGuids8System.Collections.ArrayList,AddAttributeSubsequent‘boolÐÐ-ÐÐ	E
-AÐÐ
­¦ÚÐ-ÐÐ
­§ÚÐ-ÐÐ
­¨ÚÐ-ÐÐ
­©ÚÐ-ÐÐ
­ªÚÐ-ÐÐ
­«ÚÐ-ÐÐ
­¬ÚÐ-ÐÐ
­­ÚÐ-ÐÐ
­®ÚÐ-ÐÐ
­¯ÚÐ-ÐÐ
­°ÚÐ-ÐÐ
­±ÚÐ-ÐÐ
­²ÚÐ-ÐÐ
­³ÚÐ-ÐÐ
­´ÚÐ-ÐÐ
­µÚÐ-ÐÐ
­¶ÚÐ-ÐÐ
­·ÚÐ-ÐÐ
­¸ÚÐ-ÐÐ
­¹ÚÐ- ÐÐ
­ºÚÐ-!ÐÐ
­»ÚÐ-"ÐÐ
­¼ÚÐ-#ÐÐ
­½ÚÐ-$ÐÐ
­¾ÚÐ-%ÐÐ
­¿ÚÐ-&ÐÐ
­ÀÚÐ-'ÐÐ
­ÁÚÐ-(ÐÐ
­ÂÚÐ-)ÐÐ
­ÃÚÐ-*ÐÐ
­ÄÚÐ-+ÐÐ
­ÅÚÐ-,ÐÐ
­ÆÚÐ--ÐÐ
­ÇÚÐ-.ÐÐ
­ÈÚÐ-/ÐÐ
­ÉÚÐ-0ÐÐ
­ÊÚÐ-1ÐÐ
­ËÚÐ-ÐÐ
­ÌÚÐ-ÐÐ
­ÍÚÐ-2ÐÐ
­ÎÚÐ-3ÐÐ
­ÏÚÐ-4ÐÐ
­ÐÚÐ-5ÐÐ
­ÑÚÐ-ÐÐ
­ÒÚÐ-ÐÐ
­ÓÚÐ-6ÐÐ
­ÔÚÐ-7ÐÐ
­ÕÚÐ-8ÐÐ
­ÖÚÐ-9ÐÐ
­×ÚÐ-:ÐÐ
­ØÚÐ-;ÐÐ
­ÙÚÐ-ÐÐ
­ÚÚÐ-<ÐÐ
­ÛÚÐ-=ÐÐ
­ÜÚÐ-8ÐÐ
­ÝÚÐ-9ÐÐ
­ÞÚÐ->ÐÐ
­ßÚÐ-;ÐÐ
­àÚÐ-ÐÐ
­áÚÐ-?ÐÐ
­âÚÐ-@ÐÐ
­ãÚÐ-8ÐÐ
­äÚÐ-9ÐÐ
­åÚÐ-AÐÐ
­‡ÚÐ-;ÐBCÐ	E
-EÐÐ
­`ÚÐ-DÐÐ
­aÚÐ-EÐÐ
­bÚÐ-FÐÐ
­cÚÐ-GÐÐ
­dÚÐ-HÐÐ
­eÚÐ-IÐÐ
­fÚÐ-JÐÐ
­gÚÐ-KÐÐ
­hÚÐ-LÐÐ
­iÚÐ-MÐÐ
­jÚÐ-NÐÐ
­kÚÐ-OÐÐ
­lÚÐ-PÐÐ
­nÚÐ-QÐÐ
­oÚÐ-RÐÐ
­pÚÐ-SÐÐ
­qÚÐ-TÐÐ
­rÚÐ-UÐÐ
­sÚÐ-VÐÐ
­tÚÐ-WÐÐ
­uÚÐ-XÐÐ
­vÚÐ-YÐÐ
­wÚÐ-ZÐÐ
­xÚÐ-[ÐÐ
­yÚÐ-\ÐÐ
­zÚÐ-]ÐÐ
­{ÚÐ-^ÐÐ
­|ÚÐ-_ÐÐ
­}ÚÐ-`ÐÐ
­~ÚÐ-aÐÐ
­ÚÐ-bÐÐ
­€ÚÐ-cÐÐ
­ÚÐ-dÐÐ
­‚ÚÐ-eÐÐ
­ƒÚÐ-fÐÐ
­„ÚÐ-gÐÐ
­…ÚÐ-hÐÐ
­†ÚÐ-iÐÐ
­‡ÚÐ-jÐÐ
­ˆÚÐ-kÐÐ
­‰ÚÐ-lÐÐ
­ŠÚÐ-mÐÐ
­‹ÚÐ-nÐÐ
­ŒÚÐ-oÐÐ
­ÚÐ-pÐÐ
­ÚÐ-qÐÐ
­ÚÐ-rÐÐ
­‘ÚÐ-sÐÐ
­’ÚÐ-tÐÐ
­“ÚÐ-uÐÐ
­”ÚÐ-vÐÐ
­•ÚÐ-wÐÐ
­–ÚÐ-xÐÐ
­—ÚÐ-yÐÐ
­˜ÚÐ-zÐÐ
­™ÚÐ-{ÐÐ
­šÚÐ-|ÐÐ
­›ÚÐ-}ÐÐ
­œÚÐ-~ÐÐ
­ÚÐ-ÐÐ
­žÚÐ-€ÐÐ
­ŸÚÐ-ÐÐ
­ ÚÐ-‚ÐÐ
­¡ÚÐ-ƒÐÐ
­¢ÚÐ-„ÐÐ
­£ÚÐ-…ÐÐ
­¤ÚÐ-†ÐÐ
­¥ÚÐ-‡ÐÐ
­ÚÐ-ˆЉ-ŠЋŒ-ŽА‘­
\ No newline at end of file
+Gx_l%!0…jüo#9ÀÙÁºc£System.StringL{6f9dac99-8de1-4efc-8465-68ac443b7d08}SpecialFuncL{0db3d7bb-cde0-4416-9a7b-ce49a0124323}NoneImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocument	L{f3878285-8e4f-490b-bb1b-9acbb7eb04db}
+TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagTextIF Init THEN(    AddAllMetrics();~    Scenario( TestScenario := g_example_settings.TestScenario);ô    GenerateDataPeriod := UINT_TO_TIME( Scenario.publishPeriod - 250 ); // Now we surely change the data before sending it$    Init := FALSE;END_IFbGenerateDataTimer( IN := NOT GenerateDataTimer.Q,X                   PT := GenerateDataPeriod,^                   ET => GenerateDataElapsed );6IF GenerateDataTimer.Q THEN,    GenerateEoNData();2    GenerateDeviceData();>TON_DelayStartup( IN := TRUE );’IF NOT Scenario.StillGettingClientCertificate AND TON_DelayStartup.Q THENR    EoN( ServerUrl := Scenario.ServerUrl, V         ServerPort := Scenario.ServerPort,!x         PrimaryHostID := g_example_settings.PrimaryHostID1,"€         NodeName := g_example_settings.EdgeName2,              #^         GroupId := g_example_settings.GroupID,$R         KeepAlive := Scenario.KeepAlive,%^         CleanSession := Scenario.CleanSession,&N         Username := Scenario.Username,'N         Password := Scenario.Password,(F         UseTLS := Scenario.UseTLS,)B         hCert := Scenario.hCert,*b         publishPeriod := Scenario.publishPeriod,+¸         // Uncomment this for TLS usage and please alter the initialisation of myTLSContext,æ         //         ITLSContextProvider    := ItfTLSContext, // We provide a reference to an instance of TLSContext-F         IASyncPropertyProvider :=,.X         SessionState => EoNConnectionState,/\         NumberOfDevices => NumberOfDevices );0bELSIF Scenario.StillGettingClientCertificate THEN1v    //The below method creates a Client Certificate for you2    //It generates a CSR and sends it to test.mosquitto.org to be signed3¢    Scenario.AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org();4IF PlugIt THEN5$    ItfEoN := EoN;6ELSE7     ItfEoN := 0;8FMyDevice1( DeviceName := "Device1",9V           DeviceHealthy := Device1Healthy,:H           ItfEoNInstance := ItfEoN,;:           PluggedIntoEoN =>,<T           SessionState => MyDevice1State,=j           publishPeriod := Scenario.publishPeriod );>FMyDevice2( DeviceName := "Device2",?V           DeviceHealthy := Device2Healthy,@T           SessionState => MyDevice2State,AFMyDevice3( DeviceName := "Device3",BV           DeviceHealthy := Device3Healthy,CT           SessionState => MyDevice3State,DInterfaceEL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}FPROGRAM Edge2GVARH0    Init : BOOL := TRUE;I8    EoN : Sparkplug.FB_Edge;Jz    EoNConnectionState : Sparkplug.SparkplugSessionStateType;K8    NumberOfDevices : UDINT;LH    MyDevice1 : Sparkplug.FB_Device;MD    Device1Healthy : BOOL := TRUE;NH    MyDevice2 : Sparkplug.FB_Device;OD    Device2Healthy : BOOL := TRUE;PH    MyDevice3 : Sparkplug.FB_Device;QD    Device3Healthy : BOOL := TRUE;Rr    MyDevice1State : Sparkplug.SparkplugSessionStateType;Sr    MyDevice2State : Sparkplug.SparkplugSessionStateType;Tr    MyDevice3State : Sparkplug.SparkplugSessionStateType;U4    PlugIt : BOOL := TRUE;Vh    ItfEoN : Sparkplug.ISparkplugDeviceProtocol;    W<    GenerateDataPeriod : TIME;X>    GenerateDataElapsed : TIME;Y8    GenerateDataTimer : TON;Z2    Str : ChangingString;[J    TimeStamp : Sparkplug.T_DateTime;\X    TON_DelayStartup : TON := (PT := T#5S); ]END_VAR^"UniqueIdGenerator_5223`POULevelaL{8e575c5b-1d37-49c6-941b-5c0ec7874787}bStandardc ChildObjectGuidsd8System.Collections.ArrayListe,AddAttributeSubsequentfboolÐÐ-ÐÐ	E
+CÐÐ
­ÚÐ-ÐÐ
­+ÚÐ-ÐÐ
­,ÚÐ-ÐÐ
­-ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­©ÚÐ-ÐÐ
­ªÚÐ-ÐÐ
­«ÚÐ-ÐÐ
­¬ÚÐ-ÐÐ
­­ÚÐ-ÐÐ
­®ÚÐ-ÐÐ
­¯ÚÐ-ÐÐ
­°ÚÐ-ÐÐ
­±ÚÐ-ÐÐ
­²ÚÐ-ÐÐ
­³ÚÐ-ÐÐ
­´ÚÐ-ÐÐ
­RÚÐ-ÐÐ
­SÚÐ-ÐÐ
­·ÚÐ- ÐÐ
­ÚÐ-!ÐÐ
­ýÚÐ-"ÐÐ
­úÚÐ-#ÐÐ
­BÚÐ-$ÐÐ
­CÚÐ-%ÐÐ
­DÚÐ-&ÐÐ
­EÚÐ-'ÐÐ
­FÚÐ-(ÐÐ
­GÚÐ-)ÐÐ
­HÚÐ-*ÐÐ
­IÚÐ-+ÐÐ
­JÚÐ-,ÐÐ
­KÚÐ--ÐÐ
­LÚÐ-.ÐÐ
­MÚÐ-/ÐÐ
­NÚÐ-0ÐÐ
­OÚÐ-1ÐÐ
­PÚÐ-2ÐÐ
­QÚÐ-3ÐÐ
­ËÚÐ-ÐÐ
­ÌÚÐ-ÐÐ
­ÍÚÐ-4ÐÐ
­ÎÚÐ-5ÐÐ
­ÏÚÐ-6ÐÐ
­ÐÚÐ-7ÐÐ
­ÑÚÐ-ÐÐ
­TÚÐ-ÐÐ
­UÚÐ-8ÐÐ
­VÚÐ-9ÐÐ
­WÚÐ-:ÐÐ
­XÚÐ-;ÐÐ
­YÚÐ-<ÐÐ
­ZÚÐ-=ÐÐ
­[ÚÐ-ÐÐ
­\ÚÐ->ÐÐ
­]ÚÐ-?ÐÐ
­^ÚÐ-:ÐÐ
­_ÚÐ-;ÐÐ
­`ÚÐ-@ÐÐ
­aÚÐ-=ÐÐ
­bÚÐ-ÐÐ
­cÚÐ-AÐÐ
­dÚÐ-BÐÐ
­eÚÐ-:ÐÐ
­fÚÐ-;ÐÐ
­gÚÐ-CÐÐ
­‡ÚÐ-=ÐDEÐ	E
+ÐÐ
­`ÚÐ-FÐÐ
­aÚÐ-GÐÐ
­.ÚÐ-HÐÐ
­/ÚÐ-IÐÐ
­0ÚÐ-JÐÐ
­1ÚÐ-KÐÐ
­2ÚÐ-LÐÐ
­3ÚÐ-MÐÐ
­4ÚÐ-NÐÐ
­5ÚÐ-OÐÐ
­6ÚÐ-PÐÐ
­7ÚÐ-QÐÐ
­8ÚÐ-RÐÐ
­9ÚÐ-SÐÐ
­:ÚÐ-TÐÐ
­;ÚÐ-UÐÐ
­<ÚÐ-VÐÐ
­=ÚÐ-WÐÐ
­>ÚÐ-XÐÐ
­?ÚÐ-YÐÐ
­@ÚÐ-ZÐÐ
­AÚÐ-[ÐÐ
­¥ÚÐ-\ÐÐ
­ÚÐ-]Ð^-_Ð`a-bcdÐef­
\ No newline at end of file