|
Developing with ZBOSS for Zigbee
|
◆ ZB_BDB_SIGNAL_FORMATION_CANCELLED
#define ZB_BDB_SIGNAL_FORMATION_CANCELLED 62U |
BDB formation cancel request processed
When generated:
Status codes:
- RET_INVALID_STATE: formation is not in progress
- RET_PENDING: it is too late to cancel a formation, it will be completed soon
- RET_IGNORE: cancellation was already requested
- RET_OK: formation is cancelled successfully
Signal parameters:
◆ ZB_BDB_SIGNAL_STEERING_CANCELLED
#define ZB_BDB_SIGNAL_STEERING_CANCELLED 61U |
BDB steering cancel request processed
When generated:
- after the cancel request called with bdb_cancel_steering() is processed
Status codes:
- RET_ILLEGAL_REQUEST: device is a ZC
- RET_INVALID_STATE: steering for a node not a network is not in progress
- RET_PENDING: it is too late to cancel a steering, it will be completed soon
- RET_IGNORE: cancellation was already requested
- RET_OK: steering is cancelled successfully
Signal parameters:
◆ ZB_BDB_SIGNAL_TC_REJOIN_DONE
#define ZB_BDB_SIGNAL_TC_REJOIN_DONE 58U |
TC rejoin is completed
When generated:
- Device completes TC rejoin procedure.
Status codes:
- RET_OK: TC rejoin completed successful
- RET_ERROR: An error of any type.
Signal parameters:
TRACE_MSG(TRACE_APP1,
"TC rejoin failed, so try it again with interval", (FMT__0));
break;
◆ ZB_BUFFER_TEST_REQ_SIGNAL
#define ZB_BUFFER_TEST_REQ_SIGNAL 57U |
Test Profile 2 Buffer Test Req received. To be used in certification tests .
- Parameters
-
zb_buffer_test_response_t | |
◆ ZB_DEBUG_SIGNAL_TCLK_READY
#define ZB_DEBUG_SIGNAL_TCLK_READY 68U |
When generated: Unverified aps key created, and verify_key_req has been sent or received.
Status codes:
This signal uses during debugging to broadcast aps key by calling zb_debug_broadcast_aps_key().
Signal parameters:
◆ ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS
#define ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS 59U |
Notifies the Zigbee Trust center or router application about permit join status changed.
- When generated:
- Network was just open
- Network was just closed
- Status codes:
- RET_OK: Device information updated.
- Does not return error status.
- Signal parameters:
-
- Signal handling:
{
TRACE_MSG(TRACE_APP1,
"Permit Join Received. Duration: %hd", (FMT__D, (*permit_duration)));
break;
}
- Signal generation:
- To self:
{
TRACE_MSG(TRACE_APP3,
">> permit_join_request_local : param %hd", (FMT__D, buf));
if (buf == 0U)
{
}
else
{
TRACE_MSG(TRACE_APP1,
"permit_join_request_local_cb: requesting permit join", (FMT__0));
}
}
void permit_join_request_local_cb(
zb_uint8_t param)
{
if (param != 0U)
{
}
TRACE_MSG(TRACE_APP1,
"permit_join_request_local_cb: callback called", (FMT__0));
return;
}
- To other devices:
{
TRACE_MSG(TRACE_APP3,
">> permit_join_request_broadcast : param %hd", (FMT__D, buf));
if (buf == 0U)
{
}
else
{
TRACE_MSG(TRACE_APP1,
"permit_join_request_broadcast_cb: requesting permit join", (FMT__0));
}
}
void permit_join_request_broadcast_cb(
zb_uint8_t param)
{
if (param != 0U)
{
}
TRACE_MSG(TRACE_APP1,
"permit_join_request_broadcast_confirm_cb: callback called", (FMT__0));
return;
}
◆ ZB_SIGNAL_INTERPAN_PREINIT
#define ZB_SIGNAL_INTERPAN_PREINIT 64U |
ZBOSS interpan preinit done signal
When generated:
- after ZBOSS preinit enough to send interpan initiated by zboss_preinit_for_interpan() is done
After receiving that signal application can use zb_intrp_data_request_with_chan_change() API
Signal parameters:
◆ ZB_SIGNAL_JOIN_DONE
#define ZB_SIGNAL_JOIN_DONE 56U |
Signal indicating that device just joined/rejoined, but not authorized yet
To be used mainly for certification testing, when run-time visibility setting is required
if (status == 0)
{
TRACE_MSG(TRACE_APP1,
"Joined/rejoined ok", (FMT__0));
}
break;
◆ ZB_SIGNAL_READY_TO_SHUT
#define ZB_SIGNAL_READY_TO_SHUT 63U |
ZBOSS is ready to shutdown signal
When generated:
- after ZBOSS preparations to shutdown initiated by zboss_start_shut() is done
After receiving that signal application MUST complete ZBOSS shutdown by calling zboss_complete_shut(). It is impossible to continue ZBOSS work without a restart after calling zboss_start_shut().
Signal parameters:
◆ ZB_TC_SWAPPED_SIGNAL
#define ZB_TC_SWAPPED_SIGNAL 54U |
TC is swapped (signal at Joiner)
{
TRACE_MSG(TRACE_APP1,
"ZB_TC_SWAPPED_SIGNAL, status %hd", (FMT__H, status));
}
break;
◆ ZB_TCLK_UPDATED_SIGNAL
#define ZB_TCLK_UPDATED_SIGNAL 55U |
TCLK update completed (signal at Joiner)
{
TRACE_MSG(TRACE_APP1,
"ZB_TCLK_UPDATED_SIGNAL, status %hd", (FMT__H, status));
if (s_tc_swapped)
{
TRACE_MSG(TRACE_APP1,
"TCLK updated after TC swap", (FMT__0));
}
break;
}
◆ ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL
#define ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL 53U |
it is time to backup TC database (signal at TC)
TRACE_MSG(TRACE_APP1,
"Signal ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL, status %d", (FMT__D, status));
app_backup_tc_db();
break;
static void app_backup_tc_db(void)
{
zb_ret_t ret = zb_tcsw_start_backup_db();
TRACE_MSG(TRACE_APP1,
"app_backup_tc_db, ret %x, need_backup %hd",
(FMT__D_H, ret, zb_tcsw_need_backup()));
do
{
portion_len = zb_tcsw_get_portion((
zb_uint8_t*)g_nvram_buf + nvram_buf_pos, TCSW_PORTION_SIZE);
nvram_buf_pos += portion_len;
}
while (portion_len != 0);
}
◆ ZB_ZDO_DEVICE_UNAVAILABLE
#define ZB_ZDO_DEVICE_UNAVAILABLE 66U |
Notifies an application a device unavailable.
When generated:
- ZBOSS could not send a packet over NWK, for example: there is no ACK on the MAC layer; there is no response to a network address request;
- ZBOSS could not send a packet over APS, for example: there is no APS-ACK to an APS packet.
Signal parameters:
◆ ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED 60U |
Notifies the TC that Device Interview was finished
Status codes:
- RET_OK: DDevice interview finished succeed
- RET_ERROR: Device interview failed and the device was removed.
Signal parameters:
{
TRACE_MSG(TRACE_ERROR,
"ERROR zboss_start failed", (FMT__0));
}
else
{
}
{
TRACE_MSG(TRACE_APP1,
"ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW, short_addr 0x%x, ieee_addr " TRACE_FORMAT_64,
(FMT__D_A, dev_interview_params->short_addr, TRACE_ARG_64(dev_interview_params->
long_addr)));
if (ZB_IEEE_ADDR_CMP(dev_interview_params->
long_addr, g_r23_zed_ieee_addr))
{
TRACE_MSG(TRACE_APP1,
"Start device interview for 0x%x", (FMT__D, dev_interview_params->short_addr));
app_start_device_interview(param, dev_interview_params->short_addr);
param = ZB_UNDEFINED_BUFFER;
}
else
{
TRACE_MSG(TRACE_APP1,
"Authenticate device 0x%x without interview", (FMT__D, dev_interview_params->short_addr));
param = ZB_UNDEFINED_BUFFER;
}
break;
}
{
TRACE_MSG(TRACE_APP1,
"ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED, status %hd", (FMT__H, status));
break;
}
{
{
{
TRACE_MSG(TRACE_APP1,
"device authorized " TRACE_FORMAT_64, (FMT__A, TRACE_ARG_64(ieee_addr)));
}
}
}
◆ ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING
#define ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING 67U |
ZGP Approve Commissioning signal.
When generated:
- ZGP subsystem is ready to create new pairing but APP should check if GPD application functionality matches to continue pairing.
Status codes:
After receiving that signal application SHALL decide whether to connect GP device or not. After that, application SHALL send acceptance status by calling zb_zgps_accept_commissioning(). It is impossible to continue GP commissioning operation without a calling zb_zgps_accept_commissioning(), and the sink will exit commissioning mode after commissioning timeout expired.
Signal parameters:
{
TRACE_MSG(TRACE_APP1,
"ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING", (FMT__0));
accept_comm_cb(app_comm_params->params);
}
break;
◆ ZB_ZGP_SIGNAL_MODE_CHANGE
#define ZB_ZGP_SIGNAL_MODE_CHANGE 65U |
ZGP Mode change signal.
When generated:
- GPCB Sink change mode between operational mode and commissioning mode.
Status codes:
- RET_OK: mode changed.
- Does not return error status.
Signal parameters:
{
mode_change_cb(signal_params->new_mode, signal_params->
reason);
}
break;
@ ZB_NVRAM_APP_DATA1
Definition: zboss_api.h:1424
#define ZB_TCLK_UPDATED_SIGNAL
Definition: zboss_api_zdo.h:871
unsigned int zb_uint_t
Unsigned int (at least 2 bytes).
Definition: zb_types.h:325
zb_uint16_t dest_addr
Definition: zboss_api_zdo.h:3169
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:147
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:369
#define ZB_SIGNAL_JOIN_DONE
Definition: zboss_api_zdo.h:880
zb_int32_t zb_ret_t
Return type for ZB functions returning execution status.
Definition: zb_errors.h:33
#define zb_buf_get_out_delayed_ext(callback, arg, max_size)
Allocate OUT buffer, call a callback when the buffer is available.
Definition: zboss_api_buf.h:311
#define ZB_TC_SWAPPED_SIGNAL
Definition: zboss_api_zdo.h:861
Device Ready For Interview signal parameters.
Definition: zboss_api_zdo.h:1377
#define ZB_ZGP_SIGNAL_MODE_CHANGE
Definition: zboss_api_zdo.h:1031
void zboss_main_loop(void)
#define ZB_ZGP_SIGNAL_APPROVE_COMMISSIONING
Definition: zboss_api_zdo.h:1070
#define ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS
Definition: zboss_api_zdo.h:928
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:457
#define ZB_TRUE
Definition: zb_types.h:350
#define ZB_SCHEDULE_APP_ALARM(func, param, timeout_bi)
Definition: zboss_api_core.h:370
zb_ieee_addr_t long_addr
Definition: zboss_api_zdo.h:1380
#define ZB_ZDO_SIGNAL_DEVICE_READY_FOR_INTERVIEW
Definition: zboss_api_zdo.h:815
zb_ret_t zb_address_ieee_by_short(zb_uint16_t short_addr, zb_ieee_addr_t ieee_address)
zb_uint8_t zb_zdo_app_signal_type_t
Type for signals passed to an application signal handler.
Definition: zboss_api_zdo.h:1094
#define ZB_ZDP_STATUS_SUCCESS
Definition: zboss_api_zdo.h:41
zb_ret_t zb_nvram_write_dataset(zb_nvram_dataset_types_t t)
#define ZB_BDB_SIGNAL_TC_REJOIN_DONE
Definition: zboss_api_zdo.h:903
void zb_tc_enable_device_interview(zb_bool_t enable)
void zb_bdb_initiate_tc_rejoin(zb_uint8_t param)
Starts TC rejoin procedure.
#define ZB_ZDO_SIGNAL_DEVICE_INTERVIEW_FINISHED
Definition: zboss_api_zdo.h:944
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:535
Parameters for zb_zdo_mgmt_permit_joining_req.
Definition: zboss_api_zdo.h:3167
zb_uint8_t zb_zdo_mgmt_permit_joining_req(zb_uint8_t param, zb_callback_t cb)
sends Mgmt_Permit_Joining_req (See Zigbee spec 2.4.3.3.7)
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:79
zb_zgp_mode_change_reason_t reason
Definition: zboss_api_zdo.h:1199
#define ZB_TIME_ONE_SECOND
Definition: zboss_api_core.h:172
zb_uint8_t tc_significance
Definition: zboss_api_zdo.h:3173
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:151
ZGP mode changed parameters.
Definition: zboss_api_zdo.h:1197
#define ZB_TCSWAP_DB_BACKUP_REQUIRED_SIGNAL
Definition: zboss_api_zdo.h:854
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:344
zb_ret_t zb_tc_auth_device_after_interview(const zb_ieee_addr_t device_addr)
#define ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, type)
Definition: zboss_api_zdo.h:1109
#define ZB_NWK_BROADCAST_ROUTER_COORDINATOR
Definition: zboss_api_nwk.h:86
ZGP approve commissioning parameters.
Definition: zboss_api_zdo.h:1187
zb_uint16_t zb_get_short_address(void)
zb_uint8_t permit_duration
Definition: zboss_api_zdo.h:3170
zb_ret_t zboss_start_no_autostart(void)