|
Developing with ZBOSS for Zigbee
|
◆ zb_enable_auto_pan_id_conflict_resolution()
void zb_enable_auto_pan_id_conflict_resolution |
( |
zb_bool_t |
status | ) |
|
Toggles automatic panid conflict resolution.
- Deprecated:
- Enabling/disabling of automatic panid conflict resolution is deprecated in r23 codebase and does nothing.
Call of that function allows switching on/off automatic panid conflict resolution.
- Parameters
-
status | - if ZB_TRUE, enable conflict resolution, else disable |
◆ zb_enable_panid_conflict_resolution()
void zb_enable_panid_conflict_resolution |
( |
zb_bool_t |
status | ) |
|
Toggles panid conflict resolution.
- Deprecated:
- Enabling/disabling of panid conflict resolution is deprecated in r23 codebase snd does nothing.
Call of that function allows switching on/off panid conflict resolution and detection logic.
- Deprecated:
- Kept only for backward compatibility. PANID conflict detection is always enabled at R23 and can not be disabled. Application is responsible for starting of conflict resolution.
- Parameters
-
status | - if ZB_TRUE, enable conflict resolution, else disable |
◆ zb_prepare_network_for_channel_change()
This function set nwkNextChannelChange and sends set_configuration_req for all remote devices. Parameters zb_channel_change_parameters_t will be using for zb_start_channel_change()
- Parameters
-
static void app_nwk_mgmt_change_channel_cb(
zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1,
">> app_nwk_mgmt_change_channel_cb, param, error cnt = %d", (FMT__D, params->
error_cnt));
{
TRACE_MSG(TRACE_APP1,
"Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1,
"Change channel procedure started successful", (FMT__0));
}
}
TRACE_MSG(TRACE_APP1,
"<< app_nwk_mgmt_change_channel_cb", (FMT__0));
}
static void app_nwk_mgmt_change_channel(
zb_uint8_t param, zb_channel_page_t channel_mask)
{
{
TRACE_MSG(TRACE_APP1,
"Prepare network for channel change, next channel mask: 0x%x", (FMT__D, channel_mask));
}
}
◆ zb_prepare_network_for_panid_change()
This function set nwkNextPanId and sends set_configuration_req for all remote devices Parameters zb_panid_change_parameters_t will be using for zb_start_panid_change()
- Parameters
-
static void app_nwk_mgmt_change_panid_cb(
zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1,
">> app_nwk_mgmt_change_panid_cb, param, error cnt = %d", (FMT__D, params->
error_cnt));
{
TRACE_MSG(TRACE_APP1,
"Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1,
"Change panid procedure started successful", (FMT__0));
}
}
TRACE_MSG(TRACE_APP1,
"<< app_nwk_mgmt_change_panid_cb", (FMT__0));
}
static void app_nwk_mgmt_change_panid(
zb_uint8_t param)
{
if (param == 0u)
{
}
else
{
{
TRACE_MSG(TRACE_APP1,
"Prepare network for panid change", (FMT__0));
}
}
}
◆ zb_start_channel_change()
Broadcast mgmt_nwk_update_req and change active channel for all devices in network. In centralized network the parameter zb_channel_change_parameters_t will be discarded
- See also
- zb_prepare_network_for_channel_change()
- Parameters
-
static void app_nwk_mgmt_change_channel_cb(
zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1,
">> app_nwk_mgmt_change_channel_cb, param, error cnt = %d", (FMT__D, params->
error_cnt));
{
TRACE_MSG(TRACE_APP1,
"Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1,
"Change channel procedure started successful", (FMT__0));
}
}
TRACE_MSG(TRACE_APP1,
"<< app_nwk_mgmt_change_channel_cb", (FMT__0));
}
static void app_nwk_mgmt_change_channel(
zb_uint8_t param, zb_channel_page_t channel_mask)
{
{
TRACE_MSG(TRACE_APP1,
"Prepare network for channel change, next channel mask: 0x%x", (FMT__D, channel_mask));
}
}
◆ zb_start_panid_change()
Broadcast mgmt_nwk_update_req and change PAN ID for all devices in network. In centralized network the parameter zb_channel_change_parameters_t will be discarded
- See also
- zb_prepare_network_for_panid_change() This function can be used during pan id conflict resolutions, but R23 specification recommends to ignore the pan id conflicts
- Parameters
-
static void app_nwk_mgmt_change_panid_cb(
zb_uint8_t param)
{
TRACE_MSG(TRACE_APP1,
">> app_nwk_mgmt_change_panid_cb, param, error cnt = %d", (FMT__D, params->
error_cnt));
{
TRACE_MSG(TRACE_APP1,
"Preparation for channel change is successful, let's send channel change command", (FMT__0));
{
TRACE_MSG(TRACE_APP1,
"Change panid procedure started successful", (FMT__0));
}
}
TRACE_MSG(TRACE_APP1,
"<< app_nwk_mgmt_change_panid_cb", (FMT__0));
}
static void app_nwk_mgmt_change_panid(
zb_uint8_t param)
{
if (param == 0u)
{
}
else
{
{
TRACE_MSG(TRACE_APP1,
"Prepare network for panid change", (FMT__0));
}
}
}
zb_uint16_t error_cnt
Definition: zboss_api_nwk.h:643
zb_uint16_t next_panid_change
Definition: zboss_api_nwk.h:662
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_buf_get_out_delayed(callback)
Allocate OUT buffer, call a callback when the buffer is available.
Definition: zboss_api_buf.h:275
zb_uint32_t next_channel_change
Definition: zboss_api_nwk.h:652
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:457
#define ZB_SCHEDULE_APP_ALARM(func, param, timeout_bi)
Definition: zboss_api_core.h:370
zb_ret_t zb_start_channel_change(zb_uint8_t param)
#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
Parameters for zb_prepare_network_for_channel_change() and zb_start_channel_change()
Definition: zboss_api_nwk.h:650
#define ZB_TIME_ONE_SECOND
Definition: zboss_api_core.h:172
zb_ret_t zb_prepare_network_for_panid_change(zb_uint8_t param, zb_callback_t cb)
zb_ret_t zb_prepare_network_for_channel_change(zb_uint8_t param, zb_callback_t cb)
Parameters for zb_prepare_network_for_panid_change() and zb_start_panid_change()
Definition: zboss_api_nwk.h:660
zb_ret_t zb_start_panid_change(zb_uint8_t param)
Callback parameters for zb_prepare_network_for_channel_change() and zb_prepare_network_for_panid_chan...
Definition: zboss_api_nwk.h:641