SinricPro Library
|
Device to control a garage door. More...
Public Types | |
using | DoorCallback = std::function< bool(const String &, bool &)> |
Callback definition for onDoorState function. More... | |
Public Member Functions | |
void | onDoorState (DoorCallback cb) |
Set callback function for onDoorState request. More... | |
bool | sendDoorStateEvent (bool state, String cause="PHYSICAL_INTERACTION") |
Send DoorState event to update actual door state on SinricPro Server. More... | |
Device to control a garage door.
Supporting
|
inherited |
Callback definition for onDoorState function.
Gets called when device receive a open
or close
request
[in] | deviceId | String which contains the ID of device |
[in] | doorState | false = open, device is requested to open the garage door true = close, device is requested to close the garage door |
[out] | doorState | bool with actual state false = open, true = closed |
true | request handled properly |
false | request was not handled properly because of some error |
|
inherited |
Set callback function for onDoorState
request.
cb | Function pointer to a onDoorState function |
|
inherited |
Send DoorState
event to update actual door state on SinricPro Server.
state | bool true = close false = open |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |