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

Switch to side-by-side view

--- a/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_PrimaryHost/FB_PrimaryHost/svnobj
+++ b/branches/FeatureBranches/refactorpayload/SparkplugB/Function Blocks/FB_PrimaryHost/FB_PrimaryHost/svnobj
@@ -1,6 +1,6 @@
-Gx_l†!0…jüoåg£ÒèÒ
+Gx_la†!0…jüo/hUNm›
 
,ČkSystem.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
longTagText// Componentsn_MQTT.IASyncPropertyProvider( IASyncPropertyProvider );b_MQTT.ITLSContextProvider( ITLSContextProvider );_MQTT();b_SparkplugB( AllmetricsList := _AllMetricsList );RIF _MQTT.SubscriberMessageReceived() THEN<	{region "onSubscribeMessage"}à    _RecvMesg REF= _MQTT.GetSubscriberMessage(MetricList := THIS^._AllMetricsList, MessageTopic => _RecvTopic );l    //onSubscribeMessage( pTopic := ADR( _RecvTopic ),d    //                    pMessage := _RecvMesg );‚    _TopicParser( pTopic := ADR(_RecvTopic) ); //parses the topic    ~    WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),j                    'PrimaryHost Received Topic: %s',x                    TO_STRING( _TopicParser.MessageType ) ); z    CASE _TopicParser.MessageType OF  //SparkplugMessageTypes!š        SparkplugMessageTypes.NBIRTH: //Birth certificate for MQTT EoN nodes."            _MyEdge REF= THIS^.GetEdge( GroupId := _TopicParser.GroupId,#Œ                                        EdgeId := _TopicParser.EdgeId,$„                                        eError => _HandledError );%B            CASE _HandledError OF&p                ERROR.GroupIDNotFound: // ==> NEW GROUP!'°                    _MyGroupId REF= THIS^.allocGroupId( GroupId := _TopicParser.GroupId,(–                                                        eError => eError );)f                    IF eError = ERROR.NO_ERROR THEN*º                        _MyEdge REF= THIS^.allocEdgetoGroupId( EdgeId := _TopicParser.EdgeId,+Æ                                                               itfGroupID := _MyGroupId.itfGroupID,,¤                                                               eError => eError );-n                        IF eError = ERROR.NO_ERROR THEN.–                            _MyEdge.ProcessNBIRTH( itfPrimaryHost := THIS^,/’                                                   pMessage := _RecvMesg,0ˆ                                                   xError => xError,1Œ                                                   eError => eError );28                        ELSE3V                            xError := TRUE;4^                            //eError := eError;5<                        END_IF60                    ELSE7N                        xError := TRUE;8V                        //eError := eError;94                    END_IF:l                ERROR.EdgeIDNotFound: // ==> NEW EDGE!;¬                    _MyGroupId REF= THIS^.GetGroupID( GroupId := _TopicParser.GroupId,<’                                                      eError => eError );=v                ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE>†                    _MyEdge.ProcessNBIRTH( itfPrimaryHost := THIS^,?‚                                           pMessage := _RecvMesg,@x                                           xError => xError,A|                                           eError => eError );B             ELSECz                ; //{info 'TODO: maybe some sort of error??'}D(            END_CASEE            Fr        SparkplugMessageTypes.NDATA: //Node data message.G„                    _MyEdge.ProcessNDATA( itfPrimaryHost := THIS^,H€                                          pMessage := _RecvMesg,Iv                                          xError => xError,Jz                                          eError => eError );K>                xError := TRUE;L^                eError := Error.EdgeIDNotFound;M–                WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),Nš                                'PrimaryHost process NDATA metric error: %s',O~                                TO_STRING( _HandledError ) );  Pb            END_CASE                             Qš        SparkplugMessageTypes.NDEATH: //Death certificate for MQTT EoN nodes.R’                ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE              SX                    _MyEdge.ProcessNDEATH();T~                eError := Error.OhMy_ThatShouldNotHaveHappened;Uœ                                'PrimaryHost process NDEATH metric error: %s',V*            END_CASE W        XŠ        SparkplugMessageTypes.DBIRTH: //Birth certificate forDevices.Y„            //TODO: Check if edge is online (isQualityOK).  If not OK, DO NOT process the DBIRTH, instead just send a NCMD/RebirthZ [˜            _MyDevice REF= THIS^.GetDevice( GroupId := _TopicParser.GroupId,\”                                            EdgeId := _TopicParser.EdgeId,]œ                                            DeviceId := _TopicParser.DeviceId,^Œ                                            eError => _HandledError );_ž                ERROR.GroupIDNotFound:  // ==> NEW GROUP! must rebirth the edge`J					 eError := ERROR.NotImplemented;a*					 xError := TRUE;b‚					 WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),cü                                     'DBIRTH Received with no existing groupID, but haven$'t implemented NCMD Rebirth yet %s',dX                                     '' );  eœ                ERROR.EdgeIDNotFound:   // ==> NEW EDGE! must rebirth the edgefö                                     'DBIRTH Received with no existing edge, but haven$'t implemented NCMD Rebirth yet %s',gT                                     '' );ht                ERROR.DeviceIDNotFound: // ==> NEW DEVICE!i„					 _MyEdge REF= THIS^.GetEdge( GroupId := _TopicParser.GroupId,jt							                     EdgeId := _TopicParser.EdgeId,kˆ                                                 eError => eError );lÈ                        _MyDevice REF= THIS^.allocDevicetoEdge( DeviceName := _TopicParser.DeviceId,m¾                                                               itfEdge := _MyEdge.itfRemoteEoN,nš                            _MyDevice.ProcessDBIRTH( itfPrimaryHost := THIS^,oŠ                ERROR.NO_ERROR:         // ==> UPDATE EXISTING DEVICEpl					_MyDevice.ProcessDBIRTH( itfPrimaryHost := THIS^,q’        SparkplugMessageTypes.DDEATH:    //Death certificate for Devices.r\                    _MyDevice.ProcessDDEATH();sœ                                'PrimaryHost process DDEATH metric error: %s',tx        SparkplugMessageTypes.DDATA: //Device data message. uˆ                    _MyDevice.ProcessDDATA( itfPrimaryHost := THIS^,v„                                            pMessage := _RecvMesg,wz                                            xError => xError,x~                                            eError => eError );yb                eError := Error.DeviceIDNotFound;zš                                'PrimaryHost process DDATA metric error: %s',{€        SparkplugMessageTypes.NCMD,      //Node command message.||        SparkplugMessageTypes.DCMD,  //Device command message.}’        SparkplugMessageTypes.STATE: //Critical application state message~†            ;                            //do nothing, ignore these    ELSE€j        ; //{info 'TODO: maybe some sort of error??'}    END_CASE‚    {endregion}ƒEND_IF„¸Connected := (NOT _MQTT.ClientError() AND NOT _MQTT.IsConnecting() AND _MQTT.IsConnected());…v_ExponentialBackOff( Enable := (Connect AND NOT Connected),†n                     ConnectionTime := _ConnectionTime,‡n                     LockTimesArray := _LockTimesArray,ˆR                     Enabled => _Enabled,‰v                     OutTimeRemaining => _OutTimeRemaining,Š~                     LockTimeRemaining => _LockTimeRemaining );‹d_StateMachine( Connect := _ExponentialBackOff.out,Œb               PrimaryHostConnected := Connected,J               pMQTT := ADR( _MQTT ),Žb               pSparkplugB := ADR( _SparkplugB ),H               pPrimaryHost := THIS,\               SessionState => SessionState );‘Diag();’Interface“L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}”(*•*    Primary Host Node–Ö    Allows you to concenrate Edge of Network Data sent by various Edges or other Sparkplug compatible nodes—*)˜0{attribute 'reflection'}™jFUNCTION_BLOCK FB_PrimaryHost IMPLEMENTS IPrimaryHostšVAR_INPUT›f    ServerUrl : STRING; // eg:'test.mosquitto.org';œT    ServerPort : UINT := 1883; // eg: 1883n    PrimaryHostID : WSTRING := ""; // eg:'PrimaryHost';žv    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)ŸV    // Persistent Session (FALSE = DEFAULT) °    //  * The client must get all messages from a certain topic, even if it is offline. ¡ò    //  * You want the broker to queue the messages for the client and deliver them as soon as the client is back online.¢X    //  * The client has limited resources. £ˆ    //  * You want the broker to store the subscription information of the client and restore the interrupted communication quickly.¤È    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect.¥    //  ¦8    //  Clean session (TRUE)§à    //  * The client needs only to publish messages to topics, the client does not need to subscribe to topics. ¨Þ    //  * You don t want the broker to store session information or retry transmission of QoS 1 and 2 messages.©–    //  * The client does not need to get messages that it misses offline. ª    //«B    CleanSession : BOOL := FALSE;¬Š    Username : WSTRING := ""; // specify a username if any (optional)­¢    Password : WSTRING := ""; // specify the password for the username (optional)®ˆ    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)¯æ    hCert : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional) and only used if UseTLS is TRUE°ö    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections±ˆ    //Static initialization, as shown in the following code snippet;²    //VAR³V    //    commonName : STRING := 'MyRasPi';´¸    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));µX    //    myTLSContext : NBS.TLSContext := (¶`    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,·L    //        sUseCaseName:='NBSTest',¸B    //        sTLSVersion:='1.3',¹J    //        ciCertInfo:=ciCertInfo,ºH    //        udiVerificationMode:=2»    //    );¼    //END_VAR½š    IASyncPropertyProvider : 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)¾END_VAR¿VAR_OUTPUTÀ4    Connected      : BOOL;Á^    SessionState   : SparkplugSessionStateType;Â4    xError         : BOOL;Ã6    eError         : ERROR;Ä^    itfPrimaryHost : IPrimaryHost := THIS^;    ÅVARÆÐ    _groupIDPool        : List;         // OF FB_GroupID - This is blank groupids for dynamic allocationÇv    _EdgePool           : List;         // OF FB_RemoteEdgeÈz    _DevicePool         : List;         // OF FB_RemoteDeviceÉz    _MetricPool         : List;         // OF FB_RemoteMetricʬ    _groupIDs           : List;         // OF FB_GroupID - This is groupIDs with names˦    Connect             : BOOL := TRUE; // TRUE: Connects EoN using the configured settings, FALSE: Disconnects EoN from server if it was connected̼    _cPrimaryHostID     : WSTRING;   // Corrected PrimaryHostID, contains no illegal chars    Í>    _Enabled            : BOOL;ÎP    _ConnectionTime     : TIME := T#30S;Ϩ    _LockTimesArray     : ARRAY[1..8] OF TIME := [4(TIME#30S0MS), 2(TIME#1M0S0MS), TIME#2M0S0MS, TIME#4M0S0MS]; // could be made accessible public  О    _OutTimeRemaining   : TIME; // Duration of Out Time Period = TRUE remainingÑ>    _LockTimeRemaining  : TIME;Ò¾    _ExponentialBackOff : FB_ExponentialBackOffTimer; // Handles the Exponential Backoff timingÓj    _StateMachine       : FB_PrimaryHostStateMachine;Ôl    _TopicProvider      : FB_PrimaryHostTopicProvider;ÕZ    _MQTT               : FB_PrimaryHostMQTT;ÖT    _MQTT_eError        : MQTT.MQTT_ERROR;מ    _SparkplugB         : FB_SparkplugBSimple;     // Handles SparkPlugB Stuff Øš    _AllMetricsList     : LIST;                    // Of FB_HostStorageMetricÙ¢    _Blob               : ARRAY[0..65535] OF BYTE; // buffer for encoded messagesÚ¤    _BlobSize           : UDINT;                   // current encoded message sizeÛ|    _LastWillQos        : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;ÜP    _LastWillRetain     : BOOL := FALSE;Ý’    _LastWillTopic      : WSTRING(GC_Sparkplug.supported_string_lengths);Þª    _NDEATH             : FB_SparkplugUInt64;    // contains the current NDEATH BDSeqߺ    _NDEATHPayload      : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?à@    _NDEATHPayloadSize  : UDINT;á~    _RecvMesg           : REFERENCE TO FB_PayloadSimpleDecoder;â’    _RecvTopic          : WSTRING(GC_Sparkplug.supported_string_lengths);ãâ    _HandledError       : ERROR; // an error that will be given back by a function, but we can handle the error. äd    _MyGroupId          : REFERENCE TO FB_GroupId;åj    _MyEdge             : REFERENCE TO FB_RemoteEdge;æn    _MyDevice           : REFERENCE TO FB_RemoteDevice;çR    _TopicParser        : FB_TopicParser;èB    _Diag               : STRING;é>    {attribute 'instance-path'}ê0    {attribute 'noinit'}ë$    _POU : STRING;ì"UniqueIdGeneratorí1611îPOULevelïL{8e575c5b-1d37-49c6-941b-5c0ec7874787}ðStandardñ ChildObjectGuidsò8System.Collections.ArrayListó,AddAttributeSubsequentôboolÐÐ-ÐÐ	E
+TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}Id
longTagText// Componentsn_MQTT.IASyncPropertyProvider( IASyncPropertyProvider );b_MQTT.ITLSContextProvider( ITLSContextProvider );_MQTT();b_SparkplugB( AllmetricsList := _AllMetricsList );RIF _MQTT.SubscriberMessageReceived() THEN<	{region "onSubscribeMessage"}à    _RecvMesg REF= _MQTT.GetSubscriberMessage(MetricList := THIS^._AllMetricsList, MessageTopic => _RecvTopic );l    //onSubscribeMessage( pTopic := ADR( _RecvTopic ),d    //                    pMessage := _RecvMesg );‚    _TopicParser( pTopic := ADR(_RecvTopic) ); //parses the topic    ~    WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),j                    'PrimaryHost Received Topic: %s',x                    TO_STRING( _TopicParser.MessageType ) ); z    CASE _TopicParser.MessageType OF  //SparkplugMessageTypes!š        SparkplugMessageTypes.NBIRTH: //Birth certificate for MQTT EoN nodes."            _MyEdge REF= THIS^.GetEdge( GroupId := _TopicParser.GroupId,#Œ                                        EdgeId := _TopicParser.EdgeId,$„                                        eError => _HandledError );%B            CASE _HandledError OF&p                ERROR.GroupIDNotFound: // ==> NEW GROUP!'°                    _MyGroupId REF= THIS^.allocGroupId( GroupId := _TopicParser.GroupId,(–                                                        eError => eError );)f                    IF eError = ERROR.NO_ERROR THEN*º                        _MyEdge REF= THIS^.allocEdgetoGroupId( EdgeId := _TopicParser.EdgeId,+Æ                                                               itfGroupID := _MyGroupId.itfGroupID,,¤                                                               eError => eError );-n                        IF eError = ERROR.NO_ERROR THEN.–                            _MyEdge.ProcessNBIRTH( itfPrimaryHost := THIS^,/’                                                   pMessage := _RecvMesg,0ˆ                                                   xError => xError,1Œ                                                   eError => eError );28                        ELSE3V                            xError := TRUE;4^                            //eError := eError;5<                        END_IF60                    ELSE7N                        xError := TRUE;8V                        //eError := eError;94                    END_IF:l                ERROR.EdgeIDNotFound: // ==> NEW EDGE!;¬                    _MyGroupId REF= THIS^.GetGroupID( GroupId := _TopicParser.GroupId,<’                                                      eError => eError );=v                ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE>†                    _MyEdge.ProcessNBIRTH( itfPrimaryHost := THIS^,?‚                                           pMessage := _RecvMesg,@x                                           xError => xError,A|                                           eError => eError );B             ELSECz                ; //{info 'TODO: maybe some sort of error??'}D(            END_CASEE            Fr        SparkplugMessageTypes.NDATA: //Node data message.G„                    _MyEdge.ProcessNDATA( itfPrimaryHost := THIS^,H€                                          pMessage := _RecvMesg,Iv                                          xError => xError,Jz                                          eError => eError );K>                xError := TRUE;L^                eError := Error.EdgeIDNotFound;M–                WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),Nš                                'PrimaryHost process NDATA metric error: %s',O~                                TO_STRING( _HandledError ) );  Pb            END_CASE                             Qš        SparkplugMessageTypes.NDEATH: //Death certificate for MQTT EoN nodes.R’                ERROR.NO_ERROR: // ==> UPDATE EXISTING EDGE              SX                    _MyEdge.ProcessNDEATH();T~                eError := Error.OhMy_ThatShouldNotHaveHappened;Uœ                                'PrimaryHost process NDEATH metric error: %s',V*            END_CASE W        XŠ        SparkplugMessageTypes.DBIRTH: //Birth certificate forDevices.Y„            //TODO: Check if edge is online (isQualityOK).  If not OK, DO NOT process the DBIRTH, instead just send a NCMD/RebirthZ [˜            _MyDevice REF= THIS^.GetDevice( GroupId := _TopicParser.GroupId,\”                                            EdgeId := _TopicParser.EdgeId,]œ                                            DeviceId := _TopicParser.DeviceId,^Œ                                            eError => _HandledError );_ž                ERROR.GroupIDNotFound:  // ==> NEW GROUP! must rebirth the edge`J					 eError := ERROR.NotImplemented;a*					 xError := TRUE;b‚					 WriteDeviceLog( UDINT_TO_DWORD( CmpLog.LogClass.LOG_INFO ),cü                                     'DBIRTH Received with no existing groupID, but haven$'t implemented NCMD Rebirth yet %s',dX                                     '' );  eœ                ERROR.EdgeIDNotFound:   // ==> NEW EDGE! must rebirth the edgefö                                     'DBIRTH Received with no existing edge, but haven$'t implemented NCMD Rebirth yet %s',gT                                     '' );ht                ERROR.DeviceIDNotFound: // ==> NEW DEVICE!i„					 _MyEdge REF= THIS^.GetEdge( GroupId := _TopicParser.GroupId,jt							                     EdgeId := _TopicParser.EdgeId,kˆ                                                 eError => eError );lÈ                        _MyDevice REF= THIS^.allocDevicetoEdge( DeviceName := _TopicParser.DeviceId,m¾                                                               itfEdge := _MyEdge.itfRemoteEoN,nš                            _MyDevice.ProcessDBIRTH( itfPrimaryHost := THIS^,oŠ                ERROR.NO_ERROR:         // ==> UPDATE EXISTING DEVICEpl					_MyDevice.ProcessDBIRTH( itfPrimaryHost := THIS^,q’        SparkplugMessageTypes.DDEATH:    //Death certificate for Devices.r\                    _MyDevice.ProcessDDEATH();sœ                                'PrimaryHost process DDEATH metric error: %s',tx        SparkplugMessageTypes.DDATA: //Device data message. uˆ                    _MyDevice.ProcessDDATA( itfPrimaryHost := THIS^,v„                                            pMessage := _RecvMesg,wz                                            xError => xError,x~                                            eError => eError );yb                eError := Error.DeviceIDNotFound;zš                                'PrimaryHost process DDATA metric error: %s',{€        SparkplugMessageTypes.NCMD,      //Node command message.||        SparkplugMessageTypes.DCMD,  //Device command message.}’        SparkplugMessageTypes.STATE: //Critical application state message~†            ;                            //do nothing, ignore these    ELSE€j        ; //{info 'TODO: maybe some sort of error??'}    END_CASE‚    {endregion}ƒEND_IF„¸Connected := (NOT _MQTT.ClientError() AND NOT _MQTT.IsConnecting() AND _MQTT.IsConnected());…v_ExponentialBackOff( Enable := (Connect AND NOT Connected),†n                     ConnectionTime := _ConnectionTime,‡n                     LockTimesArray := _LockTimesArray,ˆR                     Enabled => _Enabled,‰v                     OutTimeRemaining => _OutTimeRemaining,Š~                     LockTimeRemaining => _LockTimeRemaining );‹d_StateMachine( Connect := _ExponentialBackOff.out,Œb               PrimaryHostConnected := Connected,J               pMQTT := ADR( _MQTT ),Žb               pSparkplugB := ADR( _SparkplugB ),H               pPrimaryHost := THIS,\               SessionState => SessionState );‘Diag();’Interface“L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}”(*•*    Primary Host Node–Ö    Allows you to concenrate Edge of Network Data sent by various Edges or other Sparkplug compatible nodes—*)˜0{attribute 'reflection'}™jFUNCTION_BLOCK FB_PrimaryHost IMPLEMENTS IPrimaryHostšVAR_INPUT›f    ServerUrl : STRING; // eg:'test.mosquitto.org';œT    ServerPort : UINT := 1883; // eg: 1883n    PrimaryHostID : WSTRING := ""; // eg:'PrimaryHost';žv    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)ŸV    // Persistent Session (FALSE = DEFAULT) °    //  * The client must get all messages from a certain topic, even if it is offline. ¡ò    //  * You want the broker to queue the messages for the client and deliver them as soon as the client is back online.¢X    //  * The client has limited resources. £ˆ    //  * You want the broker to store the subscription information of the client and restore the interrupted communication quickly.¤È    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect.¥    //  ¦8    //  Clean session (TRUE)§à    //  * The client needs only to publish messages to topics, the client does not need to subscribe to topics. ¨Þ    //  * You don t want the broker to store session information or retry transmission of QoS 1 and 2 messages.©–    //  * The client does not need to get messages that it misses offline. ª    //«B    CleanSession : BOOL := FALSE;¬Š    Username : WSTRING := ""; // specify a username if any (optional)­¢    Password : WSTRING := ""; // specify the password for the username (optional)®ˆ    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)¯æ    hCert : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional) and only used if UseTLS is TRUE°ö    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections±ˆ    //Static initialization, as shown in the following code snippet;²    //VAR³V    //    commonName : STRING := 'MyRasPi';´¸    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));µX    //    myTLSContext : NBS.TLSContext := (¶`    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,·L    //        sUseCaseName:='NBSTest',¸B    //        sTLSVersion:='1.3',¹J    //        ciCertInfo:=ciCertInfo,ºH    //        udiVerificationMode:=2»    //    );¼    //END_VAR½š    IASyncPropertyProvider : 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)¾END_VAR¿VAR_OUTPUTÀ4    Connected      : BOOL;Á^    SessionState   : SparkplugSessionStateType;Â4    xError         : BOOL;Ã6    eError         : ERROR;Ä^    itfPrimaryHost : IPrimaryHost := THIS^;    ÅVARÆÐ    _groupIDPool        : List;         // OF FB_GroupID - This is blank groupids for dynamic allocationÇv    _EdgePool           : List;         // OF FB_RemoteEdgeÈz    _DevicePool         : List;         // OF FB_RemoteDeviceÉz    _MetricPool         : List;         // OF FB_RemoteMetricʬ    _groupIDs           : List;         // OF FB_GroupID - This is groupIDs with names˦    Connect             : BOOL := TRUE; // TRUE: Connects EoN using the configured settings, FALSE: Disconnects EoN from server if it was connected̼    _cPrimaryHostID     : WSTRING;   // Corrected PrimaryHostID, contains no illegal chars    Í>    _Enabled            : BOOL;ÎP    _ConnectionTime     : TIME := T#30S;Ϩ    _LockTimesArray     : ARRAY[1..8] OF TIME := [4(TIME#30S0MS), 2(TIME#1M0S0MS), TIME#2M0S0MS, TIME#4M0S0MS]; // could be made accessible public  О    _OutTimeRemaining   : TIME; // Duration of Out Time Period = TRUE remainingÑ>    _LockTimeRemaining  : TIME;Ò¾    _ExponentialBackOff : FB_ExponentialBackOffTimer; // Handles the Exponential Backoff timingÓj    _StateMachine       : FB_PrimaryHostStateMachine;Ôl    _TopicProvider      : FB_PrimaryHostTopicProvider;ÕZ    _MQTT               : FB_PrimaryHostMQTT;ÖT    _MQTT_eError        : MQTT.MQTT_ERROR;מ    _SparkplugB         : FB_SparkplugBSimple;     // Handles SparkPlugB Stuff Øš    _AllMetricsList     : LIST;                    // Of FB_HostStorageMetricÙ¢    _Blob               : ARRAY[0..65535] OF BYTE; // buffer for encoded messagesÚ¤    _BlobSize           : UDINT;                   // current encoded message sizeÛ|    _LastWillQos        : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;ÜP    _LastWillRetain     : BOOL := FALSE;Ý’    _LastWillTopic      : WSTRING(GC_Sparkplug.supported_string_lengths);Þô    _NDEATH             : FB_RemoteMetric := (_dataType := MetricDataType.UInt64);    // contains the current NDEATH BDSeqߺ    _NDEATHPayload      : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?à@    _NDEATHPayloadSize  : UDINT;á~    _RecvMesg           : REFERENCE TO FB_PayloadSimpleDecoder;â’    _RecvTopic          : WSTRING(GC_Sparkplug.supported_string_lengths);ãâ    _HandledError       : ERROR; // an error that will be given back by a function, but we can handle the error. äd    _MyGroupId          : REFERENCE TO FB_GroupId;åj    _MyEdge             : REFERENCE TO FB_RemoteEdge;æn    _MyDevice           : REFERENCE TO FB_RemoteDevice;çR    _TopicParser        : FB_TopicParser;èB    _Diag               : STRING;é>    {attribute 'instance-path'}ê0    {attribute 'noinit'}ë$    _POU : STRING;ì"UniqueIdGeneratorí1611îPOULevelïL{8e575c5b-1d37-49c6-941b-5c0ec7874787}ðStandardñ ChildObjectGuidsò8System.Collections.ArrayListó,AddAttributeSubsequentôboolÐÐ-ÐÐ	E
 ÞÐÐ
­cÚÐ-ÐÐ
­dÚÐ-ÐÐ
­eÚÐ-ÐÐ
­fÚÐ-ÐÐ
­gÚÐ-ÐÐ
­hÚÐ-ÐÐ
­iÚÐ-ÐÐ
­jÚÐ-ÐÐ
­vÚÐ-ÐÐ
­wÚÐ-ÐÐ
­xÚÐ-ÐÐ
­yÚÐ-ÐÐ
­zÚÐ-ÐÐ
­{ÚÐ-ÐÐ
­|ÚÐ-ÐÐ
­}ÚÐ-ÐÐ
­~ÚÐ-ÐÐ
­ÚÐ-ÐÐ
­€ÚÐ-ÐÐ
­ÚÐ- ÐÐ
­‚ÚÐ-!ÐÐ
­ƒÚÐ-"ÐÐ
­„ÚÐ-#ÐÐ
­…ÚÐ-$ÐÐ
­†ÚÐ-ÐÐ
­‡ÚÐ-%ÐÐ
­ˆÚÐ-&ÐÐ
­‰ÚÐ-'ÐÐ
­ŠÚÐ-(ÐÐ
­‹ÚÐ-ÐÐ
­ŒÚÐ-)ÐÐ
­ÚÐ-*ÐÐ
­ŽÚÐ-+ÐÐ
­ÚÐ-,ÐÐ
­ÚÐ-ÐÐ
­‘ÚÐ--ÐÐ
­’ÚÐ-.ÐÐ
­“ÚÐ-/ÐÐ
­”ÚÐ-0ÐÐ
­•ÚÐ-1ÐÐ
­–ÚÐ-2ÐÐ
­—ÚÐ-3ÐÐ
­˜ÚÐ-4ÐÐ
­™ÚÐ-5ÐÐ
­šÚÐ-6ÐÐ
­›ÚÐ-7ÐÐ
­œÚÐ-8ÐÐ
­ÚÐ-9ÐÐ
­žÚÐ-:ÐÐ
­ŸÚÐ-;ÐÐ
­ ÚÐ-<ÐÐ
­¡ÚÐ-ÐÐ
­¢ÚÐ-)ÐÐ
­£ÚÐ-*ÐÐ
­¤ÚÐ-+ÐÐ
­¥ÚÐ-,ÐÐ
­¦ÚÐ-ÐÐ
­§ÚÐ--ÐÐ
­¨ÚÐ-.ÐÐ
­©ÚÐ-/ÐÐ
­ªÚÐ-0ÐÐ
­«ÚÐ-1ÐÐ
­¬ÚÐ-2ÐÐ
­­ÚÐ-3ÐÐ
­®ÚÐ-4ÐÐ
­¯ÚÐ-5ÐÐ
­°ÚÐ-6ÐÐ
­±ÚÐ-7ÐÐ
­²ÚÐ-8ÐÐ
­³ÚÐ-9ÐÐ
­´ÚÐ-=ÐÐ
­µÚÐ->ÐÐ
­¶ÚÐ-?ÐÐ
­·ÚÐ-@ÐÐ
­¸ÚÐ-AÐÐ
­¹ÚÐ-BÐÐ
­ºÚÐ-CÐÐ
­»ÚÐ-DÐÐ
­¼ÚÐ-EÐÐ
­½ÚÐ-FÐÐ
­¾ÚÐ-"ÐÐ
­¿ÚÐ-#ÐÐ
­ÀÚÐ-$ÐÐ
­ÁÚÐ-%ÐÐ
­ÂÚÐ-=ÐÐ
­ÃÚÐ-GÐÐ
­ÄÚÐ-HÐÐ
­ÅÚÐ-IÐÐ
­ÆÚÐ-JÐÐ
­ÇÚÐ-BÐÐ
­ÈÚÐ-KÐÐ
­ÉÚÐ-LÐÐ
­ÊÚÐ-MÐÐ
­ËÚÐ-NÐÐ
­ÌÚÐ-OÐÐ
­ÍÚÐ-PÐÐ
­ÎÚÐ-ÐÐ
­ÏÚÐ-QÐÐ
­ÐÚÐ-"ÐÐ
­ÑÚÐ-#ÐÐ
­ÒÚÐ-$ÐÐ
­ÓÚÐ-%ÐÐ
­ÔÚÐ-RÐÐ
­ÕÚÐ-SÐÐ
­ÖÚÐ-BÐÐ
­×ÚÐ-KÐÐ
­ØÚÐ-TÐÐ
­ÙÚÐ-MÐÐ
­ÚÚÐ-UÐÐ
­ÛÚÐ-OÐÐ
­ÜÚÐ-VÐÐ
­ÝÚÐ-WÐÐ
­ÞÚÐ-XÐÐ
­ßÚÐ-YÐÐ
­àÚÐ-ZÐÐ
­áÚÐ-[ÐÐ
­âÚÐ-\ÐÐ
­ãÚÐ-]ÐÐ
­äÚÐ-^ÐÐ
­åÚÐ-ÐÐ
­æÚÐ-%ÐÐ
­çÚÐ-_ÐÐ
­èÚÐ-`ÐÐ
­éÚÐ-aÐÐ
­êÚÐ-bÐÐ
­ëÚÐ-cÐÐ
­ìÚÐ-dÐÐ
­íÚÐ-eÐÐ
­îÚÐ-`ÐÐ
­ïÚÐ-aÐÐ
­ðÚÐ-bÐÐ
­ñÚÐ-fÐÐ
­òÚÐ-gÐÐ
­óÚÐ-hÐÐ
­ôÚÐ-iÐÐ
­õÚÐ-jÐÐ
­öÚÐ-kÐÐ
­÷ÚÐ-)ÐÐ
­øÚÐ-lÐÐ
­ùÚÐ-mÐÐ
­úÚÐ-,ÐÐ
­ûÚÐ-ÐÐ
­üÚÐ--ÐÐ
­ýÚÐ-nÐÐ
­þÚÐ-/ÐÐ
­ÿÚÐ-0ÐÐ
­ÚÐ-1ÐÐ
­ÚÐ-2ÐÐ
­ÚÐ-3ÐÐ
­ÚÐ-4ÐÐ
­ÚÐ-5ÐÐ
­ÚÐ-6ÐÐ
­ÚÐ-7ÐÐ
­ÚÐ-8ÐÐ
­ÚÐ-9ÐÐ
­	ÚÐ-oÐÐ
­
 ÚÐ-pÐÐ
­ÚÐ-?ÐÐ
­ÚÐ-@ÐÐ
­
ÚÐ-AÐÐ
­ÚÐ-BÐÐ
­ÚÐ-CÐÐ
­ÚÐ-DÐÐ
­ÚÐ-qÐÐ
­ÚÐ-[ÐÐ
­ÚÐ-\ÐÐ
­ÚÐ-]ÐÐ
­ÚÐ-^ÐÐ
­ÚÐ-%ÐÐ
­ÚÐ-RÐÐ
­ÚÐ-rÐÐ
­ÚÐ-BÐÐ
­ÚÐ-KÐÐ
­ÚÐ-TÐÐ
­ÚÐ-MÐÐ
­ÚÐ-sÐÐ
­ÚÐ-OÐÐ
­ÚÐ-VÐÐ
­ ÚÐ-tÐÐ
­!ÚÐ-[ÐÐ
­"ÚÐ-\ÐÐ
­#ÚÐ-]ÐÐ
­$ÚÐ-^ÐÐ
­%ÚÐ-%ÐÐ
­&ÚÐ-=ÐÐ
­'ÚÐ-uÐÐ
­(ÚÐ-vÐÐ
­)ÚÐ-wÐÐ
­*ÚÐ-xÐÐ
­+ÚÐ-BÐÐ
­,ÚÐ-KÐÐ
­-ÚÐ-yÐÐ
­.ÚÐ-MÐÐ
­/ÚÐ-zÐÐ
­0ÚÐ-OÐÐ
­1ÚÐ-PÐÐ
­2ÚÐ-{ÐÐ
­3ÚÐ-|ÐÐ
­4ÚÐ-}ÐÐ
­5ÚÐ-~ÐÐ
­6ÚÐ-ÐÐ
­7ÚÐ-€ÐÐ
­8ÚÐ-ÐÐ
­9ÚÐ-‚ÐÐ
­;ÚÐ-ƒÐÐ
­<ÚÐ-ÐÐ
­=ÚÐ-„ÐÐ
­>ÚÐ-…ÐÐ
­?ÚÐ-†ÐÐ
­@ÚÐ-‡ÐÐ
­AÚÐ-ˆÐÐ
­BÚÐ-‰ÐÐ
­CÚÐ-ŠÐÐ
­DÚÐ-ÐÐ
­EÚÐ-‹ÐÐ
­FÚÐ-ŒÐÐ
­GÚÐ-ÐÐ
­HÚÐ-ŽÐÐ
­IÚÐ-ÐÐ
­JÚÐ-ÐÐ
­KÚÐ-ÐÐ
­…ÚÐ-‘В“Ð	E
 [ÐÐ
­»ÚÐ-”ÐÐ
­¼ÚÐ-•ÐÐ
­½ÚÐ-–ÐÐ
­¾ÚÐ-—ÐÐ
­¿ÚÐ-˜ÐÐ
­ÀÚÐ-™ÐÐ
­ÁÚÐ-šÐÐ
­ÂÚÐ-›ÐÐ
­ÃÚÐ-œÐÐ
­ÄÚÐ-ÐÐ
­ÅÚÐ-žÐÐ
­ÆÚÐ-ŸÐÐ
­ÇÚÐ- ÐÐ
­ÈÚÐ-¡ÐÐ
­ÉÚÐ-¢ÐÐ
­ÊÚÐ-£ÐÐ
­ËÚÐ-¤ÐÐ
­ÌÚÐ-¥ÐÐ
­ÍÚÐ-¦ÐÐ
­ÎÚÐ-§ÐÐ
­ÏÚÐ-¨ÐÐ
­ÐÚÐ-©ÐÐ
­ÑÚÐ-ªÐÐ
­ÒÚÐ-«ÐÐ
­ÓÚÐ-¬ÐÐ
­ÔÚÐ-­ÐÐ
­ÕÚÐ-®ÐÐ
­ÖÚÐ-¯ÐÐ
­×ÚÐ-°ÐÐ
­ØÚÐ-±ÐÐ
­ÙÚÐ-ªÐÐ
­ÚÚÐ-²ÐÐ
­ÛÚÐ-³ÐÐ
­ÜÚÐ-´ÐÐ
­ÝÚÐ-µÐÐ
­ÞÚÐ-¶ÐÐ
­ßÚÐ-·ÐÐ
­àÚÐ-¸ÐÐ
­áÚÐ-¹ÐÐ
­âÚÐ-ºÐÐ
­ãÚÐ-»ÐÐ
­äÚÐ-¼ÐÐ
­åÚÐ-½ÐÐ
­æÚÐ-¾ÐÐ
­çÚÐ-¿ÐÐ
­ñÚÐ-ÀÐÐ
­òÚÐ-ÁÐÐ
­óÚÐ-ÂÐÐ
­ôÚÐ-ÃÐÐ
­õÚÐ-ÄÐÐ
­÷ÚÐ-¾ÐÐ
­øÚÐ-ÅÐÐ
­ÚÐ-ÆÐÐ
­ÚÐ-ÇÐÐ
­ÚÐ-ÈÐÐ
­ÚÐ-ÉÐÐ
­ÚÐ-ÊÐÐ
­ÚÐ-ËÐÐ
­ÚÐ-ÌÐÐ
­ÚÐ-ÍÐÐ
­ÚÐ-ÎÐÐ
­ÚÐ-ÏÐÐ
­ ÚÐ-ÐÐÐ
­!ÚÐ-ÑÐÐ
­#ÚÐ-ÒÐÐ
­IÚÐ-ÓÐÐ
­JÚÐ-ÔÐÐ
­KÚÐ-ÕÐÐ
­LÚÐ-ÖÐÐ
­MÚÐ-×ÐÐ
­NÚÐ-ØÐÐ
­OÚÐ-ÙÐÐ
­PÚÐ-ÚÐÐ
­QÚÐ-ÛÐÐ
­RÚÐ-ÜÐÐ
­SÚÐ-ÝÐÐ
­TÚÐ-ÞÐÐ
­UÚÐ-ßÐÐ
­VÚÐ-àÐÐ
­WÚÐ-áÐÐ
­XÚÐ-âÐÐ
­YÚÐ-ãÐÐ
­ZÚÐ-äÐÐ
­[ÚÐ-åÐÐ
­\ÚÐ-æÐÐ
­]ÚÐ-çÐÐ
­^ÚÐ-èÐÐ
­`ÚÐ-éÐÐ
­aÚÐ-êÐÐ
­bÚÐ-ëÐÐ
­kÚÐ-¾Ðì-íÐîï-ðñòÐóô­
\ No newline at end of file