 |
F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
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);
const CancelPacket & asCancelPacket() const
U32 bufferSize() const
Compute the buffer size needed to hold this CancelPacket.
A variable-length serializable buffer.
SerializeStatus
forward declaration for string
SerializeStatus toBuffer(Buffer &buffer) const
The type of a cancel packet.
const EndPacket & asEndPacket() const
The type of a start packet.
The type of a data packet.
void fromDataPacket(const DataPacket &dataPacket)
The type of an end packet.
const DataPacket & asDataPacket() const
U32 bufferSize() const
Compute the buffer size needed to hold this EndPacket.
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
U32 bufferSize() const
Compute the buffer size needed to hold this DataPacket.
U32 bufferSize() const
Compute the buffer size needed to hold this StartPacket.
void fill()
Fill the buffer to capacity with preexisting data.
void fromStartPacket(const StartPacket &startPacket)
@ FW_DESERIALIZE_TYPE_MISMATCH
Deserialized type ID didn't match.
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.
const Header & asHeader() const
SerializeStatus toBuffer(Buffer &buffer) const
Convert this EndPacket to a Buffer.
SerializeStatus fromBuffer(const Buffer &buffer)
SerializeStatus toBuffer(Buffer &buffer) const
Convert this DataPacket to a Buffer.
const StartPacket & asStartPacket() const
void fromCancelPacket(const CancelPacket &cancelPacket)