[1103e9]: / project / sparkplug™_mqtt_edge_and_host-stack_b9741afd / function_blocks_8ad6e219 / fb_payload_ad205903 / fb_payload_ddc74abf / encode_61dc3ecf / encodenextstring_3f560788 / 3f56078817c34283b25358875c878176.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 5.1 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)3f560788-17c3-4283-b253-58875c878176","ParentGuid":"(Guid)ddc74abf-e7a4-407a-a4f5-0c8338e771b9","Name":"(string)EncodeNextString","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)231","Tag":null,"Text":"(string)//i will start pointing to the first byte of where to store the varint"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)232","Tag":null,"Text":"(string)//TIP protobuf strings are always UTF8"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)233","Tag":null,"Text":"(string)startingByteOfEncodedData := i;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)234","Tag":null,"Text":"(string)//Encode size in bytes of UTF8 string as a varint (will be max )"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)235","Tag":null,"Text":"(string)StringError := STU.ConvertUTF16toUTF8(sourceStart := ADR(ValueToEncode),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)236","Tag":null,"Text":"(string)    targetStart := ADR(myProtobufBlob[i]),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)237","Tag":null,"Text":"(string)    dwTargetBufferSize := TO_DWORD(_protobufBlobUpper - i + 1),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)238","Tag":null,"Text":"(string)    bStrictConversion := FALSE);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)239","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)240","Tag":null,"Text":"(string)IF StringError <> STU.GVL_UTF8.ERR_TARGET_EXHAUSTED THEN //SizeOfUTF8.Int32 < _protobufBlobUpper - i + 1 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)241","Tag":null,"Text":"(string)    SizeOfUTF8.Int32 := STU.StrLenA(pstData := ADR(myProtobufBlob[i]));"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)242","Tag":null,"Text":"(string)    i := i + SizeOfUTF8.Int32;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)243","Tag":null,"Text":"(string)    EncodeNextString := ReencodeLengthDelimited(ProtobufFieldNumber := ProtobufFieldNumber,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)244","Tag":null,"Text":"(string)        startingByteOfEncodedData := startingByteOfEncodedData);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)245","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)246","Tag":null,"Text":"(string)    EncodeNextString := ERROR.PayloadNotEnoughProtobufBlob;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)45","Tag":null,"Text":"(string)END_IF;"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)220","Tag":null,"Text":"(string)METHOD EncodeNextString : ERROR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)221","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)222","Tag":null,"Text":"(string)    ProtobufFieldNumber : BYTE(0..15); //The highest string Field Number in sparkplug B is 15"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)223","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)224","Tag":null,"Text":"(string)VAR_INPUT CONSTANT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)225","Tag":null,"Text":"(string)    ValueToEncode : WSTRING;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)226","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)227","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)228","Tag":null,"Text":"(string)    sizeOfUTF8 : DecodedVarInt;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)229","Tag":null,"Text":"(string)    StringError : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)230","Tag":null,"Text":"(string)    startingByteOfEncodedData : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)61","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"}