CentralScene#

Modules#

central_scene_configuration_t

s_CC_centralScene_data_t_

_cc_central_scene_t

Typedefs#

typedef struct _cc_central_scene_t

Structure that describes a single scene.

Functions#

cc_central_scene_notification_tx(AGI_PROFILE *pProfile, uint8_t keyAttribute, uint8_t sceneNumber, ZAF_TX_Callback_t pCbFunc)

Initiates the transmission of a "Central Scene Notification" command.

void
cc_central_scene_handle_notification_timer(bool start_timer, uint8_t scene_number)

Start or stop Central Scene Notification timer Used when event CENTRAL_SCENE_NOTIFICATION_KEY_ATTRIBUTES_KEY_HELD_DOWN happens.

Returns the array of central scenes.

uint8_t

Returns number of supported scenes.

uint8_t

Returns supported attributes for a given scene.

uint8_t

Gets 'identical' attribute that describes supported key attributes.

bool
cc_central_scene_read(central_scene_configuration_t *pConfig)
bool
cc_central_scene_write(const central_scene_configuration_t *pConfig)

Macros#

#define
CC_CENTRAL_SCENE_SIZE_OF_SUPPORTED_SCENES_ATTRIBUTES sizeof(((cc_central_scene_t *)0)->scene_attributes)

Size of supported scenes.

Typedef Documentation#

s_CC_centralScene_data_t#

typedef struct s_CC_centralScene_data_t_ s_CC_centralScene_data_t

cc_central_scene_t#

typedef struct _cc_central_scene_t cc_central_scene_t

Structure that describes a single scene.


Function Documentation#

cc_central_scene_notification_tx#

JOB_STATUS cc_central_scene_notification_tx (AGI_PROFILE * pProfile, uint8_t keyAttribute, uint8_t sceneNumber, ZAF_TX_Callback_t pCbFunc)

Initiates the transmission of a "Central Scene Notification" command.

Parameters
TypeDirectionArgument NameDescription
AGI_PROFILE *[in]pProfile

pointer to AGI profile or NULL for lifeline

uint8_t[in]keyAttribute

The key event.

uint8_t[in]sceneNumber

The scene number.

ZAF_TX_Callback_t[in]pCbFunc

Callback function to be called when transmission is done/failed.

Note

  • Source Endpoint is always set to Root in this function

Returns

  • Status of the job.


cc_central_scene_handle_notification_timer#

void cc_central_scene_handle_notification_timer (bool start_timer, uint8_t scene_number)

Start or stop Central Scene Notification timer Used when event CENTRAL_SCENE_NOTIFICATION_KEY_ATTRIBUTES_KEY_HELD_DOWN happens.

Parameters
TypeDirectionArgument NameDescription
boolN/Astart_timer

True if timer should be started, false will stop active timer.

uint8_tN/Ascene_number

Number of active scene.

App will send notifications periodically as long as the event is active. Frequency depends on whether slow refresh is enabled or not.


cc_central_scene_config_get_scenes_attributes#

cc_central_scene_t * cc_central_scene_config_get_scenes_attributes (void )

Returns the array of central scenes.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • If scenes are identical, the array will contain only one element

Returns

  • Address of the first element in the central scene array.


cc_central_scene_config_get_number_of_scenes#

uint8_t cc_central_scene_config_get_number_of_scenes (void )

Returns number of supported scenes.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Total amount of scenes supported by the app.


cc_central_scene_config_get_attribute_bitmask#

uint8_t cc_central_scene_config_get_attribute_bitmask (uint8_t scene_number)

Returns supported attributes for a given scene.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Ascene_number

Number of scene to get supported attributes for

Note

  • This function is used to prepare CENTRAL_SCENE_SUPPORTED_REPORT It is assumption that argument scene_number is higher than 1 only in case when scenes are not identical.

Returns

  • Supported attributes as bitmask


cc_central_scene_config_get_identical#

uint8_t cc_central_scene_config_get_identical (void )

Gets 'identical' attribute that describes supported key attributes.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • True if all keys are identical, False if different key attributes supported


cc_central_scene_read#

bool cc_central_scene_read (central_scene_configuration_t * pConfig)
Parameters
TypeDirectionArgument NameDescription
central_scene_configuration_t *N/ApConfig

cc_central_scene_write#

bool cc_central_scene_write (const central_scene_configuration_t * pConfig)
Parameters
TypeDirectionArgument NameDescription
const central_scene_configuration_t *N/ApConfig

cc_central_scene_migrate#

void cc_central_scene_migrate (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A