ZAF Actuator Module#
Modules#
Enumerations#
Return type for Actuator functions that can trigger changes that require some time to be done.
Typedefs#
The structure of Actuator module.
Return type for Actuator functions that can trigger changes that require some time to be done.
Functions#
Initializes Actuator module.
Sets target value to value
in actuator pointed by pActuator
, during duration
period.
Starts the change on actuator pointed by pActuator
.
Stops ongoing change on actuator pointed by pActuator
.
Returns current value.
Returns target value.
Returns estimated time until target value is reached.
Gets last ON value.
Converts coded duration into milliseconds format, refer to CC:0000.00.00.11.015.
Returns value defined as maximum for pActuator
.
Enumeration Documentation#
_eActuatorState#
_eActuatorState
Return type for Actuator functions that can trigger changes that require some time to be done.
Enumerator | |
---|---|
EACTUATOR_NOT_CHANGING | EACTUATOR_NOT_CHANGING - Already in final state. |
EACTUATOR_CHANGING | EACTUATOR_CHANGING - Not in final state. |
EACTUATOR_FAILED | EACTUATOR_FAILED - Requested change rejected. |
63
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
Typedef Documentation#
zaf_actuator_callback_t#
typedef void(* zaf_actuator_callback_t) (struct actuator *pActuator) )(struct actuator *pActuator)
36
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
s_Actuator#
typedef struct actuator s_Actuator
The structure of Actuator module.
58
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
eActuatorState#
typedef enum _eActuatorState eActuatorState
Return type for Actuator functions that can trigger changes that require some time to be done.
67
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
Function Documentation#
ZAF_Actuator_Init#
void ZAF_Actuator_Init (s_Actuator * pActuator, uint8_t minValue, uint8_t maxValue, uint16_t refreshRate, uint8_t durationDefault, zaf_actuator_callback_t cc_callback)
Initializes Actuator module.
N/A | pActuator | Pointer to Actuator to be initialized |
N/A | minValue | Minimum possible value |
N/A | maxValue | Maximum possible value |
N/A | refreshRate | Minimal refresh rate in milliseconds. Tells how often the application should refresh it's state during timed changes. Actuator might adjust it to higher value, when number of steps between current and target value is low. |
N/A | durationDefault | Factory default duration |
N/A | cc_callback | Pointer to function in 'user' command class |
81
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_Set#
eActuatorState ZAF_Actuator_Set (s_Actuator * pActuator, uint8_t value, uint8_t duration)
Sets target value to value
in actuator pointed by pActuator
, during duration
period.
[inout] | pActuator | Pointer to Actuator that will be set to new value |
[in] | value | New target value |
[in] | duration | Time period that change should take. Actual time spent depends on number of steps between current and target value and refreshRate. Requested and actual time may differ slightly. |
Returns
EACTUATOR_NOT_CHANGING if already on target value EACTUATOR_CHANGING if the change has successfully started EACTUATOR_FAILED if request was invalid
98
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_StartChange#
eActuatorState ZAF_Actuator_StartChange (s_Actuator * pActuator, bool ignoreStartLevel, bool upDown, uint8_t startLevel, uint8_t duration)
Starts the change on actuator pointed by pActuator
.
[inout] | pActuator | Pointer to object whose value will be updated |
[in] | ignoreStartLevel | Should startLevel be ignored. If yes, change starts from current level. |
[in] | upDown | Direction of change. FALSE for UP, TRUE for DOWN. |
[in] | startLevel | If not ignored, color will be first set to this level and then change will start |
[in] | duration | Time period that change should take. Actual time spent depends on number of steps between current and target value and refreshRate. Requested and actual time may differ slightly. |
Returns
EACTUATOR_NOT_CHANGING if already on target value EACTUATOR_CHANGING if the change has successfully started
111
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_StopChange#
eActuatorState ZAF_Actuator_StopChange (s_Actuator * pActuator)
Stops ongoing change on actuator pointed by pActuator
.
N/A | pActuator | Pointer to object whose change should be stopped |
Returns
EACTUATOR_CHANGING if there was an ongoing change that was stopped, or else EACTUATOR_NOT_CHANGING
122
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_GetCurrentValue#
uint8_t ZAF_Actuator_GetCurrentValue (s_Actuator * pActuator)
Returns current value.
N/A | pActuator | Pointer to Actuator struct for which current value was requested |
Returns
Current value
129
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_GetTargetValue#
uint8_t ZAF_Actuator_GetTargetValue (s_Actuator * pActuator)
Returns target value.
N/A | pActuator | Pointer to Actuator struct for which target value was requested |
Returns
Target value
136
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_GetDurationRemaining#
uint8_t ZAF_Actuator_GetDurationRemaining (s_Actuator * pActuator)
Returns estimated time until target value is reached.
N/A | pActuator | Pointer to Actuator struct for which remaining duration was requested |
Returns
Remaining duration in format described by requirement CC:0000.00.00.11.015 or 0 if already at target value
143
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_GetLastOnValue#
uint8_t ZAF_Actuator_GetLastOnValue (s_Actuator * pActuator)
Gets last ON value.
N/A | pActuator | Pointer to Actuator struct for which last On value was requested |
If lastOnValue was never set, it returns zero. Then the caller has to use default ON value. Returns
lastOnValue
151
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
getDurationInMs#
uint32_t getDurationInMs (uint8_t duration)
Converts coded duration into milliseconds format, refer to CC:0000.00.00.11.015.
N/A | duration | Coded duration |
Returns
duration in milliseconds
158
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h
ZAF_Actuator_GetMax#
uint8_t ZAF_Actuator_GetMax (s_Actuator * pActuator)
Returns value defined as maximum for pActuator
.
N/A | pActuator | Pointer to actuator |
Returns
Value of max
165
of file /mnt/raid/workspaces/ws.WDdsgIAV6/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h