net_nwk_scan.h File Reference
Link layer Scan API for Active and Energy Detection Scan API. More...
Go to the source code of this file.
Data Structures | |
struct | nwk_pan_alternative_parent_t |
Network alternative parent structure. More... | |
struct | nwk_pan_descriptor_t |
Linked network response list. More... | |
Functions | |
int8_t | arm_net_energy_scan (int8_t interface_id, channel_list_s *scan_list, void(*passed_fptr)(int8_t if_id, const mlme_scan_conf_t *conf), uint8_t energy_tresshold) |
Energy detection scan start for configured channel with application-specific threshold. | |
int8_t | arm_net_nwk_scan (int8_t interface_id, channel_list_s *scan_list, void(*passed_fptr)(int8_t if_id, const mlme_scan_conf_t *conf), uint8_t scan_level) |
Active network scan for configured channels. | |
nwk_pan_descriptor_t * | arm_net_get_scanned_nwk_list (int8_t interface_id) |
Active scan result read. |
Detailed Description
Link layer Scan API for Active and Energy Detection Scan API.
- arm_net_energy_scan(), Energy scan start (Use only with ZIP node library).
- arm_net_nwk_scan(), Active scan for network (Use only with ZIP node library).
- arm_net_get_scanned_nwk_list(), Active scan result read.
Scan API works only when stack is in idle state.
The scan operation result is handled at callback function that is defined by scan function call. The scan result format is as follows:
| Data pointer | VALUE | | :----------: | :---------------------------------------------------: | | 1.Byte | Scan Type: NET_NWK_ENERGY_SCAN or NET_NWK_ACTIVE_SCAN | | 2.Byte | Result length | | 3+n Bytes | Payload :Read Only at Energy Detection type |
The result length indicates the scan response size as follows:
- NET_NWK_ENERGY_SCAN Payload length is result length *2 bytes after length field. * 1.Byte Channel * 2.Byte Energy Level
- NET_NWK_ACTIVE_SCAN result indicates the the number of networks. * The network list needs to be read by net_get_scanned_nwk_list().
Definition in file net_nwk_scan.h.
Function Documentation
int8_t arm_net_energy_scan | ( | int8_t | interface_id, |
channel_list_s * | scan_list, | ||
void(*)(int8_t if_id, const mlme_scan_conf_t *conf) | passed_fptr, | ||
uint8_t | energy_tresshold | ||
) |
Energy detection scan start for configured channel with application-specific threshold.
- Parameters:
-
interface_id Interface id. scan_list Channel list for scan operation. passed_fptr A function pointer for scan result notify. energy_tresshold Scan response lists all channels with smaller or equal level.
- Returns:
- 0 Scan operation started OK.
- -1 Stack is active.
- -2 Channel list not valid.
- -3 Function not enabled at border router.
nwk_pan_descriptor_t* arm_net_get_scanned_nwk_list | ( | int8_t | interface_id ) |
int8_t arm_net_nwk_scan | ( | int8_t | interface_id, |
channel_list_s * | scan_list, | ||
void(*)(int8_t if_id, const mlme_scan_conf_t *conf) | passed_fptr, | ||
uint8_t | scan_level | ||
) |
Active network scan for configured channels.
- Parameters:
-
interface_id Interface id. scan_list Channel list for scan operation. passed_fptr A function pointer for scan result notify. scan_level NET_ACTIVE_SCAN_ONLY_NWK, NET_ACTIVE_SCAN_ACCEPT_ANY_BEACON_PAYLOAD,NET_ACTIVE_SCAN_ACCEPT_ONLY_ZIP_SPESIFIC
- Returns:
- 0 Scan operation started OK.
- -1 Stack is active.
- -2 Channel list not valid.
- -3 Function not enabled at border router.
Generated on Tue Jul 12 2022 12:22:32 by
