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) |
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_t * | cc_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) |
typedef void(* cc_multilevel_switch_callback_t) (struct cc_multilevel_switch_t *p_switch) |
typedef struct cc_multilevel_switch_t cc_multilevel_switch_t |
Enumeration for "Start Level Change" command.
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.
p_switch | The multilevel switch of which the value is returned. |
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.
p_switch | The multilevel switch of which the last on-value is returned. |
uint8_t cc_multilevel_switch_get_max_value | ( | void | ) |
Returns the max value of all multilevel switches.
uint8_t cc_multilevel_switch_get_min_value | ( | void | ) |
Returns the min value of all multilevel switches.
bool cc_multilevel_switch_read | ( | uint8_t | multilevel_component_id, |
cc_multilevel_switch_t * | multilevel_switch ) |
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.
p_switch | The switch of which the value is set. |
value | The value to set. |
duration | The time it takes to reach the value. |
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.
p_switch | The multilevel switch of which the value is changed. |
up | The direction of the change. If true the value will decrease. If false, the value will increase. |
ignore_start_level | Decides 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_level | The value to start from if ignore_start_level is set to false. |
duration | The duration of the 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.
p_switch | The multilevel switch of which the change will be stopped. |
void cc_multilevel_switch_support_cb | ( | struct cc_multilevel_switch_t * | p_switch | ) |
uint8_t cc_multilevel_switch_support_config_get_default_duration | ( | void | ) |
uint8_t cc_multilevel_switch_support_config_get_length_switches | ( | void | ) |
cc_multilevel_switch_t * cc_multilevel_switch_support_config_get_switches | ( | void | ) |
bool cc_multilevel_switch_write | ( | uint8_t | multilevel_component_id, |
cc_multilevel_switch_t * | multilevel_switch ) |
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.
[in] | pProfile | pointer to AGI profile |
[in] | sourceEndpoint | source endpoint |
[out] | pCbFunc | Callback function to be called when transmission is done/failed. |
[in] | value | Multilevel value. |
[in] | duration | The duration from current value to the new given value. |
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.
[in] | pProfile | pointer to AGI profile or NULL for lifeline |
[in] | sourceEndpoint | source endpoint |
[out] | pCbFunc | Callback function to be called when transmission is done/failed. |
[in] | primarySwitch | Controls the primary device functionality. |
[in] | fIgnoreStartLevel | Ignore start level. |
[in] | secondarySwitch | Controls the secondary device functionality. |
[in] | primarySwitchStartLevel | Start level for the primary device functionality. |
[in] | duration | The duration from lowest to highest value. |
[in] | secondarySwitchStepSize | Step size for secondary device functionality. |
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.
[in] | pProfile | pointer to AGI profile |
[in] | sourceEndpoint | source endpoint |
[out] | pCbFunc | Callback function to be called when transmission is done/failed. |