Notification#
Command Class Notification enables a device to send notifications like "smoke detected" or "window opened".
CC Notification is typically used in sensor applications because it supports many different notification/sensor types.
CC Notification requires at least one notification to be configured by implementing the functions declared in cc_notification_config_api.h. Simplicity Studio / SLC generates this configuration automatically based on user configuration in *.cc_config files.
This command class offers one single API function to be used by the application:
The specification of CC Notification can be found in https://github.com/Z-Wave-Alliance/AWG/blob/main/source/application_command_classes/command_class_definitions/notification_command_class_version_3-8.rst.
Modules#
Configuration of CC Notification
Enumerations#
General purpose notification event.
Notification type (8 bit).
General purpose notification event.
Typedefs#
Struct used to pass operational data to TSE module.
Struct used to pass operational data to TSE module.
Functions#
Triggers notification event and sends it to dedicated Agi profile.
Inits notification module Do not call it directly.
Resets notification module Do not call it directly.
Application specific Notification Set cmd handler.
Fills in Bit Mask with supported Notification Types.
Fills in Bit Mask with supported events for given notification.
Prepares data for Notification Report command as response to Notification Get.
Transmits a Notification Report.
Send report via lifeLine when a change happens.
Macros#
the maximum length of the notification bitmask array
the maximum length of the notification bitmask array
Enumeration Documentation#
NOTIFICATION_EVENT#
NOTIFICATION_EVENT
General purpose notification event.
Enumerator | |
---|---|
NOTIFICATION_EVENT_NO_EVENT | |
NOTIFICATION_EVENT_UNKNOWN_EVENT | |
NOTIFICATION_EVENT_NO_EVENT | |
NOTIFICATION_EVENT_UNKNOWN_EVENT |
56
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Notification/inc/CC_Notification.h
notification_type_t#
notification_type_t
Notification type (8 bit).
Enumerator | |
---|---|
NOTIFICATION_TYPE_NONE | |
NOTIFICATION_TYPE_SMOKE_ALARM | |
NOTIFICATION_TYPE_CO_ALARM | |
NOTIFICATION_TYPE_CO2_ALARM | |
NOTIFICATION_TYPE_HEAT_ALARM | |
NOTIFICATION_TYPE_WATER_ALARM | |
NOTIFICATION_TYPE_ACCESS_CONTROL | |
NOTIFICATION_TYPE_HOME_SECURITY | |
NOTIFICATION_TYPE_POWER_MANAGEMENT | |
NOTIFICATION_TYPE_SYSTEM | |
NOTIFICATION_TYPE_EMERGENCY_ALARM | |
NOTIFICATION_TYPE_CLOCK | |
NOTIFICATION_TYPE_MULTIDEVICE |
21
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Notification/inc/cc_notification_types.h
NOTIFICATION_EVENT#
NOTIFICATION_EVENT
General purpose notification event.
Enumerator | |
---|---|
NOTIFICATION_EVENT_NO_EVENT | |
NOTIFICATION_EVENT_UNKNOWN_EVENT | |
NOTIFICATION_EVENT_NO_EVENT | |
NOTIFICATION_EVENT_UNKNOWN_EVENT |
60
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
Typedef Documentation#
s_CC_notification_data_t#
typedef struct s_CC_notification_data_t_ s_CC_notification_data_t
Struct used to pass operational data to TSE module.
71
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Notification/inc/CC_Notification.h
s_CC_notification_data_t#
typedef struct s_CC_notification_data_t_ s_CC_notification_data_t
Struct used to pass operational data to TSE module.
73
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
notification_event_state#
typedef uint8_t notification_event_state
25
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/notification.h
cc_notification_t#
typedef struct _cc_notification_t cc_notification_t
35
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/notification.h
Function Documentation#
CC_Notification_TriggerAndTransmit#
JOB_STATUS CC_Notification_TriggerAndTransmit (uint8_t index, uint8_t notificationEvent, uint8_t * pEvPar, uint8_t evParLen, void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCallback, bool tse)
Triggers notification event and sends it to dedicated Agi profile.
[in] | index | notification index. |
[in] | notificationEvent | Event triggered. |
[in] | pEvPar | point to event parameters. |
[in] | evParLen | length of event parameters. |
[out] | pCallback | callback function returning state on job |
[in] | tse | True of false, depending if TSE should be triggered, or not |
Returns
JOB_STATUS
83
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Notification/inc/CC_Notification.h
notification_init#
void notification_init ()
Inits notification module Do not call it directly.
Used only by CC_Notification.c
80
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
notification_reset#
void notification_reset ()
Resets notification module Do not call it directly.
Used only by CC_Notification.c
87
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
handleAppNotificationSet#
e_cmd_handler_return_code_t handleAppNotificationSet (notification_type_t notificationType, NOTIFICATION_STATUS notificationStatus, uint8_t endpoint)
Application specific Notification Set cmd handler.
[in] | notificationType | notification type |
[in] | notificationStatus | notification status of type NOTIFICATION_STATUS |
[in] | endpoint | is the destination endpoint |
Returns
command handler return code
97
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
cc_notification_supported_notifications_bitmask#
uint8_t cc_notification_supported_notifications_bitmask (uint8_t * pBitMaskArray, uint8_t bBitMaskLen, uint8_t endpoint)
Fills in Bit Mask with supported Notification Types.
[out] | pBitMaskArray | The Bit Mask fields describe the supported Notification Type(s) by the device |
[in] | bBitMaskLen | The length of the Bit Mask fields |
[in] | endpoint | is the destination endpoint |
Used to prepare data for Notification Supported Report Command as response to Notification Supported Get Command.
Returns
Number of Bit Masks fields (1-31) used, in bytes.
115
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
cc_notification_supported_events_bitmask#
uint8_t cc_notification_supported_events_bitmask (notification_type_t type, uint8_t endpoint, uint8_t * pBitMaskArray)
Fills in Bit Mask with supported events for given notification.
[in] | type | Notification type |
[in] | endpoint | Notification Endpoint |
[out] | pBitMaskArray | The Bit Mask of supported Events within the requested Notification Type. |
Used to prepare data for Event Supported Report Command
Finds notification based on {type, endpoint} values an d creates bitmask with supported events. See Also
cc_notification_config.c
Returns
Number of Bit Masks fields (1-31) used in bytes
133
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
notification_report_get_data#
bool notification_report_get_data (notification_type_t * type, uint8_t endpoint, uint8_t * event, NOTIFICATION_STATUS * status)
Prepares data for Notification Report command as response to Notification Get.
[inout] | type | Notification Type |
[in] | endpoint | Notification endpoint |
[inout] | event | If specified, current state of notification |
[out] | status | Current Notification status - On/Off |
Returns
true if notification with {type,endpoint} exists, false if input data wasn't correct
150
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
CmdClassNotificationReport#
JOB_STATUS CmdClassNotificationReport (uint8_t notification_index, uint8_t * pEvPar, uint8_t evParLen, void(*)(TRANSMISSION_RESULT *pTransmissionResult) pCallback)
Transmits a Notification Report.
N/A | notification_index | index of notification to be reported in notifications array |
N/A | pEvPar | List of parameters to be reported |
N/A | evParLen | Length of event parameters list |
N/A | pCallback | callback function returning state on job |
See SDS11060.doc "Table of defined Notification Types & Events". Returns
JOB_STATUS
167
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
CC_Notification_report_stx#
void CC_Notification_report_stx (zaf_tx_options_t * tx_options, void * pData)
Send report via lifeLine when a change happens.
N/A | tx_options | txOptions |
N/A | pData | Command payload for the report |
Callback used by TSE module. Refer to ZAF_TSE.h for more details.
181
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h
Macro Definition Documentation#
NOTIFICATION_BITMASK_ARRAY_LENGTH#
#define NOTIFICATION_BITMASK_ARRAY_LENGTHValue:
32
the maximum length of the notification bitmask array
51
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/CommandClasses/Notification/inc/CC_Notification.h
NOTIFICATION_BITMASK_ARRAY_LENGTH#
#define NOTIFICATION_BITMASK_ARRAY_LENGTHValue:
32
the maximum length of the notification bitmask array
55
of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/Apps/internal/zwave_soc_ul_testtool/CC_Notification.h