Scenes Server#
API and Callbacks for the Scenes Cluster Server Component.
Silicon Labs implementation of the Scenes server cluster. This component supports commands for setting up and recalling scenes. Scenes are stored in a table and each scene consists of a set of values for attributes in other clusters. Clusters that extend the scene table do so through extension field sets. This component supports extensions for the On/Off, Level Control, Thermostat, Color Control, Door Lock, and Window Covering clusters. If the application includes any of these clusters, the component automatically includes and manages the attributes in those clusters. For example, if the application includes the On/Off server cluster, the component saves and recalls the On/Off attribute as part of saving or recalling scenes. Some ZLL extensions are implemented in this component and will be included automatically for ZLL applications. If the ZLL Scenes server cluster component is also enabled, this component uses it for handling some additional ZLL enhancements. Otherwise, these ZLL extensions are disabled. This component requires extending in order to interact with the actual hardware.
Variables#
Functions#
Scenes Server Custom Recall Scene.
Macros#
Variable Documentation#
emberAfPluginScenesServerEntriesInUse#
uint8_t emberAfPluginScenesServerEntriesInUse
78
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerSceneTable#
EmberAfSceneTableEntry emberAfPluginScenesServerSceneTable[]
101
of file app/framework/plugin/scenes/scenes.h
Function Documentation#
emberAfScenesSetSceneCountAttribute#
EmberAfStatus emberAfScenesSetSceneCountAttribute (uint8_t endpoint, uint8_t newCount)
N/A | endpoint | |
N/A | newCount |
69
of file app/framework/plugin/scenes/scenes.h
emberAfScenesMakeValid#
EmberAfStatus emberAfScenesMakeValid (uint8_t endpoint, uint8_t sceneId, uint16_t groupId)
N/A | endpoint | |
N/A | sceneId | |
N/A | groupId |
71
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerParseAddScene#
bool emberAfPluginScenesServerParseAddScene (const EmberAfClusterCommand * cmd, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, uint8_t * sceneName, uint8_t * extensionFieldSets)
N/A | cmd | |
N/A | groupId | |
N/A | sceneId | |
N/A | transitionTime | |
N/A | sceneName | |
N/A | extensionFieldSets |
116
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerParseViewScene#
bool emberAfPluginScenesServerParseViewScene (const EmberAfClusterCommand * cmd, uint16_t groupId, uint8_t sceneId)
N/A | cmd | |
N/A | groupId | |
N/A | sceneId |
122
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerCustomRecallSceneCallback#
bool emberAfPluginScenesServerCustomRecallSceneCallback (const EmberAfSceneTableEntry *const sceneEntry, uint16_t transitionTimeDs, EmberAfStatus *const status)
Scenes Server Custom Recall Scene.
N/A | sceneEntry | pointer to EmberAfSceneTableEntry for recalled scene Ver.: always |
N/A | transitionTimeDs | transition time in deci-seconds (1/10 sec) Ver.: always |
N/A | status | pointer to return EmberAfStatus Ver.: always |
Customize the implementation of the Scenes cluster RecallScene command for desired behavior when gradually transitioning to the specified scene over the specified transition time interval.
Upon entry to this callback, the presented scene table entry has been verified to be valid for the endpoint, group ID, and scene ID referenced in the received ZCL Scenes cluster RecallScene command.
NOTE: If this callback is implemented, the expectation is that it will INITIATE the scene transition behavior and return promptly with prospective success or failure status, rather than execute through the full duration of the transition time before returning.
NOTE: The scene table entry pointer, and the information in the scene table entry, are available only during the execution of this callback function. The scene table entry information (NOT the pointer) must be copied and saved before returning from this callback function if it will need to be referenced at other times to perform the desired transition behavior (for example, by a timer-based periodic handler launched by this callback).
If the value of transitionTimeDs is 0xFFFF, the transition time information configured in the scene table entry should be used.
Upon arriving at the target scene configuration, the custom implementation should set the Scenes cluster attributes CurrentScene and CurrentGroup to the scene ID and group ID values contained in the sceneEntry, and set the SceneValid attribute to true.
Returns true if a customization of this callback HAS been IMPLEMENTED. This REQUIRES that a valid EmberAfStatus value has been written to the status argument. Status will be EMBER_ZCL_STATUS_SUCCESS if the scene transition has been initiated successfully, even though the transition time has not fully elapsed and the full effect of the scene transition over the transition time has not yet completed. Otherwise, a suitable error status value should be returned in the status argument.
Returns false if a customization of this callback HAS NOT been implemented. In this case, the Scenes plugin will perform default handling (apply target scene settings immediately without regard for the specified transition time).
Returns
true if custom callback is implemented false if custom callback is not implemented (apply default handling)
175
of file app/framework/plugin/scenes/scenes.h
Macro Definition Documentation#
emberAfScenesMakeInvalid#
#define emberAfScenesMakeInvalidValue:
emberAfScenesClusterMakeInvalidCallback
76
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerRetrieveSceneEntry#
#define emberAfPluginScenesServerRetrieveSceneEntryValue:
(entry, i)
102
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerSaveSceneEntry#
#define emberAfPluginScenesServerSaveSceneEntryValue:
(entry, i)
104
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerNumSceneEntriesInUse#
#define emberAfPluginScenesServerNumSceneEntriesInUseValue:
()
106
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerSetNumSceneEntriesInUse#
#define emberAfPluginScenesServerSetNumSceneEntriesInUseValue:
(x)
108
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerIncrNumSceneEntriesInUse#
#define emberAfPluginScenesServerIncrNumSceneEntriesInUseValue:
()
110
of file app/framework/plugin/scenes/scenes.h
emberAfPluginScenesServerDecrNumSceneEntriesInUse#
#define emberAfPluginScenesServerDecrNumSceneEntriesInUseValue:
()
112
of file app/framework/plugin/scenes/scenes.h