meier/seqCount #46

Merged
muellerr merged 5 commits from meier/seqCount into eive/develop 2022-03-28 10:21:49 +02:00
1 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,19 @@ class SourceSequenceCounter {
void reset(uint16_t toValue = 0) {
sequenceCount = toValue % (SpacePacketBase::LIMIT_SEQUENCE_COUNT);
}
SourceSequenceCounter& operator++(int) {
this->increment();
return *this;
}
SourceSequenceCounter& operator--(int) {
this->decrement();
return *this;
}
SourceSequenceCounter& operator=(const uint16_t& newCount) {
sequenceCount = newCount;
return *this;
}
operator uint16_t() { return this->get(); }
};
#endif /* FSFW_TMTCSERVICES_SOURCESEQUENCECOUNTER_H_ */