20 : m_id(id), m_priority(0), m_timeTag(), m_procTypes(0), m_dpState(), m_dataSize(0), m_buffer(), m_dataBuffer() {
22 this->initUserDataField();
29 : m_id(0), m_priority(0), m_timeTag(), m_procTypes(0), m_dataSize(0), m_buffer(), m_dataBuffer() {
31 this->initUserDataField();
50 status = serializeRepr.
deserialize(packetDescriptor);
73 const bool omitLength =
true;
77 if (receivedSize != requestedSize) {
114 const bool omitLength =
true;
159 U8*
const dataHashAddr = &buffAddrBase[dataHashOffset];
170void DpContainer::initUserDataField() {
uint8_t U8
8-bit unsigned integer
#define HASH_DIGEST_LENGTH
PlatformAssertArgType FwAssertArgType
U32 FwPacketDescriptorType
PlatformSizeType FwSizeType
SerializeBufferBase & getSerializeRepr()
@ FW_PACKET_DP
Data product packet.
DpCfg::ProcType::SerialType m_procTypes
The processing types.
static constexpr FwSizeType DATA_OFFSET
The data offset.
DpContainer()
Constructor for container with default initialization.
FwDpPriorityType m_priority
The priority.
Fw::ExternalSerializeBuffer m_dataBuffer
The data buffer.
Header::UserData m_userData
The user data.
static constexpr FwSizeType MIN_PACKET_SIZE
void updateHeaderHash()
Update the header hash.
Fw::SerializeStatus deserializeHeader()
Time m_timeTag
The time tag.
Buffer m_buffer
The packet buffer.
FwSizeType m_dataSize
The data size.
FwSizeType getDataSize() const
void setBuffer(const Buffer &buffer)
Set the packet buffer.
FwSizeType getDataHashOffset() const
Get the data hash offset.
static constexpr FwSizeType HEADER_HASH_OFFSET
The header hash offset.
void updateDataHash()
Update the data hash.
DpState m_dpState
The data product state.
void setExtBuffer(U8 *buffPtr, NATIVE_UINT_TYPE size)
Set the external buffer.
SerializeStatus moveDeserToOffset(FwSizeType offset)
Moves deserialization to the specified offset.
SerializeStatus setBuffLen(NATIVE_UINT_TYPE length)
sets buffer length manually after filling with data
void resetSer()
reset to beginning of buffer to reuse for serialization
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
SerializeStatus copyRaw(SerializeBufferBase &dest, NATIVE_UINT_TYPE size)
directly copies buffer without looking for a size in the stream.
A container class for holding a hash buffer.
static void hash(const void *data, const NATIVE_INT_TYPE len, HashBuffer &buffer)
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ FW_SERIALIZE_FORMAT_ERROR
Data was the wrong format (e.g. wrong packet type)
@ FW_DESERIALIZE_SIZE_MISMATCH
Data was left in the buffer, but not enough to deserialize.