F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComCfg::Apid Class Reference

APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF. More...

#include <default/config/ApidEnumAc.hpp>

Inheritance diagram for ComCfg::Apid:
Fw::Serializable

Public Types

enum  T {
  FW_PACKET_COMMAND = 0, FW_PACKET_TELEM = 1, FW_PACKET_LOG = 2, FW_PACKET_FILE = 3,
  FW_PACKET_PACKETIZED_TLM = 4, FW_PACKET_DP = 5, FW_PACKET_IDLE = 6, FW_PACKET_HAND = 254,
  FW_PACKET_UNKNOWN = 255, SPP_IDLE_PACKET = 2047, INVALID_UNINITIALIZED = 2048
}
 The raw enum type. More...
 
enum  { SERIALIZED_SIZE = sizeof(SerialType), NUM_CONSTANTS = 11 }
 
typedef U16 SerialType
 The serial representation type. More...
 
typedef T t
 For backwards compatibility. More...
 
- Public Types inherited from Fw::Serializable
using SizeType = FwSizeType
 

Public Member Functions

 Apid ()
 Constructor (default value of INVALID_UNINITIALIZED) More...
 
 Apid (const T e1)
 Constructor (user-provided value) More...
 
 Apid (const Apid &obj)
 Copy constructor. More...
 
Apidoperator= (const Apid &obj)
 Copy assignment operator (object) More...
 
Apidoperator= (T e1)
 Copy assignment operator (raw enum) More...
 
 operator T () const
 Conversion operator. More...
 
bool operator== (T e1) const
 Equality operator. More...
 
bool operator!= (T e1) const
 Inequality operator. More...
 
bool isValid () const
 Check raw enum value for validity. More...
 
Fw::SerializeStatus serializeTo (Fw::SerializeBufferBase &buffer) const
 Serialize raw enum value to SerialType. More...
 
Fw::SerializeStatus deserializeFrom (Fw::SerializeBufferBase &buffer)
 Deserialize raw enum value from SerialType. More...
 
- Public Member Functions inherited from Fw::Serializable
 DEPRECATED (SerializeStatus serialize(SerializeBufferBase &buffer) const, "Use serializeTo(SerializeBufferBase& buffer) instead")
 
 DEPRECATED (SerializeStatus deserialize(SerializeBufferBase &buffer), "Use deserializeFrom(SerializeBufferBase& buffer) instead")
 

Public Attributes

T e
 The raw enum value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::Serializable
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 destructor More...
 

Detailed Description

APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.

Definition at line 17 of file ApidEnumAc.hpp.

Member Typedef Documentation

◆ SerialType

The serial representation type.

Definition at line 28 of file ApidEnumAc.hpp.

◆ t

typedef T ComCfg::Apid::t

For backwards compatibility.

Definition at line 57 of file ApidEnumAc.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SERIALIZED_SIZE 

The size of the serial representation.

NUM_CONSTANTS 

The number of enumerated constants.

Definition at line 65 of file ApidEnumAc.hpp.

◆ T

The raw enum type.

Enumerator
FW_PACKET_COMMAND 

Command packet type - incoming.

FW_PACKET_TELEM 

Telemetry packet type - outgoing.

FW_PACKET_LOG 

Log type - outgoing.

FW_PACKET_FILE 

File type - incoming and outgoing.

FW_PACKET_PACKETIZED_TLM 

Packetized telemetry packet type.

FW_PACKET_DP 

Data Product packet type.

FW_PACKET_IDLE 

F Prime idle.

FW_PACKET_HAND 

F Prime handshake.

FW_PACKET_UNKNOWN 

F Prime unknown packet.

SPP_IDLE_PACKET 

Per Space Packet Standard, all 1s (11bits) is reserved for Idle Packets.

INVALID_UNINITIALIZED 

Anything equal or higher value is invalid and should not be used.

Definition at line 31 of file ApidEnumAc.hpp.

Constructor & Destructor Documentation

◆ Apid() [1/3]

ComCfg::Apid::Apid ( )
inline

Constructor (default value of INVALID_UNINITIALIZED)

Definition at line 79 of file ApidEnumAc.hpp.

◆ Apid() [2/3]

ComCfg::Apid::Apid ( const T  e1)
inline

Constructor (user-provided value)

Parameters
e1The raw enum value

Definition at line 85 of file ApidEnumAc.hpp.

◆ Apid() [3/3]

ComCfg::Apid::Apid ( const Apid obj)
inline

Copy constructor.

Parameters
objThe source object

Definition at line 93 of file ApidEnumAc.hpp.

Member Function Documentation

◆ deserializeFrom()

Fw::SerializeStatus ComCfg::Apid::deserializeFrom ( Fw::SerializeBufferBase buffer)
virtual

Deserialize raw enum value from SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 66 of file ApidEnumAc.cpp.

◆ isValid()

bool ComCfg::Apid::isValid ( ) const

Check raw enum value for validity.

Definition at line 49 of file ApidEnumAc.cpp.

◆ operator T()

ComCfg::Apid::operator T ( ) const
inline

Conversion operator.

Definition at line 117 of file ApidEnumAc.hpp.

◆ operator!=()

bool ComCfg::Apid::operator!= ( T  e1) const
inline

Inequality operator.

Definition at line 129 of file ApidEnumAc.hpp.

◆ operator=() [1/2]

Apid & ComCfg::Apid::operator= ( const Apid obj)

Copy assignment operator (object)

Parameters
objThe source object

Definition at line 20 of file ApidEnumAc.cpp.

◆ operator=() [2/2]

Apid & ComCfg::Apid::operator= ( T  e1)

Copy assignment operator (raw enum)

Parameters
e1The enum value

Definition at line 27 of file ApidEnumAc.cpp.

◆ operator==()

bool ComCfg::Apid::operator== ( T  e1) const
inline

Equality operator.

Definition at line 123 of file ApidEnumAc.hpp.

◆ serializeTo()

Fw::SerializeStatus ComCfg::Apid::serializeTo ( Fw::SerializeBufferBase buffer) const
virtual

Serialize raw enum value to SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 57 of file ApidEnumAc.cpp.

Member Data Documentation

◆ e

T ComCfg::Apid::e

The raw enum value.

Definition at line 179 of file ApidEnumAc.hpp.


The documentation for this class was generated from the following files: