Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
Supervision
+ Collaboration diagram for Supervision:

Topics

 Supervision Events
 

Data Structures

struct  SUPERVISION_GET_RECEIVED_HANDLER_ARGS
 
struct  _cc_supervision_report_event
 

Macros

#define CC_SUPERVISION_EXTRACT_SESSION_ID(properties)   (properties & 0x3F)
 
#define CC_SUPERVISION_ADD_SESSION_ID(properties)   (properties & 0x3F)
 
#define CC_SUPERVISION_EXTRACT_MORE_STATUS_UPDATE(status)   (status >> 7)
 
#define CC_SUPERVISION_ADD_MORE_STATUS_UPDATE(status)   (status << 7)
 
#define CC_SUPERVISION_EXTRACT_STATUS_UPDATE(status)   (status >> 7)
 
#define CC_SUPERVISION_ADD_STATUS_UPDATE(status)   (status << 7)
 

Typedefs

typedef enum _SUPERVISION_STATUS_ cc_supervision_status_t
 
typedef struct _cc_supervision_report_event cc_supervision_report_event
 

Enumerations

enum  cc_supervision_more_status_updates_t {
  CC_SUPERVISION_MORE_STATUS_UPDATES_THIS_IS_LAST ,
  CC_SUPERVISION_MORE_STATUS_UPDATES_REPORTS_TO_FOLLOW
}
 
enum  _SUPERVISION_STATUS_ {
  CC_SUPERVISION_STATUS_NOT_SUPPORTED ,
  CC_SUPERVISION_STATUS_WORKING ,
  CC_SUPERVISION_STATUS_FAIL ,
  CC_SUPERVISION_STATUS_CANCEL ,
  CC_SUPERVISION_STATUS_NOT_FOUND ,
  CC_SUPERVISION_STATUS_SUCCESS = 0xFF
}
 

Functions

bool CmdClassSupervisionReportSend (zaf_tx_options_t *tx_options, uint8_t properties, cc_supervision_status_t status, uint8_t duration)
 CmdClassSupervisionReportSend.
 
void CommandClassSupervisionGetAdd (ZW_SUPERVISION_GET_FRAME *pPayload)
 
void CommandClassSupervisionGetWrite (ZW_SUPERVISION_GET_FRAME *pbuf)
 
void CommandClassSupervisionGetSetPayloadLength (ZW_SUPERVISION_GET_FRAME *pbuf, uint8_t payLoadlen)
 
uint8_t CommandClassSupervisionGetGetPayloadLength (ZW_SUPERVISION_GET_FRAME *pbuf)
 
void cc_supervision_get_received_handler (SUPERVISION_GET_RECEIVED_HANDLER_ARGS *pArgs)
 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.
 
void cc_supervision_report_recived_handler (cc_supervision_status_t status, uint8_t duration)
 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.
 
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.
 

Detailed Description

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.

Macro Definition Documentation

◆ 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

Typedef Documentation

◆ cc_supervision_report_event

Structure used by supervision_event_handler() to process upcoming events Registered for CC Supervision

◆ cc_supervision_status_t

Status of Supervision.

Enumeration Type Documentation

◆ _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.

Function Documentation

◆ 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()

void cc_supervision_get_received_handler ( SUPERVISION_GET_RECEIVED_HANDLER_ARGS * pArgs)

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
pArgsparameters for the handler

◆ cc_supervision_report_recived_handler()

void cc_supervision_report_recived_handler ( cc_supervision_status_t status,
uint8_t duration )

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
statusthe required status
durationthe required duration

◆ CmdClassSupervisionReportSend()

bool CmdClassSupervisionReportSend ( zaf_tx_options_t * tx_options,
uint8_t properties,
cc_supervision_status_t status,
uint8_t duration )

CmdClassSupervisionReportSend.

Parameters
[in]tx_optionsTransmit options of type zaf_tx_options_t
[in]propertiesincludes: 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]statusSupervision status.
[in]durationThe 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]pPayloadpointer 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
pbufFrame 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]pbufPointer to supervision get payload
[in]payLoadlenPayload 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]pbufPointer to supervision get payload