|
hueplusplus 1.2.0
|
List of new devices found during the last scan. More...
#include <hueplusplus/NewDeviceList.h>
Public Member Functions | |
| NewDeviceList (const std::string &lastScan, const std::map< int, std::string > &devices) | |
| Construct from data. | |
| const std::map< int, std::string > & | getNewDevices () const |
| Get a map of id and name of new devices. | |
| bool | hasLastScanTime () const |
| Get whether a last scan time is available. | |
| bool | isScanActive () |
| Get whether scan is currently active. | |
| time::AbsoluteTime | getLastScanTime () const |
| Get time when last scan was completed. | |
Static Public Member Functions | |
| static NewDeviceList | parse (const nlohmann::json &json) |
| Parse from json response. | |
List of new devices found during the last scan.
| hueplusplus::NewDeviceList::NewDeviceList | ( | const std::string & | lastScan, |
| const std::map< int, std::string > & | devices | ||
| ) |
Construct from data.
| time::AbsoluteTime hueplusplus::NewDeviceList::getLastScanTime | ( | ) | const |
Get time when last scan was completed.
| HueException | when no time is available or timestamp is invalid |
| const std::map< int, std::string > & hueplusplus::NewDeviceList::getNewDevices | ( | ) | const |
Get a map of id and name of new devices.
| bool hueplusplus::NewDeviceList::hasLastScanTime | ( | ) | const |
Get whether a last scan time is available.
This can be false if there was no scan since the last restart or if the scan is still running.
| bool hueplusplus::NewDeviceList::isScanActive | ( | ) |
Get whether scan is currently active.
When scan is active, no last scan time is available
|
static |
Parse from json response.
| std::invalid_argument | when json is invalid. |
| nlohmann::json::exception | when json is invalid. |