Microchip® Advanced Software Framework

rf4ce.h File Reference

This header file declares the interface for the RF4Control stack.

Id:
rf4ce.h 27820 2011-07-24 17:20:51Z pawan.jadia
Author
Microchip Technology Inc: http://www.microchip.com
Support: https://www.microchip.com/support/
#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...
 

Enumerations

enum  dev_type_tag {
  DEV_TYPE_RESERVED = 0x00,
  DEV_TYPE_REMOTE_CONTROL = 0x01,
  DEV_TYPE_TELEVISION = 0x02,
  DEV_TYPE_PROJECTON = 0x03,
  DEV_TYPE_PLAYER = 0x04,
  DEV_TYPE_RECORDER = 0x05,
  DEV_TYPE_VIDEO = 0x06,
  DEV_TYPE_AUDIO = 0x07,
  DEV_TYPE_AV_RECORDER = 0x08,
  DEV_TYPE_SET_TOP_BOX = 0x09,
  DEV_TYPE_HOME_THEATER = 0x0A,
  DEV_TYPE_MEDIA_CENTER = 0x0B,
  DEV_TYPE_GAME_CONSOLE = 0x0C,
  DEV_TYPE_SAT_RADIO = 0x0D,
  DEV_TYPE_IR_EXTENDER = 0x0E,
  DEV_TYPE_MONITOR = 0x0F,
  DEV_TYPE_GENERIC = 0xFE,
  DEV_TYPE_WILDCARD = 0xFF
}
 Device types as defined by 094950r00ZB_RF4CE-Device-Type-List.pdf. More...
 
enum  nib_attribute_tag {
  nwkActivePeriod = 0x60,
  nwkBaseChannel = 0x61,
  nwkDiscoveryLQIThreshold = 0x62,
  nwkDiscoveryRepetitionInterval = 0x63,
  nwkDutyCycle = 0x64,
  nwkFrameCounter = 0x65,
  nwkIndicateDiscoveryRequests = 0x66,
  nwkInPowerSave = 0x67,
  nwkPairingTable = 0x68,
  nwkMaxDiscoveryRepetitions = 0x69,
  nwkMaxFirstAttemptCSMABackoffs = 0x6a,
  nwkMaxFirstAttemptFrameRetries = 0x6b,
  nwkMaxReportedNodeDescriptors = 0x6c,
  nwkResponseWaitTime = 0x6d,
  nwkScanDuration = 0x6e,
  nwkUserString = 0x6f,
  nwkPrivateIeeeAddr = 0x70,
  nwkPrivateVendorIdentifier = 0x71,
  nwkPrivateVendorString = 0x72,
  nwkPrivateNodeCapabilities = 0x73,
  nwkPrivatePanIdentifier = 0x74,
  nwkPrivateShortAddress = 0x75,
  nwkPrivateMaxPairingTableEntries = 0x76,
  nwkPrivateChAgEnabled = 0x77,
  nwkPrivateChAgScanInterval = 0x78,
  nwkPrivateChAgEdThreshold = 0x79,
  aplKeyRepeatInterval = 0x80,
  aplKeyRepeatWaitTime = 0x81,
  aplKeyExchangeTransferCount = 0x82
}
 Network Information Base attributes as defined by 094945r00ZB_RF4CE-Specification.pdf. More...
 
enum  nwk_addr_mode_tag {
  NWK_ADDR_MODE_16 = 0,
  NWK_ADDR_MODE_64 = 1
}
 Enumeration identifiying the address mode as defined by 094945r00ZB_RF4CE-Specification.pdf. More...
 
enum  nwk_agility_mode_tag {
  AG_ONE_SHOT = 0,
  AG_PERIODIC = 1,
  AG_STOP = 2
}
 Enumeration used for implementation-specific channel agility. More...
 
enum  nwk_enum_tag {
  NWK_SUCCESS = 0x00,
  NWK_NO_ORG_CAPACITY = 0xb0,
  NWK_NO_REC_CAPACITY = 0xb1,
  NWK_NO_PAIRING = 0xb2,
  NWK_NO_RESPONSE = 0xb3,
  NWK_NOT_PERMITTED = 0xb4,
  NWK_DUPLICATE_PAIRING = 0xb5,
  NWK_FRAME_COUNTER_EXPIRED = 0xb6,
  NWK_DISCOVERY_ERROR = 0xb7,
  NWK_DISCOVERY_TIMEOUT = 0xb8,
  NWK_SECURITY_TIMEOUT = 0xb9,
  NWK_SECURITY_FAILURE = 0xba,
  NWK_INVALID_PARAMETER = 0xe8,
  NWK_UNSUPPORTED_ATTRIBUTE = 0xf4,
  NWK_INVALID_INDEX = 0xf9,
  NWK_MAC_CHANNEL_ACCESS_FAILURE = 0xE1,
  NWK_MAC_DISABLE_TRX_FAILURE = 0xE3,
  NWK_MAC_FRAME_TOO_LONG = 0xE5,
  NWK_MAC_INVALID_GTS = 0xE6,
  NWK_MAC_INVALID_HANDLE = 0xE7,
  NWK_MAC_NO_ACK = 0xE9,
  NWK_MAC_NO_BEACON = 0xEA,
  NWK_MAC_NO_DATA = 0xEB,
  NWK_MAC_NO_SHORT_ADDRESS = 0xEC,
  NWK_MAC_OUT_OF_CAP = 0xED,
  NWK_MAC_PAN_ID_CONFLICT = 0xEE,
  NWK_MAC_REALIGNMENT = 0xEF,
  NWK_MAC_TRANSACTION_EXPIRED = 0xF0,
  NWK_MAC_TRANSACTION_OVERFLOW = 0xF1,
  NWK_MAC_TX_ACTIVE = 0xF2,
  NWK_MAC_INVALID_ADDRESS = 0xF5
}
 NWK enumerations as defined by 094945r00ZB_RF4CE-Specification.pdf, Table 45 - NWK enumerations description. More...
 
enum  profile_id_tag {
  PROFILE_ID_RESERVED_00 = 0x00,
  PROFILE_ID_ZRC = 0x01,
  PROFILE_ID_VENDOR_DATA = 0xFE,
  PROFILE_ID_WILDCARD = 0xFF
}
 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.

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.

Enumeration identifiying the address mode as defined by 094945r00ZB_RF4CE-Specification.pdf.

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.

Structure implementing the pairing table entry as defined by 094945r00ZB_RF4CE-Specification.pdf.

Profile IDs as defined by 094951r00ZB_RF4CE-Profile-ID-List.pdf.

Device types as defined by 094950r00ZB_RF4CE-Device-Type-List.pdf.

Enumerator
DEV_TYPE_RESERVED 
DEV_TYPE_REMOTE_CONTROL 
DEV_TYPE_TELEVISION 
DEV_TYPE_PROJECTON 
DEV_TYPE_PLAYER 
DEV_TYPE_RECORDER 
DEV_TYPE_VIDEO 
DEV_TYPE_AUDIO 
DEV_TYPE_AV_RECORDER 
DEV_TYPE_SET_TOP_BOX 
DEV_TYPE_HOME_THEATER 
DEV_TYPE_MEDIA_CENTER 
DEV_TYPE_GAME_CONSOLE 
DEV_TYPE_SAT_RADIO 
DEV_TYPE_IR_EXTENDER 
DEV_TYPE_MONITOR 
DEV_TYPE_GENERIC 
DEV_TYPE_WILDCARD 

Network Information Base attributes as defined by 094945r00ZB_RF4CE-Specification.pdf.

Enumerator
nwkActivePeriod 

The active period of a device in MAC symbols.

nwkBaseChannel 

The logical channel that was chosen when the RC PAN was formed.

nwkDiscoveryLQIThreshold 

The LQI threshold below which discovery requests will be rejected.

nwkDiscoveryRepetitionInterval 

The interval at which discovery attempts are made on all channels.

nwkDutyCycle 

The duty cycle of a device in MAC symbols.

A value of 0x000000 indicates the device is not using power saving.

nwkFrameCounter 

The frame counter added to the transmitted NPDU.

nwkIndicateDiscoveryRequests 

Indicates whether the NLME indicates the reception of discovery request command frames to the application.

TRUE indicates that the NLME notifies the application.

nwkInPowerSave 

The power save mode of the node.

TRUE indicates that the device is operating in power save mode.

nwkPairingTable 

List of pairing table entries (see Table 41) The pairing table managed by the device.

nwkMaxDiscoveryRepetitions 

The maximum number of discovery attempts made at the nwkDiscoveryRepetitionInterval rate.

nwkMaxFirstAttemptCSMABackoffs 

The maximum number of backoffs the MAC CSMACA algorithm will attempt before declaring a channel access failure for the first transmission attempt.

nwkMaxFirstAttemptFrameRetries 

The maximum number of MAC retries allowed after a transmission failure for the first transmission attempt.

nwkMaxReportedNodeDescriptors 

The maximum number of node descriptors that can be obtained before reporting to the application.

nwkResponseWaitTime 

The maximum time in MAC symbols, a device shall wait for a response command frame following a request command frame.

nwkScanDuration 

A measure of the duration of a scanning operation, according to [R1].

nwkUserString 

The user defined character string used to identify this node.

nwkPrivateIeeeAddr 

Private/Proprietary PIB value used for set/get primitive.

IEEE address

nwkPrivateVendorIdentifier 

Vendor identifier.

nwkPrivateVendorString 

Vendor string.

nwkPrivateNodeCapabilities 

Node capabilities (security and node type bits are read-only)

nwkPrivatePanIdentifier 

Target Pan Identifier (read-only)

nwkPrivateShortAddress 

Target Short address (read-only)

nwkPrivateMaxPairingTableEntries 

Private NIB.

Maximum number of allowed pairing table entries (set only); used for testing

nwkPrivateChAgEnabled 

Channel agility feature enabled - read-only.

nwkPrivateChAgScanInterval 

Channel agility scan interval.

nwkPrivateChAgEdThreshold 

Channel agility ED threshold value.

aplKeyRepeatInterval 

The interval in ms at which user command repeat frames will be transmitted.

aplKeyRepeatWaitTime 

The duration that a recipient of a user control repeated command frame waits before terminating a repeated operation.

aplKeyExchangeTransferCount 

The minimum value of the KeyExTransferCount parameter passed to the pair request primitive during the push button pairing procedure.

Enumeration identifiying the address mode as defined by 094945r00ZB_RF4CE-Specification.pdf.

Enumerator
NWK_ADDR_MODE_16 

Address mode 16-bit network address.

NWK_ADDR_MODE_64 

Address mode 64-bit IEEE address.

Enumeration used for implementation-specific channel agility.

Enumerator
AG_ONE_SHOT 

One shot scan type for channel agility.

AG_PERIODIC 

Periodic scan.

AG_STOP 

Stop channel agility.

NWK enumerations as defined by 094945r00ZB_RF4CE-Specification.pdf, Table 45 - NWK enumerations description.

Enumerator
NWK_SUCCESS 

The requested operation was completed successfully.

NWK_NO_ORG_CAPACITY 

A pairing link cannot be established since the originator node has reached its maximum number of entries in its pairing table.

NWK_NO_REC_CAPACITY 

A pairing link cannot be established since the recipient node has reached its maximum number of entries in its pairing table.

NWK_NO_PAIRING 

A pairing table entry could not be found that corresponds to the supplied pairing reference.

NWK_NO_RESPONSE 

A response frame was not received within nwkResponseWaitTime.

NWK_NOT_PERMITTED 

A pairing request was denied by the recipient node or an attempt to update a security link key was not possible due to one or more nodes not supporting security.

NWK_DUPLICATE_PAIRING 

A duplicate pairing table entry was detected following the receipt of a pairing request command frame.

NWK_FRAME_COUNTER_EXPIRED 

The frame counter has reached its maximum value.

NWK_DISCOVERY_ERROR 

Too many unique matched discovery request or valid response command frames were received than requested.

NWK_DISCOVERY_TIMEOUT 

No discovery request or response command frames were received during discovery.

NWK_SECURITY_TIMEOUT 

The security link key exchange or recovery procedure did not complete within the required time.

NWK_SECURITY_FAILURE 

A security link key was not successfully established between both ends of a pairing link.

NWK_INVALID_PARAMETER 

A parameter in the primitive is either not supported or is out of the valid range.

NWK_UNSUPPORTED_ATTRIBUTE 

A SET/GET request was issued with the identifier of a NIB attribute that is not supported.

NWK_INVALID_INDEX 

An attempt to write to a NIB attribute that is in a table failed because the specified table index was out of range.

NWK_MAC_CHANNEL_ACCESS_FAILURE 

Enumerations from MAC layer.

A transmission could not take place due to activity on the channel, i.e., the CSMA-CA mechanism has failed.

NWK_MAC_DISABLE_TRX_FAILURE 

The attempt to disable the transceiver has failed.

NWK_MAC_FRAME_TOO_LONG 

The frame resulting from secure processing has a length that is greater than aMACMaxFrameSize.

NWK_MAC_INVALID_GTS 

The requested GTS transmission failed because the specified GTS either did not have a transmit GTS direction or was not defined.

NWK_MAC_INVALID_HANDLE 

A request to purge an MSDU from the transaction queue was made using an MSDU handle that was not found in the transaction table.

NWK_MAC_NO_ACK 

No acknowledgment was received after aMaxFrameRetries.

NWK_MAC_NO_BEACON 

A scan operation failed to find any network beacons.

NWK_MAC_NO_DATA 

No response data were available following a request.

NWK_MAC_NO_SHORT_ADDRESS 

The operation failed because a short address was not allocated.

NWK_MAC_OUT_OF_CAP 

A receiver enable request was unsuccessful because it could not be completed within the CAP.

NWK_MAC_PAN_ID_CONFLICT 

A PAN identifier conflict has been detected and communicated to the PAN coordinator.

NWK_MAC_REALIGNMENT 

A coordinator realignment command has been received.

NWK_MAC_TRANSACTION_EXPIRED 

The transaction has expired and its information discarded.

NWK_MAC_TRANSACTION_OVERFLOW 

There is no capacity to store the transaction.

NWK_MAC_TX_ACTIVE 

The transceiver was in the transmitter enabled state when the receiver was requested to be enabled.

NWK_MAC_INVALID_ADDRESS 

A request to send data was unsuccessful because neither the source address parameters nor the destination address parameters were present.

Profile IDs as defined by 094951r00ZB_RF4CE-Profile-ID-List.pdf.

Enumerator
PROFILE_ID_RESERVED_00 
PROFILE_ID_ZRC 

Consumer Electronics Remote control.

PROFILE_ID_VENDOR_DATA 
PROFILE_ID_WILDCARD 

Wildcard profile id.

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

  • not used by NWK.
Parameters
first_refFirst entry to clear
lengthNumber of entries to clear
See Also
store_pairing_ref
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.

Parameters
StatusStatus for the handled data request
PairingRefPairing reference used for the data request
ProfileIdProfile Id used for the data request
See Also
nlde_data_request

NLDE-DATA.confirm primitive API.

Parameters
Statusnwk status.
PairingRefPairing Ref for the destination.
ProfileIdProfile 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.

Parameters
PairingRefPairing reference attached to the incoming frame
ProfileIdProfile id used for the frame
VendorIdVendor id used for the frame
nsduLengthPayload length
nsduPointer to the network payload
RxLinkQualityLink quality of the received frame
RxFlagsReceive flags
See Also
nlde_data_request, nlde_data_confirm
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.

Parameters
PairingRefPairing reference used for the data transmission
ProfileIdProfile Id used for the data transmission
VendorIdVendor Id used for the data transmission
nsduLengthLength of the network payload
nsduPointer to the payload
TxOptionsTransmission options
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlde_data_confirm

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.

Parameters
StatusStatus of the completed auto-discovery procedure
SrcIEEEAddrSource IEEE address from which the discovery request was received.
See Also
nlme_auto_discovery_request
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.

Parameters
RecAppCapabilitiesRecipient application capabilities
RecDevTypeListRecipient device type list
RecProfileIdListRecipient profile id list
AutoDiscDurationauto-discovery duration
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_auto_discovery_confirm
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.

Parameters
StatusStatus of the transmission
PairingRefPairing reference used for the transmission
DstPANIdDestination PAN Id used for the transmission
DstAddrModeDestination adress mode used for the transmission
DstAddrDestination 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.

Parameters
StatusThe status of the network discovery attempt.
NumNodesThe number of discovered nodes in the NodeDescList parameter.
NodeDescListThe (pointer of) list of node descriptors discovered.
See Also
nlme_discovery_request
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.

Parameters
StatusThe status of the pairing table.
SrcIEEEAddrThe IEEE address of the device requesting the discovery.
OrgNodeCapabilitiesThe capabilities of the originator of the discovery request.
OrgVendorIdThe vendor identifier of the originator of the discovery request.
OrgVendorStringThe vendor string of the originator of the discovery request.
OrgAppCapabilitiesThe application capabilities of the originator of the discovery request.
OrgUserStringThe user defined identification string of the originator of the discovery request.
OrgDevTypeListThe list of device types supported by the originator of the discovery request.
OrgProfileIdListThe list of profile identifiers supported by the originator of the discovery request.
SearchDevTypeThe device type being discovered. If this is 0xff, any type is being requested.
RxLinkQualityLQI value of the discovery request command frame.
See Also
nlme_discovery_request, nlme_discovery_confirm, nlme_discovery_response
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.

Parameters
DstPANIdThe PAN identifier of the destination device for the discovery. This value can be set to 0xffff to indicate a wildcard.
DstNwkAddrThe address of the destination device for the discovery. This value can be set to 0xffff to indicate a wildcard.
OrgAppCapabilitiesThe application capabilities of the node.
OrgDevTypeListThe list of device types supported by the node.
OrgProfileIdListThe list of profile identifiers disclosed as supported by the node.
SearchDevTypeThe device type to discover. This value can be set to 0xff to indicate a wildcard.
DiscProfileIdListSizeThe number of profile identifiers contained in the DiscProfileIdList parameter.
DiscProfileIdListThe list of profile identifiers against which profile identifiers contained in received discovery response command frames will be matched for acceptance.
DiscDurationThe maximum number of MAC symbols to wait for discovery responses.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_discovery_confirm
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.

Parameters
StatusThe status of the discovery request.
DstIEEEAddrThe IEEE address of the device requesting discovery.
RecAppCapabilitiesThe application capabilities of the node issuing this primitive.
RecDevTypeListThe list of device types supported by the node issuing this primitive.
RecProfileIdListThe list of profile identifiers supported by the node issuing this primitive.
DiscReqLQIThe LQI value from the associated NLME-DISCOVERY.indication primitive.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_discovery_indication
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.

Parameters
StatusThe status of the request for NIB attribute information.
NIBAttributeThe identifier of the NIB attribute that was read.
NIBAttributeIndexThe index within the table or array of the specified NIB attribute that was read.
NIBAttributeValueThe value of the NIB attribute that was read.
See Also
nlme_get_request, nwk_get_nib_attribute_size

NLME-GET.confirm primitive API.

Parameters
Statusnwk status
NIBAttributeNIBAttribute
NIBAttributeIndexNIBAttributeIndex
NIBAttributeValueValue 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.

Parameters
NIBAttributeThe identifier of the NIB attribute to read.
NIBAttributeIndexThe index within the table or array of the specified NIB attribute to read.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_get_confirm
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.

Parameters
StatusThe status of the pair attempt.
PairingRefThe pairing table reference for this pairing link.
RecVendorIdThe vendor identifier of the originator of the pair response.
RecVendorStringThe vendor string of the originator of the pair response.
RecAppCapabilitiesThe application capabilities of the originator of the pair response.
RecUserStringThe user defined identification string of the originator of the pair response.
RecDevTypeListThe list of device types supported by the originator of the pair response.
RecProfileIdListThe list of profile identifiers supported by the originator of the pair response.
See Also
nlme_pair_request
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.

Parameters
StatusThe status of the provisional pairing.
SrcPANIdThe PAN identifier of the device requesting the pair.
SrcIEEEAddrThe IEEE address of the device requesting the pair.
OrgNodeCapabilitiesThe capabilities of the originator of the pair request.
OrgVendorIdThe vendor identifier of the originator of the pair request.
OrgVendorStringThe vendor string of the originator of the pair request.
OrgAppCapabilitiesThe application capabilities of the originator of the pair request.
OrgUserStringThe user defined identification string of the originator of the pair request.
OrgDevTypeListThe list of device types supported by the originator of the pair request.
OrgProfileIdListThe list of profile identifiers supported by the originator of the pair request.
KeyExTransferCountThe number of transfers being requested to exchange the link key.
ProvPairingRefThe pairing reference that will be used if this pairing request is successful.
See Also
nlme_pair_request, nlme_pair_response
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.

Parameters
LogicalChannelThe logical channel of the device with which to pair.
DstPANIdThe PAN identifier of the device with which to pair.
DstIEEEAddrThe IEEE address of the device with which to pair.
OrgAppCapabilitiesThe application capabilities of the node issuing this primitive.
OrgDevTypeListThe list of device types supported by the node issuing this primitive.
OrgProfileIdListThe list of profile identifiers supported by the node issuing this primitive.
KeyExTransferCountThe number of transfers the target should use to exchange the link key with the pairing originator.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_pair_confirm
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.

Parameters
StatusThe status of the pairing request.
DstPANIdThe PAN identifier of the device requesting the pair.
DstIEEEAddrThe IEEE address of the device requesting the pair.
RecAppCapabilitiesThe application capabilities of the node issuing this primitive.
RecDevTypeListThe list of device types supported by the node issuing this primitive.
RecProfileIdListThe list of profile identifiers supported by the node issuing this primitive.
ProvPairingRefThe reference to the provisional pairing entry if the pair was accepted.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_pair_indication
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.

Parameters
StatusThe status of the reset request.
See Also
nlme_reset_request

NLME-RESET.confirm primitive API.

Parameters
Statusnwk 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.

Parameters
SetDefaultNIBIf 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.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_reset_confirm

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.

Parameters
StatusThe result of the request to enable or disable the receiver.
See Also
nlme_rx_enable_request

NLME-RX-ENABLE.confirm primitive API.

Parameters
Statusnwk 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.

Parameters
RxOnDurationThe 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.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_rx_enable_confirm
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.

Parameters
StatusThe status of the request to set PIB attribute information.
NIBAttributeThe identifier of the NIB attribute that was written.
NIBAttributeIndexThe index within the table or array of the specified NIB attribute that was written.
See Also
nlme_set_request

NLME-SET.confirm primitive API.

Parameters
Statusnwk status
NIBAttributeNIBAttribute
NIBAttributeIndexNIBAttributeIndex

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.

Parameters
NIBAttributeThe identifier of the NIB attribute to write.
NIBAttributeIndexThe index within the table or array of the specified NIB attribute to write.
NIBAttributeValueThe value of the indicated attribute to write.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_set_confirm

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.

Parameters
StatusThe status of the start attempt.
See Also
nlme_start_request

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.

Parameters
Statusnwk 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.

Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_start_confirm

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.

Parameters
StatusThe status of the unpair attempt.
PairingRefThe pairing table reference for this pairing link.
See Also
nlme_unpair_request

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.

Parameters
Statusnwk status
PairingRefPairing 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.

Parameters
PairingRefThe pairing table reference that has been removed from the pairing table.
See Also
nlme_unpair_response

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.

Parameters
PairingRefPairing 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.

Parameters
PairingRefThe reference into the local pairing table of the entry that is to be removed.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_unpair_confirm
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.

Parameters
PairingRefThe reference into the local pairing table of the entry that is to be removed.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_unpair_indication
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.

Parameters
StatusThe status of the request to update the security link key.
PairingRefThe reference into the local pairing table of the entry whose key is to be updated.
See Also
nlme_update_key_request

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.

Parameters
statusnwk status (constants defined by nwk layer)
PairingRefPairing 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.

Parameters
PairingRefThe reference into the local pairing table of the entry whose key is to be updated.
NewLinkKeyThe security link key to replace the key in the pairing table.
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nlme_update_key_confirm
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()

Parameters
StatusResult 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.
ChannelChangedTrue if channel changed due to agility feature
LogicalChannelCurrent channel
See Also
nwk_ch_agility_request

nwk_ch_agility_req()

Parameters
Statusnwk status
ChannelChangedwhether channel is changed.
LogicalChannelchanged 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.

Parameters
LogicalChannelNew/Current channel.
See Also
nwk_ch_agility_request

Indicates a channel agility event.

Parameters
LogicalChannelchanged 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.

Parameters
AgilityModeChannel agility mode: AG_ONE_SHOT - scans once AG_PERIODIC - starts periodic scanning AG_STOP - stops periodic scanning
Returns
true if request has been added to NHLE-NWK queue successfully; else false
See Also
nwk_ch_agility_confirm

Referenced by zrc_cmd_disc_indication().

uint8_t nwk_get_nib_attribute_size ( uint8_t  nib_attribute_id)

Gets the NIB attribute value size.

Parameters
nib_attribute_idNIB attribute ID
Returns
Size of NIB attribute value in bytes
See Also
nlme_get_confirm
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.

Returns
Status of the initialization

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.

Returns
true if all layers are idle; else false
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.

Returns
true if request has been added to NHLE-NWK queue successfully; else false

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.

Parameters
pairing_refPointer to storage location
lengthNumber of entries to read
See Also
store_pairing_ref
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.

Parameters
pairing_refPointer to storage location
lengthNumber of entries to store
See Also
read_pairing_ref