[b7862c]: / project / sparkplug™_mqtt_host_b9741afd / function_blocks_8ad6e219 / fb_checkseq_57782493 / fb_checkseq_ef553972 / bdseqnum_40f728d1 / 40f728d13dab4d03b97a86d043b9d94f.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 8.8 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)40f728d1-3dab-4d03-b97a-86d043b9d94f","ParentGuid":"(Guid)ef553972-9392-40e1-ad47-eaf8d3c73bcd","Name":"(string)BDSeqNum","Properties":{"@Type":"2c41fa04:IDictionary","@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":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","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)123","Tag":null,"Text":"(string)OK := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)124","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)125","Tag":null,"Text":"(string)// Check received bdSeq Metric for Name = \"bdSeq\" according to spec "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)126","Tag":null,"Text":"(string)IF pMetric^.Name = \"bdSeq\" THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)127","Tag":null,"Text":"(string)    // Datatype"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)128","Tag":null,"Text":"(string)    IF pMetric^.DataType = SPStack.MetricDataType.UInt64 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)129","Tag":null,"Text":"(string)        // Value"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)130","Tag":null,"Text":"(string)        _CurBDSeqVal := pMetric^.UInt64;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)131","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)132","Tag":null,"Text":"(string)        CASE _CurBDSeqVal OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)133","Tag":null,"Text":"(string)            0:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)134","Tag":null,"Text":"(string)                IF _PrevBDSeqVal = 0 OR _PrevBDSeqVal = 255 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)135","Tag":null,"Text":"(string)                    // We are either birthing fresh or we have passed the 255 threshold"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)136","Tag":null,"Text":"(string)                    OK := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)137","Tag":null,"Text":"(string)                    _PrevBDSeqVal := _CurBDSeqVal;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)138","Tag":null,"Text":"(string)                END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)139","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)140","Tag":null,"Text":"(string)            1..255:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)141","Tag":null,"Text":"(string)                IF _PrevBDSeqVal = (_CurBDSeqVal - 1) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)142","Tag":null,"Text":"(string)                    OK := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)143","Tag":null,"Text":"(string)                    _PrevBDSeqVal := _CurBDSeqVal;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)144","Tag":null,"Text":"(string)                END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)145","Tag":null,"Text":"(string)        END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)146","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)147","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)148","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)149","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)5","Tag":null,"Text":"(string)DoReBirth := (OK = FALSE);"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)167","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)151","Tag":null,"Text":"(string)    a bdseq is like bookends."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)177","Tag":null,"Text":"(string)    The host application should only set the tag’s associated to the node stale (and set the node to offline) if the bdseq number matches the last NBIRTH bdSeq number. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)170","Tag":null,"Text":"(string)    The reason is that NDEATHs are stored in the MQTT Will message at QoS1 and the order in which it could arrive at the host is not guaranteed in combination with a new session. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)171","Tag":null,"Text":"(string)    If fact, it will often arrive after a new NBIRTH. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)173","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)172","Tag":null,"Text":"(string)    Consider the following:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)174","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)158","Tag":null,"Text":"(string)    Edge Node connects - sets Will NDEATH with bdSeq=0"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)159","Tag":null,"Text":"(string)    Edge Node publishes NBIRTH with bdSeq=0"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)160","Tag":null,"Text":"(string)    Edge Node disconnects ungracefully (no NDEATH is published by the Edge Node - but later it will be by the MQTT Server)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)161","Tag":null,"Text":"(string)    Edge Node connects (sets bdSeq=1)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)162","Tag":null,"Text":"(string)    Edge Node publishes NBIRTH with bdSeq=1"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)163","Tag":null,"Text":"(string)    Host application receives NDEATH with bdseq=0 - This NDEATH MUST be ignored as it is no longer valid (as denoted by the old/stale bdSeq number of '0')"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)164","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)175","Tag":null,"Text":"(string)    It is the bdSeq number that correlates a single session’s ‘book-ends’. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)176","Tag":null,"Text":"(string)    The NDEATH with an old/stale bdSeq number MUST be ignored by host applications."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)165","Tag":null,"Text":"(string)    "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)166","Tag":null,"Text":"(string)    https://eclipse-sparkplug-wg.slack.com/archives/CSVE8K97B/p1615143319039100"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)150","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)106","Tag":null,"Text":"(string)METHOD BDSeqNum"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)107","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)108","Tag":null,"Text":"(string)    pMetric : POINTER TO SPStack.FB_Metric; // Pointer to BDSeqNum Metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)109","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)110","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)111","Tag":null,"Text":"(string)    OK : BOOL; // OK"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)112","Tag":null,"Text":"(string)    DoReBirth : BOOL; // A rebirth is demanded"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)113","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)114","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)115","Tag":null,"Text":"(string)(* "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)116","Tag":null,"Text":"(string)    A generic bdSeq metric looks something like;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)117","Tag":null,"Text":"(string)    {"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)118","Tag":null,"Text":"(string)        \"name\": \"bdSeq\",\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)119","Tag":null,"Text":"(string)         timestamp\": 1486144502122,\""}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)120","Tag":null,"Text":"(string)         dataType\": \"Uint64\","}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)121","Tag":null,"Text":"(string)        \"value\": 0"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)122","Tag":null,"Text":"(string)    }"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","Tag":null,"Text":"(string)*)"}}]}}}}}}},"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"}