F´ Flight Software - C/C++ Documentation NASA-v1.6.0
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.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
16namespace 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_ */
SerializeStatus serializeBase(SerializeBufferBase &buffer) const
Definition ComPacket.cpp:18
ComPacketType m_type
Definition ComPacket.hpp:35
SerializeStatus deserializeBase(SerializeBufferBase &buffer)
Definition ComPacket.cpp:22
@ FW_PACKET_PACKETIZED_TLM
Definition ComPacket.hpp:26
virtual ~ComPacket()
Definition ComPacket.cpp:15
forward declaration
Definition Buffer.cpp:21
SerializeStatus
forward declaration for string