Diff of /project/sparkplug™_mqtt_edge_and_host-stack_b9741afd/function_blocks_8ad6e219/fb_metric_0161affa/fb_metric_c79cccec/addchangestopayload_be59d58d/be59d58d52a1498aa9e152a38e6c09c5.object [000000] .. [451759]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/project/sparkplug™_mqtt_edge_and_host-stack_b9741afd/function_blocks_8ad6e219/fb_metric_0161affa/fb_metric_c79cccec/addchangestopayload_be59d58d/be59d58d52a1498aa9e152a38e6c09c5.object
@@ -0,0 +1 @@
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)be59d58d-52a1-498a-a9e1-52a38e6c09c5","ParentGuid":"(Guid)c79cccec-ca8d-4f26-a08b-cb32d8a13152","Name":"(string)AddChangesToPayload","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)141","Tag":null,"Text":"(string)// SparkplugSimpleEncoder.AddMetricChanges has already added the metric, and its value."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)142","Tag":null,"Text":"(string)IF THIS^._NotifyThem THEN //Specifically, the value changed, not any sub objects"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)157","Tag":null,"Text":"(string)\tTHIS^.Timestamp := Timestamp;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)161","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)156","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)112","Tag":null,"Text":"(string)Metric.SetTimestamp(uliTimestamp := THIS^.Timestamp);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)113","Tag":null,"Text":"(string)Metric.SetDatatype(Datatype := THIS^.DataType);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)114","Tag":null,"Text":"(string)CASE THIS^.DataType OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)115","Tag":null,"Text":"(string)\tMetricDataType.Int8,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)116","Tag":null,"Text":"(string)\t\tMetricDataType.Int16,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)117","Tag":null,"Text":"(string)\t\tMetricDataType.Int32,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)118","Tag":null,"Text":"(string)\t\tMetricDataType.UInt8,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)119","Tag":null,"Text":"(string)\t\tMetricDataType.UInt16,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)120","Tag":null,"Text":"(string)\t\tMetricDataType.UInt32:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)121","Tag":null,"Text":"(string)\t\t//Native storage format of a decodedvarint is UInt64, so for speed I will just grab that one."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)122","Tag":null,"Text":"(string)\t\tDecoded.UInt64 := THIS^.UInt64;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)123","Tag":null,"Text":"(string)\t\tMetric.SetValueToInt(Value := Decoded);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)124","Tag":null,"Text":"(string)\tMetricDataType.Int64,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)125","Tag":null,"Text":"(string)\t\tMetricDataType.UInt64,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)126","Tag":null,"Text":"(string)\t\tMetricDataType.DateTime:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)127","Tag":null,"Text":"(string)\t\tDecoded.UInt64 := THIS^.UInt64;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)128","Tag":null,"Text":"(string)\t\tMetric.SetValueToInt64(Value := Decoded);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)129","Tag":null,"Text":"(string)\tMetricDataType.Float:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)130","Tag":null,"Text":"(string)\t\tMetric.SetValueToReal(Value := THIS^.Float);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)131","Tag":null,"Text":"(string)\tMetricDataType.Double:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)132","Tag":null,"Text":"(string)\t\tMetric.SetValueToLreal(Value := THIS^.Double);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)133","Tag":null,"Text":"(string)\tMetricDataType.Boolean:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)134","Tag":null,"Text":"(string)\t\t//Native storage format of a decodedvarint is UInt64, so for speed I will just grab that one."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)135","Tag":null,"Text":"(string)\t\tMetric.SetValueToBool(Value := THIS^.Boolean);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)136","Tag":null,"Text":"(string)\tMetricDataType.String_,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)137","Tag":null,"Text":"(string)\t\tMetricDataType.Text,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)138","Tag":null,"Text":"(string)\t\tMetricDataType.UUID:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)139","Tag":null,"Text":"(string)\t\t// String_UUID_Text := THIS^.String_;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)140","Tag":null,"Text":"(string)\t\tMetric.SetValueToWString(Value := _wString);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)110","Tag":null,"Text":"(string)END_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)144","Tag":null,"Text":"(string)THIS^.AcknowledgeNotify();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)143","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)111","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)5","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)10","Tag":null,"Text":"(string)// Currently All that is left is to add the Properties."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)12","Tag":null,"Text":"(string)//Metric.Property has changed"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)13","Tag":null,"Text":"(string)_Properties.ItterateRestart(HasNext => HasNext);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)22","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)23","Tag":null,"Text":"(string)IF HasNext THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)24","Tag":null,"Text":"(string)\t//At least one property to add, so we will need a Metric.PropertySet"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)27","Tag":null,"Text":"(string)\tTempPropertySet REF= Metric.SetPropertySetBlank();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)25","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)14","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)15","Tag":null,"Text":"(string)WHILE HasNext AND (eError = ERROR.NO_ERROR) DO"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)16","Tag":null,"Text":"(string)    _Properties.ItterateNext(itfElement => itfElement, HasNext => HasNext);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)17","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)18","Tag":null,"Text":"(string)    IF __QUERYINTERFACE(itfElement, itfProperty) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)145","Tag":null,"Text":"(string)\t\tIF itfProperty.Notify THEN // IF need to send this property"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)149","Tag":null,"Text":"(string)\t\t\tIF NOT __ISVALIDREF(TempPropertySet) THEN //if we do need to send this, we get a propertySet if we don't have one already"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)146","Tag":null,"Text":"(string)\t\t\t\t//At least one property to add, so we will need a Metric.PropertySet"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)148","Tag":null,"Text":"(string)\t\t\t\tTempPropertySet REF= Metric.SetPropertySetBlank();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)150","Tag":null,"Text":"(string)\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)35","Tag":null,"Text":"(string)\t\t\tString_Text_Key := itfProperty.Key;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)21","Tag":null,"Text":"(string)\t\t\teError := TempPropertySet.AddKey(KeyName := String_Text_Key,OwnerPayload := Payload);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)162","Tag":null,"Text":"(string)\t\t\tIF String_Text_Key = c_Quality THEN // Also update timestamp if it is the Quality Property"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)166","Tag":null,"Text":"(string)\t\t\t\tTHIS^.Timestamp := Timestamp;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)167","Tag":null,"Text":"(string)\t\t\t\tMetric.SetTimestamp(uliTimestamp := THIS^.Timestamp);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)164","Tag":null,"Text":"(string)\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)41","Tag":null,"Text":"(string)\t\t\tIF eError = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)37","Tag":null,"Text":"(string)\t\t\t\tTempPropertyValue REF= TempPropertySet.AddValueBlank(OwnerPayload := Payload, eError => eError);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)48","Tag":null,"Text":"(string)\t\t\t\tIF eError = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)49","Tag":null,"Text":"(string)\t\t\t\t\teError := TempPropertyValue.SetType(itfProperty.DataType);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)53","Tag":null,"Text":"(string)\t\t\t\t\tIF eError = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)57","Tag":null,"Text":"(string)\t\t\t\t\t\t//Add Value"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)58","Tag":null,"Text":"(string)\t\t\t\t\t\tCASE itfProperty.DataType OF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)59","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Int8,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)60","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Int16,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)61","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Int32,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)62","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.UInt8,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)63","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.UInt16,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)64","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.UInt32:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)65","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\t//Native storage format of a decodedvarint is UInt64, so for speed I will just grab that one."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)66","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\tDecoded.UInt64 := itfProperty.UInt64;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)67","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToInt(Value := Decoded);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)68","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Int64,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)69","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.UInt64,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)70","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.DateTime:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)71","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\tDecoded.UInt64 := itfProperty.UInt64;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)72","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToInt64(Value := Decoded);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)73","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Float:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)74","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToReal(Value := itfProperty.Float);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)75","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Double:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)76","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToLreal(Value := itfProperty.Double);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)77","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Boolean:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)78","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\t//Native storage format of a decodedvarint is UInt64, so for speed I will just grab that one."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)79","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToBool(Value := itfProperty.Boolean);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)80","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.String_,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)81","Tag":null,"Text":"(string)\t\t\t\t\t\t\tPropertyDataType.Text:"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)83","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\tString_Text_Key := itfProperty.String_;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)84","Tag":null,"Text":"(string)\t\t\t\t\t\t\t\teError := TempPropertyValue.SetValueToWString(Value := String_Text_Key);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)56","Tag":null,"Text":"(string)\t\t\t\t\t\tEND_CASE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)90","Tag":null,"Text":"(string)\t\t\t\t\t\tIF eError = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)54","Tag":null,"Text":"(string)\t\t\t\t\t\t\titfProperty.AcknowledgeNotify();"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)91","Tag":null,"Text":"(string)\t\t\t\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)55","Tag":null,"Text":"(string)\t\t\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)47","Tag":null,"Text":"(string)\t\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)46","Tag":null,"Text":"(string)\t\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)151","Tag":null,"Text":"(string)\t\tEND_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)20","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)11","Tag":null,"Text":"(string)END_WHILE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)40","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)39","Tag":null,"Text":"(string)AddChangesToPayload := eError;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)92","Tag":null,"Text":"(string){attribute 'hide'}"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)93","Tag":null,"Text":"(string)METHOD AddChangesToPayload : ERROR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)154","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)155","Tag":null,"Text":"(string)\tTimestamp : T_DateTime;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)153","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)94","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)95","Tag":null,"Text":"(string)\tPayload : FB_Payload;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)96","Tag":null,"Text":"(string)\tMetric  : FB_PayloadMetric;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)97","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)98","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)99","Tag":null,"Text":"(string)\tTempPropertySet : REFERENCE TO FB_PayloadPropertySet;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)100","Tag":null,"Text":"(string)\tTempPropertyValue : REFERENCE TO FB_PayloadPropertyValue;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)101","Tag":null,"Text":"(string)\titfProperty : IProperty;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)102","Tag":null,"Text":"(string)    itfElement : LinkedList.IElement;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)103","Tag":null,"Text":"(string)    HasNext : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)104","Tag":null,"Text":"(string)\teError : ERROR;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)105","Tag":null,"Text":"(string)\t"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)106","Tag":null,"Text":"(string)\tDecoded : DecodedVarInt;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)107","Tag":null,"Text":"(string)    Double : LREAL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)108","Tag":null,"Text":"(string)    Boolean : BOOL;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)109","Tag":null,"Text":"(string)    String_Text_Key : WSTRING(GC_Sparkplug.supported_string_lengths);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)159","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)160","Tag":null,"Text":"(string)VAR CONSTANT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)158","Tag":null,"Text":"(string)\tc_Quality : WSTRING(GC_Sparkplug.supported_string_lengths) := \"Quality\";"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)29","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