Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
MultilevelSwitch
+ Collaboration diagram for MultilevelSwitch:

Data Structures

struct  cc_multilevel_switch_t
 

Typedefs

typedef struct cc_multilevel_switch_t cc_multilevel_switch_t
 
typedef void(* cc_multilevel_switch_callback_t) (struct cc_multilevel_switch_t *p_switch)
 

Enumerations

enum  CCMLS_PRIMARY_SWITCH_T {
  CCMLS_PRIMARY_SWITCH_UP ,
  CCMLS_PRIMARY_SWITCH_DOWN ,
  CCMLS_PRIMARY_SWITCH_RESERVED ,
  CCMLS_PRIMARY_SWITCH_NO_UP_DOWN_MOTION
}
 
enum  CCMLS_IGNORE_START_LEVEL_T {
  CCMLS_IGNORE_START_LEVEL_FALSE ,
  CCMLS_IGNORE_START_LEVEL_TRUE
}
 
enum  CCMLS_SECONDARY_SWITCH_T {
  CCMLS_SECONDARY_SWITCH_INCREMENT ,
  CCMLS_SECONDARY_SWITCH_DECREMENT ,
  CCMLS_SECONDARY_SWITCH_RESERVED ,
  CCMLS_SECONDARY_SWITCH_NO_INC_DEC
}
 

Functions

JOB_STATUS CmdClassMultilevelSwitchStartLevelChange (AGI_PROFILE *pProfile, uint8_t sourceEndpoint, void(*pCbFunc)(TRANSMISSION_RESULT *pTransmissionResult), CCMLS_PRIMARY_SWITCH_T primarySwitch, CCMLS_IGNORE_START_LEVEL_T fIgnoreStartLevel, CCMLS_SECONDARY_SWITCH_T secondarySwitch, uint8_t primarySwitchStartLevel, uint8_t duration, uint8_t secondarySwitchStepSize)
 Initiates the transmission of a "Multilevel Switch Start Level Change" command.
 
JOB_STATUS CmdClassMultilevelSwitchStopLevelChange (AGI_PROFILE *pProfile, uint8_t sourceEndpoint, void(*pCbFunc)(TRANSMISSION_RESULT *pTransmissionResult))
 Initiates the transmission of a "Multilevel Switch Stop Level Change" command.
 
JOB_STATUS CmdClassMultilevelSwitchSetTransmit (AGI_PROFILE *pProfile, uint8_t sourceEndpoint, void(*pCbFunc)(TRANSMISSION_RESULT *pTransmissionResult), uint8_t value, uint8_t duration)
 Initiates the transmission of a "Multilevel Switch Set" command.
 
void cc_multilevel_switch_set (cc_multilevel_switch_t *p_switch, uint8_t value, uint8_t duration)
 
void cc_multilevel_switch_start_level_change (cc_multilevel_switch_t *p_switch, bool up, bool ignore_start_level, uint8_t start_level, uint8_t duration)
 
void cc_multilevel_switch_stop_level_change (cc_multilevel_switch_t *p_switch)
 
uint8_t cc_multilevel_switch_get_current_value (cc_multilevel_switch_t *p_switch)
 
uint8_t cc_multilevel_switch_get_last_on_value (cc_multilevel_switch_t *p_switch)
 
uint8_t cc_multilevel_switch_get_min_value (void)
 
uint8_t cc_multilevel_switch_get_max_value (void)
 
void cc_multilevel_switch_support_cb (struct cc_multilevel_switch_t *p_switch)
 
cc_multilevel_switch_tcc_multilevel_switch_support_config_get_switches (void)
 
uint8_t cc_multilevel_switch_support_config_get_length_switches (void)
 
uint8_t cc_multilevel_switch_support_config_get_default_duration (void)
 
bool cc_multilevel_switch_write (uint8_t multilevel_component_id, cc_multilevel_switch_t *multilevel_switch)
 
bool cc_multilevel_switch_read (uint8_t multilevel_component_id, cc_multilevel_switch_t *multilevel_switch)
 

Detailed Description

Typedef Documentation

◆ cc_multilevel_switch_callback_t

typedef void(* cc_multilevel_switch_callback_t) (struct cc_multilevel_switch_t *p_switch)

◆ cc_multilevel_switch_t

typedef struct cc_multilevel_switch_t cc_multilevel_switch_t

Enumeration Type Documentation

◆ CCMLS_IGNORE_START_LEVEL_T

Enumeration for "Start Level Change" command.

Enumerator
CCMLS_IGNORE_START_LEVEL_FALSE 

CCMLS_IGNORE_START_LEVEL_FALSE.

CCMLS_IGNORE_START_LEVEL_TRUE 

CCMLS_IGNORE_START_LEVEL_TRUE.

◆ CCMLS_PRIMARY_SWITCH_T

Enumeration for "Start Level Change" command.

Enumerator
CCMLS_PRIMARY_SWITCH_UP 

CCMLS_PRIMARY_SWITCH_UP.

CCMLS_PRIMARY_SWITCH_DOWN 

CCMLS_PRIMARY_SWITCH_DOWN.

CCMLS_PRIMARY_SWITCH_RESERVED 

CCMLS_PRIMARY_SWITCH_RESERVED.

CCMLS_PRIMARY_SWITCH_NO_UP_DOWN_MOTION 

CCMLS_PRIMARY_SWITCH_NO_UP_DOWN_MOTION.

◆ CCMLS_SECONDARY_SWITCH_T

Enumeration for "Start Level Change" command.

Enumerator
CCMLS_SECONDARY_SWITCH_INCREMENT 

CCMLS_SECONDARY_SWITCH_INCREMENT.

CCMLS_SECONDARY_SWITCH_DECREMENT 

CCMLS_SECONDARY_SWITCH_DECREMENT.

CCMLS_SECONDARY_SWITCH_RESERVED 

CCMLS_SECONDARY_SWITCH_RESERVED.

CCMLS_SECONDARY_SWITCH_NO_INC_DEC 

CCMLS_SECONDARY_SWITCH_NO_INC_DEC.

Function Documentation

◆ cc_multilevel_switch_get_current_value()

uint8_t cc_multilevel_switch_get_current_value ( cc_multilevel_switch_t * p_switch)

Returns the current value of a given multilevel switch.

Must be used for local actuation only.

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

◆ cc_multilevel_switch_get_last_on_value()

uint8_t cc_multilevel_switch_get_last_on_value ( cc_multilevel_switch_t * p_switch)

Returns the last on-value of a given multilevel switch.

Must be used for local actuation only.

Parameters
p_switchThe multilevel switch of which the last on-value is returned.
Returns
Last on value of the given multilevel switch.

◆ cc_multilevel_switch_get_max_value()

uint8_t cc_multilevel_switch_get_max_value ( void )

Returns the max value of all multilevel switches.

Returns
uint8_t Max value of all multilevel switches.

◆ cc_multilevel_switch_get_min_value()

uint8_t cc_multilevel_switch_get_min_value ( void )

Returns the min value of all multilevel switches.

Returns
uint8_t Min value of all multilevel switches.

◆ cc_multilevel_switch_read()

bool cc_multilevel_switch_read ( uint8_t multilevel_component_id,
cc_multilevel_switch_t * multilevel_switch )

◆ cc_multilevel_switch_set()

void cc_multilevel_switch_set ( cc_multilevel_switch_t * p_switch,
uint8_t value,
uint8_t duration )

Sets the value of a given multilevel 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.
durationThe time it takes to reach the value.

◆ cc_multilevel_switch_start_level_change()

void cc_multilevel_switch_start_level_change ( cc_multilevel_switch_t * p_switch,
bool up,
bool ignore_start_level,
uint8_t start_level,
uint8_t duration )

Starts changing the value of a given multilevel switch.

Must be used for local actuation only.

Parameters
p_switchThe multilevel switch of which the value is changed.
upThe direction of the change. If true the value will decrease. If false, the value will increase.
ignore_start_levelDecides whether the start level is ignored or not. If set to true, the change will start from the current value. If set to false, the value will start it's change from the given start level.
start_levelThe value to start from if ignore_start_level is set to false.
durationThe duration of the change.

◆ cc_multilevel_switch_stop_level_change()

void cc_multilevel_switch_stop_level_change ( cc_multilevel_switch_t * p_switch)

Stops an ongoing change of a given multilevel switch.

If no change is ongoing, nothing happens.

Must be used for local actuation only.

Parameters
p_switchThe multilevel switch of which the change will be stopped.

◆ cc_multilevel_switch_support_cb()

void cc_multilevel_switch_support_cb ( struct cc_multilevel_switch_t * p_switch)

◆ cc_multilevel_switch_support_config_get_default_duration()

uint8_t cc_multilevel_switch_support_config_get_default_duration ( void )

◆ cc_multilevel_switch_support_config_get_length_switches()

uint8_t cc_multilevel_switch_support_config_get_length_switches ( void )

◆ cc_multilevel_switch_support_config_get_switches()

cc_multilevel_switch_t * cc_multilevel_switch_support_config_get_switches ( void )

◆ cc_multilevel_switch_write()

bool cc_multilevel_switch_write ( uint8_t multilevel_component_id,
cc_multilevel_switch_t * multilevel_switch )

◆ CmdClassMultilevelSwitchSetTransmit()

JOB_STATUS CmdClassMultilevelSwitchSetTransmit ( AGI_PROFILE * pProfile,
uint8_t sourceEndpoint,
void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCbFunc,
uint8_t value,
uint8_t duration )

Initiates the transmission of a "Multilevel Switch Set" command.

Parameters
[in]pProfilepointer to AGI profile
[in]sourceEndpointsource endpoint
[out]pCbFuncCallback function to be called when transmission is done/failed.
[in]valueMultilevel value.
[in]durationThe duration from current value to the new given value.
Returns
Status of the job.

◆ CmdClassMultilevelSwitchStartLevelChange()

JOB_STATUS CmdClassMultilevelSwitchStartLevelChange ( AGI_PROFILE * pProfile,
uint8_t sourceEndpoint,
void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCbFunc,
CCMLS_PRIMARY_SWITCH_T primarySwitch,
CCMLS_IGNORE_START_LEVEL_T fIgnoreStartLevel,
CCMLS_SECONDARY_SWITCH_T secondarySwitch,
uint8_t primarySwitchStartLevel,
uint8_t duration,
uint8_t secondarySwitchStepSize )

Initiates the transmission of a "Multilevel Switch Start Level Change" command.

Parameters
[in]pProfilepointer to AGI profile or NULL for lifeline
[in]sourceEndpointsource endpoint
[out]pCbFuncCallback function to be called when transmission is done/failed.
[in]primarySwitchControls the primary device functionality.
[in]fIgnoreStartLevelIgnore start level.
[in]secondarySwitchControls the secondary device functionality.
[in]primarySwitchStartLevelStart level for the primary device functionality.
[in]durationThe duration from lowest to highest value.
[in]secondarySwitchStepSizeStep size for secondary device functionality.
Returns
Status of the job.

◆ CmdClassMultilevelSwitchStopLevelChange()

JOB_STATUS CmdClassMultilevelSwitchStopLevelChange ( AGI_PROFILE * pProfile,
uint8_t sourceEndpoint,
void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCbFunc )

Initiates the transmission of a "Multilevel Switch Stop Level Change" command.

Parameters
[in]pProfilepointer to AGI profile
[in]sourceEndpointsource endpoint
[out]pCbFuncCallback function to be called when transmission is done/failed.
Returns
Status of the job.