[8ed4a5]: / project / co⚡e_-_sparkplug™_mqtt_edge_and_host-edge_b9741afd / function_blocks_d9bd2ff1 / fb_edge_df8b6e33 / fb_edge_af25efb2 / setlastwillandtestament_89031019 / 890310195f004ea1bd5149b0cd88751a.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 11.1 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)89031019-5f00-4ea1-bd51-49b0cd88751a","ParentGuid":"(Guid)af25efb2-e7d3-4d17-9b46-1d6d5c77fe77","Name":"(string)SetLastWillAndTestament","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)851","Tag":null,"Text":"(string)// NDEATH is the unencoded metric, contains the bdseqnum"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)852","Tag":null,"Text":"(string)NDEATHError :="}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)853","Tag":null,"Text":"(string)    _SparkplugB.GetEoNNodeDeathCertificate(NDEATH := _NDEATH // Contains Current BdSeq as value! => Store as global"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)854","Tag":null,"Text":"(string));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)855","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)856","Tag":null,"Text":"(string)IF NDEATHError <> SPStack.ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)857","Tag":null,"Text":"(string)    SPStack.WriteDeviceLog(SPStack.GC_sparkplug.CMP_EDGE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)858","Tag":null,"Text":"(string)        SPStack.CmpLog.LogClass.LOG_ERROR,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)859","Tag":null,"Text":"(string)        'EoN Publish NDEATHSPStack.ERROR: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)860","Tag":null,"Text":"(string)        TO_STRING(NDEATHError));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)861","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)862","Tag":null,"Text":"(string)    RETURN;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)863","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)864","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)865","Tag":null,"Text":"(string)_SparkplugB.Encode(Enable := TRUE);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)866","Tag":null,"Text":"(string)REPEAT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)867","Tag":null,"Text":"(string)    _SparkplugB();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)868","Tag":null,"Text":"(string)    EncodeError := _SparkplugB.EncodeError(eError => Encode_eError);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)869","Tag":null,"Text":"(string)    EncodeDone := _SparkplugB.Encoded();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)870","Tag":null,"Text":"(string)UNTIL EncodeDone OR EncodeError"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)871","Tag":null,"Text":"(string)END_REPEAT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)872","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)873","Tag":null,"Text":"(string)_SparkplugB.Encode(Enable := FALSE);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)874","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)875","Tag":null,"Text":"(string)IF EncodeError THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)876","Tag":null,"Text":"(string)    SPStack.WriteDeviceLog(SPStack.GC_sparkplug.CMP_EDGE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)877","Tag":null,"Text":"(string)        SPStack.CmpLog.LogClass.LOG_ERROR,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)878","Tag":null,"Text":"(string)        'EoN Encoding NDEATH dataSPStack.ERROR: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)879","Tag":null,"Text":"(string)        TO_STRING(Encode_eError));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)880","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)881","Tag":null,"Text":"(string)    RETURN;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)882","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)883","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)884","Tag":null,"Text":"(string)// Now retrieve the serialised blob"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)885","Tag":null,"Text":"(string)_SparkplugB.GetEncodedBlob(Blob := _Blob,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)886","Tag":null,"Text":"(string)    BlobSize := _BlobSize);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)887","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)888","Tag":null,"Text":"(string)_MQTT.SetLastWill(Topic := _TopicProvider.wsLASTWILLpublisherTopic,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)889","Tag":null,"Text":"(string)    Message := ADR(_Blob),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)890","Tag":null,"Text":"(string)    MessageSize := UDINT_TO_UINT(_BlobSize),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)891","Tag":null,"Text":"(string)    Qos := _LastWillQos,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)892","Tag":null,"Text":"(string)    Retained := _LastWillRetain);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)893","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)894","Tag":null,"Text":"(string)SPStack.WriteDeviceLog(SPStack.GC_sparkplug.CMP_EDGE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)895","Tag":null,"Text":"(string)    SPStack.CmpLog.LogClass.LOG_INFO,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)896","Tag":null,"Text":"(string)    'EoN LW&T set to publish a NDEATH payload to: %s',"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)897","Tag":null,"Text":"(string)    WSTRING_TO_STRING(_TopicProvider.wsLASTWILLpublisherTopic));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)898","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)186","Tag":null,"Text":"(string)SetLastWillAndTestament := TRUE;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)816","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)817","Tag":null,"Text":"(string)    Last Will & testament (LW&T)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)818","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)819","Tag":null,"Text":"(string)    The NDEATH messages are registered with the MQTT Server in the MQTT CONNECT packet as the LW&T. This is"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)820","Tag":null,"Text":"(string)    used by backend applications to know when an EoN node has lost its MQTT connection with the MQTT Server."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)821","Tag":null,"Text":"(string)    The following is a representation of a NDEATH message on the topic:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)822","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)823","Tag":null,"Text":"(string)        spBv1.0/Sparkplug™ B Devices/NDEATH/Raspberry Pi"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)824","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)825","Tag":null,"Text":"(string)        •   The ‘Group ID’ of this device is: Sparkplug™ B Devices"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)826","Tag":null,"Text":"(string)        •   The host ‘EoN node ID’ of this EoN node is: Raspberry Pi"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)827","Tag":null,"Text":"(string)        •   This is an NDEATH message from the MQTT Server on behalf of an EoN node"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)828","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)829","Tag":null,"Text":"(string)    Consider the following Sparkplug™ B payload in the NDEATH message shown above:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)830","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)831","Tag":null,"Text":"(string)    {"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)832","Tag":null,"Text":"(string)        \"timestamp\": 1486144502122,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)833","Tag":null,"Text":"(string)        \"metrics\": [{"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)834","Tag":null,"Text":"(string)                \"name\": \"bdSeq\","}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)835","Tag":null,"Text":"(string)                \"timestamp\": 1486144502122,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)836","Tag":null,"Text":"(string)                \"dataType\": \"UInt64\","}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)837","Tag":null,"Text":"(string)                \"value\": 0"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)838","Tag":null,"Text":"(string)                }]"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)839","Tag":null,"Text":"(string)    }"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)840","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)841","Tag":null,"Text":"(string)    The payload metric of bdSeq allows a backend application to reconcile this NDEATH with the NBIRTH that"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)842","Tag":null,"Text":"(string)    occurred previously."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)843","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)844","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)845","Tag":null,"Text":"(string)METHOD SetLastWillAndTestament : BOOL"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)846","Tag":null,"Text":"(string)VAR_INST"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)847","Tag":null,"Text":"(string)    NDEATHError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)848","Tag":null,"Text":"(string)    EncodeError : BOOL := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)849","Tag":null,"Text":"(string)    Encode_eError : SPStack.ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)850","Tag":null,"Text":"(string)    EncodeDone : BOOL := FALSE;"}},{"@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"}