Description
CC Supervision is built into the Application Framework and handles Supervision communication on S2 encapsulated frames. Supervision is only supported for Set and Report commands.
Command Class Supervision is default configuration to not support more Supervision reports on a Supervision Get command. In Supervision Get command is 'more status updates' field set to CC_SUPERVISION_STATUS_UPDATES_NOT_SUPPORTED.
Default configuration
The default setting is that CC Supervision supports only one Supervision Report per Supervision Get command. In Supervision Get command, the 'more status updates' field is set to CC_SUPERVISION_STATUS_UPDATES_NOT_SUPPORTED.
Handle more Supervision Reports
Device has the possibility to inform destination node that there is an operation in progress. Example is Wall controller with a display showing that a device is working (CC_SUPERVISION_STATUS_WORKING) until target value is reached (CC_SUPERVISION_STATUS_SUCCESS). Please see cc_supervision_report_recived_handler() for more details.
Control Supervision Reports
Device has the possibility to send more Supervision Reports to report ongoing Request job. Example application Doorlock Keypad reports when Doorlock operation is started and also sends a new report when it's finished. For this purpose, cc_supervision_get_received_handler()
can be used. Please see cc_supervision_get_received_handler() for more details.
◆ CC_SUPERVISION_ADD_MORE_STATUS_UPDATE
#define CC_SUPERVISION_ADD_MORE_STATUS_UPDATE |
( |
| status | ) |
(status << 7) |
status values: {0,1}. Set bit 7, CC SUPERVISION_REPORT
◆ CC_SUPERVISION_ADD_SESSION_ID
#define CC_SUPERVISION_ADD_SESSION_ID |
( |
| properties | ) |
(properties & 0x3F) |
add session id from properties bits [0..5]
◆ CC_SUPERVISION_ADD_STATUS_UPDATE
#define CC_SUPERVISION_ADD_STATUS_UPDATE |
( |
| status | ) |
(status << 7) |
status values: {0,1}. Set bit 7, CC SUPERVISION_GET
◆ CC_SUPERVISION_EXTRACT_MORE_STATUS_UPDATE
#define CC_SUPERVISION_EXTRACT_MORE_STATUS_UPDATE |
( |
| status | ) |
(status >> 7) |
extract more status update field bit 7, CC SUPERVISION_REPORT
◆ CC_SUPERVISION_EXTRACT_SESSION_ID
#define CC_SUPERVISION_EXTRACT_SESSION_ID |
( |
| properties | ) |
(properties & 0x3F) |
extract session id from properties bits [0..5]
◆ CC_SUPERVISION_EXTRACT_STATUS_UPDATE
#define CC_SUPERVISION_EXTRACT_STATUS_UPDATE |
( |
| status | ) |
(status >> 7) |
extract more status update field bit 7, CC SUPERVISION_GET
◆ cc_supervision_report_event
Structure used by supervision_event_handler() to process upcoming events Registered for CC Supervision
◆ cc_supervision_status_t
◆ _SUPERVISION_STATUS_
Status of Supervision.
Enumerator |
---|
CC_SUPERVISION_STATUS_NOT_SUPPORTED | SUPERVISION_STATUS_NOT_SUPPORTED
|
CC_SUPERVISION_STATUS_WORKING | SUPERVISION_STATUS_WORKING
|
CC_SUPERVISION_STATUS_FAIL | SUPERVISION_STATUS_FAIL
|
CC_SUPERVISION_STATUS_CANCEL | CC Supervision shouldn't do anything with this frame, report will be sent from somewhere else
|
CC_SUPERVISION_STATUS_NOT_FOUND | CC handler was not found in CC handler map
|
CC_SUPERVISION_STATUS_SUCCESS | SUPERVISION_STATUS_SUCCESS
|
◆ cc_supervision_more_status_updates_t
Enum type is used in CC SUPERVISION_REPORT to allow a receiving node to advertise application status updates in future Supervision Report Commands
Enumerator |
---|
CC_SUPERVISION_MORE_STATUS_UPDATES_THIS_IS_LAST | CC_SUPERVISION_MORE_STATUS_UPDATES_THIS_IS_LAST.
|
CC_SUPERVISION_MORE_STATUS_UPDATES_REPORTS_TO_FOLLOW | CC_SUPERVISION_MORE_STATUS_UPDATES_REPORTS_TO_FOLLOW.
|
◆ cc_supervision_get_default_status_updates_enabled()
bool cc_supervision_get_default_status_updates_enabled |
( |
| ) |
|
Returns whether transmission of status updates is enabled or disabled by default. Used by the Supervion Command Class initialization.
- Returns
- true if enabled, false if disabled
◆ cc_supervision_get_received_handler()
Invoked upon reception of a Supervision Get This function is weakly defined in CC_Supervision.c and can be defined in the application if desired.
- Parameters
-
pArgs | parameters for the handler |
◆ cc_supervision_report_recived_handler()
Invoked upon reception of a Supervision Report This function is weakly defined in CC_Supervision.c and can be defined in the application if desired.
- Parameters
-
status | the required status |
duration | the required duration |
◆ CmdClassSupervisionReportSend()
CmdClassSupervisionReportSend.
- Parameters
-
[in] | tx_options | Transmit options of type zaf_tx_options_t |
[in] | properties | includes: bit[0..5] Session ID bit[6] unused and bit[7] more status updates. This field is used to advertise if more Supervision Reports follow for the actual Session ID. [0] last report, [1] more report follow. |
[in] | status | Supervision status. |
[in] | duration | The duration must comply with the following: 0x00 0 seconds. (Already at the Target Value.) 0x01-0x7F 1 second (0x01) to 127 seconds (0x7F) in 1 second resolution. 0x80-0xFD 1 minute (0x80) to 126 minutes (0xFD) in 1 minute resolution. 0xFE Unknown duration 0xFF Reserved |
- Returns
- true if the frame was enqueued else false
◆ CommandClassSupervisionGetAdd()
void CommandClassSupervisionGetAdd |
( |
ZW_SUPERVISION_GET_FRAME * | pPayload | ) |
|
Creates payload for Supervision Get command by calling CommandClassSupervisionGetWrite and updates supervision session ID. Used by Framework and should not be used be application.
- Parameters
-
[in,out] | pPayload | pointer to supervision get payload |
◆ CommandClassSupervisionGetGetPayloadLength()
uint8_t CommandClassSupervisionGetGetPayloadLength |
( |
ZW_SUPERVISION_GET_FRAME * | pbuf | ) |
|
Gets the length of encapsulated payload from the frame. Used by framework to calculate the length of the payload in supervision-encapsulated frames.
- Parameters
-
pbuf | Frame that contains the encapsulated command |
- Returns
- length of the payload
◆ CommandClassSupervisionGetSetPayloadLength()
void CommandClassSupervisionGetSetPayloadLength |
( |
ZW_SUPERVISION_GET_FRAME * | pbuf, |
|
|
uint8_t | payLoadlen ) |
Sets the payload length in a Supervision Get command. Used by Framework when sending supervision-encapsulated frames
- Parameters
-
[in] | pbuf | Pointer to supervision get payload |
[in] | payLoadlen | Payload length to be set. |
◆ CommandClassSupervisionGetWrite()
void CommandClassSupervisionGetWrite |
( |
ZW_SUPERVISION_GET_FRAME * | pbuf | ) |
|
Generates payload for Supervision Get command. Used by Framework and should not be used be application.
- Parameters
-
[in,out] | pbuf | Pointer to supervision get payload |