BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Static Public Member Functions | Static Public Attributes
BeeeOn::RefreshTime Class Reference

RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically once per refresh time or sensors reports their values periodically once per refresh time. More...

#include <RefreshTime.h>

Public Member Functions

bool isDisabled () const
 
bool isNone () const
 
Poco::Timespan time () const
 
int seconds () const
 
 operator Poco::Timespan () const
 
bool operator== (const RefreshTime &other) const
 
bool operator!= (const RefreshTime &other) const
 
bool operator< (const RefreshTime &other) const
 
bool operator<= (const RefreshTime &other) const
 
bool operator> (const RefreshTime &other) const
 
bool operator>= (const RefreshTime &other) const
 
std::string toString () const
 

Static Public Member Functions

static RefreshTime fromSeconds (const int seconds)
 
static RefreshTime fromMinutes (const int minutes)
 
static RefreshTime parse (const std::string &input)
 

Static Public Attributes

static const RefreshTime NONE = RefreshTime(-1)
 
static const RefreshTime DISABLED = RefreshTime(0)
 

Detailed Description

RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically once per refresh time or sensors reports their values periodically once per refresh time.

However, sensors can be some times set to a different mode where values are not reported periodically but the reports are generated based changes (event based). Some sensors does not support refresh time and always works this way.

The class RefreshTime models the situation described above. The refresh time can be NONE (unsupported by device), DISABLED (reporting is event based), or a number of seconds.


The documentation for this class was generated from the following files: