1#ifndef CCSDS_DATA_FIELD_H
2#define CCSDS_DATA_FIELD_H
95 const std::string &pType);
Represents the data field of a CCSDS packet.
ResultBool setDataFieldHeader(const uint8_t *pData, const size_t &sizeData)
Sets the secondary header data for the data field.
std::shared_ptr< SecondaryHeaderAbstract > m_secondaryHeader
Shared pointer to the secondary header class.
uint16_t getDataFieldAvailableBytesSize()
Retrieves the available size of the data field in bytes.
uint16_t getDataFieldUsedBytesSize()
Retrieves the used size of the data field in bytes.
uint16_t m_dataPacketSize
Data field maximum size in bytes.
std::vector< uint8_t > m_applicationData
Application data buffer.
SecondaryHeaderAbstract & getDataFieldHeader()
returns the secondary header A SecondaryHeaderAbstract derived object containing the header data.
std::vector< uint8_t > getDataFieldHeaderBytes()
Retrieves the secondary header data as a vector of bytes.
std::shared_ptr< SecondaryHeaderAbstract > getSecondaryHeader()
retrieves the known PUS type
bool m_dataFieldHeaderUpdated
Boolean for secondary header updated status.
std::vector< uint8_t > getApplicationData()
Retrieves the application data from the data field.
bool getDataFieldHeaderAutoUpdateStatus() const
returns true if auto update has been enabled for the secondary header
bool getDataFieldHeaderFlag() const
retrieves true if a known secondary header has been set
SecondaryHeaderFactory m_secondaryHeaderFactory
secondary header dispatcher factory
ResultBool setApplicationData(const std::vector< uint8_t > &applicationData)
Sets the application data using a vector of bytes.
std::string m_dataFieldHeaderType
Data field Header type.
void update()
Updates the data field header based on the current application data size.
void setDataFieldHeaderAutoUpdateStatus(const bool enable)
Sets The auto update variable, if disabled the data size in the header field will not be updated.
SecondaryHeaderFactory & getDataFieldHeaderFactory()
returns the secondary header factory
void setDataPacketSize(const uint16_t &value)
Sets the maximum data packet size for the CCSDS DataField.
std::vector< uint8_t > getFullDataFieldBytes()
Retrieves the full data field by combining the data field header and application data.
bool m_enableDataFieldUpdate
Boolean for secondary header update enable.
uint16_t getDataFieldAbsoluteBytesSize()
Retrieves the absolute size of the data field in bytes.
Encapsulates a result that can hold either a value or an Error.
Contains definitions and classes for handling CCSDS headers.