17.2.2.17.2. SequenceNumber_t Operators

inline bool eprosima::fastrtps::rtps::operator==(const SequenceNumber_t &sn1, const SequenceNumber_t &sn2) noexcept

Compares two SequenceNumber_t.

Parameters
Returns

True if equal

inline bool eprosima::fastrtps::rtps::operator!=(const SequenceNumber_t &sn1, const SequenceNumber_t &sn2) noexcept

Compares two SequenceNumber_t.

Parameters
Returns

True if not equal

inline bool eprosima::fastrtps::rtps::operator>(const SequenceNumber_t &seq1, const SequenceNumber_t &seq2) noexcept

Checks if a SequenceNumber_t is greater than other.

Parameters
Returns

True if the first SequenceNumber_t is greater than the second

inline bool eprosima::fastrtps::rtps::operator<(const SequenceNumber_t &seq1, const SequenceNumber_t &seq2) noexcept

Checks if a SequenceNumber_t is less than other.

Parameters
Returns

True if the first SequenceNumber_t is less than the second

inline bool eprosima::fastrtps::rtps::operator>=(const SequenceNumber_t &seq1, const SequenceNumber_t &seq2) noexcept

Checks if a SequenceNumber_t is greater or equal than other.

Parameters
Returns

True if the first SequenceNumber_t is greater or equal than the second

inline bool eprosima::fastrtps::rtps::operator<=(const SequenceNumber_t &seq1, const SequenceNumber_t &seq2) noexcept

Checks if a SequenceNumber_t is less or equal than other.

Parameters
Returns

True if the first SequenceNumber_t is less or equal than the second

inline SequenceNumber_t eprosima::fastrtps::rtps::operator-(const SequenceNumber_t &seq, const uint32_t inc) noexcept

Subtract one uint32_t from a SequenceNumber_t

Parameters
Returns

Result of the subtraction

inline SequenceNumber_t eprosima::fastrtps::rtps::operator+(const SequenceNumber_t &seq, const uint32_t inc) noexcept

Add one uint32_t to a SequenceNumber_t

Parameters
  • seq[in] Base sequence number

  • inc – value to add to the base

Returns

Result of the addition

inline SequenceNumber_t eprosima::fastrtps::rtps::operator-(const SequenceNumber_t &minuend, const SequenceNumber_t &subtrahend) noexcept

Subtract one SequenceNumber_t to another

Parameters
  • minuend – Minuend. Has to be greater than or equal to subtrahend.

  • subtrahend – Subtrahend.

Returns

Result of the subtraction

inline std::ostream &eprosima::fastrtps::rtps::operator<<(std::ostream &output, const SequenceNumber_t &seqNum)
Parameters
  • output

  • seqNum

Returns

inline std::ostream &eprosima::fastrtps::rtps::operator<<(std::ostream &output, const std::vector<SequenceNumber_t> &seqNumSet)
inline std::ostream &eprosima::fastrtps::rtps::operator<<(std::ostream &output, const SequenceNumberSet_t &sns)

Prints a sequence Number set

Parameters
  • output – Output Stream

  • sns – SequenceNumber set

Returns

OStream.