F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
8 #include <Fw/Com/ComPacket.hpp>
9 
10 namespace 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:87
SerializeStatus serializeBase(SerializeBufferBase &buffer) const
Definition: ComPacket.cpp:18
ComPacketType m_type
Definition: ComPacket.hpp:36
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
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.