SinricPro Library
Loading...
Searching...
No Matches
ColorController< T >

ColorController. More...

#include <ColorController.h>

Inheritance diagram for ColorController< T >:

Public Member Functions

void onColor (ColorCallback cb)
 Set callback function for setColor request.
 
bool sendColorEvent (byte r, byte g, byte b, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setColor event to SinricPro Server indicating actual color.
 

Detailed Description

template<typename T>
class SINRICPRO_3_0_0::ColorController< T >

ColorController.

Member Function Documentation

◆ onColor()

template<typename T >
void onColor ( ColorCallback  cb)

Set callback function for setColor request.

Parameters
cbFunction pointer to a ColorCallback function
Returns
void
See also
ColorCallback

◆ sendColorEvent()

template<typename T >
bool sendColorEvent ( byte  r,
byte  g,
byte  b,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setColor event to SinricPro Server indicating actual color.

Parameters
rByte value for red
gByte value for green
bByte value for blue
cause(optional) String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the even
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time