--- 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)// 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)17569","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17570","Tag":null,"Text":"(string)    Edge of Network Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17571","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)17572","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17573","Tag":null,"Text":"(string){attribute 'no_assign'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17574","Tag":null,"Text":"(string){attribute 'reflection'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17575","Tag":null,"Text":"(string)FUNCTION_BLOCK PUBLIC FB_Edge IMPLEMENTS IEdge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17576","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17577","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)17578","Tag":null,"Text":"(string)    ServerPort : UINT := 1883; // Only in TCP Mode, eg: 1883"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17579","Tag":null,"Text":"(string)    PingInterval : TIME := T#2S; // Ping interval for TCP and Websocket mode, default interval = T#2s"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17580","Tag":null,"Text":"(string)    CommunicationMode : MQTT.COMMUNICATION_MODE := MQTT.COMMUNICATION_MODE.TCP; // Choose either TCP or WebSockets"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17581","Tag":null,"Text":"(string)    HttpProxySettings : MQTT.WEB_SOCKET.HttpProxySettings; // Contains Proxy- Server, Port, User and Password settings "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17582","Tag":null,"Text":"(string)    PrimaryHostID : WSTRING := \"\"; // eg:'PrimaryHostNode';  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17583","Tag":null,"Text":"(string)    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17584","Tag":null,"Text":"(string)    // Persistent Session (FALSE = DEFAULT)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17585","Tag":null,"Text":"(string)    //  * The client must get all messages from a certain topic, even if it is offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17586","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)17587","Tag":null,"Text":"(string)    //  * The client has limited resources. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17588","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)17589","Tag":null,"Text":"(string)    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17590","Tag":null,"Text":"(string)    //  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17591","Tag":null,"Text":"(string)    //  Clean session (TRUE)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17592","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)17593","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)17594","Tag":null,"Text":"(string)    //  * The client does not need to get messages that it misses offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17595","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17596","Tag":null,"Text":"(string)    CleanSession : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17597","Tag":null,"Text":"(string)    Username : WSTRING := \"\"; // specify a username if any (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17598","Tag":null,"Text":"(string)    Password : WSTRING := \"\"; // specify the password for the username (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17599","Tag":null,"Text":"(string)    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17600","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)17601","Tag":null,"Text":"(string)    GroupId : WSTRING; // eg: \"SparkplugBDevice\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17602","Tag":null,"Text":"(string)    NodeName : WSTRING; // eg: \"EoN1\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17603","Tag":null,"Text":"(string)    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17604","Tag":null,"Text":"(string)    //Static initialization, as shown in the following code snippet;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17605","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17606","Tag":null,"Text":"(string)    //VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17607","Tag":null,"Text":"(string)    //    commonName : STRING := 'MyRasPi';"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17608","Tag":null,"Text":"(string)    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17609","Tag":null,"Text":"(string)    //    myTLSContext : NBS.TLSContext := ("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17610","Tag":null,"Text":"(string)    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17611","Tag":null,"Text":"(string)    //        sUseCaseName:='NBSTest',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17612","Tag":null,"Text":"(string)    //        sTLSVersion:='1.3',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17613","Tag":null,"Text":"(string)    //        ciCertInfo:=ciCertInfo,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17614","Tag":null,"Text":"(string)    //        udiVerificationMode:=2"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17615","Tag":null,"Text":"(string)    //    );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17616","Tag":null,"Text":"(string)    //END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17617","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)17618","Tag":null,"Text":"(string)    UseAliases : BOOL := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17619","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17620","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17621","Tag":null,"Text":"(string)    Connected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17622","Tag":null,"Text":"(string)    SessionState : SPStack.SparkplugSessionStateType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17623","Tag":null,"Text":"(string)    {attribute 'no_copy'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17624","Tag":null,"Text":"(string)    itfEdge : IEdge := THIS^;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17625","Tag":null,"Text":"(string)    NumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17626","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17627","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17628","Tag":null,"Text":"(string)    publishPeriod : UINT; // eg: 5000 (Value is in milliseconds), can be altered remotely too"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17629","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17630","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17631","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)17632","Tag":null,"Text":"(string)    _Enabled : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17633","Tag":null,"Text":"(string)    _Rebirth : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17634","Tag":null,"Text":"(string)    _ConnectionTime : TIME := T#30S;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17635","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)17636","Tag":null,"Text":"(string)    _OutTimeRemaining : TIME; // Duration of Out Time Period = TRUE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17637","Tag":null,"Text":"(string)    _LockTimeRemaining : TIME; // Duration of Out Time Period = FALSE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17638","Tag":null,"Text":"(string)    _ExponentialBackOff : SPStack.FB_ExponentialBackOffTimer; // Handles the Exponential Backoff ttiming"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17639","Tag":null,"Text":"(string)    _StateMachine : FB_EdgeStateMachine;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17640","Tag":null,"Text":"(string)    _TopicProvider : SPStack.FB_EdgeTopicProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17641","Tag":null,"Text":"(string)    _EdgeInfoProvider : FB_EdgeInfoProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17642","Tag":null,"Text":"(string)    _EdgeControlProvider : FB_EdgeControlProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17643","Tag":null,"Text":"(string)    _cPrimaryHostID : WSTRING; // Corrected PrimaryHostID, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17644","Tag":null,"Text":"(string)    _cGroupId : WSTRING; // Corrected GroupId, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17645","Tag":null,"Text":"(string)    _cNodeName : WSTRING; // Corrected NodeName, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17646","Tag":null,"Text":"(string)    _MQTT : FB_EdgeMQTT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17647","Tag":null,"Text":"(string)    _MQTT_eError : MQTT.MQTT_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17648","Tag":null,"Text":"(string)    _SparkplugB : SPStack.FB_SparkplugBSimple; // Handles SparkPlugB Stuff"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17649","Tag":null,"Text":"(string)    _Devices : LinkedList.List; // Handles all connected Devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17650","Tag":null,"Text":"(string)    _prevNumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17651","Tag":null,"Text":"(string)    _ItfCurElement : LinkedList.IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17652","Tag":null,"Text":"(string)    _DeviceCnt : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17653","Tag":null,"Text":"(string)    _ItfCurDevice : IDevice;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17654","Tag":null,"Text":"(string)    _HasItfDevice : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17655","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)17656","Tag":null,"Text":"(string)    _ChangeList : LinkedList.List; // The Send list; Needed for NDATA"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17657","Tag":null,"Text":"(string)    _Initialise : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17658","Tag":null,"Text":"(string)    _Disconnect : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17659","Tag":null,"Text":"(string)    _Initialised : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17660","Tag":null,"Text":"(string)    _Reset : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17661","Tag":null,"Text":"(string)    _SubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17662","Tag":null,"Text":"(string)    _UnSubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17663","Tag":null,"Text":"(string)    _NodeBirthPublished : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17664","Tag":null,"Text":"(string)    _PublishNodeDataStart : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17665","Tag":null,"Text":"(string)    _DisablePublisher : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17666","Tag":null,"Text":"(string)    _LastWillTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17667","Tag":null,"Text":"(string)    _NDEATH : SPStack.FB_Metric; // contains the current NDEATH BDSeq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17668","Tag":null,"Text":"(string)    _NDEATHPayload : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17669","Tag":null,"Text":"(string)    _NDEATHPayloadSize : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17670","Tag":null,"Text":"(string)    _LastWillQos : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17671","Tag":null,"Text":"(string)    _LastWillRetain : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17672","Tag":null,"Text":"(string)    _NBIRTH : SPStack.FB_Metric := (_dataType := SPStack.MetricDataType.UInt64); // contains the current raw NBIRTH seq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17673","Tag":null,"Text":"(string)    _Blob : ARRAY[0..MQTT.MQTTParam.g_udiMaxPayloadSize] OF BYTE; // buffer for encoded messages"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17674","Tag":null,"Text":"(string)    _BlobSize : UDINT; // current encoded message size"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17675","Tag":null,"Text":"(string)    _NDATAEncoderPrepared : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17676","Tag":null,"Text":"(string)    _PublishNDATA : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17677","Tag":null,"Text":"(string)    _ErrorDetected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17678","Tag":null,"Text":"(string)    _ChangeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17679","Tag":null,"Text":"(string)    _ChangeDetected : BOOL; // At least 1 Signal change has been detected; RBE needed next PublishInterval "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17680","Tag":null,"Text":"(string)    _CurrentChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17681","Tag":null,"Text":"(string)    _MessageType : SPStack.SparkplugMessageTypes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17682","Tag":null,"Text":"(string)    _RecvSTATEMesg : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17683","Tag":null,"Text":"(string)    _RecvSTATETopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17684","Tag":null,"Text":"(string)    _RecvNCMDMesg : REFERENCE TO SPStack.FB_Payload;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17685","Tag":null,"Text":"(string)    _RecvNCMDTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17686","Tag":null,"Text":"(string)    _Diag : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17687","Tag":null,"Text":"(string)    _puiPublishPeriod : POINTER TO UINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17688","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)17689","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17690","Tag":null,"Text":"(string)    // IMessageSource"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17691","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)17692","Tag":null,"Text":"(string)    _IMessageSource_publishing : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17693","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)17694","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17695","Tag":null,"Text":"(string)    {attribute 'instance-path'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17696","Tag":null,"Text":"(string)    {attribute 'noinit'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17697","Tag":null,"Text":"(string)    _POU : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)360","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)17697","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)17569","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17570","Tag":null,"Text":"(string)    Edge of Network Node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17571","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)17572","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17573","Tag":null,"Text":"(string){attribute 'no_assign'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17574","Tag":null,"Text":"(string){attribute 'reflection'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17575","Tag":null,"Text":"(string)FUNCTION_BLOCK PUBLIC FB_Edge IMPLEMENTS IEdge"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17576","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17577","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)17578","Tag":null,"Text":"(string)    ServerPort : UINT := 1883; // Only in TCP Mode, eg: 1883"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17579","Tag":null,"Text":"(string)    PingInterval : TIME := T#2S; // Ping interval for TCP and Websocket mode, default interval = T#2s"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17580","Tag":null,"Text":"(string)    CommunicationMode : MQTT.COMMUNICATION_MODE := MQTT.COMMUNICATION_MODE.TCP; // Choose either TCP or WebSockets"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17581","Tag":null,"Text":"(string)    HttpProxySettings : MQTT.WEB_SOCKET.HttpProxySettings; // Contains Proxy- Server, Port, User and Password settings "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17582","Tag":null,"Text":"(string)    PrimaryHostID : WSTRING := \"\"; // eg:'PrimaryHostNode';  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17583","Tag":null,"Text":"(string)    KeepAlive : UINT := 60; // eg: 60 (Value is in seconds)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17584","Tag":null,"Text":"(string)    // Persistent Session (FALSE = DEFAULT)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17585","Tag":null,"Text":"(string)    //  * The client must get all messages from a certain topic, even if it is offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17586","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)17587","Tag":null,"Text":"(string)    //  * The client has limited resources. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17588","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)17589","Tag":null,"Text":"(string)    //  * The client needs to reNumberOfMetricse all QoS 1 and 2 publish messages after a reconnect."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17590","Tag":null,"Text":"(string)    //  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17591","Tag":null,"Text":"(string)    //  Clean session (TRUE)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17592","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)17593","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)17594","Tag":null,"Text":"(string)    //  * The client does not need to get messages that it misses offline. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17595","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17596","Tag":null,"Text":"(string)    CleanSession : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17597","Tag":null,"Text":"(string)    Username : WSTRING := \"\"; // specify a username if any (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17598","Tag":null,"Text":"(string)    Password : WSTRING := \"\"; // specify the password for the username (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17599","Tag":null,"Text":"(string)    UseTLS : BOOL; // Enables usage of the TLS encryption (optional)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17600","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)17601","Tag":null,"Text":"(string)    GroupId : WSTRING; // eg: \"SparkplugBDevice\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17602","Tag":null,"Text":"(string)    NodeName : WSTRING; // eg: \"EoN1\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17603","Tag":null,"Text":"(string)    ITLSContextProvider : MQTT.NBS.ITLSContext; //Encapsulates all the data neccessaray to handle encrypted tcp connections"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17604","Tag":null,"Text":"(string)    //Static initialization, as shown in the following code snippet;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17605","Tag":null,"Text":"(string)    //"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17606","Tag":null,"Text":"(string)    //VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17607","Tag":null,"Text":"(string)    //    commonName : STRING := 'MyRasPi';"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17608","Tag":null,"Text":"(string)    //    ciCertInfo : NBS.CERT_INFO := (psInfo:=ADR(commonName), udiSize:=LEN(commonName));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17609","Tag":null,"Text":"(string)    //    myTLSContext : NBS.TLSContext := ("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17610","Tag":null,"Text":"(string)    //        ePurpose:=NBS.PURPOSE.CLIENT_SIDE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17611","Tag":null,"Text":"(string)    //        sUseCaseName:='NBSTest',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17612","Tag":null,"Text":"(string)    //        sTLSVersion:='1.3',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17613","Tag":null,"Text":"(string)    //        ciCertInfo:=ciCertInfo,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17614","Tag":null,"Text":"(string)    //        udiVerificationMode:=2"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17615","Tag":null,"Text":"(string)    //    );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17616","Tag":null,"Text":"(string)    //END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17617","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)17618","Tag":null,"Text":"(string)    UseAliases : BOOL := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17619","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17620","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17621","Tag":null,"Text":"(string)    Connected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17622","Tag":null,"Text":"(string)    SessionState : SPStack.SparkplugSessionStateType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17623","Tag":null,"Text":"(string)    {attribute 'no_copy'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17624","Tag":null,"Text":"(string)    itfEdge : IEdge := THIS^;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17625","Tag":null,"Text":"(string)    NumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17626","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17627","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17628","Tag":null,"Text":"(string)    publishPeriod : UINT; // eg: 5000 (Value is in milliseconds), can be altered remotely too"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17629","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17630","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17631","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)17632","Tag":null,"Text":"(string)    _Enabled : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17633","Tag":null,"Text":"(string)    _Rebirth : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17634","Tag":null,"Text":"(string)    _ConnectionTime : TIME := T#30S;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17635","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)17636","Tag":null,"Text":"(string)    _OutTimeRemaining : TIME; // Duration of Out Time Period = TRUE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17637","Tag":null,"Text":"(string)    _LockTimeRemaining : TIME; // Duration of Out Time Period = FALSE remaining"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17638","Tag":null,"Text":"(string)    _ExponentialBackOff : SPStack.FB_ExponentialBackOffTimer; // Handles the Exponential Backoff ttiming"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17639","Tag":null,"Text":"(string)    _StateMachine : FB_EdgeStateMachine;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17640","Tag":null,"Text":"(string)    _TopicProvider : SPStack.FB_EdgeTopicProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17641","Tag":null,"Text":"(string)    _EdgeInfoProvider : FB_EdgeInfoProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17642","Tag":null,"Text":"(string)    _EdgeControlProvider : FB_EdgeControlProvider;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17643","Tag":null,"Text":"(string)    _cPrimaryHostID : WSTRING; // Corrected PrimaryHostID, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17644","Tag":null,"Text":"(string)    _cGroupId : WSTRING; // Corrected GroupId, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17645","Tag":null,"Text":"(string)    _cNodeName : WSTRING; // Corrected NodeName, contains no illegal chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17646","Tag":null,"Text":"(string)    _MQTT : FB_EdgeMQTT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17647","Tag":null,"Text":"(string)    _MQTT_eError : MQTT.MQTT_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17648","Tag":null,"Text":"(string)    _SparkplugB : SPStack.FB_SparkplugBxCoderHandler; // Handles SparkPlugB Stuff"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17649","Tag":null,"Text":"(string)    _Devices : LinkedList.List; // Handles all connected Devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17650","Tag":null,"Text":"(string)    _prevNumberOfDevices : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17651","Tag":null,"Text":"(string)    _ItfCurElement : LinkedList.IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17652","Tag":null,"Text":"(string)    _DeviceCnt : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17653","Tag":null,"Text":"(string)    _ItfCurDevice : IDevice;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17654","Tag":null,"Text":"(string)    _HasItfDevice : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17655","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)17656","Tag":null,"Text":"(string)    _ChangeList : LinkedList.List; // The Send list; Needed for NDATA"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17657","Tag":null,"Text":"(string)    _Initialise : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17658","Tag":null,"Text":"(string)    _Disconnect : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17659","Tag":null,"Text":"(string)    _Initialised : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17660","Tag":null,"Text":"(string)    _Reset : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17661","Tag":null,"Text":"(string)    _SubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17662","Tag":null,"Text":"(string)    _UnSubscribeNCMD : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17663","Tag":null,"Text":"(string)    _NodeBirthPublished : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17664","Tag":null,"Text":"(string)    _PublishNodeDataStart : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17665","Tag":null,"Text":"(string)    _DisablePublisher : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17666","Tag":null,"Text":"(string)    _LastWillTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17667","Tag":null,"Text":"(string)    _NDEATH : SPStack.FB_Metric; // contains the current NDEATH BDSeq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17668","Tag":null,"Text":"(string)    _NDEATHPayload : ARRAY[0..255] OF BYTE; // what is the maximum size of this payload?"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17669","Tag":null,"Text":"(string)    _NDEATHPayloadSize : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17670","Tag":null,"Text":"(string)    _LastWillQos : MQTT.MQTT_QOS := MQTT.MQTT_QOS.QoS0;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17671","Tag":null,"Text":"(string)    _LastWillRetain : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17672","Tag":null,"Text":"(string)    _NBIRTH : SPStack.FB_Metric := (_dataType := SPStack.MetricDataType.UInt64); // contains the current raw NBIRTH seq"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17673","Tag":null,"Text":"(string)    _Blob : ARRAY[0..MQTT.MQTTParam.g_udiMaxPayloadSize] OF BYTE; // buffer for encoded messages"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17674","Tag":null,"Text":"(string)    _BlobSize : UDINT; // current encoded message size"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17675","Tag":null,"Text":"(string)    _NDATAEncoderPrepared : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17676","Tag":null,"Text":"(string)    _PublishNDATA : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17677","Tag":null,"Text":"(string)    _ErrorDetected : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17678","Tag":null,"Text":"(string)    _ChangeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17679","Tag":null,"Text":"(string)    _ChangeDetected : BOOL; // At least 1 Signal change has been detected; RBE needed next PublishInterval "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17680","Tag":null,"Text":"(string)    _CurrentChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal     "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17681","Tag":null,"Text":"(string)    _MessageType : SPStack.SparkplugMessageTypes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17682","Tag":null,"Text":"(string)    _RecvSTATEMesg : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17683","Tag":null,"Text":"(string)    _RecvSTATETopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17684","Tag":null,"Text":"(string)    _RecvNCMDMesg : REFERENCE TO SPStack.FB_Payload;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17685","Tag":null,"Text":"(string)    _RecvNCMDTopic : WSTRING(SPStack.GC_sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17686","Tag":null,"Text":"(string)    _Diag : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17687","Tag":null,"Text":"(string)    _puiPublishPeriod : POINTER TO UINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17688","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)17689","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17690","Tag":null,"Text":"(string)    // IMessageSource"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17691","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)17692","Tag":null,"Text":"(string)    _IMessageSource_publishing : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17693","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)17694","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17695","Tag":null,"Text":"(string)    {attribute 'instance-path'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17696","Tag":null,"Text":"(string)    {attribute 'noinit'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17697","Tag":null,"Text":"(string)    _POU : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)360","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)17697","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