|
| | CLIPLightLevel (Sensor sensor) |
| | Construct from generic sensor.
|
| |
| int | getDarkThreshold () const |
| | Get threshold to detect darkness.
|
| |
| void | setDarkThreshold (int threshold) |
| | Set threshold to detect darkness.
|
| |
| int | getThresholdOffset () const |
| | Get offset over dark threshold to detect daylight.
|
| |
| void | setThresholdOffset (int offset) |
| | Set offset to detect daylight.
|
| |
| int | getLightLevel () const |
| | Get measured light level.
|
| |
| void | setLightLevel (int level) |
| | Set measured light level.
|
| |
| bool | isDark () const |
| | Check whether light level is below dark threshold.
|
| |
| bool | isDaylight () const |
| | Check whether light level is above light threshold.
|
| |
| bool | isOn () const |
| | Check if sensor is on.
|
| |
| void | setOn (bool on) |
| | Enable or disable sensor.
|
| |
| bool | hasBatteryState () const |
| | Check whether the sensor has a battery state.
|
| |
| int | getBatteryState () const |
| | Get battery state.
|
| |
| void | setBatteryState (int percent) |
| | Set battery state.
|
| |
| bool | isReachable () const |
| | Check whether the sensor is reachable.
|
| |
| bool | hasURL () const |
| | Check whether the sensor has a URL.
|
| |
| std::string | getURL () const |
| | Get sensor URL.
|
| |
| void | setURL (const std::string &url) |
| | Set sensor URL.
|
| |
| time::AbsoluteTime | getLastUpdated () const |
| | Get time of last status update.
|
| |
| virtual | ~BaseDevice ()=default |
| | Virtual destructor.
|
| |
| virtual int | getId () const |
| | Const function that returns the id of this device.
|
| |
| virtual std::string | getType () const |
| | Const function that returns the device type.
|
| |
| virtual std::string | getName () |
| | Function that returns the name of the device.
|
| |
| virtual std::string | getName () const |
| | Const function that returns the name of the device.
|
| |
| virtual std::string | getModelId () const |
| | Const function that returns the modelid of the device.
|
| |
| virtual std::string | getUId () const |
| | Const function that returns the uniqueid of the device.
|
| |
| virtual std::string | getManufacturername () const |
| | Const function that returns the manufacturername of the device.
|
| |
| virtual std::string | getProductname () const |
| | Const function that returns the productname of the device.
|
| |
| virtual std::string | getSwVersion () |
| | Function that returns the software version of the device.
|
| |
| virtual std::string | getSwVersion () const |
| | Const function that returns the software version of the device.
|
| |
| virtual bool | setName (const std::string &name) |
| | Function that sets the name of the device.
|
| |
| virtual void | refresh (bool force=false) |
| | Refreshes internal cached state.
|
| |
| virtual void | setRefreshDuration (std::chrono::steady_clock::duration refreshDuration) |
| | Sets custom refresh interval for this device.
|
| |
|
| | BaseCLIP (Sensor sensor) |
| | Protected constructor to be used by subclasses.
|
| |
| | BaseDevice (int id, const std::shared_ptr< APICache > &baseCache) |
| | Protected ctor that is used by subclasses, construct with shared cache.
|
| |
| | BaseDevice (int id, const HueCommandAPI &commands, const std::string &path, std::chrono::steady_clock::duration refreshDuration, const nlohmann::json ¤tState) |
| | Protected ctor that is used by subclasses.
|
| |
| virtual nlohmann::json | sendPutRequest (const std::string &subPath, const nlohmann::json &request, FileInfo fileInfo) |
| | Utility function to send a put request to the device.
|
| |
| int | id |
| | holds the id of the device
|
| |
| APICache | state |
| | holds the current state of the device
|
| |
CLIP sensor for light level.