--- a
+++ b/project/sparkplug™_mqtt_edge_and_host-stack_b9741afd/function_blocks_8ad6e219/fb_payload_ad205903/fb_payload_ddc74abf/encode_61dc3ecf/encodenextbinarydata_cdb52fb9/cdb52fb9b73640b196fc2c406dcb64d3.object
@@ -0,0 +1 @@
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)cdb52fb9-b736-40b1-96fc-2c406dcb64d3","ParentGuid":"(Guid)ddc74abf-e7a4-407a-a4f5-0c8338e771b9","Name":"(string)EncodeNextBinaryData","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)61dc3ecf-4aea-47a6-9ff3-993acbde812d"}]}}}}]},"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)329","Tag":null,"Text":"(string)IF ProtobufFieldNumber <> 0 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)330","Tag":null,"Text":"(string)    // Encode the field number first"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)331","Tag":null,"Text":"(string)    IF ProtobufFieldNumber > 15 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)332","Tag":null,"Text":"(string)        //If it is over 15, you gotta encode it as a varint"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)333","Tag":null,"Text":"(string)        dviTemp.UInt32 := SHL(TO_UDINT(ProtobufFieldNumber),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)334","Tag":null,"Text":"(string)            3) OR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)335","Tag":null,"Text":"(string)            TO_UDINT(BinaryWireType);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)336","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)337","Tag":null,"Text":"(string)        EncodeNextBinaryData := EncodeNextVarInt(ValueToEncode := dviTemp,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)338","Tag":null,"Text":"(string)            ProtobufFieldNumber := 0);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)339","Tag":null,"Text":"(string)    ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)340","Tag":null,"Text":"(string)        IF _protobufBlobUpper < i THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)341","Tag":null,"Text":"(string)            //ERROR, there's not even enough room to write one byte!"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)342","Tag":null,"Text":"(string)            EncodeNextBinaryData := ERROR.PayloadNotEnoughProtobufBlob;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)343","Tag":null,"Text":"(string)        ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)344","Tag":null,"Text":"(string)            //OK, now you can encode it"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)345","Tag":null,"Text":"(string)            myProtobufBlob[i] := SHL(ProtobufFieldNumber,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)346","Tag":null,"Text":"(string)                3) OR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)347","Tag":null,"Text":"(string)                BinaryWireType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)348","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)349","Tag":null,"Text":"(string)            i := i + 1;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)350","Tag":null,"Text":"(string)        END_IF;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)351","Tag":null,"Text":"(string)    END_IF;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)352","Tag":null,"Text":"(string)END_IF;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)353","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)354","Tag":null,"Text":"(string)IF EncodeNextBinaryData = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)355","Tag":null,"Text":"(string)    //Encode the size"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)356","Tag":null,"Text":"(string)    dviTemp.Int32 := NumberOfBytes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)357","Tag":null,"Text":"(string)    EncodeNextBinaryData := EncodeNextVarInt(ValueToEncode := dviTemp,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)358","Tag":null,"Text":"(string)        ProtobufFieldNumber := 0);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)359","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)360","Tag":null,"Text":"(string)    IF EncodeNextBinaryData = ERROR.NO_ERROR THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)361","Tag":null,"Text":"(string)        IF (NumberOfBytes <= (_protobufBlobUpper - i + 1)) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)362","Tag":null,"Text":"(string)            //Encode the bytes"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)363","Tag":null,"Text":"(string)            MEMUtils.MemCpy(pbyDest := ADR(ProtobufBlob[i]),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)364","Tag":null,"Text":"(string)                pbySrc := myBodyPool + TO___XWORD(StartOfBytes),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)365","Tag":null,"Text":"(string)                dwSize := TO_DWORD(NumberOfBytes));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)366","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)367","Tag":null,"Text":"(string)            i := i + NumberOfBytes;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)368","Tag":null,"Text":"(string)        END_IF;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)369","Tag":null,"Text":"(string)    END_IF;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)44","Tag":null,"Text":"(string)END_IF;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)318","Tag":null,"Text":"(string)METHOD EncodeNextBinaryData : ERROR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)319","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)320","Tag":null,"Text":"(string)    StartOfBytes : DINT; //ARRAY index in  "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)321","Tag":null,"Text":"(string)    NumberOfBytes : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)322","Tag":null,"Text":"(string)    ProtobufFieldNumber : BYTE; //Set to zero to not store the ProtobufFieldNumber"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)323","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)324","Tag":null,"Text":"(string)VAR_IN_OUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)325","Tag":null,"Text":"(string)    ProtobufBlob : ARRAY[*] OF BYTE; //array of bytes containing the protobuf payload."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)326","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)327","Tag":null,"Text":"(string)VAR CONSTANT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)328","Tag":null,"Text":"(string)    BinaryWireType : BYTE := 2;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)1","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