Diff of /project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/initialise_886625dd/886625dd520f4a19a0e12e521235a58c.object [70723e] .. [48a107]  Maximize  Restore

Switch to side-by-side view

--- a/project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/initialise_886625dd/886625dd520f4a19a0e12e521235a58c.object
+++ b/project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/initialise_886625dd/886625dd520f4a19a0e12e521235a58c.object
@@ -1 +1 @@
-{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)886625dd-520f-4a19-a0e1-2e521235a58c","ParentGuid":"(Guid)af25efb2-e7d3-4d17-9b46-1d6d5c77fe77","Name":"(string)Initialise","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":[]}}}}]},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","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}","bool":"System.Boolean","Guid":"System.Guid","int":"System.Int32","string":"System.String"}},"object":{"Graph":{"@Type":"f8a58466","@Value":{"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)3041","Tag":null,"Text":"(string)Initialise := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3042","Tag":null,"Text":"(string)// Only use the corrected names throughout EoN!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3043","Tag":null,"Text":"(string)_cPrimaryHostID := SPStack.ReplaceIllegalCharsWithUnderscore(PrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3044","Tag":null,"Text":"(string)_cGroupId := SPStack.ReplaceIllegalCharsWithUnderscore(GroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3045","Tag":null,"Text":"(string)_cNodeName := SPStack.ReplaceIllegalCharsWithUnderscore(NodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3155","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3046","Tag":null,"Text":"(string)// Set Topics"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3047","Tag":null,"Text":"(string)_TopicProvider.SETSTATETopic(PrimaryHostID := _cPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3048","Tag":null,"Text":"(string)_TopicProvider.SETLASTWILLTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3051","Tag":null,"Text":"(string)_TopicProvider.SETNBIRTHTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3054","Tag":null,"Text":"(string)_TopicProvider.SETNCMDTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3057","Tag":null,"Text":"(string)_TopicProvider.SETNDATATopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3059","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3060","Tag":null,"Text":"(string)// Convert corrected GroupId From WSTRING TO STRING"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3061","Tag":null,"Text":"(string)sPrimaryHostID := WSTRING_TO_STRING(_cPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3062","Tag":null,"Text":"(string)sGroupId := WSTRING_TO_STRING(_cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3063","Tag":null,"Text":"(string)sNodeName := WSTRING_TO_STRING(_cNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3156","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3064","Tag":null,"Text":"(string)//  create clientid"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3065","Tag":null,"Text":"(string)sClientID := Concat(sGroupId, sNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3067","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3068","Tag":null,"Text":"(string)MakeValidClientID(sClientID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3069","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3071","Tag":null,"Text":"(string)                'EoN ClientId: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3072","Tag":null,"Text":"(string)                sClientID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3073","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3074","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3076","Tag":null,"Text":"(string)                'EoN GroupId: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3077","Tag":null,"Text":"(string)                sGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3078","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3079","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3081","Tag":null,"Text":"(string)                'EoN NodeName: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3082","Tag":null,"Text":"(string)                sNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3083","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3084","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3086","Tag":null,"Text":"(string)                'EoN Connecting with Primary Host: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3087","Tag":null,"Text":"(string)                sPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3088","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3089","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3091","Tag":null,"Text":"(string)                'EoN Connecting to: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3092","Tag":null,"Text":"(string)                ServerUrl);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3093","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3094","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3096","Tag":null,"Text":"(string)                'EoN Connecting on port: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3097","Tag":null,"Text":"(string)                UINT_TO_STRING(ServerPort));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3098","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3099","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3101","Tag":null,"Text":"(string)                'EoN Session KeepAlive: %s sec',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3102","Tag":null,"Text":"(string)                UINT_TO_STRING(KeepAlive));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3103","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3104","Tag":null,"Text":"(string)// Setup the MQTT client connection"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3105","Tag":null,"Text":"(string)_MQTT.SetBroker(sUrl := ServerUrl,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3106","Tag":null,"Text":"(string)                uiPort := ServerPort,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3107","Tag":null,"Text":"(string)                uiKeepAlive := KeepAlive);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3108","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3109","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3111","Tag":null,"Text":"(string)                'EoN CleanSession: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3112","Tag":null,"Text":"(string)                BOOL_TO_STRING(CleanSession));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3113","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3114","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3116","Tag":null,"Text":"(string)                'EoN User: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3117","Tag":null,"Text":"(string)                WSTRING_TO_STRING(Username));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3118","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3119","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3121","Tag":null,"Text":"(string)                'EoN Pass: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3122","Tag":null,"Text":"(string)                '****************');"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3123","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3124","Tag":null,"Text":"(string)// Setup Credentials"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3125","Tag":null,"Text":"(string)_MQTT.SetSessionCredentials(xCleanSession := CleanSession,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3126","Tag":null,"Text":"(string)                            sClientID := sClientID,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3127","Tag":null,"Text":"(string)                            wsUser := Username,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3128","Tag":null,"Text":"(string)                            wsPass := Password);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3129","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3130","Tag":null,"Text":"(string)// Setup TLS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3131","Tag":null,"Text":"(string)_MQTT.SetSessionTLS(xUseTLS := UseTLS, hCert := hCert);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3133","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3134","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3136","Tag":null,"Text":"(string)                'EoN TLS Certificate Handle: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3137","Tag":null,"Text":"(string)                SEL(UseTLS, 'None', TO_STRING(hCert)));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3138","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3139","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3141","Tag":null,"Text":"(string)                'EoN TLS : %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3142","Tag":null,"Text":"(string)                SEL(UseTLS, 'Disabled', 'Enabled'));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3143","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3144","Tag":null,"Text":"(string)_EdgeControlProvider( PublishPeriod := THIS^._puiPublishPeriod^, AllMetricsList := THIS^._Metrics );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3145","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3146","Tag":null,"Text":"(string)(* set Lastwill, the _AllMetricsList is now set in "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3147","Tag":null,"Text":"(string)concrete after setting the lastWill we cannot alter "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3148","Tag":null,"Text":"(string)(add/remove metrics) AllMetricsList *)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3149","Tag":null,"Text":"(string)LastWillSet := SetLastWillAndTestament();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3150","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3152","Tag":null,"Text":"(string)                'EoN LW&T: %s ',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3153","Tag":null,"Text":"(string)                BOOL_TO_STRING(LastWillSet));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3154","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)600","Tag":null,"Text":"(string)Initialise := LastWillSet;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)3032","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3033","Tag":null,"Text":"(string)METHOD Initialise : BOOL"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3034","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3035","Tag":null,"Text":"(string)    sPrimaryHostID : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3036","Tag":null,"Text":"(string)    sGroupId : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3037","Tag":null,"Text":"(string)    sNodeName : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3038","Tag":null,"Text":"(string)    sClientID : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3039","Tag":null,"Text":"(string)    ComposeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3040","Tag":null,"Text":"(string)    LastWillSet : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)77","Tag":null,"Text":"(string)END_VAR"}}]}}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)886625dd-520f-4a19-a0e1-2e521235a58c","ParentGuid":"(Guid)af25efb2-e7d3-4d17-9b46-1d6d5c77fe77","Name":"(string)Initialise","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":[]}}}}]},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","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}","bool":"System.Boolean","Guid":"System.Guid","int":"System.Int32","string":"System.String"}},"object":{"Graph":{"@Type":"f8a58466","@Value":{"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)3041","Tag":null,"Text":"(string)Initialise := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3278","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3042","Tag":null,"Text":"(string)// Only use the corrected names throughout EoN!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3043","Tag":null,"Text":"(string)_cPrimaryHostID := SPStack.ReplaceIllegalCharsWithUnderscore(PrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3044","Tag":null,"Text":"(string)_cGroupId := SPStack.ReplaceIllegalCharsWithUnderscore(GroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3045","Tag":null,"Text":"(string)_cNodeName := SPStack.ReplaceIllegalCharsWithUnderscore(NodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3155","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3046","Tag":null,"Text":"(string)// Set Topics"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3047","Tag":null,"Text":"(string)_TopicProvider.SETSTATETopic(PrimaryHostID := _cPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3048","Tag":null,"Text":"(string)_TopicProvider.SETLASTWILLTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3051","Tag":null,"Text":"(string)_TopicProvider.SETNBIRTHTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3054","Tag":null,"Text":"(string)_TopicProvider.SETNCMDTopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3057","Tag":null,"Text":"(string)_TopicProvider.SETNDATATopic(NodeName := _cNodeName, GroupId := _cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3059","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3060","Tag":null,"Text":"(string)// Convert corrected GroupId From WSTRING TO STRING"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3061","Tag":null,"Text":"(string)sPrimaryHostID := WSTRING_TO_STRING(_cPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3062","Tag":null,"Text":"(string)sGroupId := WSTRING_TO_STRING(_cGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3063","Tag":null,"Text":"(string)sNodeName := WSTRING_TO_STRING(_cNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3156","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3064","Tag":null,"Text":"(string)//  create clientid"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3065","Tag":null,"Text":"(string)sClientID := Concat(sGroupId, sNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3068","Tag":null,"Text":"(string)MakeValidClientID(sClientID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3229","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3232","Tag":null,"Text":"(string)// Setup and log WebSockets if set"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3233","Tag":null,"Text":"(string)_MQTT.SetCommunicationMode( communicationMode := CommunicationMode );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3234","Tag":null,"Text":"(string)IF CommunicationMode = MQTT.COMMUNICATION_MODE.WEB_SOCKET THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3275","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3264","Tag":null,"Text":"(string)    _MQTT.SetWebSocketOptions( tPingInterval := PingInterval, httpProxySettings := HttpProxySettings );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3265","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3266","Tag":null,"Text":"(string)    _MQTT.SetWebSocketUrl( psWebSocketUrl := ADR( WebSocketUrl) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3276","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3267","Tag":null,"Text":"(string)ELSE   "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3274","Tag":null,"Text":"(string)    _MQTT.SetPingInterval( tPingInterval := PingInterval );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3230","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3290","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3289","Tag":null,"Text":"(string)// Log Edge Group, Nodename and the Host we wish to connect with"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3279","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3280","Tag":null,"Text":"(string)                'Edge GroupId: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3281","Tag":null,"Text":"(string)                sGroupId);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3282","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3283","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3284","Tag":null,"Text":"(string)                'Edge NodeName: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3285","Tag":null,"Text":"(string)                sNodeName);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3286","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3287","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3288","Tag":null,"Text":"(string)              'Edge Connecting with Primary Host: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3103","Tag":null,"Text":"(string)              sPrimaryHostID);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3291","Tag":null,"Text":"(string)                "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3104","Tag":null,"Text":"(string)// Setup the MQTT client connection"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3105","Tag":null,"Text":"(string)_MQTT.SetBroker(sUrl := ServerUrl,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3106","Tag":null,"Text":"(string)                uiPort := ServerPort,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3107","Tag":null,"Text":"(string)                uiKeepAlive := KeepAlive);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3179","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3124","Tag":null,"Text":"(string)// Setup Credentials"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3125","Tag":null,"Text":"(string)_MQTT.SetSessionCredentials(xCleanSession := CleanSession,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3126","Tag":null,"Text":"(string)                            sClientID := sClientID,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3127","Tag":null,"Text":"(string)                            wsUser := Username,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3128","Tag":null,"Text":"(string)                            wsPass := Password);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3129","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3130","Tag":null,"Text":"(string)// Setup TLS, if used"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3131","Tag":null,"Text":"(string)_MQTT.SetSessionTLS(xUseTLS := UseTLS, hCert := hCert);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3143","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3144","Tag":null,"Text":"(string)_EdgeControlProvider( PublishPeriod := THIS^._puiPublishPeriod^, AllMetricsList := THIS^._Metrics );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3145","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3146","Tag":null,"Text":"(string)(* set Lastwill, the _AllMetricsList is now set in "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3147","Tag":null,"Text":"(string)concrete after setting the lastWill we cannot alter "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3148","Tag":null,"Text":"(string)(add/remove metrics) AllMetricsList *)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3149","Tag":null,"Text":"(string)LastWillSet := SetLastWillAndTestament();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3292","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3150","Tag":null,"Text":"(string)WriteEdgeLog( CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3152","Tag":null,"Text":"(string)              'Edge LW&T: %s ',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3153","Tag":null,"Text":"(string)              BOOL_TO_STRING(LastWillSet));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3154","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)600","Tag":null,"Text":"(string)Initialise := LastWillSet;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)3032","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3033","Tag":null,"Text":"(string)METHOD Initialise : BOOL"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3034","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3035","Tag":null,"Text":"(string)    sPrimaryHostID : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3036","Tag":null,"Text":"(string)    sGroupId : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3037","Tag":null,"Text":"(string)    sNodeName : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3038","Tag":null,"Text":"(string)    sClientID : STRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3039","Tag":null,"Text":"(string)    ComposeError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3040","Tag":null,"Text":"(string)    LastWillSet : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)77","Tag":null,"Text":"(string)END_VAR"}}]}}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file