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

ModeController. More...

#include <ModeController.h>

Inheritance diagram for ModeController< T >:

Public Member Functions

void onSetMode (ModeCallback cb)
 Set callback function for setMode request.
 
void onSetMode (const String &instance, GenericModeCallback cb)
 Set callback function for setMode request on a specific instance.
 
bool sendModeEvent (String mode, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setMode event to SinricPro Server indicating the mode has changed.
 
bool sendModeEvent (String instance, String mode, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setMode event to SinricPro Server indicating the mode on a specific instance has changed.
 

Detailed Description

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

ModeController.

Member Function Documentation

◆ onSetMode() [1/2]

template<typename T >
void onSetMode ( const String &  instance,
GenericModeCallback  cb 
)

Set callback function for setMode request on a specific instance.

Parameters
instanceString with instance name
cbFunction pointer to a ModeCallback function
Returns
void
See also
ModeCallback

◆ onSetMode() [2/2]

template<typename T >
void onSetMode ( ModeCallback  cb)

Set callback function for setMode request.

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

◆ sendModeEvent() [1/2]

template<typename T >
bool sendModeEvent ( String  instance,
String  mode,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setMode event to SinricPro Server indicating the mode on a specific instance has changed.

Parameters
instanceString instance name
modeString with actual mode device is set to
MOVIE, MUSIC, NIGHT, SPORT, TV
cause(optional) String reason why event is sent (default = FSTR_SINRICPRO_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

◆ sendModeEvent() [2/2]

template<typename T >
bool sendModeEvent ( String  mode,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setMode event to SinricPro Server indicating the mode has changed.

Parameters
modeString with actual mode device is set to
MOVIE, MUSIC, NIGHT, SPORT, TV
cause(optional) String reason why event is sent (default = FSTR_SINRICPRO_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