You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Underlying DpContainer does not reset serialization
Adding records picks up at old serialization point
I manually added a reset of the serialization to DpContainer:
voidDpContainer::setBuffer(const Buffer& buffer) {
// Set the bufferthis->m_buffer = buffer;
// Check that the buffer is large enough to hold a data product packet with// zero-size dataconst FwSizeType bufferSize = buffer.getSize();
FW_ASSERT(bufferSize >= MIN_PACKET_SIZE, static_cast<FwAssertArgType>(bufferSize),
static_cast<FwAssertArgType>(MIN_PACKET_SIZE));
// Initialize the data buffer
U8* const buffAddr = buffer.getData();
const FwSizeType dataCapacity = buffer.getSize() - MIN_PACKET_SIZE;
// Check that data buffer is in bounds for packet bufferconst FwSizeType minBufferSize = DATA_OFFSET + dataCapacity;
FW_ASSERT(bufferSize >= minBufferSize, static_cast<FwAssertArgType>(bufferSize),
static_cast<FwAssertArgType>(minBufferSize));
U8* const dataAddr = &buffAddr[DATA_OFFSET];
this->m_dataBuffer.setExtBuffer(dataAddr, static_cast<Fw::Serializable::SizeType>(dataCapacity));
// reset the serializationthis->m_dataBuffer.resetSer();
}
However, when adding new records, eventually the container asserts:
EVENT: (8450) (2:1728529763,447710) ACTIVITY_LO: (SG1) DpComplete : Writing 15 DP records 780 bytes total
Assert: "/home/tcanham/source/fprime/Fw/Dp/DpContainer.cpp:201" 1463 907
FATAL 16898 handled.
Exiting with abort signal and core dump file.
Aborted
Expected Behavior
The container should be completely reset.
The text was updated successfully, but these errors were encountered:
I'm working on some fixes to F Prime that should address the immediate issue. I opened up a related issue in nasa/fpp to ensure that all the state (not just the serialization state) is reset when doing a DpGet operation.
Problem Description
When a new buffer is assigned to a DpContainer, the serialization pointer is not reset.
Context / Environment
Execute
fprime-util version-check
and share the output.How to Reproduce
I manually added a reset of the serialization to DpContainer:
However, when adding new records, eventually the container asserts:
Expected Behavior
The container should be completely reset.
The text was updated successfully, but these errors were encountered: