[b6d3b1]: / project / sparkplug™_mqtt_host_b9741afd / function_blocks_8ad6e219 / fb_primaryhost_ec6863e3 / fb_primaryhostmqtt_5eddef6f / subscriber_e4588b20 / getsubscribermessage_01926b44 / 01926b442c6e425ea9259faf6634992e.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 7.0 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)01926b44-2c6e-425e-a925-9faf6634992e","ParentGuid":"(Guid)5eddef6f-704e-42d7-820d-1501e598bd8a","Name":"(string)GetSubscriberMessage","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)e4588b20-3d73-4ce5-9249-ed87ac44bebb"}]}}}}]},"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)511","Tag":null,"Text":"(string)//Today, we are only interested in NCMDs with exactly one metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)512","Tag":null,"Text":"(string)_SubscriberDecoderInstList.InsertElem( _SubscriberDecoderInstMetric, 0 );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)515","Tag":null,"Text":"(string)size := TO_DINT( _Subscriber_PayloadSize );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)516","Tag":null,"Text":"(string)_SubscriberDecoderInst( xEnable := TRUE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)517","Tag":null,"Text":"(string)                        protobufBlobSize := size, //TO_DINT(_NCMD_PayloadSize)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)518","Tag":null,"Text":"(string)                        myProtobufBlob := THIS^._Subscriber_Message,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)520","Tag":null,"Text":"(string)                        xDone => xDone,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)521","Tag":null,"Text":"(string)                        xBusy => xBusy,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)522","Tag":null,"Text":"(string)                        xError => xError,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)523","Tag":null,"Text":"(string)                        eError => eError );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)525","Tag":null,"Text":"(string)GetSubscriberMessage REF= _SubscriberDecoderInst;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)209","Tag":null,"Text":"(string)MessageTopic := _Subscriber_LastTopic;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)479","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)480","Tag":null,"Text":"(string)\tProvides you with the latest message and the topic it was posted in."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)481","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)482","Tag":null,"Text":"(string)\tNote there is only ever one FB_PayloadSimpleDecoder for NCMD, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)483","Tag":null,"Text":"(string)    so you must finish with the last one before you call this method again"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)484","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)485","Tag":null,"Text":"(string)\tThe returned REFERENCE TO FB_PayloadSimpleDecoder will already be decoded"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)486","Tag":null,"Text":"(string)\tso just Call its Get() methods"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)487","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)488","Tag":null,"Text":"(string)\tThe topic can differ when a subscription topicfilter is applied (#,+)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)489","Tag":null,"Text":"(string)\tUse in combination with MessageReceived"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)490","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)491","Tag":null,"Text":"(string)\tThe current implementation supports only NCMDs with exactly one "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)492","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)493","Tag":null,"Text":"(string)\tExample:\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)494","Tag":null,"Text":"(string)\t\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)495","Tag":null,"Text":"(string)\t\tIF MQTT_PubSub.MessageReceived(); THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)496","Tag":null,"Text":"(string)\t\t\tuiRecv := uiRecv+1; // tally up the total received messages counter"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)497","Tag":null,"Text":"(string)\t\t\twsReceivedMessage := MQTT_PubSub.GetMessage( MessageTopic => wsMessageTopic );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)498","Tag":null,"Text":"(string)\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)499","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)500","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)501","Tag":null,"Text":"(string)METHOD GetSubscriberMessage : REFERENCE TO SPStack.FB_PayloadSimpleDecoder"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)502","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)503","Tag":null,"Text":"(string)    MessageTopic : WSTRING(SPStack.GC_Sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)504","Tag":null,"Text":"(string)    xDone,              //FB_PayloadSimpleDecoder is decoded"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)505","Tag":null,"Text":"(string)        xBusy,          //FB_PayloadSimpleDecoder is still decoding (not used in current implementation)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)506","Tag":null,"Text":"(string)        xError : BOOL;  //FB_PayloadSimpleDecoder could not decode"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)507","Tag":null,"Text":"(string)    eError     : SPStack.ERROR; //The error returned by FB_PayloadSimpleDecoder could not decode"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)508","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)509","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)510","Tag":null,"Text":"(string)    size : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)123","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"}