Diff of /branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_PrimaryHost/FB_PrimaryHostMQTT/svnobj [r824] .. [r825]  Maximize  Restore

Switch to side-by-side view

--- a/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_PrimaryHost/FB_PrimaryHostMQTT/svnobj
+++ b/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_PrimaryHost/FB_PrimaryHostMQTT/svnobj
@@ -1,5 +1,5 @@
-Gx_lpH!0…jüo7:ˆß§bSystem.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
longTagTextD_Client( xEnable := _ClientEnable,<         xDone => _ClientDone,<         xBusy => _ClientBusy,@         xError => _ClientError,>         uiPort := _ServerPort,8         xUseTLS := _UseTLS,F         uiKeepAlive := _KeepAlive,V         pbWillMessage := _LastWillMessage,f         uiWillMessageSize := _LastWillMessageSize,P         xWillRetain := _LastWillRetain,B         eWillQoS := _LastWilQos,\         xCleanSession := _ClientCleanSession,B         wsUsername := _Username,B         wsPassword := _Password,N         wsWillTopic := _LastWillTopic,@         sClientId := _ClientId, \         tPingInterval := _ClientPingInterval,!2         hCert := _hCert,"R         itfTLSContext := _ItfTLSContext,#^         itfAsyncProperty := _ItfAsyncProperty,$B         sHostname := _ServerUrl,%P         eMQTTError => _ClientMQTTError,&t         xConnectedToBroker => _ClientConnectedToBroker );'(º_ClientConnecting := _ClientEnable AND NOT (_ClientConnectedToBroker) AND NOT (_ClientError);)f_ConnectionState  := SEL( _ClientConnectedToBroker,*x                          SparkplugSessionStateType.OFFLINE,+z                          SparkplugSessionStateType.ONLINE );,H_Publisher( xExecute := _PubExecute,-L            udiTimeOut := _PubTimeOut,.@            eQoS := _PublishQos,/T            xReDelivery := _PubRedelivery,0L            xRetain := _PublishRetain,1R            pbPayload := _PublishMessage,2d            udiPayloadSize := _PublishMessageSize,3D            mqttClient := _Client,4J            wsTopicName := _PubTopic,5<            xDone => _PubDone,6<            xBusy => _PubBusy,7@            xError => _PubError,8T            eMQTTError => _PubMQTTError );9// Subscriber:X_Subscriber( xEnable := _Subscriber_Enabled,;\             eSubscribeQos := _Subscriber_QoS,<j             pbPayload := ADR( _Subscriber_Message ),=€             udiMaxPayloadSize := SIZEOF( _Subscriber_Message ),>F             mqttClient := _Client,?l             wsTopicFilter := _Subscriber_TopicFilter,@N             xDone => _Subscriber_Done,AN             xBusy => _Subscriber_Busy,BR             xError => _Subscriber_Error,Cb             eMQTTError => _Subscriber_MQTTError,D^             xReceived => _Subscriber_Received,En             udiPayloadSize => _Subscriber_PayloadSize,Fh             xSubscribeActive => _Subscriber_Active,Gh             wsLastTopic => _Subscriber_LastTopic );HXTerminateString( ADR( _Subscriber_Message ),IV                 _Subscriber_PayloadSize );J// DiagnoseKDiag();LInterfaceML{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}N(* O€    Contains Primary Node MQTT CLient, Publisher and subscribersP*)Q${attribute 'hide'}RBFUNCTION_BLOCK FB_PrimaryHostMQTTSVARTÔ    _Client             : MQTT.MQTTClient; // Function block to establish a connection to a MQTT broker   U>    _ClientEnable       : BOOL;V     _ClientConnecting   : BOOL; // TRUE while trying to connect, otherwise FALSEW²    _ConnectionState    : SparkplugSessionStateType := SparkplugSessionStateType.OFFLINE;X>    _ClientDone         : BOOL;Y>    _ClientBusy         : BOOL;Z>    _ClientError        : BOOL;[>    _ClientCleanSession : BOOL;\h    _ClientId           : STRING(255) := 'ClientID';]^    _ClientPingInterval : TIME        := T#15S;^„    _ServerUrl          : STRING(255); // := 'test.mosquitto.org';_d    _ServerPort         : UINT;        // := 1883;`P    _KeepAlive          : UINT    := 60;aP    _Username           : WSTRING := "";bP    _Password           : WSTRING := "";cV    _UseTLS             : BOOL    := FALSE;dò    _ItfTLSContext      : MQTT.NBS.ITLSContext; //Encapsulates all the data neccecray to handle encrypted tcp connectionse    //fˆ    //Static initialization, as shown in the following code snippet;g    //VARhV    //    commonName : STRING := 'MyRasPi';i¸    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));jX    //    myTLSContext : NBS.TLSContext := (k`    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,lL    //        sUseCaseName:='NBSTest',mB    //        sTLSVersion:='1.3',nJ    //        ciCertInfo:=ciCertInfo,oH    //        udiVerificationMode:=2p    //    );q    //END_VARrž    _ItfAsyncProperty        : MQTT.NBS.IAsyncProperty; // Runs the connect process in a own background task. Use this property if the connection setup takes longer than one task cycle (e.g. TLS connections)sÐ    _hCert                   : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional)  t^    _ClientMQTTError         : MQTT.MQTT_ERROR;uH    _ClientConnectedToBroker : BOOL;vœ    _LastWillTopic           : WSTRING(GC_Sparkplug.supported_string_lengths);w^    _LastWillMessage         : POINTER TO BYTE;xH    _LastWillMessageSize     : UINT;yZ    _LastWilQos              : MQTT.MQTT_QOS;zH    _LastWillRetain          : BOOL;{ª    _ClientDiag              : STRING := '';      // Diagnosis String for the client	|¸    _Publisher               : MQTT.MQTTPublish;  // Function block to publish MQTT messages}”    _PubExecute              : BOOL;              // Enables the publisher~Ø    _PubTimeOut              : UDINT := 10000000; // Timeout in microseconds, default set at 10000000 = 10s †    _PubRedelivery           : BOOL;              //TRUE: When packet got already send and now should got resend, FALSE: First time€Ð    _PubDone                 : BOOL;              // TRUE if the message has been successfully published¼    _PubBusy                 : BOOL;              // TRUE while the message is being published‚š    _PubError                : BOOL;              // TRUE if an error occuredƒ„    _PubTopic                : WSTRING(1024);     // Message Topic„^    _PublishMessage          : POINTER TO BYTE;…J    _PublishMessageSize      : UDINT;††    _PublishQos              : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;‡®    _PublishRetain           : BOOL; // TRUE: Stores the message on server permanently ˆ^    _PubMQTTError            : MQTT.MQTT_ERROR;‰°    _PubDiag                 : STRING := '';       // Diagnosis String for the publisherŠ–    _Subscriber              : MQTT.MQTTSubscribe; // Subscriber Subscriber‹H    _Subscriber_Enabled      : BOOL;ŒH    _Subscriber_Done         : BOOL;H    _Subscriber_Busy         : BOOL;ŽH    _Subscriber_Error        : BOOL;–    _Subscriber_TopicFilter  : WSTRING(1024);           // the topic filterŠ    _Subscriber_Message      : ARRAY[0..65535] OF BYTE; //64kb buffer‘Z    _Subscriber_QoS          : MQTT.MQTT_QOS;’H    _Subscriber_Active       : BOOL;“^    _Subscriber_MQTTError    : MQTT.MQTT_ERROR;”H    _Subscriber_Received     : BOOL;•‚    _Subscriber_PayloadSize  : UDINT; // size of received message–<    _Subscriber_MaxPayloadSize—^        : UDINT; // maximum receive buffer size˜–    _Subscriber_LastTopic : WSTRING(GC_Sparkplug.supported_string_lengths);™     _Subscriber_Diag      : STRING := ''; // Diagnosis String for the SubscriberšP    //these are for GetSubscriberMessage›v    _SubscriberDecoderInst       : FB_PayloadSimpleDecoder;œn    _SubscriberDecoderInstMetric : FB_SparkplugBoolean;P    _SubscriberDecoderInstList   : List;žEND_VARŸ"UniqueIdGenerator 1649¡POULevel¢L{8e575c5b-1d37-49c6-941b-5c0ec7874787}£Standard¤ ChildObjectGuids¥8System.Collections.ArrayList¦,AddAttributeSubsequent§boolÐÐ-ÐÐ	E
+Gx_l»H!0…jüo‚:¯X@ߧbSystem.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
longTagTextD_Client( xEnable := _ClientEnable,<         xDone => _ClientDone,<         xBusy => _ClientBusy,@         xError => _ClientError,>         uiPort := _ServerPort,8         xUseTLS := _UseTLS,F         uiKeepAlive := _KeepAlive,V         pbWillMessage := _LastWillMessage,f         uiWillMessageSize := _LastWillMessageSize,P         xWillRetain := _LastWillRetain,B         eWillQoS := _LastWilQos,\         xCleanSession := _ClientCleanSession,B         wsUsername := _Username,B         wsPassword := _Password,N         wsWillTopic := _LastWillTopic,@         sClientId := _ClientId, \         tPingInterval := _ClientPingInterval,!2         hCert := _hCert,"R         itfTLSContext := _ItfTLSContext,#^         itfAsyncProperty := _ItfAsyncProperty,$B         sHostname := _ServerUrl,%P         eMQTTError => _ClientMQTTError,&t         xConnectedToBroker => _ClientConnectedToBroker );'(º_ClientConnecting := _ClientEnable AND NOT (_ClientConnectedToBroker) AND NOT (_ClientError);)f_ConnectionState  := SEL( _ClientConnectedToBroker,*x                          SparkplugSessionStateType.OFFLINE,+z                          SparkplugSessionStateType.ONLINE );,H_Publisher( xExecute := _PubExecute,-L            udiTimeOut := _PubTimeOut,.@            eQoS := _PublishQos,/T            xReDelivery := _PubRedelivery,0L            xRetain := _PublishRetain,1R            pbPayload := _PublishMessage,2d            udiPayloadSize := _PublishMessageSize,3D            mqttClient := _Client,4J            wsTopicName := _PubTopic,5<            xDone => _PubDone,6<            xBusy => _PubBusy,7@            xError => _PubError,8T            eMQTTError => _PubMQTTError );9// Subscriber:X_Subscriber( xEnable := _Subscriber_Enabled,;\             eSubscribeQos := _Subscriber_QoS,<j             pbPayload := ADR( _Subscriber_Message ),=€             udiMaxPayloadSize := SIZEOF( _Subscriber_Message ),>F             mqttClient := _Client,?l             wsTopicFilter := _Subscriber_TopicFilter,@N             xDone => _Subscriber_Done,AN             xBusy => _Subscriber_Busy,BR             xError => _Subscriber_Error,Cb             eMQTTError => _Subscriber_MQTTError,D^             xReceived => _Subscriber_Received,En             udiPayloadSize => _Subscriber_PayloadSize,Fh             xSubscribeActive => _Subscriber_Active,Gh             wsLastTopic => _Subscriber_LastTopic );HXTerminateString( ADR( _Subscriber_Message ),IV                 _Subscriber_PayloadSize );J// DiagnoseKDiag();LInterfaceML{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}N(* O€    Contains Primary Node MQTT CLient, Publisher and subscribersP*)Q${attribute 'hide'}RBFUNCTION_BLOCK FB_PrimaryHostMQTTSVARTÔ    _Client             : MQTT.MQTTClient; // Function block to establish a connection to a MQTT broker   U>    _ClientEnable       : BOOL;V     _ClientConnecting   : BOOL; // TRUE while trying to connect, otherwise FALSEW²    _ConnectionState    : SparkplugSessionStateType := SparkplugSessionStateType.OFFLINE;X>    _ClientDone         : BOOL;Y>    _ClientBusy         : BOOL;Z>    _ClientError        : BOOL;[>    _ClientCleanSession : BOOL;\h    _ClientId           : STRING(255) := 'ClientID';]^    _ClientPingInterval : TIME        := T#15S;^„    _ServerUrl          : STRING(255); // := 'test.mosquitto.org';_d    _ServerPort         : UINT;        // := 1883;`P    _KeepAlive          : UINT    := 60;aP    _Username           : WSTRING := "";bP    _Password           : WSTRING := "";cV    _UseTLS             : BOOL    := FALSE;dò    _ItfTLSContext      : MQTT.NBS.ITLSContext; //Encapsulates all the data neccecray to handle encrypted tcp connectionse    //fˆ    //Static initialization, as shown in the following code snippet;g    //VARhV    //    commonName : STRING := 'MyRasPi';i¸    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));jX    //    myTLSContext : NBS.TLSContext := (k`    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,lL    //        sUseCaseName:='NBSTest',mB    //        sTLSVersion:='1.3',nJ    //        ciCertInfo:=ciCertInfo,oH    //        udiVerificationMode:=2p    //    );q    //END_VARrž    _ItfAsyncProperty        : MQTT.NBS.IAsyncProperty; // Runs the connect process in a own background task. Use this property if the connection setup takes longer than one task cycle (e.g. TLS connections)sÐ    _hCert                   : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional)  t^    _ClientMQTTError         : MQTT.MQTT_ERROR;uH    _ClientConnectedToBroker : BOOL;vœ    _LastWillTopic           : WSTRING(GC_Sparkplug.supported_string_lengths);w^    _LastWillMessage         : POINTER TO BYTE;xH    _LastWillMessageSize     : UINT;yZ    _LastWilQos              : MQTT.MQTT_QOS;zH    _LastWillRetain          : BOOL;{ª    _ClientDiag              : STRING := '';      // Diagnosis String for the client	|¸    _Publisher               : MQTT.MQTTPublish;  // Function block to publish MQTT messages}”    _PubExecute              : BOOL;              // Enables the publisher~Ø    _PubTimeOut              : UDINT := 10000000; // Timeout in microseconds, default set at 10000000 = 10s †    _PubRedelivery           : BOOL;              //TRUE: When packet got already send and now should got resend, FALSE: First time€Ð    _PubDone                 : BOOL;              // TRUE if the message has been successfully published¼    _PubBusy                 : BOOL;              // TRUE while the message is being published‚š    _PubError                : BOOL;              // TRUE if an error occuredƒ„    _PubTopic                : WSTRING(1024);     // Message Topic„^    _PublishMessage          : POINTER TO BYTE;…J    _PublishMessageSize      : UDINT;††    _PublishQos              : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;‡®    _PublishRetain           : BOOL; // TRUE: Stores the message on server permanently ˆ^    _PubMQTTError            : MQTT.MQTT_ERROR;‰°    _PubDiag                 : STRING := '';       // Diagnosis String for the publisherŠ–    _Subscriber              : MQTT.MQTTSubscribe; // Subscriber Subscriber‹H    _Subscriber_Enabled      : BOOL;ŒH    _Subscriber_Done         : BOOL;H    _Subscriber_Busy         : BOOL;ŽH    _Subscriber_Error        : BOOL;–    _Subscriber_TopicFilter  : WSTRING(1024);           // the topic filterŠ    _Subscriber_Message      : ARRAY[0..65535] OF BYTE; //64kb buffer‘Z    _Subscriber_QoS          : MQTT.MQTT_QOS;’H    _Subscriber_Active       : BOOL;“^    _Subscriber_MQTTError    : MQTT.MQTT_ERROR;”H    _Subscriber_Received     : BOOL;•‚    _Subscriber_PayloadSize  : UDINT; // size of received message–<    _Subscriber_MaxPayloadSize—^        : UDINT; // maximum receive buffer size˜–    _Subscriber_LastTopic : WSTRING(GC_Sparkplug.supported_string_lengths);™     _Subscriber_Diag      : STRING := ''; // Diagnosis String for the SubscriberšP    //these are for GetSubscriberMessage›v    _SubscriberDecoderInst       : FB_PayloadSimpleDecoder;œ¸    _SubscriberDecoderInstMetric : FB_RemoteMetric := (_dataType := MetricDataType.Boolean);P    _SubscriberDecoderInstList   : List;žEND_VARŸ"UniqueIdGenerator 1649¡POULevel¢L{8e575c5b-1d37-49c6-941b-5c0ec7874787}£Standard¤ ChildObjectGuids¥8System.Collections.ArrayList¦,AddAttributeSubsequent§boolÐÐ-ÐÐ	E
 @ÐÐ
­3ÚÐ-ÐÐ
­4ÚÐ-ÐÐ
­5ÚÐ-ÐÐ
­6ÚÐ-ÐÐ
­7ÚÐ-ÐÐ
­8ÚÐ-ÐÐ
­9ÚÐ-ÐÐ
­:ÚÐ-ÐÐ
­;ÚÐ-ÐÐ
­<ÚÐ-ÐÐ
­=ÚÐ-ÐÐ
­>ÚÐ-ÐÐ
­?ÚÐ-ÐÐ
­@ÚÐ-ÐÐ
­AÚÐ-ÐÐ
­BÚÐ-ÐÐ
­CÚÐ- ÐÐ
­DÚÐ-!ÐÐ
­EÚÐ-"ÐÐ
­FÚÐ-#ÐÐ
­GÚÐ-$ÐÐ
­HÚÐ-%ÐÐ
­IÚÐ-&ÐÐ
­JÚÐ-'ÐÐ
­KÚÐ-(ÐÐ
­LÚÐ-)ÐÐ
­MÚÐ-*ÐÐ
­NÚÐ-+ÐÐ
­OÚÐ-'ÐÐ
­PÚÐ-,ÐÐ
­QÚÐ--ÐÐ
­RÚÐ-.ÐÐ
­SÚÐ-/ÐÐ
­TÚÐ-0ÐÐ
­UÚÐ-1ÐÐ
­VÚÐ-2ÐÐ
­WÚÐ-3ÐÐ
­XÚÐ-4ÐÐ
­YÚÐ-5ÐÐ
­ZÚÐ-6ÐÐ
­[ÚÐ-7ÐÐ
­\ÚÐ-8ÐÐ
­]ÚÐ-'ÐÐ
­^ÚÐ-9ÐÐ
­_ÚÐ-:ÐÐ
­`ÚÐ-;ÐÐ
­aÚÐ-<ÐÐ
­bÚÐ-=ÐÐ
­cÚÐ->ÐÐ
­dÚÐ-?ÐÐ
­eÚÐ-@ÐÐ
­fÚÐ-AÐÐ
­gÚÐ-BÐÐ
­hÚÐ-CÐÐ
­iÚÐ-DÐÐ
­jÚÐ-EÐÐ
­kÚÐ-FÐÐ
­lÚÐ-GÐÐ
­mÚÐ-'ÐÐ
­nÚÐ-HÐÐ
­oÚÐ-IÐÐ
­pÚÐ-'ÐÐ
­qÚÐ-JÐÐ
­|ÚÐ-KÐLMÐ	E
 RÐÐ
­âÚÐ-NÐÐ
­ãÚÐ-OÐÐ
­äÚÐ-PÐÐ
­åÚÐ-QÐÐ
­æÚÐ-RÐÐ
­çÚÐ-SÐÐ
­èÚÐ-TÐÐ
­éÚÐ-UÐÐ
­êÚÐ-VÐÐ
­ëÚÐ-WÐÐ
­ìÚÐ-XÐÐ
­íÚÐ-YÐÐ
­îÚÐ-ZÐÐ
­ïÚÐ-[ÐÐ
­ðÚÐ-\ÐÐ
­ñÚÐ-]ÐÐ
­òÚÐ-^ÐÐ
­óÚÐ-_ÐÐ
­ôÚÐ-`ÐÐ
­õÚÐ-aÐÐ
­öÚÐ-bÐÐ
­÷ÚÐ-cÐÐ
­øÚÐ-dÐÐ
­ùÚÐ-eÐÐ
­úÚÐ-fÐÐ
­ûÚÐ-eÐÐ
­üÚÐ-gÐÐ
­ýÚÐ-hÐÐ
­þÚÐ-iÐÐ
­ÿÚÐ-jÐÐ
­ÚÐ-kÐÐ
­ÚÐ-lÐÐ
­ÚÐ-mÐÐ
­ÚÐ-nÐÐ
­ÚÐ-oÐÐ
­ÚÐ-pÐÐ
­ÚÐ-qÐÐ
­ÚÐ-rÐÐ
­ÚÐ-sÐÐ
­	ÚÐ-tÐÐ
­
 ÚÐ-uÐÐ
­ÚÐ-vÐÐ
­ÚÐ-wÐÐ
­
ÚÐ-xÐÐ
­ÚÐ-yÐÐ
­ÚÐ-zÐÐ
­ÚÐ-{ÐÐ
­ÚÐ-|ÐÐ
­ÚÐ-}ÐÐ
­ÚÐ-~ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-€ÐÐ
­ÚÐ-ÐÐ
­ÚÐ-‚ÐÐ
­ÚÐ-ƒÐÐ
­ÚÐ-„ÐÐ
­ÚÐ-…ÐÐ
­ÚÐ-†ÐÐ
­ÚÐ-‡ÐÐ
­ÚÐ-ˆÐÐ
­ÚÐ-‰ÐÐ
­ÚÐ-ŠÐÐ
­ ÚÐ-‹ÐÐ
­!ÚÐ-ŒÐÐ
­"ÚÐ-ÐÐ
­#ÚÐ-ŽÐÐ
­$ÚÐ-ÐÐ
­%ÚÐ-ÐÐ
­&ÚÐ-‘ÐÐ
­'ÚÐ-’ÐÐ
­(ÚÐ-“ÐÐ
­)ÚÐ-”ÐÐ
­*ÚÐ-•ÐÐ
­+ÚÐ-–ÐÐ
­,ÚÐ-—ÐÐ
­-ÚÐ-˜ÐÐ
­.ÚÐ-™ÐÐ
­/ÚÐ-šÐÐ
­0ÚÐ-›ÐÐ
­1ÚÐ-œÐÐ
­2ÚÐ-ÐÐ
­ÚÐ-žП- С¢-£¤¥Ц§­
\ No newline at end of file