 |
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.
26 const_cast<Buffer&
>(buffer).getData(),
27 const_cast<Buffer&
>(buffer).getSize()
44 return this->startPacket;
51 return this->dataPacket;
58 return this->endPacket;
65 return this->cancelPacket;
71 this->startPacket = startPacket;
78 this->dataPacket = dataPacket;
85 this->endPacket = endPacket;
92 this->cancelPacket = cancelPacket;
99 switch (this->header.
type) {
119 switch (this->header.
type) {
121 return this->startPacket.
toBuffer(buffer);
123 return this->dataPacket.
toBuffer(buffer);
125 return this->endPacket.
toBuffer(buffer);
127 return this->cancelPacket.
toBuffer(buffer);
142 status = this->header.fromSerialBuffer(serialBuffer);
145 switch (this->header.
type) {
147 status = this->startPacket.fromSerialBuffer(serialBuffer);
150 status = this->dataPacket.fromSerialBuffer(serialBuffer);
153 status = this->endPacket.fromSerialBuffer(serialBuffer);
156 status = this->cancelPacket.fromSerialBuffer(serialBuffer);
U32 bufferSize(void) const
Compute the buffer size needed to hold this DataPacket.
U32 bufferSize(void) const
Compute the buffer size needed to hold this EndPacket.
A variable-length serializable buffer.
const Header & asHeader(void) const
SerializeStatus
forward declaration for string
SerializeStatus toBuffer(Buffer &buffer) const
const EndPacket & asEndPacket(void) const
The type of a cancel packet.
The type of a start packet.
const StartPacket & asStartPacket(void) const
The type of a data packet.
void fromDataPacket(const DataPacket &dataPacket)
The type of an end packet.
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
U32 bufferSize(void) const
void fromStartPacket(const StartPacket &startPacket)
U32 bufferSize(void) const
Compute the buffer size needed to hold this StartPacket.
const DataPacket & asDataPacket(void) const
@ FW_DESERIALIZE_TYPE_MISMATCH
Deserialized type ID didn't match.
const CancelPacket & asCancelPacket(void) const
SerializeStatus toBuffer(Buffer &buffer) const
Convert this StartPacket to a Buffer.
void fromEndPacket(const EndPacket &endPacket)
SerializeStatus toBuffer(Buffer &buffer) const
Convert this CancelPacket to a Buffer.
SerializeStatus toBuffer(Buffer &buffer) const
Convert this EndPacket to a Buffer.
void fill(void)
Fill the buffer to capacity with preexisting data.
SerializeStatus fromBuffer(const Buffer &buffer)
U32 bufferSize(void) const
Compute the buffer size needed to hold this CancelPacket.
SerializeStatus toBuffer(Buffer &buffer) const
Convert this DataPacket to a Buffer.
void fromCancelPacket(const CancelPacket &cancelPacket)