[247745]: / project / sparkplug™_mqtt_edge_and_host-stack_b9741afd / function_blocks_8ad6e219 / fb_payload_ad205903 / fb_payload_ddc74abf / reencodelengthdelimited_d2ef057c / d2ef057c168b4b7e9c4a35b4a903fe25.object  Maximize  Restore  History

Download this file

1 lines (1 with data), 6.2 kB

1
{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)d2ef057c-168b-4b7e-9c4a-35b4a903fe25","ParentGuid":"(Guid)ddc74abf-e7a4-407a-a4f5-0c8338e771b9","Name":"(string)ReencodeLengthDelimited","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)314","Tag":null,"Text":"(string)encodedfieldnumber.UInt32 := SHL(ProtobufFieldNumber,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)315","Tag":null,"Text":"(string)    3) OR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)316","Tag":null,"Text":"(string)    LengthDelimitedWireType;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)317","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)318","Tag":null,"Text":"(string)length.Int32 := i - startingByteOfEncodedData;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)319","Tag":null,"Text":"(string)shift := CalculateVarIntSize(Value := encodedfieldnumber) + CalculateVarIntSize(Value := length);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)320","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)321","Tag":null,"Text":"(string)IF (i - 1 + shift) <= THIS^._protobufBlobUpper THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)322","Tag":null,"Text":"(string)    //move everything"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)323","Tag":null,"Text":"(string)    FOR j := (i - 1) TO startingByteOfEncodedData BY -1 DO"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)324","Tag":null,"Text":"(string)        myProtobufBlob[j + shift] := myProtobufBlob[j];"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)325","Tag":null,"Text":"(string)    END_FOR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)326","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)327","Tag":null,"Text":"(string)    //we want to start encoding again from startingByteOfEncodedData"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)328","Tag":null,"Text":"(string)    i := startingByteOfEncodedData;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)329","Tag":null,"Text":"(string)    //encode the fieldnumber"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)330","Tag":null,"Text":"(string)    EncodeNextVarInt(ValueToEncode := encodedfieldnumber,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)331","Tag":null,"Text":"(string)        ProtobufFieldNumber := 0);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)332","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)333","Tag":null,"Text":"(string)    //encode the length"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)334","Tag":null,"Text":"(string)    EncodeNextVarInt(ValueToEncode := length,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)335","Tag":null,"Text":"(string)        ProtobufFieldNumber := 0);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)336","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)337","Tag":null,"Text":"(string)    //update i to point to one after the final byte of the lengthdelimited object"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)338","Tag":null,"Text":"(string)    i := (i + length.Int32);"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)339","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)340","Tag":null,"Text":"(string)    ReencodeLengthDelimited := ERROR.PayloadNotEnoughProtobufBlob;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)341","Tag":null,"Text":"(string)    i := THIS^._protobufBlobUpper + 1;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)25","Tag":null,"Text":"(string)END_IF"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)299","Tag":null,"Text":"(string)//shifts the data you just encoded enough to fit the field number and length in"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)300","Tag":null,"Text":"(string)//and then encodes these two things"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)301","Tag":null,"Text":"(string)METHOD ReencodeLengthDelimited : ERROR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)302","Tag":null,"Text":"(string)VAR_INPUT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)303","Tag":null,"Text":"(string)    ProtobufFieldNumber : UDINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)304","Tag":null,"Text":"(string)    startingByteOfEncodedData : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)305","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)306","Tag":null,"Text":"(string)VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)307","Tag":null,"Text":"(string)    j : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)308","Tag":null,"Text":"(string)    shift : DINT;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)309","Tag":null,"Text":"(string)    encodedfieldnumber : DecodedVarInt;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)310","Tag":null,"Text":"(string)    length : DecodedVarInt;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)311","Tag":null,"Text":"(string)END_VAR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)312","Tag":null,"Text":"(string)VAR CONSTANT"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)313","Tag":null,"Text":"(string)    LengthDelimitedWireType : UDINT := 2;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)19","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"}