--- a/project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/af25efb2e7d34d179b461d6d5c77fe77.object
+++ b/project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/af25efb2e7d34d179b461d6d5c77fe77.object
@@ -1 +1 @@
-{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)af25efb2-e7d3-4d17-9b46-1d6d5c77fe77","ParentGuid":"(Guid)00000000-0000-0000-0000-000000000000","Name":"(string)FB_Edge","Properties":{"@Type":"2c41fa04:IDictionary","@Value":[{"@Key":"(Guid)24568a24-c491-472c-a21f-ee5d33859fab","@Value":{"@Type":"24568a24","@Value":{"MemoryReserveForOnlineChange":"(int)0","ExcludeFromBuild":"(bool)False","External":"(bool)False","EnableSystemCall":"(bool)False","CompilerDefines":"(string)","LinkAlways":"(bool)False","Undefines":{"@Type":"[string]","@Value":[]}}}},{"@Key":"(Guid)829a18f2-c514-4f6e-9634-1df173429203","@Value":{"@Type":"829a18f2","@Value":{"ParentObjects":{"@Type":"fa2ee218:IDictionary","@Value":[{"@Key":"(Guid)21af5390-2942-461a-bf89-951aaf6999f1","@Value":"(Guid)df8b6e33-73a6-4e1c-bc61-8ee3c2cdd757"}]}}}}]},"TypeGuid":"(Guid)6f9dac99-8de1-4efc-8465-68ac443b7d08","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"24568a24":"{24568a24-c491-472c-a21f-ee5d33859fab}","2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","bool":"System.Boolean","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","int":"System.Int32","string":"System.String"}},"object":{"Graph":{"@Type":"6f9dac99","@Value":{"SpecialFunc":{"@Type":"0db3d7bb:Enum","@Value":"None"},"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)17486","Tag":null,"Text":"(string)//Make a pointer to avoid warning on external usage of VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17487","Tag":null,"Text":"(string)_puiPublishPeriod := ADR(publishPeriod);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17488","Tag":null,"Text":"(string)// Components"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17489","Tag":null,"Text":"(string)_MQTT.IASyncPropertyProvider(IASyncPropertyProvider);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17490","Tag":null,"Text":"(string)_MQTT.ITLSContextProvider(ITLSContextProvider);_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17492","Tag":null,"Text":"(string)Connected := (NOT _MQTT.ClientError() AND NOT _MQTT.IsConnecting() AND _MQTT.IsConnected());"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17493","Tag":null,"Text":"(string)_SparkplugB();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17494","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17495","Tag":null,"Text":"(string)IF _MQTT.STATEMessageReceived() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17496","Tag":null,"Text":"(string)    _RecvSTATEMesg := _MQTT.GetSTATEMessage(MessageTopic => _RecvSTATETopic);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17497","Tag":null,"Text":"(string)    onSTATEMessage(Topic := _RecvSTATETopic,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17498","Tag":null,"Text":"(string)        Message := _RecvSTATEMesg);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17499","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17500","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17501","Tag":null,"Text":"(string)IF _MQTT.NCMDMessageReceived() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17502","Tag":null,"Text":"(string)    _RecvNCMDMesg REF= _MQTT.GetNCMDMessage(MessageTopic => _RecvNCMDTopic);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17503","Tag":null,"Text":"(string)    // only updates the received NCMD metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17504","Tag":null,"Text":"(string)    onNCMDMessage(pTopic := ADR(_RecvNCMDTopic), pMessage := _RecvNCMDMesg);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17505","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17506","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17507","Tag":null,"Text":"(string)// Experimental -> this code does not decode anything, it relies on \"onNCMDMessage()\" "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17508","Tag":null,"Text":"(string)_EdgeControlProvider(PublishPeriod := THIS^.publishPeriod, AllMetricsList := THIS^._Metrics, Rebirth => _Rebirth);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17509","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17510","Tag":null,"Text":"(string)_ExponentialBackOff(Enable := (Connect AND NOT Connected),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17511","Tag":null,"Text":"(string)    ConnectionTime := _ConnectionTime,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17512","Tag":null,"Text":"(string)    LockTimesArray := _LockTimesArray,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17513","Tag":null,"Text":"(string)    Enabled => _Enabled,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17514","Tag":null,"Text":"(string)    OutTimeRemaining => _OutTimeRemaining,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17515","Tag":null,"Text":"(string)    LockTimeRemaining => _LockTimeRemaining);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17516","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17517","Tag":null,"Text":"(string)_StateMachine(Connect := _ExponentialBackOff.out,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17518","Tag":null,"Text":"(string)    EoNConnected := Connected,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17519","Tag":null,"Text":"(string)    ReBirth := _Rebirth,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17520","Tag":null,"Text":"(string)    TimeToWait := TO_TIME(publishPeriod),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17521","Tag":null,"Text":"(string)    pMQTT := ADR(_MQTT),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17522","Tag":null,"Text":"(string)    pSparkplugB := ADR(_SparkplugB),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17523","Tag":null,"Text":"(string)    pEdge := THIS,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17524","Tag":null,"Text":"(string)    SessionState => SessionState,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17525","Tag":null,"Text":"(string)    AllMetricsList := _Metrics,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17526","Tag":null,"Text":"(string)    DeviceList := _Devices);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17527","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17528","Tag":null,"Text":"(string)_Rebirth := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17529","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17530","Tag":null,"Text":"(string)// update current number of plugged devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17531","Tag":null,"Text":"(string)NumberOfDevices := _Devices.ListSize;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17532","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)2243","Tag":null,"Text":"(string)Diag();"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)17364","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17365","Tag":null,"Text":"(string)    Edge of Network Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17366","Tag":null,"Text":"(string)    Allows you to bidirectionally share sparkplug data from the edge of your network to a Primary Host Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17367","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17533","Tag":null,"Text":"(string){attribute 'no_assign'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17368","Tag":null,"Text":"(string){attribute 'reflection'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17369","Tag":null,"Text":"(string)FUNCTION_BLOCK PUBLIC FB_Edge IMPLEMENTS IEdge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17370","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17371","Tag":null,"Text":"(string)    ServerUrl : STRING; // TCP:'test.mosquitto.org' or WebSocket: ‘ws://localhost:8080’ ws-URI = “ws:” “//” host [ ”:” port ] path [ ”?” query ] wss-URI = “wss:” “//” host [ ”:” port ] path [ ”?” query ]"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17372","Tag":null,"Text":"(string)    ServerPort : UINT := 1883; // Only in TCP Mode, eg: 1883"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17548","Tag":null,"Text":"(string)    PingInterval : TIME := T#2S; // Ping interval for TCP and Websocket mode, default interval = T#2s"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17549","Tag":null,"Text":"(string)    CommunicationMode : MQTT.COMMUNICATION_MODE := MQTT.COMMUNICATION_MODE.TCP; // Choose either TCP or WebSockets"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17547","Tag":null,"Text":"(string)    HttpProxySettings : MQTT.WEB_SOCKET.HttpProxySettings; // Contains Proxy- Server, Port, User and Password settings "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17373","Tag":null,"Text":"(string)    PrimaryHostID : WSTRING := \"\"; // eg:'PrimaryHostNode';  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17374","Tag":null,"Text":"(string)    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17375","Tag":null,"Text":"(string)    // Persistent Session (FALSE = DEFAULT)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17376","Tag":null,"Text":"(string)    //  * The client must get all messages from a certain topic, even if it is offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17377","Tag":null,"Text":"(string)    //  * You want the broker to queue the messages for the client and deliver them as soon as the client is back online."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17378","Tag":null,"Text":"(string)    //  * The client has limited resources. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17379","Tag":null,"Text":"(string)    //  * You want the broker to store the subscription information of the client and restore the interrupted communication quickly."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17380","Tag":null,"Text":"(string)    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17381","Tag":null,"Text":"(string)    //  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17382","Tag":null,"Text":"(string)    //  Clean session (TRUE)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17383","Tag":null,"Text":"(string)    //  * The client needs only to publish messages to topics, the client does not need to subscribe to topics. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17384","Tag":null,"Text":"(string)    //  * You don’t want the broker to store session information or retry transmission of QoS 1 and 2 messages."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17385","Tag":null,"Text":"(string)    //  * The client does not need to get messages that it misses offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17386","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17387","Tag":null,"Text":"(string)    CleanSession : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17388","Tag":null,"Text":"(string)    Username : WSTRING := \"\"; // specify a username if any (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17389","Tag":null,"Text":"(string)    Password : WSTRING := \"\"; // specify the password for the username (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17390","Tag":null,"Text":"(string)    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17391","Tag":null,"Text":"(string)    hCert : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional) and only used if UseTLS is TRUE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17392","Tag":null,"Text":"(string)    GroupId : WSTRING; // eg: \"SparkplugBDevice\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17393","Tag":null,"Text":"(string)    NodeName : WSTRING; // eg: \"EoN1\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17394","Tag":null,"Text":"(string)    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17395","Tag":null,"Text":"(string)    //Static initialization, as shown in the following code snippet;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17396","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17397","Tag":null,"Text":"(string)    //VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17398","Tag":null,"Text":"(string)    //    commonName : STRING := 'MyRasPi';"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17399","Tag":null,"Text":"(string)    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17400","Tag":null,"Text":"(string)    //    myTLSContext : NBS.TLSContext := ("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17401","Tag":null,"Text":"(string)    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17402","Tag":null,"Text":"(string)    //        sUseCaseName:='NBSTest',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17403","Tag":null,"Text":"(string)    //        sTLSVersion:='1.3',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17404","Tag":null,"Text":"(string)    //        ciCertInfo:=ciCertInfo,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17405","Tag":null,"Text":"(string)    //        udiVerificationMode:=2"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17406","Tag":null,"Text":"(string)    //    );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17407","Tag":null,"Text":"(string)    //END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17408","Tag":null,"Text":"(string)    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)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17535","Tag":null,"Text":"(string)    UseAliases : BOOL := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17409","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17410","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17411","Tag":null,"Text":"(string)    Connected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17412","Tag":null,"Text":"(string)    SessionState : SPStack.SparkplugSessionStateType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17413","Tag":null,"Text":"(string)    {attribute 'no_copy'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17414","Tag":null,"Text":"(string)    itfEdge : IEdge := THIS^;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17415","Tag":null,"Text":"(string)    NumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17416","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17417","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17418","Tag":null,"Text":"(string)    publishPeriod : UINT; // eg: 5000 (Value is in milliseconds), can be altered remotely too"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17419","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17420","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17421","Tag":null,"Text":"(string)    Connect : BOOL := TRUE; // TRUE: Connects EoN using the configured settings, FALSE: Disconnects EoN from server if it was connected"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17422","Tag":null,"Text":"(string)    _Enabled : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17423","Tag":null,"Text":"(string)    _Rebirth : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17424","Tag":null,"Text":"(string)    _ConnectionTime : TIME := T#30S;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17425","Tag":null,"Text":"(string)    _LockTimesArray : ARRAY[1..8] OF TIME := [4(TIME#30S0MS), 2(TIME#1M0S0MS), TIME#2M0S0MS, TIME#4M0S0MS]; // could be made accessible public  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17426","Tag":null,"Text":"(string)    _OutTimeRemaining : TIME; // Duration of Out Time Period = TRUE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17427","Tag":null,"Text":"(string)    _LockTimeRemaining : TIME; // Duration of Out Time Period = FALSE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17428","Tag":null,"Text":"(string)    _ExponentialBackOff : SPStack.FB_ExponentialBackOffTimer; // Handles the Exponential Backoff ttiming"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17429","Tag":null,"Text":"(string)    _StateMachine : FB_EdgeStateMachine;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17430","Tag":null,"Text":"(string)    _TopicProvider : SPStack.FB_EdgeTopicProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17431","Tag":null,"Text":"(string)    _EdgeControlProvider : FB_EdgeControlProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17432","Tag":null,"Text":"(string)    _cPrimaryHostID : WSTRING; // Corrected PrimaryHostID, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17433","Tag":null,"Text":"(string)    _cGroupId : WSTRING; // Corrected GroupId, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17434","Tag":null,"Text":"(string)    _cNodeName : WSTRING; // Corrected NodeName, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17435","Tag":null,"Text":"(string)    _MQTT : FB_EdgeMQTT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17436","Tag":null,"Text":"(string)    _MQTT_eError : MQTT.MQTT_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17437","Tag":null,"Text":"(string)    _SparkplugB : SPStack.FB_SparkplugBSimple; // Handles SparkPlugB Stuff"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17438","Tag":null,"Text":"(string)    _Devices : LinkedList.List; // Handles all connected Devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17439","Tag":null,"Text":"(string)    _prevNumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17440","Tag":null,"Text":"(string)    _ItfCurElement : LinkedList.IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17441","Tag":null,"Text":"(string)    _DeviceCnt : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17442","Tag":null,"Text":"(string)    _ItfCurDevice : IDevice;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17443","Tag":null,"Text":"(string)    _HasItfDevice : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17444","Tag":null,"Text":"(string)    _Metrics : LinkedList.List; // Complete List Of All Metrics That Will ever be Sent, needed for NBIRTH "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17445","Tag":null,"Text":"(string)    _ChangeList : LinkedList.List; // The Send list; Needed for NDATA"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17446","Tag":null,"Text":"(string)    _Initialise : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17447","Tag":null,"Text":"(string)    _Disconnect : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17448","Tag":null,"Text":"(string)    _Initialised : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17449","Tag":null,"Text":"(string)    _Reset : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17450","Tag":null,"Text":"(string)    _SubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17451","Tag":null,"Text":"(string)    _UnSubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17452","Tag":null,"Text":"(string)    _NodeBirthPublished : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17453","Tag":null,"Text":"(string)    _PublishNodeDataStart : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17454","Tag":null,"Text":"(string)    _DisablePublisher : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17455","Tag":null,"Text":"(string)    _LastWillTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17456","Tag":null,"Text":"(string)    _NDEATH : SPStack.FB_Metric; // contains the current NDEATH BDSeq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17457","Tag":null,"Text":"(string)    _NDEATHPayload : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17458","Tag":null,"Text":"(string)    _NDEATHPayloadSize : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17459","Tag":null,"Text":"(string)    _LastWillQos : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17460","Tag":null,"Text":"(string)    _LastWillRetain : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17461","Tag":null,"Text":"(string)    _NBIRTH : SPStack.FB_Metric := (_dataType := SPStack.MetricDataType.UInt64); // contains the current raw NBIRTH seq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17462","Tag":null,"Text":"(string)    _Blob : ARRAY[0..MQTT.MQTTParam.g_udiMaxPayloadSize] OF BYTE; // buffer for encoded messages"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17463","Tag":null,"Text":"(string)    _BlobSize : UDINT; // current encoded message size"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17464","Tag":null,"Text":"(string)    _NDATAEncoderPrepared : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17465","Tag":null,"Text":"(string)    _PublishNDATA : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17466","Tag":null,"Text":"(string)    _ErrorDetected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17467","Tag":null,"Text":"(string)    _ChangeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17468","Tag":null,"Text":"(string)    _ChangeDetected : BOOL; // At least 1 Signal change has been detected; RBE needed next PublishInterval "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17469","Tag":null,"Text":"(string)    _CurrentChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17470","Tag":null,"Text":"(string)    _MessageType : SPStack.SparkplugMessageTypes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17471","Tag":null,"Text":"(string)    _RecvSTATEMesg : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17472","Tag":null,"Text":"(string)    _RecvSTATETopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17473","Tag":null,"Text":"(string)    _RecvNCMDMesg : REFERENCE TO SPStack.FB_PayloadSimpleDecoder;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17474","Tag":null,"Text":"(string)    _RecvNCMDTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17475","Tag":null,"Text":"(string)    _Diag : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17476","Tag":null,"Text":"(string)    _puiPublishPeriod : POINTER TO UINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17534","Tag":null,"Text":"(string)    _Alias : ULINT := 1; // 0 is reserved in metrics to flag that no alias has been assigned yet to that metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17477","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17478","Tag":null,"Text":"(string)    // IMessageSource"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17479","Tag":null,"Text":"(string)    _IMessageSource_Device : LinkedList.IElement; //The itfElement that you are publishing (for FB_Edge this will be a FB_Device)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17480","Tag":null,"Text":"(string)    _IMessageSource_publishing : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17481","Tag":null,"Text":"(string)    _IMessageSource_published : BOOL; // TRUE when publish is complete.  Is set false automatically in claimExclusivePublishingRights, but you can set it false yourself if you want"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17482","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17483","Tag":null,"Text":"(string)    {attribute 'instance-path'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17484","Tag":null,"Text":"(string)    {attribute 'noinit'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17485","Tag":null,"Text":"(string)    _POU : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)360","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)17551","POULevel":{"@Type":"8e575c5b:Enum","@Value":"Standard"},"ChildObjectGuids":{"@Type":"ArrayList:IList","@Value":[]},"AddAttributeSubsequent":"(bool)False"}},"TypeInfos":{"0db3d7bb":"{0db3d7bb-cde0-4416-9a7b-ce49a0124323}","3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","6f9dac99":"{6f9dac99-8de1-4efc-8465-68ac443b7d08}","8e575c5b":"{8e575c5b-1d37-49c6-941b-5c0ec7874787}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","ArrayList":"System.Collections.ArrayList","bool":"System.Boolean","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)af25efb2-e7d3-4d17-9b46-1d6d5c77fe77","ParentGuid":"(Guid)00000000-0000-0000-0000-000000000000","Name":"(string)FB_Edge","Properties":{"@Type":"2c41fa04:IDictionary","@Value":[{"@Key":"(Guid)24568a24-c491-472c-a21f-ee5d33859fab","@Value":{"@Type":"24568a24","@Value":{"MemoryReserveForOnlineChange":"(int)0","ExcludeFromBuild":"(bool)False","External":"(bool)False","EnableSystemCall":"(bool)False","CompilerDefines":"(string)","LinkAlways":"(bool)False","Undefines":{"@Type":"[string]","@Value":[]}}}},{"@Key":"(Guid)829a18f2-c514-4f6e-9634-1df173429203","@Value":{"@Type":"829a18f2","@Value":{"ParentObjects":{"@Type":"fa2ee218:IDictionary","@Value":[{"@Key":"(Guid)21af5390-2942-461a-bf89-951aaf6999f1","@Value":"(Guid)df8b6e33-73a6-4e1c-bc61-8ee3c2cdd757"}]}}}}]},"TypeGuid":"(Guid)6f9dac99-8de1-4efc-8465-68ac443b7d08","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"24568a24":"{24568a24-c491-472c-a21f-ee5d33859fab}","2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","bool":"System.Boolean","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","int":"System.Int32","string":"System.String"}},"object":{"Graph":{"@Type":"6f9dac99","@Value":{"SpecialFunc":{"@Type":"0db3d7bb:Enum","@Value":"None"},"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)17486","Tag":null,"Text":"(string)//Make a pointer to avoid warning on external usage of VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17487","Tag":null,"Text":"(string)_puiPublishPeriod := ADR(publishPeriod);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17488","Tag":null,"Text":"(string)// ServiceProviders for MQTT and TLS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17489","Tag":null,"Text":"(string)_MQTT.IASyncPropertyProvider(IASyncPropertyProvider);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17490","Tag":null,"Text":"(string)_MQTT.ITLSContextProvider(ITLSContextProvider);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17566","Tag":null,"Text":"(string)_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17492","Tag":null,"Text":"(string)Connected := (NOT _MQTT.ClientError() AND NOT _MQTT.IsConnecting() AND _MQTT.IsConnected());"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17563","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17562","Tag":null,"Text":"(string)// ServiceProvider for Sparkplug B Payload Certificates and Encoding / Decoding"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17493","Tag":null,"Text":"(string)_SparkplugB();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17494","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17495","Tag":null,"Text":"(string)IF _MQTT.STATEMessageReceived() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17496","Tag":null,"Text":"(string)    _RecvSTATEMesg := _MQTT.GetSTATEMessage( MessageTopic => _RecvSTATETopic );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17497","Tag":null,"Text":"(string)    onSTATEMessage( Topic := _RecvSTATETopic,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17498","Tag":null,"Text":"(string)                    Message := _RecvSTATEMesg );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17499","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17500","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17501","Tag":null,"Text":"(string)IF _MQTT.NCMDMessageReceived() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17502","Tag":null,"Text":"(string)    _RecvNCMDMesg REF= _MQTT.GetNCMDMessage(MessageTopic => _RecvNCMDTopic);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17503","Tag":null,"Text":"(string)    // only updates the received NCMD metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17504","Tag":null,"Text":"(string)    onNCMDMessage(pTopic := ADR(_RecvNCMDTopic), pMessage := _RecvNCMDMesg);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17505","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17552","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17553","Tag":null,"Text":"(string)// Provide Remote Host with all kinds of Info from this edge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17554","Tag":null,"Text":"(string)_EdgeInfoProvider( IWantExtendedEdgeInfoPublished := SPStack.GVL_sparkplug.IWantExtendedEdgeInfoPublished, // some parts are opt-out"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17557","Tag":null,"Text":"(string)                   AllMetricsList := THIS^._Metrics);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17555","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17507","Tag":null,"Text":"(string)// Provides Remote Host with the Controls this edge supports"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17508","Tag":null,"Text":"(string)_EdgeControlProvider( AllMetricsList := THIS^._Metrics, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17558","Tag":null,"Text":"(string)                      PublishPeriod := THIS^.publishPeriod, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17559","Tag":null,"Text":"(string)                      Rebirth => _Rebirth );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17560","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17509","Tag":null,"Text":"(string)// ServiceProvider to handle reconnecta via configurable exponential backoff timer, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17510","Tag":null,"Text":"(string)_ExponentialBackOff( Enable := (Connect AND NOT Connected),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17511","Tag":null,"Text":"(string)                     ConnectionTime := _ConnectionTime, // Wait xx time during reconnection phase"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17512","Tag":null,"Text":"(string)                     LockTimesArray := _LockTimesArray, // contains the times between reconnection attempt"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17513","Tag":null,"Text":"(string)                     Enabled => _Enabled, // Feedback Enable"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17514","Tag":null,"Text":"(string)                     OutTimeRemaining => _OutTimeRemaining, // time left for current reconnect phase"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17515","Tag":null,"Text":"(string)                     LockTimeRemaining => _LockTimeRemaining ); // time left for current lockphase (we wait for next reconnect attempt)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17561","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17516","Tag":null,"Text":"(string)// The main Edge State Machine"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17517","Tag":null,"Text":"(string)_StateMachine( Connect := _ExponentialBackOff.out, // Reconnect yes/no"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17518","Tag":null,"Text":"(string)               EoNConnected := Connected, // MQTT Client is Connected"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17519","Tag":null,"Text":"(string)               ReBirth := _Rebirth,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17520","Tag":null,"Text":"(string)               TimeToWait := TO_TIME(publishPeriod),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17521","Tag":null,"Text":"(string)               pMQTT := ADR(_MQTT),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17522","Tag":null,"Text":"(string)               pSparkplugB := ADR(_SparkplugB),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17523","Tag":null,"Text":"(string)               pEdge := THIS,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17525","Tag":null,"Text":"(string)               AllMetricsList := _Metrics,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17526","Tag":null,"Text":"(string)               DeviceList := _Devices,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17568","Tag":null,"Text":"(string)               SessionState => SessionState ); // Our MQTT SessionState"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17527","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17528","Tag":null,"Text":"(string)_Rebirth := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17529","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17530","Tag":null,"Text":"(string)// update current number of plugged devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17531","Tag":null,"Text":"(string)NumberOfDevices := _Devices.ListSize;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17532","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)2243","Tag":null,"Text":"(string)Diag();"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)17364","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17365","Tag":null,"Text":"(string)    Edge of Network Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17366","Tag":null,"Text":"(string)    Allows you to bidirectionally share sparkplug data from the edge of your network to a Primary Host Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17367","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17533","Tag":null,"Text":"(string){attribute 'no_assign'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17368","Tag":null,"Text":"(string){attribute 'reflection'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17369","Tag":null,"Text":"(string)FUNCTION_BLOCK PUBLIC FB_Edge IMPLEMENTS IEdge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17370","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17371","Tag":null,"Text":"(string)    ServerUrl : STRING; // TCP:'test.mosquitto.org' or WebSocket: ‘ws://localhost:8080’ ws-URI = “ws:” “//” host [ ”:” port ] path [ ”?” query ] wss-URI = “wss:” “//” host [ ”:” port ] path [ ”?” query ]"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17372","Tag":null,"Text":"(string)    ServerPort : UINT := 1883; // Only in TCP Mode, eg: 1883"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17548","Tag":null,"Text":"(string)    PingInterval : TIME := T#2S; // Ping interval for TCP and Websocket mode, default interval = T#2s"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17549","Tag":null,"Text":"(string)    CommunicationMode : MQTT.COMMUNICATION_MODE := MQTT.COMMUNICATION_MODE.TCP; // Choose either TCP or WebSockets"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17547","Tag":null,"Text":"(string)    HttpProxySettings : MQTT.WEB_SOCKET.HttpProxySettings; // Contains Proxy- Server, Port, User and Password settings "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17373","Tag":null,"Text":"(string)    PrimaryHostID : WSTRING := \"\"; // eg:'PrimaryHostNode';  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17374","Tag":null,"Text":"(string)    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17375","Tag":null,"Text":"(string)    // Persistent Session (FALSE = DEFAULT)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17376","Tag":null,"Text":"(string)    //  * The client must get all messages from a certain topic, even if it is offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17377","Tag":null,"Text":"(string)    //  * You want the broker to queue the messages for the client and deliver them as soon as the client is back online."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17378","Tag":null,"Text":"(string)    //  * The client has limited resources. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17379","Tag":null,"Text":"(string)    //  * You want the broker to store the subscription information of the client and restore the interrupted communication quickly."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17380","Tag":null,"Text":"(string)    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17381","Tag":null,"Text":"(string)    //  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17382","Tag":null,"Text":"(string)    //  Clean session (TRUE)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17383","Tag":null,"Text":"(string)    //  * The client needs only to publish messages to topics, the client does not need to subscribe to topics. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17384","Tag":null,"Text":"(string)    //  * You don’t want the broker to store session information or retry transmission of QoS 1 and 2 messages."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17385","Tag":null,"Text":"(string)    //  * The client does not need to get messages that it misses offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17386","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17387","Tag":null,"Text":"(string)    CleanSession : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17388","Tag":null,"Text":"(string)    Username : WSTRING := \"\"; // specify a username if any (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17389","Tag":null,"Text":"(string)    Password : WSTRING := \"\"; // specify the password for the username (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17390","Tag":null,"Text":"(string)    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17391","Tag":null,"Text":"(string)    hCert : SysTypes.RTS_IEC_HANDLE; // Handle to the client certificate (optional) and only used if UseTLS is TRUE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17392","Tag":null,"Text":"(string)    GroupId : WSTRING; // eg: \"SparkplugBDevice\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17393","Tag":null,"Text":"(string)    NodeName : WSTRING; // eg: \"EoN1\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17394","Tag":null,"Text":"(string)    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17395","Tag":null,"Text":"(string)    //Static initialization, as shown in the following code snippet;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17396","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17397","Tag":null,"Text":"(string)    //VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17398","Tag":null,"Text":"(string)    //    commonName : STRING := 'MyRasPi';"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17399","Tag":null,"Text":"(string)    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17400","Tag":null,"Text":"(string)    //    myTLSContext : NBS.TLSContext := ("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17401","Tag":null,"Text":"(string)    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17402","Tag":null,"Text":"(string)    //        sUseCaseName:='NBSTest',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17403","Tag":null,"Text":"(string)    //        sTLSVersion:='1.3',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17404","Tag":null,"Text":"(string)    //        ciCertInfo:=ciCertInfo,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17405","Tag":null,"Text":"(string)    //        udiVerificationMode:=2"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17406","Tag":null,"Text":"(string)    //    );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17407","Tag":null,"Text":"(string)    //END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17408","Tag":null,"Text":"(string)    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)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17535","Tag":null,"Text":"(string)    UseAliases : BOOL := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17409","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17410","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17411","Tag":null,"Text":"(string)    Connected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17412","Tag":null,"Text":"(string)    SessionState : SPStack.SparkplugSessionStateType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17413","Tag":null,"Text":"(string)    {attribute 'no_copy'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17414","Tag":null,"Text":"(string)    itfEdge : IEdge := THIS^;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17415","Tag":null,"Text":"(string)    NumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17416","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17417","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17418","Tag":null,"Text":"(string)    publishPeriod : UINT; // eg: 5000 (Value is in milliseconds), can be altered remotely too"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17419","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17420","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17421","Tag":null,"Text":"(string)    Connect : BOOL := TRUE; // TRUE: Connects EoN using the configured settings, FALSE: Disconnects EoN from server if it was connected"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17422","Tag":null,"Text":"(string)    _Enabled : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17423","Tag":null,"Text":"(string)    _Rebirth : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17424","Tag":null,"Text":"(string)    _ConnectionTime : TIME := T#30S;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17425","Tag":null,"Text":"(string)    _LockTimesArray : ARRAY[1..8] OF TIME := [4(TIME#30S0MS), 2(TIME#1M0S0MS), TIME#2M0S0MS, TIME#4M0S0MS]; // could be made accessible public  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17426","Tag":null,"Text":"(string)    _OutTimeRemaining : TIME; // Duration of Out Time Period = TRUE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17427","Tag":null,"Text":"(string)    _LockTimeRemaining : TIME; // Duration of Out Time Period = FALSE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17428","Tag":null,"Text":"(string)    _ExponentialBackOff : SPStack.FB_ExponentialBackOffTimer; // Handles the Exponential Backoff ttiming"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17429","Tag":null,"Text":"(string)    _StateMachine : FB_EdgeStateMachine;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17430","Tag":null,"Text":"(string)    _TopicProvider : SPStack.FB_EdgeTopicProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17556","Tag":null,"Text":"(string)    _EdgeInfoProvider : FB_EdgeInfoProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17431","Tag":null,"Text":"(string)    _EdgeControlProvider : FB_EdgeControlProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17432","Tag":null,"Text":"(string)    _cPrimaryHostID : WSTRING; // Corrected PrimaryHostID, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17433","Tag":null,"Text":"(string)    _cGroupId : WSTRING; // Corrected GroupId, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17434","Tag":null,"Text":"(string)    _cNodeName : WSTRING; // Corrected NodeName, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17435","Tag":null,"Text":"(string)    _MQTT : FB_EdgeMQTT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17436","Tag":null,"Text":"(string)    _MQTT_eError : MQTT.MQTT_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17437","Tag":null,"Text":"(string)    _SparkplugB : SPStack.FB_SparkplugBSimple; // Handles SparkPlugB Stuff"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17438","Tag":null,"Text":"(string)    _Devices : LinkedList.List; // Handles all connected Devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17439","Tag":null,"Text":"(string)    _prevNumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17440","Tag":null,"Text":"(string)    _ItfCurElement : LinkedList.IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17441","Tag":null,"Text":"(string)    _DeviceCnt : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17442","Tag":null,"Text":"(string)    _ItfCurDevice : IDevice;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17443","Tag":null,"Text":"(string)    _HasItfDevice : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17444","Tag":null,"Text":"(string)    _Metrics : LinkedList.List; // Complete List Of All Metrics That Will ever be Sent, needed for NBIRTH "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17445","Tag":null,"Text":"(string)    _ChangeList : LinkedList.List; // The Send list; Needed for NDATA"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17446","Tag":null,"Text":"(string)    _Initialise : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17447","Tag":null,"Text":"(string)    _Disconnect : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17448","Tag":null,"Text":"(string)    _Initialised : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17449","Tag":null,"Text":"(string)    _Reset : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17450","Tag":null,"Text":"(string)    _SubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17451","Tag":null,"Text":"(string)    _UnSubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17452","Tag":null,"Text":"(string)    _NodeBirthPublished : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17453","Tag":null,"Text":"(string)    _PublishNodeDataStart : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17454","Tag":null,"Text":"(string)    _DisablePublisher : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17455","Tag":null,"Text":"(string)    _LastWillTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17456","Tag":null,"Text":"(string)    _NDEATH : SPStack.FB_Metric; // contains the current NDEATH BDSeq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17457","Tag":null,"Text":"(string)    _NDEATHPayload : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17458","Tag":null,"Text":"(string)    _NDEATHPayloadSize : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17459","Tag":null,"Text":"(string)    _LastWillQos : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17460","Tag":null,"Text":"(string)    _LastWillRetain : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17461","Tag":null,"Text":"(string)    _NBIRTH : SPStack.FB_Metric := (_dataType := SPStack.MetricDataType.UInt64); // contains the current raw NBIRTH seq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17462","Tag":null,"Text":"(string)    _Blob : ARRAY[0..MQTT.MQTTParam.g_udiMaxPayloadSize] OF BYTE; // buffer for encoded messages"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17463","Tag":null,"Text":"(string)    _BlobSize : UDINT; // current encoded message size"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17464","Tag":null,"Text":"(string)    _NDATAEncoderPrepared : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17465","Tag":null,"Text":"(string)    _PublishNDATA : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17466","Tag":null,"Text":"(string)    _ErrorDetected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17467","Tag":null,"Text":"(string)    _ChangeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17468","Tag":null,"Text":"(string)    _ChangeDetected : BOOL; // At least 1 Signal change has been detected; RBE needed next PublishInterval "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17469","Tag":null,"Text":"(string)    _CurrentChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17470","Tag":null,"Text":"(string)    _MessageType : SPStack.SparkplugMessageTypes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17471","Tag":null,"Text":"(string)    _RecvSTATEMesg : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17472","Tag":null,"Text":"(string)    _RecvSTATETopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17473","Tag":null,"Text":"(string)    _RecvNCMDMesg : REFERENCE TO SPStack.FB_PayloadSimpleDecoder;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17474","Tag":null,"Text":"(string)    _RecvNCMDTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17475","Tag":null,"Text":"(string)    _Diag : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17476","Tag":null,"Text":"(string)    _puiPublishPeriod : POINTER TO UINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17534","Tag":null,"Text":"(string)    _Alias : ULINT := 1; // 0 is reserved in metrics to flag that no alias has been assigned yet to that metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17477","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17478","Tag":null,"Text":"(string)    // IMessageSource"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17479","Tag":null,"Text":"(string)    _IMessageSource_Device : LinkedList.IElement; //The itfElement that you are publishing (for FB_Edge this will be a FB_Device)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17480","Tag":null,"Text":"(string)    _IMessageSource_publishing : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17481","Tag":null,"Text":"(string)    _IMessageSource_published : BOOL; // TRUE when publish is complete.  Is set false automatically in claimExclusivePublishingRights, but you can set it false yourself if you want"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17482","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17483","Tag":null,"Text":"(string)    {attribute 'instance-path'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17484","Tag":null,"Text":"(string)    {attribute 'noinit'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17485","Tag":null,"Text":"(string)    _POU : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)360","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)17568","POULevel":{"@Type":"8e575c5b:Enum","@Value":"Standard"},"ChildObjectGuids":{"@Type":"ArrayList:IList","@Value":[]},"AddAttributeSubsequent":"(bool)False"}},"TypeInfos":{"0db3d7bb":"{0db3d7bb-cde0-4416-9a7b-ce49a0124323}","3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","6f9dac99":"{6f9dac99-8de1-4efc-8465-68ac443b7d08}","8e575c5b":"{8e575c5b-1d37-49c6-941b-5c0ec7874787}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","ArrayList":"System.Collections.ArrayList","bool":"System.Boolean","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file