F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fw::DpContainer Class Reference

A data product Container. More...

#include <Fw/Dp/DpContainer.hpp>

Classes

struct  Header
 A DpContainer packet header. More...
 

Public Member Functions

 DpContainer (FwDpIdType id, const Fw::Buffer &buffer)
 Constructor for initialized container.
 
 DpContainer ()
 Constructor for container with default initialization.
 
FwDpIdType getId () const
 
FwSizeType getDataSize () const
 
Fw::Buffer getBuffer () const
 
FwSizeType getPacketSize () const
 Get the packet size corresponding to the data size.
 
FwDpPriorityType getPriority () const
 
Fw::Time getTimeTag () const
 
DpCfg::ProcType::SerialType getProcTypes () const
 
Fw::SerializeStatus deserializeHeader ()
 
void serializeHeader ()
 
void setId (FwDpIdType id)
 Set the id.
 
void setPriority (FwDpPriorityType priority)
 Set the priority.
 
void setTimeTag (Fw::Time timeTag)
 Set the time tag.
 
void setProcTypes (DpCfg::ProcType::SerialType procTypes)
 Set the processing types bit mask.
 
void setDpState (DpState dpState)
 Set the data product state.
 
void setDataSize (FwSizeType dataSize)
 Set the data size.
 
void setBuffer (const Buffer &buffer)
 Set the packet buffer.
 
void updateHeaderHash ()
 Update the header hash.
 
FwSizeType getDataHashOffset () const
 Get the data hash offset.
 
void updateDataHash ()
 Update the data hash.
 

Static Public Member Functions

static constexpr FwSizeType getPacketSizeForDataSize (FwSizeType dataSize)
 Get the packet size for a given data size.
 

Public Attributes

Header::UserData m_userData
 The user data.
 

Static Public Attributes

static constexpr FwSizeType HEADER_HASH_OFFSET = Header::SIZE
 The header hash offset.
 
static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH
 The data offset.
 
static constexpr FwSizeType MIN_PACKET_SIZE = Header::SIZE + 2 * HASH_DIGEST_LENGTH
 

Protected Attributes

FwDpIdType m_id
 
FwDpPriorityType m_priority
 The priority.
 
Time m_timeTag
 The time tag.
 
DpCfg::ProcType::SerialType m_procTypes
 The processing types.
 
DpState m_dpState
 The data product state.
 
FwSizeType m_dataSize
 The data size.
 
Buffer m_buffer
 The packet buffer.
 
Fw::ExternalSerializeBuffer m_dataBuffer
 The data buffer.
 

Detailed Description

A data product Container.

Definition at line 20 of file DpContainer.hpp.

Constructor & Destructor Documentation

◆ DpContainer() [1/2]

Fw::DpContainer::DpContainer ( FwDpIdType id,
const Fw::Buffer & buffer )

Constructor for initialized container.

Parameters
idThe container id
bufferThe buffer

Definition at line 19 of file DpContainer.cpp.

◆ DpContainer() [2/2]

Fw::DpContainer::DpContainer ( )

Constructor for container with default initialization.

Definition at line 28 of file DpContainer.cpp.

Member Function Documentation

◆ deserializeHeader()

Fw::SerializeStatus Fw::DpContainer::deserializeHeader ( )

Deserialize the header from the packet buffer Buffer must be valid and large enough to hold a DP container packet

Returns
The serialize status

Definition at line 38 of file DpContainer.cpp.

◆ getBuffer()

Fw::Buffer Fw::DpContainer::getBuffer ( ) const
inline

Get the packet buffer

Returns
The buffer

Definition at line 87 of file DpContainer.hpp.

◆ getDataHashOffset()

FwSizeType Fw::DpContainer::getDataHashOffset ( ) const
inline

Get the data hash offset.

Definition at line 157 of file DpContainer.hpp.

◆ getDataSize()

FwSizeType Fw::DpContainer::getDataSize ( ) const
inline

Get the data size

Returns
The data size

Definition at line 83 of file DpContainer.hpp.

◆ getId()

FwDpIdType Fw::DpContainer::getId ( ) const
inline

Get the container id

Returns
The id

Definition at line 79 of file DpContainer.hpp.

◆ getPacketSize()

FwSizeType Fw::DpContainer::getPacketSize ( ) const
inline

Get the packet size corresponding to the data size.

Definition at line 90 of file DpContainer.hpp.

◆ getPacketSizeForDataSize()

static constexpr FwSizeType Fw::DpContainer::getPacketSizeForDataSize ( FwSizeType dataSize)
inlinestaticconstexpr

Get the packet size for a given data size.

Parameters
dataSizeThe data size

Definition at line 171 of file DpContainer.hpp.

◆ getPriority()

FwDpPriorityType Fw::DpContainer::getPriority ( ) const
inline

Get the priority

Returns
The priority

Definition at line 94 of file DpContainer.hpp.

◆ getProcTypes()

DpCfg::ProcType::SerialType Fw::DpContainer::getProcTypes ( ) const
inline

Get the processing types

Returns
The processing types

Definition at line 102 of file DpContainer.hpp.

◆ getTimeTag()

Fw::Time Fw::DpContainer::getTimeTag ( ) const
inline

Get the time tag

Returns
The time tag

Definition at line 98 of file DpContainer.hpp.

◆ serializeHeader()

void Fw::DpContainer::serializeHeader ( )

Serialize the header into the packet buffer and update the header hash Buffer must be valid and large enough to hold a DP container packet

Definition at line 92 of file DpContainer.cpp.

◆ setBuffer()

void Fw::DpContainer::setBuffer ( const Buffer & buffer)

Set the packet buffer.

Parameters
bufferThe packet buffer

Definition at line 127 of file DpContainer.cpp.

◆ setDataSize()

void Fw::DpContainer::setDataSize ( FwSizeType dataSize)
inline

Set the data size.

Parameters
dataSizeThe data size

Definition at line 144 of file DpContainer.hpp.

◆ setDpState()

void Fw::DpContainer::setDpState ( DpState dpState)
inline

Set the data product state.

Parameters
dpStateThe data product state

Definition at line 138 of file DpContainer.hpp.

◆ setId()

void Fw::DpContainer::setId ( FwDpIdType id)
inline

Set the id.

Parameters
idThe id

Definition at line 114 of file DpContainer.hpp.

◆ setPriority()

void Fw::DpContainer::setPriority ( FwDpPriorityType priority)
inline

Set the priority.

Parameters
priorityThe priority

Definition at line 120 of file DpContainer.hpp.

◆ setProcTypes()

void Fw::DpContainer::setProcTypes ( DpCfg::ProcType::SerialType procTypes)
inline

Set the processing types bit mask.

Parameters
procTypesThe processing types

Definition at line 132 of file DpContainer.hpp.

◆ setTimeTag()

void Fw::DpContainer::setTimeTag ( Fw::Time timeTag)
inline

Set the time tag.

Parameters
timeTagThe time tag

Definition at line 126 of file DpContainer.hpp.

◆ updateDataHash()

void Fw::DpContainer::updateDataHash ( )

Update the data hash.

Definition at line 150 of file DpContainer.cpp.

◆ updateHeaderHash()

void Fw::DpContainer::updateHeaderHash ( )

Update the header hash.

Definition at line 141 of file DpContainer.cpp.

Member Data Documentation

◆ DATA_OFFSET

constexpr FwSizeType Fw::DpContainer::DATA_OFFSET = HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH
staticconstexpr

The data offset.

Definition at line 53 of file DpContainer.hpp.

◆ HEADER_HASH_OFFSET

constexpr FwSizeType Fw::DpContainer::HEADER_HASH_OFFSET = Header::SIZE
staticconstexpr

The header hash offset.

Definition at line 51 of file DpContainer.hpp.

◆ m_buffer

Buffer Fw::DpContainer::m_buffer
protected

The packet buffer.

Definition at line 217 of file DpContainer.hpp.

◆ m_dataBuffer

Fw::ExternalSerializeBuffer Fw::DpContainer::m_dataBuffer
protected

The data buffer.

Definition at line 220 of file DpContainer.hpp.

◆ m_dataSize

FwSizeType Fw::DpContainer::m_dataSize
protected

The data size.

Definition at line 214 of file DpContainer.hpp.

◆ m_dpState

DpState Fw::DpContainer::m_dpState
protected

The data product state.

Definition at line 211 of file DpContainer.hpp.

◆ m_id

FwDpIdType Fw::DpContainer::m_id
protected

The container id This is a system-global id (component-local id + component base id)

Definition at line 199 of file DpContainer.hpp.

◆ m_priority

FwDpPriorityType Fw::DpContainer::m_priority
protected

The priority.

Definition at line 202 of file DpContainer.hpp.

◆ m_procTypes

DpCfg::ProcType::SerialType Fw::DpContainer::m_procTypes
protected

The processing types.

Definition at line 208 of file DpContainer.hpp.

◆ m_timeTag

Time Fw::DpContainer::m_timeTag
protected

The time tag.

Definition at line 205 of file DpContainer.hpp.

◆ m_userData

Header::UserData Fw::DpContainer::m_userData

The user data.

Definition at line 190 of file DpContainer.hpp.

◆ MIN_PACKET_SIZE

constexpr FwSizeType Fw::DpContainer::MIN_PACKET_SIZE = Header::SIZE + 2 * HASH_DIGEST_LENGTH
staticconstexpr

The minimum packet size Reserve space for the header, the header hash, and the data hash This is also the number of non-data bytes in the packet

Definition at line 57 of file DpContainer.hpp.


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