[9a5d66]: / project / sparkplug™_mqtt_edge_and_host-stack_b9741afd / functions_a1970cad / addchangestopayload_75f9c1a9 / 75f9c1a90f3942adabcf3b9ec23d7825.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 8.6 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)75f9c1a9-0f39-42ad-abcf-3b9ec23d7825","ParentGuid":"(Guid)00000000-0000-0000-0000-000000000000","Name":"(string)AddChangesToPayload","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)a1970cad-fb7e-4f32-9f9c-fd8f237326f9"}]}}}}]},"TypeGuid":"(Guid)6f9dac99-8de1-4efc-8465-68ac443b7d08","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":"6f9dac99","@Value":{"SpecialFunc":{"@Type":"0db3d7bb:Enum","@Value":"None"},"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)1640","Tag":null,"Text":"(string)AddChangesToPayload := ERROR.NO_ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1641","Tag":null,"Text":"(string)ErrorDetected       := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1642","Tag":null,"Text":"(string)ChangeDetected      := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1643","Tag":null,"Text":"(string)NumberOfChanges     := 0;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1644","Tag":null,"Text":"(string)SysTimeRtc.SysTimeRtcHighResGet( pTimestamp := Timestamp );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1917","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1916","Tag":null,"Text":"(string)//Loop through the metrics"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1923","Tag":null,"Text":"(string)AllMetricsList.ItterateRestart( HasNext => HasNext );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1924","Tag":null,"Text":"(string)WHILE HasNext DO"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1925","Tag":null,"Text":"(string)\tAllMetricsList.ItterateNext( itfElement => itfElement,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1926","Tag":null,"Text":"(string)\t\t\t\t\t\t   HasNext => HasNext );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1927","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1928","Tag":null,"Text":"(string)\tIF __QUERYINTERFACE( itfElement,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1929","Tag":null,"Text":"(string)\t\t\t\t\t\t _Metric ) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1934","Tag":null,"Text":"(string)\t\t// Loop is called for every metric"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1942","Tag":null,"Text":"(string)\t\tIF _Metric.Notify THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1943","Tag":null,"Text":"(string)\t\t\tAddMetricError := pSparkplugB^._Encoder.AddMetric( TimeStamp := Timestamp,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1944","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   SparkPlugObject := _Metric );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1946","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1947","Tag":null,"Text":"(string)\t\t\tIF AddMetricError <> ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1948","Tag":null,"Text":"(string)\t\t\t\tAddChangesToPayload   := AddMetricError;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1949","Tag":null,"Text":"(string)\t\t\t\tErrorDetected := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1950","Tag":null,"Text":"(string)\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1951","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1952","Tag":null,"Text":"(string)\t\t\tNumberOfChanges := NumberOfChanges + 1;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1953","Tag":null,"Text":"(string)\t\t\t_Metric.AcknowledgeNotify();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1941","Tag":null,"Text":"(string)\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1935","Tag":null,"Text":"(string)\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1919","Tag":null,"Text":"(string)END_WHILE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1914","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)7","Tag":null,"Text":"(string)ChangeDetected := (NumberOfChanges <> 0);"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)1603","Tag":null,"Text":"(string)(*"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1604","Tag":null,"Text":"(string)    Parses every Array Element and adds it to the Encoder metrics List if the Element notifies a change (the value has been changed during runtime)."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1605","Tag":null,"Text":"(string)    When the Element has been processed, the notifier gets acknowledged. "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1606","Tag":null,"Text":"(string)    Be sure to run this code continously!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1607","Tag":null,"Text":"(string)*)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1608","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1609","Tag":null,"Text":"(string)FUNCTION AddChangesToPayload : ERROR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1610","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1626","Tag":null,"Text":"(string)    AllMetricsList      : LIST; // AllMetricsList in which the changes are added"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1627","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1628","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1629","Tag":null,"Text":"(string)    pSparkplugB : POINTER TO FB_SparkplugBSimple;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1630","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1631","Tag":null,"Text":"(string)VAR_OUTPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1632","Tag":null,"Text":"(string)    ChangeDetected  : BOOL;  // At least one Signal change has been detected;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1633","Tag":null,"Text":"(string)    ErrorDetected   : BOOL;  // Some Error Occured"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1634","Tag":null,"Text":"(string)    NumberOfChanges : UDINT; // Number of detected changes, each changes reflects 1 Signal "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1635","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1636","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1637","Tag":null,"Text":"(string)    Index          : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1638","Tag":null,"Text":"(string)    TimeStamp      : T_DateTime;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1639","Tag":null,"Text":"(string)    AddMetricError : ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1936","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1938","Tag":null,"Text":"(string)\tHasNext     : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1939","Tag":null,"Text":"(string)    FoundMetric : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1940","Tag":null,"Text":"(string)    itfElement  : IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1937","Tag":null,"Text":"(string)    _Metric     : IMetric;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","Tag":null,"Text":"(string)END_VAR"}}]}}}}},"UniqueIdGenerator":"(string)1953","POULevel":{"@Type":"8e575c5b:Enum","@Value":"Standard"},"ChildObjectGuids":{"@Type":"ArrayList:IList","@Value":[]},"AddAttributeSubsequent":"(bool)False"}},"TypeInfos":{"0db3d7bb":"{0db3d7bb-cde0-4416-9a7b-ce49a0124323}","3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","6f9dac99":"{6f9dac99-8de1-4efc-8465-68ac443b7d08}","8e575c5b":"{8e575c5b-1d37-49c6-941b-5c0ec7874787}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","ArrayList":"System.Collections.ArrayList","bool":"System.Boolean","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}