 |
F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
20 const U32 sequenceIndex,
36 this->header.bufferSize() +
37 sizeof(this->byteOffset) +
38 sizeof(this->dataSize) +
49 return this->toSerialBuffer(serialBuffer);
70 this->data = &addr[this->fixedLengthSize()];
76 U32 FilePacket::DataPacket ::
77 fixedLengthSize(
void)
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);
U32 bufferSize(void) const
Compute the buffer size needed to hold this DataPacket.
Header header
The packet header.
A variable-length serializable buffer.
void initialize(const U32 sequenceIndex, const U32 byteOffset, const U16 dataSize, const U8 *const data)
Initialize a data packet.
SerializeStatus
forward declaration for string
@ FW_DESERIALIZE_SIZE_MISMATCH
Data was left in in the buffer, but not enough to deserialize.
U8 * getBuffAddr(void)
gets buffer address for data filling
uint8_t U8
8-bit unsigned integer
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
U32 byteOffset
The byte offset of the packet data into the destination file.
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
const U8 * data
Pointer to the file data.
SerializeStatus toBuffer(Buffer &buffer) const
Convert this DataPacket to a Buffer.
U16 dataSize
The size of the file data in the packet.