32 operator bool()
const;
49 bool has(
const std::string &keyword,
bool hasValue =
false)
const;
56 int get(
const std::string &keyword)
const;
66 double temperature(
const std::string &keyword)
const;
Report with data coming from a sensor. Each report comes in format [AAAAAAAA] TYPE PAYLOAD...
Definition: JablotronReport.h:13
double temperature(const std::string &keyword) const
Almost same logic as for JablotronReport::get(), just the value is expected in the temperature format...
Definition: JablotronReport.cpp:63
const std::string type
Type of device.
Definition: JablotronReport.h:22
unsigned int battery() const
It calls JablotronReport::get("LB") internally and interprets the value as 1 - 5 % and 0 - 100 %...
Definition: JablotronReport.cpp:81
bool operator!() const
Definition: JablotronReport.cpp:21
std::string toString() const
Definition: JablotronReport.cpp:86
const std::string data
Data payload.
Definition: JablotronReport.h:27
bool has(const std::string &keyword, bool hasValue=false) const
Search the payload for a keyword like BEACON, SENSOR, etc.
Definition: JablotronReport.cpp:34
const uint32_t address
Address of the source device.
Definition: JablotronReport.h:17
static JablotronReport invalid()
Definition: JablotronReport.cpp:92