Trident IoT Z-Wave SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Binary Switch
+ Collaboration diagram for Binary Switch:

Data Structures

struct  cc_binary_switch_t
 

Macros

#define BIN_SWITCH_DURATION_MIN_VAL_SECONDS   0x00
 
#define BIN_SWITCH_DURATION_MAX_VAL_SECONDS   0x7F
 
#define BIN_SWITCH_DURATION_MIN_VAL_MINUTES   0x80
 
#define BIN_SWITCH_DURATION_MAX_VAL_MINUTES   0xFE
 
#define BIN_SWITCH_DURATION_FACTORY_DEFAULT   0xFF
 
#define BIN_SWITCH_DURATION_MAX_MINUTES   (BIN_SWITCH_DURATION_MAX_VAL_MINUTES - BIN_SWITCH_DURATION_MIN_VAL_MINUTES)
 

Typedefs

typedef void(* cc_binary_switch_callback_t) (struct cc_binary_switch_t *p_switch)
 
typedef struct cc_binary_switch_t cc_binary_switch_t
 

Functions

e_cmd_handler_return_code_t cc_binary_switch_set_handler (uint8_t value, uint8_t duration, uint8_t endpoint)
 
void cc_binary_switch_set (cc_binary_switch_t *p_switch, uint8_t value)
 
uint8_t cc_binary_switch_get_current_value (cc_binary_switch_t *p_switch)
 
void cc_binary_switch_handler (cc_binary_switch_t *p_switch)
 
cc_binary_switch_tcc_binary_switch_get_config (void)
 
uint8_t cc_binary_switch_get_config_length (void)
 

Detailed Description

Macro Definition Documentation

◆ BIN_SWITCH_DURATION_FACTORY_DEFAULT

#define BIN_SWITCH_DURATION_FACTORY_DEFAULT   0xFF

◆ BIN_SWITCH_DURATION_MAX_MINUTES

#define BIN_SWITCH_DURATION_MAX_MINUTES   (BIN_SWITCH_DURATION_MAX_VAL_MINUTES - BIN_SWITCH_DURATION_MIN_VAL_MINUTES)

◆ BIN_SWITCH_DURATION_MAX_VAL_MINUTES

#define BIN_SWITCH_DURATION_MAX_VAL_MINUTES   0xFE

◆ BIN_SWITCH_DURATION_MAX_VAL_SECONDS

#define BIN_SWITCH_DURATION_MAX_VAL_SECONDS   0x7F

◆ BIN_SWITCH_DURATION_MIN_VAL_MINUTES

#define BIN_SWITCH_DURATION_MIN_VAL_MINUTES   0x80

◆ BIN_SWITCH_DURATION_MIN_VAL_SECONDS

#define BIN_SWITCH_DURATION_MIN_VAL_SECONDS   0x00

Typedef Documentation

◆ cc_binary_switch_callback_t

typedef void(* cc_binary_switch_callback_t) (struct cc_binary_switch_t *p_switch)

◆ cc_binary_switch_t

typedef struct cc_binary_switch_t cc_binary_switch_t

Function Documentation

◆ cc_binary_switch_get_config()

cc_binary_switch_t * cc_binary_switch_get_config ( void )
Returns
cc_binary_switch_t*

◆ cc_binary_switch_get_config_length()

uint8_t cc_binary_switch_get_config_length ( void )
Returns
uint8_t

◆ cc_binary_switch_get_current_value()

uint8_t cc_binary_switch_get_current_value ( cc_binary_switch_t * p_switch)

Returns the current value of a given binary switch.

Must be used for local actuation only.

Parameters
p_switchThe switch of which the value is returned.
Returns
Current value of the given switch.

◆ cc_binary_switch_handler()

void cc_binary_switch_handler ( cc_binary_switch_t * p_switch)
Parameters
p_switch

◆ cc_binary_switch_set()

void cc_binary_switch_set ( cc_binary_switch_t * p_switch,
uint8_t value )

Sets the value of a given binary switch.

This function can be used in an application that might have a button.

Must be used for local actuation only.

Parameters
p_switchThe switch of which the value is set.
valueThe value to set.

◆ cc_binary_switch_set_handler()

e_cmd_handler_return_code_t cc_binary_switch_set_handler ( uint8_t value,
uint8_t duration,
uint8_t endpoint )

Handler for mapping Basic Set to Multilevel Switch Set.

This function MUST NOT be used for anything else than mapping.

Parameters
[in]valueMapped value.
[in]durationMapped duration.
[in]endpointMapped endpoint.
Returns
Result of the set command. E_CMD_HANDLER_RETURN_CODE_HANDLED if the actual value was set to the given value right away. E_CMD_HANDLER_RETURN_CODE_WORKING if the actual value is transitioning to the given value. E_CMD_HANDLER_RETURN_CODE_FAIL if the parameters were incorrect.