This header file declares the interface for the RF4Control stack.
#include <stdbool.h>
#include <stdint.h>
#include "pal_types.h"
#include "return_val.h"
#include "nwk_build_config.h"
Data Structures | |
struct | NodeDesc_tag |
Elements of the NodeDesc type as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
struct | pairing_table_tag |
Structure implementing the pairing table entry as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
Macros | |
#define | ChannelNormalizationCapableFalse 0x00 |
Node capability - constant channel normalization capable false. More... | |
#define | ChannelNormalizationCapableTrue 0x08 |
Node capability - constant channel normalization capable true. More... | |
#define | MAX_SAFE_DATA_FRAME_PAYLOAD (aMaxMACSafePayloadSize - 12) |
Calculate the maximum data frame payload that is allowed: 12 = FCF + frame counter + profile id + vendor id + MIC. More... | |
#define | NodeTypeController 0x00 |
Node capability - constant node type controller. More... | |
#define | NodeTypeTarget 0x01 |
Node capability - constant for node type target. More... | |
#define | nwkcMaxDutyCycle 62500 /* symbols = 1 s */ |
NWK layer constant - max duty cycle. More... | |
#define | nwkcMinActivePeriod 1050 /* symbols = 16.8 ms */ |
NWK layer constant - min active period. More... | |
#define | PowerSourceMainsFalse 0x00 |
Node capability - constant power source main not available. More... | |
#define | PowerSourceMainsTrue 0x02 |
Node capability - constant power source main available. More... | |
#define | RX_DURATION_INFINITY 0xFFFFFF |
Define used as parameters for NLME-RX-ENABLE.request: receiver on. More... | |
#define | RX_DURATION_OFF 0 |
Define used as parameters for NLME-RX-ENABLE.request: receiver off. More... | |
#define | RX_FLAG_BROADCAST 0x01 |
Rx flag - broadcast. More... | |
#define | RX_FLAG_NO_SEC 0x00 |
Rx flag - without security. More... | |
#define | RX_FLAG_NOT_VENDOR 0x00 |
Rx flag - no vendor-specific data. More... | |
#define | RX_FLAG_UNICAST 0x00 |
Rx flag - unicast. More... | |
#define | RX_FLAG_VENDOR_SPEC 0x04 |
Rx flag - vendor-specific data. More... | |
#define | RX_FLAG_WITH_SEC 0x02 |
Rx flag - with security. More... | |
#define | SecurityCapableFalse 0x00 |
Node capability - constant security capable false. More... | |
#define | SecurityCapableTrue 0x04 |
Node capability - constant security capable true. More... | |
#define | TXO_ACK_NOT_REQ 0x00 |
Tx option - ACK not requested. More... | |
#define | TXO_ACK_REQ 0x04 |
Tx option - ACK requested. More... | |
#define | TXO_BROADCAST 0x01 |
Tx option - broadcast. More... | |
#define | TXO_CH_NOT_SPEC 0x00 |
Tx option - channel not specified. More... | |
#define | TXO_CH_SPEC 0x20 |
Tx option - channel specified. More... | |
#define | TXO_DST_ADDR_IEEE 0x02 |
Tx option - destination address: long. More... | |
#define | TXO_DST_ADDR_NET 0x00 |
Tx option - destination address: short. More... | |
#define | TXO_MULTI_CH 0x00 |
Tx option - multi-channel transmission. More... | |
#define | TXO_SEC_NOT_REQ 0x00 |
Tx option - security not requested. More... | |
#define | TXO_SEC_REQ 0x08 |
Tx option - security requested. More... | |
#define | TXO_SINGLE_CH 0x10 |
Tx option - single-channel transmission. More... | |
#define | TXO_UNICAST 0x00 |
Tx option - unicast. More... | |
#define | TXO_VEND_NOT_SPEC 0x00 |
Tx option - no vendor-specific data. More... | |
#define | TXO_VEND_SPEC 0x40 |
Tx option - vendor-specific data. More... | |
Typedefs | |
typedef enum dev_type_tag | dev_type_t |
Device types as defined by 094950r00ZB_RF4CE-Device-Type-List.pdf. More... | |
typedef enum nib_attribute_tag | nib_attribute_t |
Network Information Base attributes as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
typedef struct NodeDesc_tag | node_desc_t |
Elements of the NodeDesc type as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
typedef enum nwk_addr_mode_tag | nwk_addr_mode_t |
Enumeration identifiying the address mode as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
typedef enum nwk_agility_mode_tag | nwk_agility_mode_t |
Enumeration used for implementation-specific channel agility. More... | |
typedef enum nwk_enum_tag | nwk_enum_t |
NWK enumerations as defined by 094945r00ZB_RF4CE-Specification.pdf, Table 45 - NWK enumerations description. More... | |
typedef struct pairing_table_tag | pairing_table_t |
Structure implementing the pairing table entry as defined by 094945r00ZB_RF4CE-Specification.pdf. More... | |
typedef enum profile_id_tag | profile_id_t |
Profile IDs as defined by 094951r00ZB_RF4CE-Profile-ID-List.pdf. More... | |
Functions | |
void | clear_pairing_ref (uint8_t first_ref, uint8_t length) |
Clears pairing references within EEPROM. More... | |
void | nlde_data_confirm (nwk_enum_t Status, uint8_t PairingRef, profile_id_t ProfileId) |
NLDE-DATA.confirm primitive API. More... | |
void | nlde_data_indication (uint8_t PairingRef, profile_id_t ProfileId, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags) |
NLDE-DATA.indication primitive API. More... | |
bool | nlde_data_request (uint8_t PairingRef, profile_id_t ProfileId, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t TxOptions) |
NLDE-DATA.request primitive API. More... | |
void | nlme_auto_discovery_confirm (nwk_enum_t Status, uint64_t SrcIEEEAddr) |
NLME-AUTO-DISCOVERY.confirm primitive API. More... | |
bool | nlme_auto_discovery_request (uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3], profile_id_t RecProfileIdList[7], uint32_t AutoDiscDuration) |
NLME-AUTO-DISCOVERY.request primitive API. More... | |
void | nlme_comm_status_indication (nwk_enum_t Status, uint8_t PairingRef, uint16_t DstPANId, uint8_t DstAddrMode, uint64_t DstAddr) |
NLME-COMM-STATUS.indication primitive API. More... | |
void | nlme_discovery_confirm (nwk_enum_t Status, uint8_t NumNodes, node_desc_t *NodeDescList) |
NLME-DISCOVERY.confirm primitive API. More... | |
void | nlme_discovery_indication (nwk_enum_t Status, uint64_t SrcIEEEAddr, uint8_t OrgNodeCapabilities, uint16_t OrgVendorId, uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities, uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3], profile_id_t OrgProfileIdList[7], dev_type_t SearchDevType, uint8_t RxLinkQuality) |
NLME-DISCOVERY.indication primitive API. More... | |
bool | nlme_discovery_request (uint16_t DstPANId, uint16_t DstNwkAddr, uint8_t OrgAppCapabilities, dev_type_t OrgDevTypeList[3], profile_id_t OrgProfileIdList[7], dev_type_t SearchDevType, uint8_t DiscProfileIdListSize, profile_id_t DiscProfileIdList[7], uint32_t DiscDuration) |
NLME-DISCOVERY.request primitive API. More... | |
bool | nlme_discovery_response (nwk_enum_t Status, uint64_t DstIEEEAddr, uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3], profile_id_t RecProfileIdList[7], uint8_t DiscReqLQI) |
NLME-DISCOVERY.response primitive API. More... | |
void | nlme_get_confirm (nwk_enum_t Status, nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex, void *NIBAttributeValue) |
NLME-GET.confirm primitive API. More... | |
bool | nlme_get_request (nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex) |
NLME-GET.request primitive API. More... | |
void | nlme_pair_confirm (nwk_enum_t Status, uint8_t PairingRef, uint16_t RecVendorId, uint8_t RecVendorString[7], uint8_t RecAppCapabilities, uint8_t RecUserString[15], dev_type_t RecDevTypeList[3], profile_id_t RecProfileIdList[7]) |
NLME-PAIR.confirm primitive API. More... | |
void | nlme_pair_indication (nwk_enum_t Status, uint16_t SrcPANId, uint64_t SrcIEEEAddr, uint8_t OrgNodeCapabilities, uint16_t OrgVendorId, uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities, uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3], profile_id_t OrgProfileIdList[7], uint8_t KeyExTransferCount, uint8_t ProvPairingRef) |
NLME-PAIR.indication primitive API. More... | |
bool | nlme_pair_request (uint8_t LogicalChannel, uint16_t DstPANId, uint64_t DstIEEEAddr, uint8_t OrgAppCapabilities, dev_type_t OrgDevTypeList[3], profile_id_t OrgProfileIdList[7], uint8_t KeyExTransferCount) |
NLME-PAIR.request primitive API. More... | |
bool | nlme_pair_response (nwk_enum_t Status, uint16_t DstPANId, uint64_t DstIEEEAddr, uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3], profile_id_t RecProfileIdList[7], uint8_t ProvPairingRef) |
NLME-PAIR.response primitive API. More... | |
void | nlme_reset_confirm (nwk_enum_t Status) |
NLME-RESET.confirm primitive API. More... | |
bool | nlme_reset_request (bool SetDefaultNIB) |
NLME-RESET.request primitive API. More... | |
void | nlme_rx_enable_confirm (nwk_enum_t Status) |
NLME-RX-ENABLE.confirm primitive API. More... | |
bool | nlme_rx_enable_request (uint32_t RxOnDuration) |
NLME-RX-ENABLE.request primitive API. More... | |
void | nlme_set_confirm (nwk_enum_t Status, nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex) |
NLME-SET.confirm primitive API. More... | |
bool | nlme_set_request (nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex, uint8_t *NIBAttributeValue) |
NLME-SET.request primitive API. More... | |
void | nlme_start_confirm (nwk_enum_t Status) |
NLME-START.confirm primitive API. More... | |
bool | nlme_start_request (void) |
NLME-START.request primitive API. More... | |
void | nlme_unpair_confirm (uint8_t Status, uint8_t PairingRef) |
NLME-UNPAIR.confirm primitive API. More... | |
void | nlme_unpair_indication (uint8_t PairingRef) |
NLME-UNPAIR.indication primitive API. More... | |
bool | nlme_unpair_request (uint8_t PairingRef) |
NLME-UNPAIR.request primitive API. More... | |
bool | nlme_unpair_response (uint8_t PairingRef) |
NLME-UNPAIR.response primitive API. More... | |
void | nlme_update_key_confirm (nwk_enum_t Status, uint8_t PairingRef) |
NLME-UPDATE-KEY.confirm primitive API. More... | |
bool | nlme_update_key_request (uint8_t PairingRef, uint8_t NewLinkKey[16]) |
NLME-UPDATE-KEY.request primitive API. More... | |
void | nwk_ch_agility_confirm (nwk_enum_t Status, bool ChannelChanged, uint8_t LogicalChannel) |
Confirms the previous channel agility request, i.e. More... | |
void | nwk_ch_agility_indication (uint8_t LogicalChannel) |
Indicates a channel agility event. More... | |
bool | nwk_ch_agility_request (nwk_agility_mode_t AgilityMode) |
Sets channel agility mode. More... | |
uint8_t | nwk_get_nib_attribute_size (uint8_t nib_attribute_id) |
Gets the NIB attribute value size. More... | |
nwk_enum_t | nwk_init (void) |
Initialization of RF4CE network layer. More... | |
bool | nwk_stack_idle (void) |
Checks if the entire stack is idle. More... | |
bool | nwk_task (void) |
Task handling of RF4CE network layer. More... | |
void | read_pairing_ref (uint8_t *pairing_ref, uint8_t length) |
Reads pairing reference from EEPROM. More... | |
void | store_pairing_ref (uint8_t *pairing_ref, uint8_t length) |
Stores pairing references to EEPROM. More... | |
#define ChannelNormalizationCapableFalse 0x00 |
Node capability - constant channel normalization capable false.
#define ChannelNormalizationCapableTrue 0x08 |
Node capability - constant channel normalization capable true.
#define MAX_SAFE_DATA_FRAME_PAYLOAD (aMaxMACSafePayloadSize - 12) |
Calculate the maximum data frame payload that is allowed: 12 = FCF + frame counter + profile id + vendor id + MIC.
#define NodeTypeController 0x00 |
Node capability - constant node type controller.
#define NodeTypeTarget 0x01 |
Node capability - constant for node type target.
#define nwkcMaxDutyCycle 62500 /* symbols = 1 s */ |
NWK layer constant - max duty cycle.
#define nwkcMinActivePeriod 1050 /* symbols = 16.8 ms */ |
NWK layer constant - min active period.
#define PowerSourceMainsFalse 0x00 |
Node capability - constant power source main not available.
#define PowerSourceMainsTrue 0x02 |
Node capability - constant power source main available.
#define RX_DURATION_INFINITY 0xFFFFFF |
Define used as parameters for NLME-RX-ENABLE.request: receiver on.
#define RX_DURATION_OFF 0 |
Define used as parameters for NLME-RX-ENABLE.request: receiver off.
#define RX_FLAG_BROADCAST 0x01 |
Rx flag - broadcast.
#define RX_FLAG_NO_SEC 0x00 |
Rx flag - without security.
#define RX_FLAG_NOT_VENDOR 0x00 |
Rx flag - no vendor-specific data.
#define RX_FLAG_UNICAST 0x00 |
Rx flag - unicast.
#define RX_FLAG_VENDOR_SPEC 0x04 |
Rx flag - vendor-specific data.
#define RX_FLAG_WITH_SEC 0x02 |
Rx flag - with security.
#define SecurityCapableFalse 0x00 |
Node capability - constant security capable false.
#define SecurityCapableTrue 0x04 |
Node capability - constant security capable true.
#define TXO_ACK_NOT_REQ 0x00 |
Tx option - ACK not requested.
#define TXO_ACK_REQ 0x04 |
Tx option - ACK requested.
Referenced by app_task().
#define TXO_BROADCAST 0x01 |
Tx option - broadcast.
#define TXO_CH_NOT_SPEC 0x00 |
Tx option - channel not specified.
Referenced by app_task().
#define TXO_CH_SPEC 0x20 |
Tx option - channel specified.
#define TXO_DST_ADDR_IEEE 0x02 |
Tx option - destination address: long.
Referenced by app_task().
#define TXO_DST_ADDR_NET 0x00 |
Tx option - destination address: short.
#define TXO_MULTI_CH 0x00 |
Tx option - multi-channel transmission.
Referenced by app_task().
#define TXO_SEC_NOT_REQ 0x00 |
Tx option - security not requested.
#define TXO_SEC_REQ 0x08 |
Tx option - security requested.
Referenced by app_task().
#define TXO_SINGLE_CH 0x10 |
Tx option - single-channel transmission.
#define TXO_UNICAST 0x00 |
Tx option - unicast.
Referenced by app_task().
#define TXO_VEND_NOT_SPEC 0x00 |
Tx option - no vendor-specific data.
#define TXO_VEND_SPEC 0x40 |
Tx option - vendor-specific data.
Referenced by app_task().
typedef enum dev_type_tag dev_type_t |
Device types as defined by 094950r00ZB_RF4CE-Device-Type-List.pdf.
typedef enum nib_attribute_tag nib_attribute_t |
Network Information Base attributes as defined by 094945r00ZB_RF4CE-Specification.pdf.
typedef struct NodeDesc_tag node_desc_t |
Elements of the NodeDesc type as defined by 094945r00ZB_RF4CE-Specification.pdf.
typedef enum nwk_addr_mode_tag nwk_addr_mode_t |
Enumeration identifiying the address mode as defined by 094945r00ZB_RF4CE-Specification.pdf.
typedef enum nwk_agility_mode_tag nwk_agility_mode_t |
Enumeration used for implementation-specific channel agility.
typedef enum nwk_enum_tag nwk_enum_t |
NWK enumerations as defined by 094945r00ZB_RF4CE-Specification.pdf, Table 45 - NWK enumerations description.
typedef struct pairing_table_tag pairing_table_t |
Structure implementing the pairing table entry as defined by 094945r00ZB_RF4CE-Specification.pdf.
typedef enum profile_id_tag profile_id_t |
Profile IDs as defined by 094951r00ZB_RF4CE-Profile-ID-List.pdf.
enum dev_type_tag |
Device types as defined by 094950r00ZB_RF4CE-Device-Type-List.pdf.
enum nib_attribute_tag |
Network Information Base attributes as defined by 094945r00ZB_RF4CE-Specification.pdf.
enum nwk_addr_mode_tag |
enum nwk_agility_mode_tag |
enum nwk_enum_tag |
NWK enumerations as defined by 094945r00ZB_RF4CE-Specification.pdf, Table 45 - NWK enumerations description.
enum profile_id_tag |
void clear_pairing_ref | ( | uint8_t | first_ref, |
uint8_t | length | ||
) |
Clears pairing references within EEPROM.
The function clear_pairing_ref() clears pairing references within the EEPROM for the application scope. It's a function supporting the application
first_ref | First entry to clear |
length | Number of entries to clear |
void nlde_data_confirm | ( | nwk_enum_t | Status, |
uint8_t | PairingRef, | ||
profile_id_t | ProfileId | ||
) |
NLDE-DATA.confirm primitive API.
The NLDE-DATA.confirm primitive is generated by the NWK layer entity in response to an NLDE-DATA.request primitive.
Status | Status for the handled data request |
PairingRef | Pairing reference used for the data request |
ProfileId | Profile Id used for the data request |
NLDE-DATA.confirm primitive API.
Status | nwk status. |
PairingRef | Pairing Ref for the destination. |
ProfileId | Profile id |
References UNUSED.
void nlde_data_indication | ( | uint8_t | PairingRef, |
profile_id_t | ProfileId, | ||
uint16_t | VendorId, | ||
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | RxLinkQuality, | ||
uint8_t | RxFlags | ||
) |
NLDE-DATA.indication primitive API.
The NLDE-DATA.indication primitive is generated by the NLDE and issued to the application on receipt of a data frame at the local NWK layer entity.
PairingRef | Pairing reference attached to the incoming frame |
ProfileId | Profile id used for the frame |
VendorId | Vendor id used for the frame |
nsduLength | Payload length |
nsdu | Pointer to the network payload |
RxLinkQuality | Link quality of the received frame |
RxFlags | Receive flags |
bool nlde_data_request | ( | uint8_t | PairingRef, |
profile_id_t | ProfileId, | ||
uint16_t | VendorId, | ||
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | TxOptions | ||
) |
NLDE-DATA.request primitive API.
The NLDE-DATA.request primitive requests the transfer of a data APDU (i.e. NSDU) from a local application entity to a peer application entity.
PairingRef | Pairing reference used for the data transmission |
ProfileId | Profile Id used for the data transmission |
VendorId | Vendor Id used for the data transmission |
nsduLength | Length of the network payload |
nsdu | Pointer to the payload |
TxOptions | Transmission options |
Referenced by vendor_data_request().
void nlme_auto_discovery_confirm | ( | nwk_enum_t | Status, |
uint64_t | SrcIEEEAddr | ||
) |
NLME-AUTO-DISCOVERY.confirm primitive API.
The NLME-AUTO-DISCOVERY.confirm primitive allows the NLME to notify the application of the status of its request to enter auto discovery response mode.
Status | Status of the completed auto-discovery procedure |
SrcIEEEAddr | Source IEEE address from which the discovery request was received. |
bool nlme_auto_discovery_request | ( | uint8_t | RecAppCapabilities, |
dev_type_t | RecDevTypeList[3], | ||
profile_id_t | RecProfileIdList[7], | ||
uint32_t | AutoDiscDuration | ||
) |
NLME-AUTO-DISCOVERY.request primitive API.
The NLME-AUTO-DISCOVERY.request primitive allows the application to request the NLME automatically handles the receipt of discovery request command frames.
RecAppCapabilities | Recipient application capabilities |
RecDevTypeList | Recipient device type list |
RecProfileIdList | Recipient profile id list |
AutoDiscDuration | auto-discovery duration |
void nlme_comm_status_indication | ( | nwk_enum_t | Status, |
uint8_t | PairingRef, | ||
uint16_t | DstPANId, | ||
uint8_t | DstAddrMode, | ||
uint64_t | DstAddr | ||
) |
NLME-COMM-STATUS.indication primitive API.
The NLME-COMM-STATUS.indication primitive allows the NLME to notify the application of a communication status.
Status | Status of the transmission |
PairingRef | Pairing reference used for the transmission |
DstPANId | Destination PAN Id used for the transmission |
DstAddrMode | Destination adress mode used for the transmission |
DstAddr | Destination address used for the transmission |
void nlme_discovery_confirm | ( | nwk_enum_t | Status, |
uint8_t | NumNodes, | ||
node_desc_t * | NodeDescList | ||
) |
NLME-DISCOVERY.confirm primitive API.
The NLME-DISCOVERY.confirm primitive allows the NLME to notify the application of the status of its request to perform a network discovery.
Status | The status of the network discovery attempt. |
NumNodes | The number of discovered nodes in the NodeDescList parameter. |
NodeDescList | The (pointer of) list of node descriptors discovered. |
void nlme_discovery_indication | ( | nwk_enum_t | Status, |
uint64_t | SrcIEEEAddr, | ||
uint8_t | OrgNodeCapabilities, | ||
uint16_t | OrgVendorId, | ||
uint8_t | OrgVendorString[7], | ||
uint8_t | OrgAppCapabilities, | ||
uint8_t | OrgUserString[15], | ||
dev_type_t | OrgDevTypeList[3], | ||
profile_id_t | OrgProfileIdList[7], | ||
dev_type_t | SearchDevType, | ||
uint8_t | RxLinkQuality | ||
) |
NLME-DISCOVERY.indication primitive API.
The NLME-DISCOVERY.indication primitive allows the NLME to notify the application that a discovery request command has been received.
Status | The status of the pairing table. |
SrcIEEEAddr | The IEEE address of the device requesting the discovery. |
OrgNodeCapabilities | The capabilities of the originator of the discovery request. |
OrgVendorId | The vendor identifier of the originator of the discovery request. |
OrgVendorString | The vendor string of the originator of the discovery request. |
OrgAppCapabilities | The application capabilities of the originator of the discovery request. |
OrgUserString | The user defined identification string of the originator of the discovery request. |
OrgDevTypeList | The list of device types supported by the originator of the discovery request. |
OrgProfileIdList | The list of profile identifiers supported by the originator of the discovery request. |
SearchDevType | The device type being discovered. If this is 0xff, any type is being requested. |
RxLinkQuality | LQI value of the discovery request command frame. |
bool nlme_discovery_request | ( | uint16_t | DstPANId, |
uint16_t | DstNwkAddr, | ||
uint8_t | OrgAppCapabilities, | ||
dev_type_t | OrgDevTypeList[3], | ||
profile_id_t | OrgProfileIdList[7], | ||
dev_type_t | SearchDevType, | ||
uint8_t | DiscProfileIdListSize, | ||
profile_id_t | DiscProfileIdList[7], | ||
uint32_t | DiscDuration | ||
) |
NLME-DISCOVERY.request primitive API.
The NLME-DISCOVERY.request primitive allows the application to request the NLME discover other devices of interest operating in the POS of the device.
DstPANId | The PAN identifier of the destination device for the discovery. This value can be set to 0xffff to indicate a wildcard. |
DstNwkAddr | The address of the destination device for the discovery. This value can be set to 0xffff to indicate a wildcard. |
OrgAppCapabilities | The application capabilities of the node. |
OrgDevTypeList | The list of device types supported by the node. |
OrgProfileIdList | The list of profile identifiers disclosed as supported by the node. |
SearchDevType | The device type to discover. This value can be set to 0xff to indicate a wildcard. |
DiscProfileIdListSize | The number of profile identifiers contained in the DiscProfileIdList parameter. |
DiscProfileIdList | The list of profile identifiers against which profile identifiers contained in received discovery response command frames will be matched for acceptance. |
DiscDuration | The maximum number of MAC symbols to wait for discovery responses. |
bool nlme_discovery_response | ( | nwk_enum_t | Status, |
uint64_t | DstIEEEAddr, | ||
uint8_t | RecAppCapabilities, | ||
dev_type_t | RecDevTypeList[3], | ||
profile_id_t | RecProfileIdList[7], | ||
uint8_t | DiscReqLQI | ||
) |
NLME-DISCOVERY.response primitive API.
The NLME-DISCOVERY.response primitive allows the application to request that the NLME respond to the discovery request command.
Status | The status of the discovery request. |
DstIEEEAddr | The IEEE address of the device requesting discovery. |
RecAppCapabilities | The application capabilities of the node issuing this primitive. |
RecDevTypeList | The list of device types supported by the node issuing this primitive. |
RecProfileIdList | The list of profile identifiers supported by the node issuing this primitive. |
DiscReqLQI | The LQI value from the associated NLME-DISCOVERY.indication primitive. |
void nlme_get_confirm | ( | nwk_enum_t | Status, |
nib_attribute_t | NIBAttribute, | ||
uint8_t | NIBAttributeIndex, | ||
void * | NIBAttributeValue | ||
) |
NLME-GET.confirm primitive API.
The NLME-GET.confirm primitive allows the NLME to notify the application of the status of its request for the value of a NIB attribute.
Status | The status of the request for NIB attribute information. |
NIBAttribute | The identifier of the NIB attribute that was read. |
NIBAttributeIndex | The index within the table or array of the specified NIB attribute that was read. |
NIBAttributeValue | The value of the NIB attribute that was read. |
NLME-GET.confirm primitive API.
Status | nwk status |
NIBAttribute | NIBAttribute |
NIBAttributeIndex | NIBAttributeIndex |
NIBAttributeValue | Value of the NIB attribute. |
References NWK_SUCCESS.
bool nlme_get_request | ( | nib_attribute_t | NIBAttribute, |
uint8_t | NIBAttributeIndex | ||
) |
NLME-GET.request primitive API.
The NLME-GET.request primitive allows the application to request the value of a NIB attribute from the NLME.
NIBAttribute | The identifier of the NIB attribute to read. |
NIBAttributeIndex | The index within the table or array of the specified NIB attribute to read. |
void nlme_pair_confirm | ( | nwk_enum_t | Status, |
uint8_t | PairingRef, | ||
uint16_t | RecVendorId, | ||
uint8_t | RecVendorString[7], | ||
uint8_t | RecAppCapabilities, | ||
uint8_t | RecUserString[15], | ||
dev_type_t | RecDevTypeList[3], | ||
profile_id_t | RecProfileIdList[7] | ||
) |
NLME-PAIR.confirm primitive API.
The NLME-PAIR.confirm primitive allows the NLME to notify the application of the status of its request to pair with another device.
Status | The status of the pair attempt. |
PairingRef | The pairing table reference for this pairing link. |
RecVendorId | The vendor identifier of the originator of the pair response. |
RecVendorString | The vendor string of the originator of the pair response. |
RecAppCapabilities | The application capabilities of the originator of the pair response. |
RecUserString | The user defined identification string of the originator of the pair response. |
RecDevTypeList | The list of device types supported by the originator of the pair response. |
RecProfileIdList | The list of profile identifiers supported by the originator of the pair response. |
void nlme_pair_indication | ( | nwk_enum_t | Status, |
uint16_t | SrcPANId, | ||
uint64_t | SrcIEEEAddr, | ||
uint8_t | OrgNodeCapabilities, | ||
uint16_t | OrgVendorId, | ||
uint8_t | OrgVendorString[7], | ||
uint8_t | OrgAppCapabilities, | ||
uint8_t | OrgUserString[15], | ||
dev_type_t | OrgDevTypeList[3], | ||
profile_id_t | OrgProfileIdList[7], | ||
uint8_t | KeyExTransferCount, | ||
uint8_t | ProvPairingRef | ||
) |
NLME-PAIR.indication primitive API.
The NLME-PAIR.indication primitive allows the NLME to notify the application of the reception of a pairing request command.
Status | The status of the provisional pairing. |
SrcPANId | The PAN identifier of the device requesting the pair. |
SrcIEEEAddr | The IEEE address of the device requesting the pair. |
OrgNodeCapabilities | The capabilities of the originator of the pair request. |
OrgVendorId | The vendor identifier of the originator of the pair request. |
OrgVendorString | The vendor string of the originator of the pair request. |
OrgAppCapabilities | The application capabilities of the originator of the pair request. |
OrgUserString | The user defined identification string of the originator of the pair request. |
OrgDevTypeList | The list of device types supported by the originator of the pair request. |
OrgProfileIdList | The list of profile identifiers supported by the originator of the pair request. |
KeyExTransferCount | The number of transfers being requested to exchange the link key. |
ProvPairingRef | The pairing reference that will be used if this pairing request is successful. |
bool nlme_pair_request | ( | uint8_t | LogicalChannel, |
uint16_t | DstPANId, | ||
uint64_t | DstIEEEAddr, | ||
uint8_t | OrgAppCapabilities, | ||
dev_type_t | OrgDevTypeList[3], | ||
profile_id_t | OrgProfileIdList[7], | ||
uint8_t | KeyExTransferCount | ||
) |
NLME-PAIR.request primitive API.
The NLME-PAIR.request primitive allows the application to request the NLME pair with another device. This primitive would normally be issued following a discovery operation via the NLME-DISCOVERY.request primitive.
LogicalChannel | The logical channel of the device with which to pair. |
DstPANId | The PAN identifier of the device with which to pair. |
DstIEEEAddr | The IEEE address of the device with which to pair. |
OrgAppCapabilities | The application capabilities of the node issuing this primitive. |
OrgDevTypeList | The list of device types supported by the node issuing this primitive. |
OrgProfileIdList | The list of profile identifiers supported by the node issuing this primitive. |
KeyExTransferCount | The number of transfers the target should use to exchange the link key with the pairing originator. |
bool nlme_pair_response | ( | nwk_enum_t | Status, |
uint16_t | DstPANId, | ||
uint64_t | DstIEEEAddr, | ||
uint8_t | RecAppCapabilities, | ||
dev_type_t | RecDevTypeList[3], | ||
profile_id_t | RecProfileIdList[7], | ||
uint8_t | ProvPairingRef | ||
) |
NLME-PAIR.response primitive API.
The NLME-PAIR.response primitive allows the application to request that the NLME respond to a pairing request command.
Status | The status of the pairing request. |
DstPANId | The PAN identifier of the device requesting the pair. |
DstIEEEAddr | The IEEE address of the device requesting the pair. |
RecAppCapabilities | The application capabilities of the node issuing this primitive. |
RecDevTypeList | The list of device types supported by the node issuing this primitive. |
RecProfileIdList | The list of profile identifiers supported by the node issuing this primitive. |
ProvPairingRef | The reference to the provisional pairing entry if the pair was accepted. |
void nlme_reset_confirm | ( | nwk_enum_t | Status | ) |
NLME-RESET.confirm primitive API.
The NLME-RESET.confirm primitive allows the NLME to notify the application of the status of its request to reset the NWK layer.
Status | The status of the reset request. |
NLME-RESET.confirm primitive API.
Status | nwk status |
References ALL_IN_ONE_START, nlme_start_request(), and node_status.
bool nlme_reset_request | ( | bool | SetDefaultNIB | ) |
NLME-RESET.request primitive API.
The NLME-RESET.request primitive allows the application entity to request a reset of the NWK layer.
SetDefaultNIB | If TRUE, the NWK layer is reset and all NIB attributes are set to their default values. If FALSE, the NWK layer is reset but all NIB attributes retain their values prior to the generation of the NLME-RESET.request primitive. |
Referenced by app_task().
void nlme_rx_enable_confirm | ( | nwk_enum_t | Status | ) |
NLME-RX-ENABLE.confirm primitive API.
The NLME-RX-ENABLE.confirm primitive reports the results of the attempt to enable or disable the receiver.
Status | The result of the request to enable or disable the receiver. |
NLME-RX-ENABLE.confirm primitive API.
Status | nwk status |
References UNUSED.
bool nlme_rx_enable_request | ( | uint32_t | RxOnDuration | ) |
NLME-RX-ENABLE.request primitive API.
The NLME-RX-ENABLE.request primitive allows the application to request that the receiver is either enabled (for a finite period or until further notice) or disabled.
RxOnDuration | The number of MAC symbols for which the receiver is to be enabled. To activate power saving mode, this value should correspond to the value of nwkActivePeriod and nwkActivePeriod should not be equal to 0x000000. If this parameter is equal to 0x000000, the receiver is disabled, allowing the node to enter dormant power save mode. If this parameter is equal to 0xffffff, the receiver is enabled, allowing the node to come out of power save mode. |
void nlme_set_confirm | ( | nwk_enum_t | Status, |
nib_attribute_t | NIBAttribute, | ||
uint8_t | NIBAttributeIndex | ||
) |
NLME-SET.confirm primitive API.
The NLME-SET.confirm primitive allows the NLME to notify the application of the status of its request to change the value of a NIB attribute.
Status | The status of the request to set PIB attribute information. |
NIBAttribute | The identifier of the NIB attribute that was written. |
NIBAttributeIndex | The index within the table or array of the specified NIB attribute that was written. |
NLME-SET.confirm primitive API.
Status | nwk status |
NIBAttribute | NIBAttribute |
NIBAttributeIndex | NIBAttributeIndex |
References APP_CAPABILITIES, DEVICE_TYPE_LIST_SIZE, FUNC_PTR, led_handling(), LED_NWK_SETUP, LED_ON, NWK_SUCCESS, nwkBaseChannel, PAIR_WAIT_PERIOD, pal_led(), pal_timer_start(), pbp_rec_pair_request(), PROFILE_ID_LIST_SIZE, SUPPORTED_DEV_TYPE_0, SUPPORTED_PROFILE_ID_0, T_LED_TIMER, TIMEOUT_RELATIVE, and UNUSED.
bool nlme_set_request | ( | nib_attribute_t | NIBAttribute, |
uint8_t | NIBAttributeIndex, | ||
uint8_t * | NIBAttributeValue | ||
) |
NLME-SET.request primitive API.
The NLME-SET.request primitive allows the application to request the NLME change the value of a NIB attribute.
NIBAttribute | The identifier of the NIB attribute to write. |
NIBAttributeIndex | The index within the table or array of the specified NIB attribute to write. |
NIBAttributeValue | The value of the indicated attribute to write. |
Referenced by nlme_start_confirm().
void nlme_start_confirm | ( | nwk_enum_t | Status | ) |
NLME-START.confirm primitive API.
The NLME-START.confirm primitive allows the NLME to notify the application of the status of its request to start a network.
Status | The status of the start attempt. |
NLME-START.confirm primitive API.
The NLME-START.confirm primitive allows the NLME to notify the application of the status of its request to start a network.
Status | nwk status |
References ALL_IN_ONE_START, nlme_set_request(), node_status, and nwkBaseChannel.
bool nlme_start_request | ( | void | ) |
NLME-START.request primitive API.
The NLME-START.request primitive allows the application to request the NLME start a network.
Referenced by nlme_reset_confirm().
void nlme_unpair_confirm | ( | uint8_t | Status, |
uint8_t | PairingRef | ||
) |
NLME-UNPAIR.confirm primitive API.
The NLME-UNPAIR.confirm primitive allows the NLME to notify the application of the status of its request to remove a pair with another device.
Status | The status of the unpair attempt. |
PairingRef | The pairing table reference for this pairing link. |
NLME-UNPAIR.confirm primitive API.
The NLME-UNPAIR.confirm primitive allows the NLME to notify the application of the status of its request to remove a pair with another device.
Status | nwk status |
PairingRef | Pairing Ref for which entry is removed from pairing table. |
References IDLE, node_status, UNPAIRING, and UNUSED.
void nlme_unpair_indication | ( | uint8_t | PairingRef | ) |
NLME-UNPAIR.indication primitive API.
The NLME-UNPAIR.indication primitive allows the NLME to notify the application of the removal of a pairing link by another device.
PairingRef | The pairing table reference that has been removed from the pairing table. |
NLME-UNPAIR.indication primitive API.
The NLME-UNPAIR.indication primitive allows the NLME to notify the application of the removal of a pairing link by another device.
PairingRef | Pairing Ref for which entry is removed from pairing table. |
References UNUSED.
bool nlme_unpair_request | ( | uint8_t | PairingRef | ) |
NLME-UNPAIR.request primitive API.
The NLME-UNPAIR.request primitive allows the application to request the NLME removes a pairing link with another device both in the local and remote pairing tables.
PairingRef | The reference into the local pairing table of the entry that is to be removed. |
bool nlme_unpair_response | ( | uint8_t | PairingRef | ) |
NLME-UNPAIR.response primitive API.
The NLME-UNPAIR.response primitive allows the application to notify the NLME that the pairing link indicated via the NLME-UNPAIR.indication primitive can be removed from the pairing table.
PairingRef | The reference into the local pairing table of the entry that is to be removed. |
void nlme_update_key_confirm | ( | nwk_enum_t | Status, |
uint8_t | PairingRef | ||
) |
NLME-UPDATE-KEY.confirm primitive API.
The NLME-UPDATE-KEY.confirm primitive allows the NLME to notify the application of the status of its request to change the security link key of a pairing table entry.
Status | The status of the request to update the security link key. |
PairingRef | The reference into the local pairing table of the entry whose key is to be updated. |
NLME-UPDATE-KEY.confirm primitive API.
The NLME-UPDATE-KEY.confirm primitive allows the NLME to notify the application of the status of its request to change the security link key of a pairing table entry.
status | nwk status (constants defined by nwk layer) |
PairingRef | Pairing reference |
References UNUSED.
bool nlme_update_key_request | ( | uint8_t | PairingRef, |
uint8_t | NewLinkKey[16] | ||
) |
NLME-UPDATE-KEY.request primitive API.
The NLME-UPDATE-KEY.request primitive allows the application to request the NLME change the security link key of an entry in the pairing table.
PairingRef | The reference into the local pairing table of the entry whose key is to be updated. |
NewLinkKey | The security link key to replace the key in the pairing table. |
void nwk_ch_agility_confirm | ( | nwk_enum_t | Status, |
bool | ChannelChanged, | ||
uint8_t | LogicalChannel | ||
) |
Confirms the previous channel agility request, i.e.
nwk_ch_agility_req()
Status | Result of last request NWK_SUCCESS Channel agility request is performed successfully. NWK_NOT_PERMITTED Channel agility is not permitted, because power save mode is currently enabled. |
ChannelChanged | True if channel changed due to agility feature |
LogicalChannel | Current channel |
nwk_ch_agility_req()
Status | nwk status |
ChannelChanged | whether channel is changed. |
LogicalChannel | changed logical channel. |
References IDLE, node_status, and UNUSED.
void nwk_ch_agility_indication | ( | uint8_t | LogicalChannel | ) |
Indicates a channel agility event.
The function indicates that a channel agility event has occured, i.e. the base channel has been changed automatically. The new channel is indicated by the parameter LogicalChannel.
LogicalChannel | New/Current channel. |
Indicates a channel agility event.
LogicalChannel | changed logical channel. |
References UNUSED.
bool nwk_ch_agility_request | ( | nwk_agility_mode_t | AgilityMode | ) |
Sets channel agility mode.
The function configures the channel agility mode. Parameters of the channel agility feature, like ScanInterval, EdThreshold, IndicationCountThreshold and AutoChannelMode, can be set via NLME-SET.request. If power save mode is enabled, the channel agility mode is suspended until power save mode is left again.
AgilityMode | Channel agility mode: AG_ONE_SHOT - scans once AG_PERIODIC - starts periodic scanning AG_STOP - stops periodic scanning |
Referenced by zrc_cmd_disc_indication().
uint8_t nwk_get_nib_attribute_size | ( | uint8_t | nib_attribute_id | ) |
Gets the NIB attribute value size.
nib_attribute_id | NIB attribute ID |
nwk_enum_t nwk_init | ( | void | ) |
Initialization of RF4CE network layer.
The RF4CE network layer needs to initialize after power-up of the MCU. The function nwk_init() initializes the network layer including the underlying layers, like MAC and queue and buffer management.
Referenced by main().
bool nwk_stack_idle | ( | void | ) |
Checks if the entire stack is idle.
The function nwk_stack_idle() checks the RF4CE network layer and layers below if they are busy or idle. The function can be used to determine if the MCU can be set to a power save mode.
bool nwk_task | ( | void | ) |
Task handling of RF4CE network layer.
The function nwk_task() handles the RF4CE network layer and layers below. It needs to called frequently.
Referenced by main().
void read_pairing_ref | ( | uint8_t * | pairing_ref, |
uint8_t | length | ||
) |
Reads pairing reference from EEPROM.
The function read_pairing_ref() reads the pairing references from the EEPROM for the application scope. It's a function supporting the application - not used by NWK. If a pairing reference is equal to 0xFF, it is unused.
pairing_ref | Pointer to storage location |
length | Number of entries to read |
void store_pairing_ref | ( | uint8_t * | pairing_ref, |
uint8_t | length | ||
) |
Stores pairing references to EEPROM.
The function store_pairing_ref() stores the pairing references to the EEPROM for the application scope. It's a function supporting the application - not used by NWK.
pairing_ref | Pointer to storage location |
length | Number of entries to store |