18 void FilePacket::DataPacket ::
20 const U32 sequenceIndex,
27 this->byteOffset = byteOffset;
28 this->dataSize = dataSize;
32 U32 FilePacket::DataPacket ::
36 this->header.bufferSize() +
37 sizeof(this->byteOffset) +
38 sizeof(this->dataSize) +
43 toBuffer(
Buffer& buffer)
const
49 return this->toSerialBuffer(serialBuffer);
70 this->data = &addr[this->fixedLengthSize()];
76 U32 FilePacket::DataPacket ::
77 fixedLengthSize()
const
80 this->header.bufferSize() +
81 sizeof(this->byteOffset) +
82 sizeof(this->dataSize);
86 toSerialBuffer(SerialBuffer& serialBuffer)
const
93 status = this->header.toSerialBuffer(serialBuffer);
97 status = serialBuffer.serialize(this->byteOffset);
101 status = serialBuffer.serialize(this->dataSize);
105 status = serialBuffer.pushBytes(this->data, dataSize);
uint8_t U8
8-bit unsigned integer
A variable-length serializable buffer.
U8 * getBuffAddr()
gets buffer address for data filling
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ FW_DESERIALIZE_SIZE_MISMATCH
Data was left in the buffer, but not enough to deserialize.