Developing with ZBOSS for Zigbee
|
Macros | |
#define | ZB_COMMON_SIGNAL_CAN_SLEEP 22U |
#define | ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY 23U |
#define | ZB_NWK_SIGNAL_NO_ACTIVE_LINKS_LEFT 24U |
#define | ZB_SIGNAL_SUBGHZ_SUSPEND 41U |
#define | ZB_SIGNAL_SUBGHZ_RESUME 42U |
#define | ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED 47U |
#define | ZB_ZDO_SIGNAL_DEVICE_UPDATE 48U |
#define | ZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED 49U |
#define | ZB_NLME_STATUS_INDICATION 50U |
#define | ZB_ZGP_FILL_GPS_SECURITY_LEVEL(sec_lvl, with_link_key, involve_tc) (((sec_lvl) & 3U) | ((!!(with_link_key)) << 2U) | ((!!(involve_tc)) << 3U)) |
Functions | |
void | zb_zgps_start_commissioning (zb_time_t timeout) |
Put ZGPS into commissioning mode. More... | |
void | zb_zgps_stop_commissioning (void) |
Switch ZGPS back to operational mode from commissioning. More... | |
void | zb_zgps_accept_commissioning (zb_bool_t accept) |
Accept/reject ZGPD commissioning attempt. More... | |
void | zb_zgps_delete_zgpd (zb_uint8_t buf_ref, zb_zgpd_id_t *zgpd_id) |
Remove all the information about ZGPD from stack. More... | |
void | zb_zgps_delete_all_zgpd (void) |
Remove all the information about ALL ZGPD from stack. More... | |
void | zb_zgps_get_diag_data (zb_zgpd_id_t *zgpd_id, zb_uint8_t *lqi, zb_int8_t *rssi) |
void | zb_zgps_set_security_level (zb_uint_t level) |
void | zb_zgp_set_shared_security_key_type (zb_uint_t key_type) |
void | zb_zgp_set_shared_security_key (zb_uint8_t *key) |
void | zb_zgps_set_commissioning_exit_mode (zb_uint_t cem) |
void | zb_zgps_set_communication_mode (zgp_communication_mode_t mode) |
zb_ret_t | zb_zgp_convert_8bit_vector (zb_uint8_t vector_8bit_cmd_id, zb_uint8_t switch_type, zb_uint8_t num_of_contacs, zb_uint8_t contact_status, zb_uint8_t *zgp_cmd_out) |
Signals passed to zboss_signal_handler() | |
typedef struct zb_zdo_app_my_custom_signal_s
{
zb_zdo_app_signal_type_t super;
zb_my_custom_data_type_t my_custom_data;
}
| |
#define | ZB_ZGP_SIGNAL_COMMISSIONING 21U |
#define ZB_COMMON_SIGNAL_CAN_SLEEP 22U |
Notifies the application that the MCU can sleep for the specified period of time.
When generated:
Status codes:
Signal parameters:
#define ZB_NLME_STATUS_INDICATION 50U |
NLME status indication. Application may implement additional logic based on receiving some statuses.
#define ZB_NWK_SIGNAL_NO_ACTIVE_LINKS_LEFT 24U |
Notifies the application about the Neighbor Table expiration. It means that the neighbor devices did not send the Link Status messages for ZB_NWK_ROUTER_AGE_LIMIT * ZB_NWK_LINK_STATUS_PERIOD seconds.
When generated:
Status codes:
Signal parameters:
#define ZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED 49U |
PAN ID conflict has been detected. Application has to decide whether to initiate its resolution or not.
#define ZB_SIGNAL_SUBGHZ_RESUME 42U |
ZC resumed our device tx (sub-ghz only)
#define ZB_SIGNAL_SUBGHZ_SUSPEND 41U |
ZC / our MAC suspended our device tx: out of Duty cycle (sub-ghz only)
#define ZB_ZDO_SIGNAL_DEVICE_AUTHORIZED 47U |
Notifies the Zigbee Trust center application about a new device is authorized in the network. For Zigbee R21 devices it means that the TCLK exchange procedure was finished, for the legacy devices it means that the Transport key was send to the device.
When generated:
Status codes:
#define ZB_ZDO_SIGNAL_DEVICE_UPDATE 48U |
Notifies the Zigbee Trust center or parent router application about a new device joined, rejoined or left the network.
When generated:
Status codes:
Signal parameters:
#define ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY 23U |
Notifies the application that the application specific part of the production configuration was found and restored and provides the application with this data.
When generated:
Status codes:
Signal parameters:
#define ZB_ZGP_FILL_GPS_SECURITY_LEVEL | ( | sec_lvl, | |
with_link_key, | |||
involve_tc | |||
) | (((sec_lvl) & 3U) | ((!!(with_link_key)) << 2U) | ((!!(involve_tc)) << 3U)) |
Fill security level constant to be passed to zb_zgps_set_security_level()
Described in A.3.3.2.6 gpsSecurityLevel attribute.
sec_lvl | zb_zgp_security_level_e Minimal GPD Security Level sub-field contains the minimum gpdSecurityLevel this sink accepts |
with_link_key | 1 bit - Protection with the gpLinkKey sub-field, indicates if the GPDs attempting the pairing are required to support protecting the over-the-air exchange of the GPD Key |
involve_tc | always zero for the current GPPB specification |
#define ZB_ZGP_SIGNAL_COMMISSIONING 21U |
ZGP commissioning complete signal.
When generated:
Status codes:
Signal parameters:
void zb_zgp_set_shared_security_key | ( | zb_uint8_t * | key | ) |
Set gpSharedSecurityKey GP cluster attribute
Described in A.3.3.3.1 gpSharedSecurityKey attribute.
key | Security key to set |
void zb_zgp_set_shared_security_key_type | ( | zb_uint_t | key_type | ) |
Set gpSharedSecurityKeyType GP cluster attribute
Described in A.3.3.3.1 gpSharedSecurityKeyType attribute.
key_type | Security key type to set ( |
void zb_zgps_accept_commissioning | ( | zb_bool_t | accept | ) |
Accept/reject ZGPD commissioning attempt.
This function should be called as an answer to commissioning request made by stack via zb_zgp_comm_req_cb_t. Also, it can be called from zb_zgp_comm_req_cb_t callback as well as outside it.
[in] | accept | - If ZB_TRUE, then stack will continue ongoing commissioning process with ZGPD Otherwise ongoing commissioning process will be terminated |
void zb_zgps_delete_all_zgpd | ( | void | ) |
Remove all the information about ALL ZGPD from stack.
void zb_zgps_delete_zgpd | ( | zb_uint8_t | buf_ref, |
zb_zgpd_id_t * | zgpd_id | ||
) |
Remove all the information about ZGPD from stack.
In ZGP there is no way to say ZGPD to leave the network. ZGPD can leave network by itself using "Decommissioning" command, but ZGPS can miss this command if it was not in commissioning state.
This function removes all the information related to specified ZGPD from stack.
buf_ref | reference to the free buffer |
zgpd_id | identifier of ZGPD to be removed |
void zb_zgps_get_diag_data | ( | zb_zgpd_id_t * | zgpd_id, |
zb_uint8_t * | lqi, | ||
zb_int8_t * | rssi | ||
) |
Get LQI and RSSI last time received from that ZGPD.
void zb_zgps_set_commissioning_exit_mode | ( | zb_uint_t | cem | ) |
Set gpsCommissioningExitMode GP cluster attribute
Described in A.3.3.2.4 gpsCommissioningExitMode attribute.
cem | Commissioning exit mode to set ( |
void zb_zgps_set_communication_mode | ( | zgp_communication_mode_t | mode | ) |
Set gpsCommunicationMode GP cluster attribute of gpcb
Described in A.3.3.2.3 gpsCommunicationMode attribute
mode | zgp_communication_mode_t communication mode |
void zb_zgps_set_security_level | ( | zb_uint_t | level | ) |
Set gpsSecurityLevel GP cluster attribute of gpcb
Described in A.3.3.2.6 gpsSecurityLevel attribute.
level | Security level to set |
void zb_zgps_start_commissioning | ( | zb_time_t | timeout | ) |
Put ZGPS into commissioning mode.
It is safe to call this function when device is already in commissioning mode. In this case function does nothing.
timeout | [in] Maximum commissioning time in beacon intervals. 0 means no timeout. If timeout occurs, then result of commissioning is ZB_ZGP_COMMISSIONING_TIMED_OUT |
void zb_zgps_stop_commissioning | ( | void | ) |
Switch ZGPS back to operational mode from commissioning.
After commissioning is cancelled, user is notified with zb_zgp_comm_completed_cb_t with ZB_ZGP_COMMISSIONING_CANCELLED_BY_USER status.