F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
ComPacket.hpp
Go to the documentation of this file.
1 /*
2  * ComPacket.hpp
3  *
4  * Created on: May 24, 2014
5  * Author: Timothy Canham
6  */
7 
8 #ifndef COMPACKET_HPP_
9 #define COMPACKET_HPP_
10 
12 
13 // Packet format:
14 // |32-bit packet type|packet type-specific data|
15 
16 namespace Fw {
17 
18  class ComPacket: public Serializable {
19  public:
20 
21  typedef enum {
22  FW_PACKET_COMMAND, // !< Command packet type - incoming
23  FW_PACKET_TELEM, // !< Telemetry packet type - outgoing
24  FW_PACKET_LOG, // !< Log type - outgoing
25  FW_PACKET_FILE, // !< File type - incoming and outgoing
26  FW_PACKET_PACKETIZED_TLM, // !< Packetized telemetry packet type
28  FW_PACKET_IDLE, // !< Idle packet
29  FW_PACKET_UNKNOWN = 0xFF // !< Unknown packet
31 
32  ComPacket();
33  virtual ~ComPacket();
34 
35  protected:
37  SerializeStatus serializeBase(SerializeBufferBase& buffer) const ; // called by derived classes to serialize common fields
38  SerializeStatus deserializeBase(SerializeBufferBase& buffer); // called by derived classes to deserialize common fields
39  };
40 
41 } /* namespace Fw */
42 
43 #endif /* COMPACKET_HPP_ */
SerializeStatus serializeBase(SerializeBufferBase &buffer) const
Definition: ComPacket.cpp:18
ComPacketType m_type
Definition: ComPacket.hpp:36
SerializeStatus deserializeBase(SerializeBufferBase &buffer)
Definition: ComPacket.cpp:22
@ FW_PACKET_PACKETIZED_TLM
Definition: ComPacket.hpp:26
@ FW_PACKET_DP
Data product packet.
Definition: ComPacket.hpp:27
virtual ~ComPacket()
Definition: ComPacket.cpp:15
forward declaration
SerializeStatus
forward declaration for string