SinricPro Library
|
Public Types | |
using | ColorCallback = std::function< bool(const String &, byte &, byte &, byte &)> |
Callback definition for onColor function. More... | |
Public Member Functions | |
void | onColor (ColorCallback cb) |
Set callback function for setColor request. More... | |
bool | sendColorEvent (byte r, byte g, byte b, String cause="PHYSICAL_INTERACTION") |
Send setColor event to SinricPro Server indicating actual color. More... | |
using ColorCallback = std::function<bool(const String &, byte &, byte &, byte &)> |
Callback definition for onColor function.
Gets called when device receive a setColor
request
[in] | deviceId | String which contains the ID of device |
[in] | r | Byte value for red |
[in] | g | Byte value for green |
[in] | b | Byte value for blue |
[out] | r | Byte value for red |
[out] | g | Byte value for green |
[out] | b | Byte value for blue |
true | request handled properly |
false | request was not handled properly because of some error |
void onColor | ( | ColorCallback | cb | ) |
Set callback function for setColor
request.
cb | Function pointer to a ColorCallback function |
bool sendColorEvent | ( | byte | r, |
byte | g, | ||
byte | b, | ||
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send setColor
event to SinricPro Server indicating actual color.
r | Byte value for red |
g | Byte value for green |
b | Byte value for blue |
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 |