Diff of /project/sparkplug™_mqtt_edge_b9741afd/function_blocks_d9bd2ff1/fb_edge_df8b6e33/fb_edge_af25efb2/initialise_886625dd/886625dd520f4a19a0e12e521235a58c.object [a48499] .. [ac6d98]  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":{"TextBlobForSerialisation":"(string)Initialise := FALSE;\n\n// Only use the corrected names throughout EoN!\n_cPrimaryHostID := SPStack.ReplaceIllegalCharsWithUnderscore(PrimaryHostID);\n_cGroupId := SPStack.ReplaceIllegalCharsWithUnderscore(GroupId);\n_cNodeName := SPStack.ReplaceIllegalCharsWithUnderscore(NodeName);\n\n// Set Topics\n_TopicProvider.SETSTATETopic(PrimaryHostID := _cPrimaryHostID);\n_TopicProvider.SETLASTWILLTopic(NodeName := _cNodeName, GroupId := _cGroupId);\n_TopicProvider.SETNBIRTHTopic(NodeName := _cNodeName, GroupId := _cGroupId);\n_TopicProvider.SETNCMDTopic(NodeName := _cNodeName, GroupId := _cGroupId);\n_TopicProvider.SETNDATATopic(NodeName := _cNodeName, GroupId := _cGroupId);\n\n// Convert corrected GroupId From WSTRING TO STRING\nsPrimaryHostID := WSTRING_TO_STRING(_cPrimaryHostID);\nsGroupId := WSTRING_TO_STRING(_cGroupId);\nsNodeName := WSTRING_TO_STRING(_cNodeName);\n\n//  create clientid\nsClientID := Concat(sGroupId, sNodeName);\nMakeValidClientID(sClientID);\n\n_MQTT.SetCommunicationMode( communicationMode := CommunicationMode );\nIF CommunicationMode = MQTT.COMMUNICATION_MODE.WEB_SOCKET THEN\n    // Websockets    \n    _MQTT.SetWebSocketUrl( URI := ServerUrl );\n    \n    _MQTT.SetWebSocketOptions( tPingInterval := PingInterval, httpProxySettings := HttpProxySettings );\n    \nELSE\n    // TCP settings\n    _MQTT.SetPingInterval( tPingInterval := PingInterval );\nEND_IF\n\n// Setup TCP client connection\n_MQTT.SetBroker(sUrl := ServerUrl,\n                uiPort := ServerPort,\n                uiKeepAlive := KeepAlive);  \n\n// Log Edge Group, Nodename and the Host we wish to connect with\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n                'Edge GroupId: %s',\n                sGroupId);\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n                'Edge NodeName: %s',\n                sNodeName);\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge Connecting with Primary Host: %s',\n              sPrimaryHostID);\n\n// Setup Credentials\n_MQTT.SetSessionCredentials(xCleanSession := CleanSession,\n                            sClientID := sClientID,\n                            wsUser := Username,\n                            wsPass := Password);\n\n// Setup TLS\n_MQTT.SetSessionTLS(xUseTLS := UseTLS, hCert := hCert);\n\n_EdgeControlProvider( PublishPeriod := THIS^._puiPublishPeriod^, AllMetricsList := THIS^._Metrics );\n\n(* set Lastwill, the _AllMetricsList is now set in \nconcrete after setting the lastWill we cannot alter \n(add/remove metrics) AllMetricsList *)\nLastWillSet := SetLastWillAndTestament();\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge LW&T: %s ',\n              BOOL_TO_STRING(LastWillSet));\n\nInitialise := LastWillSet;","LineInfoPersistence":"(string)886625dd-520f-4a19-a0e1-2e521235a58c_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string){attribute 'hide'}\nMETHOD Initialise : BOOL\nVAR\n   sPrimaryHostID : STRING;\n   sGroupId : STRING;\n   sNodeName : STRING;\n   sClientID : STRING;\n   ComposeError : SPStack.ERROR;\n   LastWillSet : BOOL;\nEND_VAR","LineInfoPersistence":"(string)886625dd-520f-4a19-a0e1-2e521235a58c_Decl_LineIds"}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","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":{"TextBlobForSerialisation":"(string)Initialise := FALSE;\n\n// Only use the corrected names throughout EoN!\n_cPrimaryHostID := SPStack.ReplaceIllegalCharsWithUnderscore( PrimaryHostID );\n_cGroupId := SPStack.ReplaceIllegalCharsWithUnderscore( GroupId );\n_cNodeName := SPStack.ReplaceIllegalCharsWithUnderscore( NodeName );\n\n// Set Topics\n_TopicProvider.SETSTATETopic( PrimaryHostID := _cPrimaryHostID );\n_TopicProvider.SETLASTWILLTopic( NodeName := _cNodeName, GroupId := _cGroupId );\n_TopicProvider.SETNBIRTHTopic( NodeName := _cNodeName, GroupId := _cGroupId );\n_TopicProvider.SETNCMDTopic( NodeName := _cNodeName, GroupId := _cGroupId );\n_TopicProvider.SETNDATATopic( NodeName := _cNodeName, GroupId := _cGroupId );\n\n// Convert corrected GroupId From WSTRING TO STRING\nsPrimaryHostID := WSTRING_TO_STRING( _cPrimaryHostID );\nsGroupId := WSTRING_TO_STRING( _cGroupId );\nsNodeName := WSTRING_TO_STRING( _cNodeName );\n\n//  create clientid\nsClientID := Concat( sGroupId, sNodeName );\nMakeValidClientID( sClientID );\n\n_MQTT.SetCommunicationMode( communicationMode := CommunicationMode );\n\nIF CommunicationMode = MQTT.COMMUNICATION_MODE.WEB_SOCKET THEN\n    // Websockets    \n    _MQTT.SetWebSocketUrl( URI := ServerUrl );\n\n    _MQTT.SetWebSocketOptions( tPingInterval := PingInterval, httpProxySettings := HttpProxySettings );\n\nELSE\n    // TCP settings\n    _MQTT.SetPingInterval( tPingInterval := PingInterval );\nEND_IF\n\n// Setup TCP client connection\n_MQTT.SetBroker( sUrl := ServerUrl,\n                 uiPort := ServerPort,\n                 uiKeepAlive := KeepAlive );\n\n// Log Edge Group, Nodename and the Host we wish to connect with\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge GroupId: %s',\n              sGroupId );\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge NodeName: %s',\n              sNodeName );\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge Connecting with Primary Host: %s',\n              sPrimaryHostID );\n\n// Setup Credentials\n_MQTT.SetSessionCredentials( xCleanSession := CleanSession,\n                             sClientID := sClientID,\n                             wsUser := Username,\n                             wsPass := Password );\n\n// Setup TLS\n_MQTT.SetSessionTLS( xUseTLS := UseTLS, hCert := hCert );\n\n_EdgeControlProvider( PublishPeriod := THIS^._puiPublishPeriod^, AllMetricsList := THIS^._Metrics );\n\n(* set Lastwill, the _AllMetricsList is now set in \nconcrete after setting the lastWill we cannot alter \n(add/remove metrics) AllMetricsList *)\nLastWillSet := SetLastWillAndTestament();\n\nWriteEdgeLog( CmpLog.LogClass.LOG_INFO,\n              'Edge LW&T: %s ',\n              BOOL_TO_STRING( LastWillSet ) );\n\nInitialise := LastWillSet;","LineInfoPersistence":"(string)886625dd-520f-4a19-a0e1-2e521235a58c_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string){attribute 'hide'}\nMETHOD Initialise : BOOL\nVAR\n    sPrimaryHostID : STRING;\n    sGroupId : STRING;\n    sNodeName : STRING;\n    sClientID : STRING;\n    ComposeError : SPStack.ERROR;\n    LastWillSet : BOOL;\nEND_VAR","LineInfoPersistence":"(string)886625dd-520f-4a19-a0e1-2e521235a58c_Decl_LineIds"}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file