CCSDSPack
C++ Library for CCSDS Space Packet manipulation. i.e. generation, extraction, analisys and more
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
CCSDS::SecondaryHeaderAbstract Class Referenceabstract

Abstract base class for a (Packet Utilization Standard) header. More...

#include <CCSDSSecondaryHeaderAbstract.h>

Inheritance diagram for CCSDS::SecondaryHeaderAbstract:
[legend]

Public Member Functions

virtual ~SecondaryHeaderAbstract ()=default
 
virtual ResultBool deserialize (const std::vector< std::uint8_t > &data)=0
 takes a buffer if data (vector std::uint8) and creates the header
 
virtual void update (DataField *dataField)=0
 Defines how the packet secondary header is updated using the data field as reference.
 
virtual std::uint16_t getSize () const =0
 Gets the size of the header in bytes.
 
virtual std::vector< std::uint8_t > serialize () const =0
 Retrieves the serialized representation of the header.
 
virtual std::string getType () const =0
 Retrieves the name of the packet.
 
virtual ResultBool loadFromConfig (const Config &config)=0
 
void setVariableLength (const bool bEnable)
 

Public Attributes

bool variableLength {false}
 

Detailed Description

Abstract base class for a (Packet Utilization Standard) header.

Defines the common interface for all header types.

Definition at line 20 of file CCSDSSecondaryHeaderAbstract.h.

Constructor & Destructor Documentation

◆ ~SecondaryHeaderAbstract()

virtual CCSDS::SecondaryHeaderAbstract::~SecondaryHeaderAbstract ( )
virtualdefault

Member Function Documentation

◆ deserialize()

virtual ResultBool CCSDS::SecondaryHeaderAbstract::deserialize ( const std::vector< std::uint8_t > &  data)
pure virtual

takes a buffer if data (vector std::uint8) and creates the header

Returns
Boolean true on success or Error.

Implemented in CCSDS::BufferHeader, PusA, PusB, and PusC.

◆ getSize()

virtual std::uint16_t CCSDS::SecondaryHeaderAbstract::getSize ( ) const
pure virtual

Gets the size of the header in bytes.

Returns
The size of the header in bytes.

Implemented in CCSDS::BufferHeader, PusA, PusB, and PusC.

◆ getType()

virtual std::string CCSDS::SecondaryHeaderAbstract::getType ( ) const
pure virtual

Retrieves the name of the packet.

Returns
A vector containing the header bytes. (does not include data field)

Implemented in CCSDS::BufferHeader, PusA, PusB, and PusC.

◆ loadFromConfig()

virtual ResultBool CCSDS::SecondaryHeaderAbstract::loadFromConfig ( const Config config)
pure virtual

Implemented in CCSDS::BufferHeader.

◆ serialize()

virtual std::vector< std::uint8_t > CCSDS::SecondaryHeaderAbstract::serialize ( ) const
pure virtual

Retrieves the serialized representation of the header.

Returns
A vector containing the header bytes. (does not include data field)

Implemented in CCSDS::BufferHeader, PusA, PusB, and PusC.

◆ setVariableLength()

void CCSDS::SecondaryHeaderAbstract::setVariableLength ( const bool  bEnable)
inline

◆ update()

virtual void CCSDS::SecondaryHeaderAbstract::update ( DataField dataField)
pure virtual

Defines how the packet secondary header is updated using the data field as reference.

This method is called every time a data get is performed from the packet, that is if update is enabled and method successfully registered.

Parameters
dataField

Implemented in PusA, PusB, PusC, and CCSDS::BufferHeader.

Member Data Documentation

◆ variableLength

bool CCSDS::SecondaryHeaderAbstract::variableLength {false}

Definition at line 62 of file CCSDSSecondaryHeaderAbstract.h.

62{false};

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