Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Svc/TlmPacketizer/TlmPacketizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ void TlmPacketizer::setPacketList(const TlmPacketizerPacketList& packetList,
entry.ignored = false;
entry.channelSize = packetList.list[pktEntry]->list[tlmEntry].size;
// the offset into the buffer will be the current packet length
// the offset must fit within FwSignedSizeType to allow for negative values
FW_ASSERT(packetLen <= static_cast<FwSizeType>(std::numeric_limits<FwSignedSizeType>::max()),
// the offset must fit within I16 to allow for the -1 sentinel value
FW_ASSERT(packetLen <= static_cast<FwSizeType>(std::numeric_limits<I16>::max()),
static_cast<FwAssertArgType>(packetLen));
entry.packetOffset[pktEntry] = static_cast<FwSignedSizeType>(packetLen);
entry.packetOffset[pktEntry] = static_cast<I16>(packetLen);

packetLen += entry.channelSize;

Expand Down
2 changes: 1 addition & 1 deletion Svc/TlmPacketizer/TlmPacketizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class TlmPacketizer final : public TlmPacketizerComponentBase, public Fw::ParamE
FwChanIdType id; //!< telemetry id stored in slot
// Offsets into packet buffers.
// -1 means that channel is not in that packet
FwSignedSizeType packetOffset[MAX_PACKETIZER_PACKETS];
I16 packetOffset[MAX_PACKETIZER_PACKETS];
FwSizeType channelSize; //!< max serialized size of the channel in bytes
bool ignored; //!< ignored channel id
bool hasValue; //!< if the entry has received a value at least once
Expand Down
Loading