Diff of /project/sparkplug™_mqtt_host_b9741afd/function_blocks_8ad6e219/fb_primaryhost_ec6863e3/fb_primaryhost_948b5570/online_aec1287d/online_active_9af9701f/9af9701f8dc44e899172d5f6e1b143f5.object [3b3737] .. [9fbd90]  Maximize  Restore

Switch to side-by-side view

--- a/project/sparkplug™_mqtt_host_b9741afd/function_blocks_8ad6e219/fb_primaryhost_ec6863e3/fb_primaryhost_948b5570/online_aec1287d/online_active_9af9701f/9af9701f8dc44e899172d5f6e1b143f5.object
+++ b/project/sparkplug™_mqtt_host_b9741afd/function_blocks_8ad6e219/fb_primaryhost_ec6863e3/fb_primaryhost_948b5570/online_aec1287d/online_active_9af9701f/9af9701f8dc44e899172d5f6e1b143f5.object
@@ -1 +1 @@
-{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)9af9701f-8dc4-4e89-9172-d5f6e1b143f5","ParentGuid":"(Guid)948b5570-7cc5-435c-9690-793c65eb192c","Name":"(string)ONLINE_active","Properties":{"@Type":"2c41fa04:IDictionary","@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)aec1287d-0a0d-4838-a613-8d9d9e15bf97"}]}}}}]},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","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)6","Tag":null,"Text":"(string)IF _MQTT.PublisherBusy() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)35","Tag":null,"Text":"(string)\t; // NO DRAMAS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)34","Tag":null,"Text":"(string)ELSIF _MQTT.PublisherDone() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)36","Tag":null,"Text":"(string)\t//SUCCESS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)39","Tag":null,"Text":"(string)\tTHIS^.PublisherDone := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)41","Tag":null,"Text":"(string)\t_MQTT.DisablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)42","Tag":null,"Text":"(string)\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)37","Tag":null,"Text":"(string)ELSIF _MQTT.PublisherError() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)38","Tag":null,"Text":"(string)\t//ERROR :("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)40","Tag":null,"Text":"(string)\tTHIS^.PublisherError := SPStack.ERROR.MQTTPublisherReturnedError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)44","Tag":null,"Text":"(string)\t_MQTT.DisablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)43","Tag":null,"Text":"(string)\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)33","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)45","Tag":null,"Text":"(string)\t//Publisher is idle, so look for a new message"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)32","Tag":null,"Text":"(string)\tIF THIS^.readyForPublish()"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)7","Tag":null,"Text":"(string)\tAND_THEN THIS^.getMessage(pPayload => _pPayload,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)8","Tag":null,"Text":"(string)\t    \t                  pTopic   => _pTopic,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)9","Tag":null,"Text":"(string)\t\t\t\t\t\t\t  timeout  => )"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)10","Tag":null,"Text":"(string)\tTHEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)11","Tag":null,"Text":"(string)\t\t//publish the payload"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)12","Tag":null,"Text":"(string)\t\t//_pPayload^.SetSeq(Seq := _sparkplugb.GetSeqNum()); //NOT needed for xCMDs"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)30","Tag":null,"Text":"(string)\t\t//encode the blob"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)15","Tag":null,"Text":"(string)\t\t_pPayload^( xEnable:= TRUE, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17","Tag":null,"Text":"(string)\t\t\t\t\tprotobufBlobSize:= _xCMDSize,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)18","Tag":null,"Text":"(string)\t\t\t\t\tmyProtobufBlob:= _xCMDBlob, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)19","Tag":null,"Text":"(string)\t\t\t\t\txDone=> _xCMDEncDone, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)20","Tag":null,"Text":"(string)\t\t\t\t\txBusy=> , "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)21","Tag":null,"Text":"(string)\t\t\t\t\txError=> _xCMDEncxErr, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)13","Tag":null,"Text":"(string)\t\t\t\t\teError=> _xCMDEncError);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)27","Tag":null,"Text":"(string)\t\t// Does not _actually_ publish.  just loads the values into the publisher"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)22","Tag":null,"Text":"(string)\t\t_MQTT.Publish( Topic := _pTopic^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)23","Tag":null,"Text":"(string)\t\t\t\t\t   pbMessage := ADR(_xCMDBlob),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)24","Tag":null,"Text":"(string)\t\t\t\t\t   MessageSize := TO_UDINT(_xCMDSize),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)25","Tag":null,"Text":"(string)\t\t\t\t\t   Qos         := MQTT.MQTT_QOS.QoS0,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)26","Tag":null,"Text":"(string)\t\t\t\t\t   Retained    := FALSE );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)28","Tag":null,"Text":"(string)\t\t// Enables the publisher.  Note that we checked ABOVE that the publisher is not yet enabled"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)29","Tag":null,"Text":"(string)\t\t_MQTT.EnablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)46","Tag":null,"Text":"(string)\t\t// we call _MQTT() so that the publisher actually gets immediately active"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)31","Tag":null,"Text":"(string)\t\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)14","Tag":null,"Text":"(string)\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)5","Tag":null,"Text":"(string)END_IF"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)2","Tag":null,"Text":"(string)METHOD ONLINE_active"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)4","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)9af9701f-8dc4-4e89-9172-d5f6e1b143f5","ParentGuid":"(Guid)948b5570-7cc5-435c-9690-793c65eb192c","Name":"(string)ONLINE_active","Properties":{"@Type":"2c41fa04:IDictionary","@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)aec1287d-0a0d-4838-a613-8d9d9e15bf97"}]}}}}]},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","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)6","Tag":null,"Text":"(string)IF _MQTT.PublisherBusy() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)35","Tag":null,"Text":"(string)\t; // NO DRAMAS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)34","Tag":null,"Text":"(string)ELSIF _MQTT.PublisherDone() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)36","Tag":null,"Text":"(string)\t//SUCCESS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)39","Tag":null,"Text":"(string)\tTHIS^.PublisherDone := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)41","Tag":null,"Text":"(string)\t_MQTT.DisablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)42","Tag":null,"Text":"(string)\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)37","Tag":null,"Text":"(string)ELSIF _MQTT.PublisherError() THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)38","Tag":null,"Text":"(string)\t//ERROR :("}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)40","Tag":null,"Text":"(string)\tTHIS^.PublisherError := SPStack.ERROR.MQTTPublisherReturnedError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)44","Tag":null,"Text":"(string)\t_MQTT.DisablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)43","Tag":null,"Text":"(string)\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)33","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)45","Tag":null,"Text":"(string)\t//Publisher is idle, so look for a new message"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)32","Tag":null,"Text":"(string)\tIF THIS^.readyForPublish()"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)7","Tag":null,"Text":"(string)\tAND_THEN THIS^.getMessage(pPayload => _pPayload,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)8","Tag":null,"Text":"(string)\t    \t                  pTopic   => _pTopic,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)9","Tag":null,"Text":"(string)\t\t\t\t\t\t\t  timeout  => )"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)10","Tag":null,"Text":"(string)\tTHEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)11","Tag":null,"Text":"(string)\t\t//publish the payload"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)12","Tag":null,"Text":"(string)\t\t//_pPayload^.SetSeq(Seq := _sparkplugb.GetSeqNum()); //NOT needed for xCMDs"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)30","Tag":null,"Text":"(string)\t\t//encode the blob"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)15","Tag":null,"Text":"(string)\t\t_pPayload^( xEncode:= TRUE, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17","Tag":null,"Text":"(string)\t\t\t\t\tprotobufBlobSize:= _xCMDSize,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)18","Tag":null,"Text":"(string)\t\t\t\t\tmyProtobufBlob:= _xCMDBlob, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)19","Tag":null,"Text":"(string)\t\t\t\t\txEncodeDone=> _xCMDEncDone, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)20","Tag":null,"Text":"(string)\t\t\t\t\txEncodeBusy=> , "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)21","Tag":null,"Text":"(string)\t\t\t\t\txEncodeError=> _xCMDEncxErr, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)13","Tag":null,"Text":"(string)\t\t\t\t\teEncodeError=> _xCMDEncError);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)27","Tag":null,"Text":"(string)\t\t// Does not _actually_ publish.  just loads the values into the publisher"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)22","Tag":null,"Text":"(string)\t\t_MQTT.Publish( Topic := _pTopic^,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)23","Tag":null,"Text":"(string)\t\t\t\t\t   pbMessage := ADR(_xCMDBlob),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)24","Tag":null,"Text":"(string)\t\t\t\t\t   MessageSize := TO_UDINT(_xCMDSize),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)25","Tag":null,"Text":"(string)\t\t\t\t\t   Qos         := MQTT.MQTT_QOS.QoS0,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)26","Tag":null,"Text":"(string)\t\t\t\t\t   Retained    := FALSE );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)28","Tag":null,"Text":"(string)\t\t// Enables the publisher.  Note that we checked ABOVE that the publisher is not yet enabled"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)29","Tag":null,"Text":"(string)\t\t_MQTT.EnablePublisher();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)46","Tag":null,"Text":"(string)\t\t// we call _MQTT() so that the publisher actually gets immediately active"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)31","Tag":null,"Text":"(string)\t\t_MQTT();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)14","Tag":null,"Text":"(string)\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)5","Tag":null,"Text":"(string)END_IF"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)2","Tag":null,"Text":"(string)METHOD ONLINE_active"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)3","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)4","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