7#ifndef NR_RLC_SEQUENCE_NUMBER_H
8#define NR_RLC_SEQUENCE_NUMBER_H
10#include "ns3/assert.h"
36 : m_value(value % 1024),
47 : m_value(value.m_value),
48 m_modulusBase(value.m_modulusBase)
60 m_value = value % 1024;
79 m_modulusBase = modulusBase.m_value;
88 m_modulusBase = modulusBase;
98 m_value = ((uint32_t)m_value + 1) % 1024;
134 uint16_t diff = m_value - other.m_value;
145 NS_ASSERT(m_modulusBase == other.m_modulusBase);
146 uint16_t v1 = (m_value - m_modulusBase) % 1024;
147 uint16_t v2 = (other.m_value - other.m_modulusBase) % 1024;
158 return (m_value == other.m_value);
168 return (m_value != other.m_value);
178 return (!this->
operator>(other));
188 return (this->
operator>(other) || this->
operator==(other));
198 return !this->
operator>(other) && m_value != other.m_value;
205 uint16_t m_modulusBase;
SequenceNumber10 & operator=(uint16_t value)
uint16_t GetValue() const
Extracts the numeric value of the sequence number.
bool operator!=(const SequenceNumber10 &other) const
bool operator>=(const SequenceNumber10 &other) const
bool operator>(const SequenceNumber10 &other) const
SequenceNumber10 operator+(uint16_t delta) const
bool operator<(const SequenceNumber10 &other) const
uint16_t operator-(const SequenceNumber10 &other) const
SequenceNumber10(uint16_t value)
SequenceNumber10(const SequenceNumber10 &value)
SequenceNumber10 operator-(uint16_t delta) const
bool operator==(const SequenceNumber10 &other) const
void SetModulusBase(uint16_t modulusBase)
Set modulus base.
void SetModulusBase(SequenceNumber10 modulusBase)
Set modulus base.
bool operator<=(const SequenceNumber10 &other) const
friend std::ostream & operator<<(std::ostream &os, const SequenceNumber10 &val)
SequenceNumber10 operator++(int)