F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
ComPacket.cpp
Go to the documentation of this file.
1/*
2 * ComPacket.cpp
3 *
4 * Created on: May 24, 2014
5 * Author: Timothy Canham
6 */
7
9
10namespace Fw {
11
12 ComPacket::ComPacket() : m_type(FW_PACKET_UNKNOWN) {
13 }
14
16 }
17
19 return buffer.serialize(static_cast<FwPacketDescriptorType>(this->m_type));
20 }
21
24 SerializeStatus stat = buffer.deserialize(serVal);
25 if (FW_SERIALIZE_OK == stat) {
26 this->m_type = static_cast<ComPacketType>(serVal);
27 }
28 return stat;
29 }
30
31
32} /* namespace Fw */
U32 FwPacketDescriptorType
Definition FpConfig.h:53
SerializeStatus serializeBase(SerializeBufferBase &buffer) const
Definition ComPacket.cpp:18
ComPacketType m_type
Definition ComPacket.hpp:35
SerializeStatus deserializeBase(SerializeBufferBase &buffer)
Definition ComPacket.cpp:22
virtual ~ComPacket()
Definition ComPacket.cpp:15
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Definition Buffer.cpp:21
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.