add API to set msg counter

This commit is contained in:
Robin Müller 2023-06-25 12:35:50 +02:00
parent 0f76cdb3ba
commit c3572e31a8
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 8 additions and 1 deletions

View File

@ -10,7 +10,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Fixes
- Important bugfix in CFDP PDU header format: The entity length field and the transaction sequence
number fields stored the actual length of the field instead of the length minus 1 like specified
in the CFDP standard.
@ -26,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- add CFDP subsystem ID
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
- `PusTmZcWriter` now exposes API to set message counter field.
## Changed
- Bump ETL version to 20.35.14

View File

@ -24,3 +24,9 @@ void PusTmZeroCopyWriter::updateErrorControl() {
crcStart[0] = (crc16 >> 8) & 0xff;
crcStart[1] = crc16 & 0xff;
}
void PusTmZeroCopyWriter::setMessageCount(uint16_t msgCount) {
size_t serSize = 0;
SerializeAdapter::serialize(&msgCount, const_cast<uint8_t*>(pointers.secHeaderStart + 3),
&serSize, 2, SerializeIF::Endianness::NETWORK);
}

View File

@ -14,6 +14,7 @@ class PusTmZeroCopyWriter : public PusTmReader {
PusTmZeroCopyWriter(TimeReaderIF& timeReader, uint8_t* data, size_t size);
void setSequenceCount(uint16_t seqCount);
void setMessageCount(uint16_t msgCount);
void updateErrorControl();
private: