Merge pull request 'sequence count init value' (#81) from meier/sequenceCount into develop
Reviewed-on: #81
This commit is contained in:
commit
5eb52133ac
@ -8,7 +8,7 @@ class SourceSequenceCounter {
|
|||||||
uint16_t sequenceCount;
|
uint16_t sequenceCount;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SourceSequenceCounter() : sequenceCount(0) {}
|
SourceSequenceCounter(uint16_t initialSequenceCount = 0) : sequenceCount(initialSequenceCount) {}
|
||||||
void increment() {
|
void increment() {
|
||||||
sequenceCount = (sequenceCount + 1) % (SpacePacketBase::LIMIT_SEQUENCE_COUNT);
|
sequenceCount = (sequenceCount + 1) % (SpacePacketBase::LIMIT_SEQUENCE_COUNT);
|
||||||
}
|
}
|
||||||
@ -31,6 +31,7 @@ class SourceSequenceCounter {
|
|||||||
sequenceCount = newCount;
|
sequenceCount = newCount;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
operator uint16_t() { return this->get(); }
|
operator uint16_t() { return this->get(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user