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);
76 if (receivedSize != requestedSize) {
194 const U8*
const dataHashAddr = &buffAddr[dataHashOffset];
214 U8*
const dataHashAddr = &buffAddr[dataHashOffset];
238 void DpContainer::initUserDataField() {
PlatformIntType NATIVE_INT_TYPE
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.
Utils::HashBuffer getDataHash() const
FwDpPriorityType m_priority
The priority.
Header::UserData m_userData
The user data.
static constexpr FwSizeType MIN_PACKET_SIZE
void updateHeaderHash()
Compute and set the header hash.
Utils::HashBuffer computeDataHash() const
Utils::HashBuffer computeHeaderHash() const
Fw::SerializeStatus deserializeHeader()
Utils::HashBuffer getHeaderHash() const
Fw::ExternalSerializeBufferWithMemberCopy m_dataBuffer
Time m_timeTag
The time tag.
Success::T checkHeaderHash(Utils::HashBuffer &storedHash, Utils::HashBuffer &computedHash) const
Check the header hash.
void setDataHash(Utils::HashBuffer hash)
Set the data hash.
Buffer m_buffer
The packet buffer.
FwSizeType m_dataSize
The data size.
FwSizeType getDataSize() const
void setBuffer(const Buffer &buffer)
Set the packet buffer.
void setHeaderHash(const Utils::HashBuffer &hash)
Set the header hash.
FwSizeType getDataHashOffset() const
Get the data hash offset.
static constexpr FwSizeType HEADER_HASH_OFFSET
The header hash offset.
Success::T checkDataHash(Utils::HashBuffer &storedHash, Utils::HashBuffer &computedHash) const
Check the data hash.
void updateDataHash()
Update the data hash.
DpState m_dpState
The data product state.
External serialize buffer with no copy semantics.
void setExtBuffer(U8 *buffPtr, Serializable::SizeType size)
NATIVE_UINT_TYPE SizeType
@ OMIT_LENGTH
Omit length from serialization.
SerializeStatus deserializeSize(FwSizeType &size)
deserialize a size value
SerializeStatus setBuffLen(Serializable::SizeType length)
sets buffer length manually after filling with data
SerializeStatus moveDeserToOffset(FwSizeType offset)
Moves deserialization to the specified offset.
void resetSer()
reset to beginning of buffer to reuse for serialization
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus copyRaw(SerializeBufferBase &dest, Serializable::SizeType size)
directly copies buffer without looking for a size in the stream.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
SerializeStatus serializeSize(const FwSizeType size)
serialize a size value
@ FAILURE
Representing failure.
@ SUCCESS
Representing success.
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.