possible bugfix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -26,16 +26,19 @@ struct SpTcParams {
|
||||
|
||||
class SpTcBase {
|
||||
public:
|
||||
SpTcBase(SpTcParams params) : spParams(params) { updateFields(); }
|
||||
SpTcBase(SpTcParams params) : spParams(params) {
|
||||
payloadStart = spParams.buf + ccsds::HEADER_LEN;
|
||||
updateSpFields();
|
||||
}
|
||||
|
||||
SpTcBase(SpTcParams params, uint16_t apid, uint16_t seqCount) : spParams(params) {
|
||||
spParams.creator.setApid(apid);
|
||||
spParams.creator.setSeqCount(seqCount);
|
||||
updateFields();
|
||||
payloadStart = spParams.buf + ccsds::HEADER_LEN;
|
||||
updateSpFields();
|
||||
}
|
||||
|
||||
void updateFields() {
|
||||
payloadStart = spParams.buf + ccsds::HEADER_LEN;
|
||||
void updateSpFields() {
|
||||
spParams.creator.setDataLen(spParams.dataFieldLen - 1);
|
||||
spParams.creator.setPacketType(ccsds::PacketType::TC);
|
||||
}
|
||||
@ -55,7 +58,7 @@ class SpTcBase {
|
||||
}
|
||||
|
||||
ReturnValue_t serializeHeader() {
|
||||
updateFields();
|
||||
updateSpFields();
|
||||
size_t serLen = 0;
|
||||
return spParams.creator.serializeBe(spParams.buf, serLen, spParams.maxSize);
|
||||
}
|
||||
|
Reference in New Issue
Block a user