nl::Weave::MonotonicallyIncreasingCounter

#include <src/lib/support/WeaveCounter.h>

A class for managing a monotonically-increasing counter as an integer value.

Summary

Inheritance

Inherits from: nl::Weave::Counter
Direct Known Subclasses: nl::Weave::PersistedCounter

Constructors and Destructors

MonotonicallyIncreasingCounter(void)
~MonotonicallyIncreasingCounter(void)

Protected attributes

mCounterValue
uint32_t

Public functions

Advance(void)
virtual WEAVE_ERROR
Advance the value of the counter.
GetValue(void)
virtual uint32_t
Get the current value of the counter.
Init(uint32_t aStartValue)
Initialize a MonotonicallyIncreasingCounter object.

Protected attributes

mCounterValue

uint32_t mCounterValue

Public functions

Advance

virtual WEAVE_ERROR Advance(
  void
)

Advance the value of the counter.

Details
Returns
A Weave error code if something fails, WEAVE_NO_ERROR otherwise

GetValue

virtual uint32_t GetValue(
  void
)

Get the current value of the counter.

Details
Returns
The current value of the counter.

Init

WEAVE_ERROR Init(
  uint32_t aStartValue
)

Initialize a MonotonicallyIncreasingCounter object.

Details
Parameters
[in] aStartValue
The starting value of the counter.
Returns
A Weave error code if something fails, WEAVE_NO_ERROR otherwise

MonotonicallyIncreasingCounter

 MonotonicallyIncreasingCounter(
  void
)

~MonotonicallyIncreasingCounter

virtual  ~MonotonicallyIncreasingCounter(
  void
)