F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
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
27  FW_PACKET_IDLE, // !< Idle packet
28  FW_PACKET_UNKNOWN = 0xFF // !< Unknown packet
30 
31  ComPacket();
32  virtual ~ComPacket();
33 
34  protected:
36  SerializeStatus serializeBase(SerializeBufferBase& buffer) const ; // called by derived classes to serialize common fields
37  SerializeStatus deserializeBase(SerializeBufferBase& buffer); // called by derived classes to deserialize common fields
38  };
39 
40 } /* namespace Fw */
41 
42 #endif /* COMPACKET_HPP_ */
Fw::ComPacket::deserializeBase
SerializeStatus deserializeBase(SerializeBufferBase &buffer)
Definition: ComPacket.cpp:22
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Serializable.hpp
Fw::ComPacket::FW_PACKET_UNKNOWN
@ FW_PACKET_UNKNOWN
Definition: ComPacket.hpp:28
Fw::ComPacket::FW_PACKET_FILE
@ FW_PACKET_FILE
Definition: ComPacket.hpp:25
Fw::ComPacket::FW_PACKET_LOG
@ FW_PACKET_LOG
Definition: ComPacket.hpp:24
Fw::ComPacket::serializeBase
SerializeStatus serializeBase(SerializeBufferBase &buffer) const
Definition: ComPacket.cpp:18
Fw::ComPacket::FW_PACKET_COMMAND
@ FW_PACKET_COMMAND
Definition: ComPacket.hpp:22
Fw::Serializable
forward declaration
Definition: Serializable.hpp:26
Fw::ComPacket::ComPacket
ComPacket()
Definition: ComPacket.cpp:12
Fw::ComPacket
Definition: ComPacket.hpp:18
Fw::ComPacket::~ComPacket
virtual ~ComPacket()
Definition: ComPacket.cpp:15
Fw::ComPacket::m_type
ComPacketType m_type
Definition: ComPacket.hpp:35
Fw::ComPacket::FW_PACKET_PACKETIZED_TLM
@ FW_PACKET_PACKETIZED_TLM
Definition: ComPacket.hpp:26
Fw::ComPacket::FW_PACKET_TELEM
@ FW_PACKET_TELEM
Definition: ComPacket.hpp:23
Fw::ComPacket::ComPacketType
ComPacketType
Definition: ComPacket.hpp:21
Fw::ComPacket::FW_PACKET_IDLE
@ FW_PACKET_IDLE
Definition: ComPacket.hpp:27
Fw
Definition: BufferGetPortAc.cpp:6