Merge pull request 'meier/seqCount' (#46) from meier/seqCount into eive/develop

Reviewed-on: eive/fsfw#46
This commit is contained in:
Robin Müller 2022-03-28 10:21:48 +02:00
commit a01002aa5d

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_ */