ZAF Actuator Module#

Modules#

actuator

Enumerations#

enum
EACTUATOR_NOT_CHANGING
EACTUATOR_CHANGING
EACTUATOR_FAILED
}

Return type for Actuator functions that can trigger changes that require some time to be done.

Typedefs#

typedef void(*
zaf_actuator_callback_t)(struct actuator *pActuator)
typedef struct actuator

The structure of Actuator module.

typedef enum _eActuatorState

Return type for Actuator functions that can trigger changes that require some time to be done.

Functions#

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.

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.

ZAF_Actuator_StartChange(s_Actuator *pActuator, bool ignoreStartLevel, bool upDown, uint8_t startLevel, uint8_t duration)

Starts the change on actuator pointed by pActuator.

ZAF_Actuator_StopChange(s_Actuator *pActuator)

Stops ongoing change on actuator pointed by pActuator.

uint8_t
ZAF_Actuator_GetCurrentValue(s_Actuator *pActuator)

Returns current value.

uint8_t
ZAF_Actuator_GetTargetValue(s_Actuator *pActuator)

Returns target value.

uint8_t
ZAF_Actuator_GetDurationRemaining(s_Actuator *pActuator)

Returns estimated time until target value is reached.

uint8_t
ZAF_Actuator_GetLastOnValue(s_Actuator *pActuator)

Gets last ON value.

uint32_t
getDurationInMs(uint8_t duration)

Converts coded duration into milliseconds format, refer to CC:0000.00.00.11.015.

uint8_t
ZAF_Actuator_GetMax(s_Actuator *pActuator)

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.


Definition at line 63 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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)

Definition at line 36 of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h

s_Actuator#

typedef struct actuator s_Actuator

The structure of Actuator module.


Definition at line 58 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.


Definition at line 67 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

Pointer to Actuator to be initialized

N/AminValue

Minimum possible value

N/AmaxValue

Maximum possible value

N/ArefreshRate

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/AdurationDefault

Factory default duration

N/Acc_callback

Pointer to function in 'user' command class


Definition at line 81 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
[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


Definition at line 98 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
[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


Definition at line 111 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

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


Definition at line 122 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

Pointer to Actuator struct for which current value was requested

Returns

  • Current value


Definition at line 129 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

Pointer to Actuator struct for which target value was requested

Returns

  • Target value


Definition at line 136 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

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


Definition at line 143 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

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


Definition at line 151 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/Aduration

Coded duration

Returns

  • duration in milliseconds


Definition at line 158 of file /mnt/raid/workspaces/ws.T7KR5OZRo/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.

Parameters
N/ApActuator

Pointer to actuator

Returns

  • Value of max


Definition at line 165 of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/Actuator/ZAF_Actuator.h