00001
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RF4CE_H
00019 #define RF4CE_H
00020
00021
00022
00023
00024 #include <stdbool.h>
00025 #include <stdint.h>
00026 #include "pal_types.h"
00027 #include "return_val.h"
00028 #include "nwk_build_config.h"
00029
00030
00031
00032
00033
00034
00035
00036
00038 #define NodeTypeTarget 0x01
00039
00040 #define NodeTypeController 0x00
00041
00042 #define PowerSourceMainsTrue 0x02
00043
00044 #define PowerSourceMainsFalse 0x00
00045
00046 #define SecurityCapableTrue 0x04
00047
00048 #define SecurityCapableFalse 0x00
00049
00050 #define ChannelNormalizationCapableTrue 0x08
00051
00052 #define ChannelNormalizationCapableFalse 0x00
00053
00055 #define RX_DURATION_OFF 0
00056
00057 #define RX_DURATION_INFINITY 0xFFFFFF
00058
00059
00061 #define TXO_UNICAST 0x00
00062
00063 #define TXO_BROADCAST 0x01
00064
00065 #define TXO_DST_ADDR_NET 0x00
00066
00067 #define TXO_DST_ADDR_IEEE 0x02
00068
00069 #define TXO_ACK_NOT_REQ 0x00
00070
00071 #define TXO_ACK_REQ 0x04
00072
00073 #define TXO_SEC_NOT_REQ 0x00
00074
00075 #define TXO_SEC_REQ 0x08
00076
00077 #define TXO_MULTI_CH 0x00
00078
00079 #define TXO_SINGLE_CH 0x10
00080
00081 #define TXO_CH_NOT_SPEC 0x00
00082
00083 #define TXO_CH_SPEC 0x20
00084
00085 #define TXO_VEND_NOT_SPEC 0x00
00086
00087 #define TXO_VEND_SPEC 0x40
00088
00089
00090
00091
00093 #define RX_FLAG_UNICAST 0x00
00094
00095 #define RX_FLAG_BROADCAST 0x01
00096
00097 #define RX_FLAG_NO_SEC 0x00
00098
00099 #define RX_FLAG_WITH_SEC 0x02
00100
00101 #define RX_FLAG_NOT_VENDOR 0x00
00102
00103 #define RX_FLAG_VENDOR_SPEC 0x04
00104
00105
00107 #define nwkcMaxDutyCycle 62500
00108
00109 #define nwkcMinActivePeriod 1050
00110
00111
00114 #define MAX_SAFE_DATA_FRAME_PAYLOAD (aMaxMACSafePayloadSize - 12)
00115
00116
00117
00118
00119
00126 typedef enum nwk_enum_tag
00127 {
00129 NWK_SUCCESS = 0x00,
00132 NWK_NO_ORG_CAPACITY = 0xb0,
00135 NWK_NO_REC_CAPACITY = 0xb1,
00138 NWK_NO_PAIRING = 0xb2,
00140 NWK_NO_RESPONSE = 0xb3,
00144 NWK_NOT_PERMITTED = 0xb4,
00147 NWK_DUPLICATE_PAIRING = 0xb5,
00149 NWK_FRAME_COUNTER_EXPIRED = 0xb6,
00152 NWK_DISCOVERY_ERROR = 0xb7,
00155 NWK_DISCOVERY_TIMEOUT = 0xb8,
00158 NWK_SECURITY_TIMEOUT = 0xb9,
00161 NWK_SECURITY_FAILURE = 0xba,
00164 NWK_INVALID_PARAMETER = 0xe8,
00167 NWK_UNSUPPORTED_ATTRIBUTE = 0xf4,
00170 NWK_INVALID_INDEX = 0xf9,
00174 NWK_MAC_CHANNEL_ACCESS_FAILURE = 0xE1,
00176 NWK_MAC_DISABLE_TRX_FAILURE = 0xE3,
00179 NWK_MAC_FRAME_TOO_LONG = 0xE5,
00182 NWK_MAC_INVALID_GTS = 0xE6,
00185 NWK_MAC_INVALID_HANDLE = 0xE7,
00187 NWK_MAC_NO_ACK = 0xE9,
00189 NWK_MAC_NO_BEACON = 0xEA,
00191 NWK_MAC_NO_DATA = 0xEB,
00193 NWK_MAC_NO_SHORT_ADDRESS = 0xEC,
00196 NWK_MAC_OUT_OF_CAP = 0xED,
00199 NWK_MAC_PAN_ID_CONFLICT = 0xEE,
00201 NWK_MAC_REALIGNMENT = 0xEF,
00203 NWK_MAC_TRANSACTION_EXPIRED = 0xF0,
00205 NWK_MAC_TRANSACTION_OVERFLOW = 0xF1,
00208 NWK_MAC_TX_ACTIVE = 0xF2,
00212 NWK_MAC_INVALID_ADDRESS = 0xF5
00213 } SHORTENUM nwk_enum_t;
00214
00215
00221 typedef struct NodeDesc_tag
00222 {
00225 nwk_enum_t Status;
00227 uint8_t LogicalChannel;
00229 uint16_t PANId;
00231 uint64_t IEEEAddr;
00233 uint8_t NodeCapabilities;
00235 uint16_t VendorId;
00237 uint8_t VendorString[7];
00239 uint8_t AppCapabilities;
00243 uint8_t UserString[15];
00245 uint8_t DevTypeList[3];
00247 uint8_t ProfileIdList[7];
00250 uint8_t DiscReqLQI;
00251 } node_desc_t;
00252
00253
00259 typedef enum nib_attribute_tag
00260 {
00262 nwkActivePeriod = 0x60,
00264 nwkBaseChannel = 0x61,
00266 nwkDiscoveryLQIThreshold = 0x62,
00268 nwkDiscoveryRepetitionInterval = 0x63,
00272 nwkDutyCycle = 0x64,
00274 nwkFrameCounter = 0x65,
00278 nwkIndicateDiscoveryRequests = 0x66,
00281 nwkInPowerSave = 0x67,
00284 nwkPairingTable = 0x68,
00287 nwkMaxDiscoveryRepetitions = 0x69,
00291 nwkMaxFirstAttemptCSMABackoffs = 0x6a,
00294 nwkMaxFirstAttemptFrameRetries = 0x6b,
00297 nwkMaxReportedNodeDescriptors = 0x6c,
00300 nwkResponseWaitTime = 0x6d,
00302 nwkScanDuration = 0x6e,
00304 nwkUserString = 0x6f,
00307 nwkPrivateIeeeAddr = 0x70,
00309 nwkPrivateVendorIdentifier = 0x71,
00311 nwkPrivateVendorString = 0x72,
00313 nwkPrivateNodeCapabilities = 0x73,
00315 nwkPrivatePanIdentifier = 0x74,
00317 nwkPrivateShortAddress = 0x75,
00320 nwkPrivateMaxPairingTableEntries = 0x76,
00322 nwkPrivateChAgEnabled = 0x77,
00324 nwkPrivateChAgScanInterval = 0x78,
00326 nwkPrivateChAgEdThreshold = 0x79
00327 #ifdef ZRC_PROFILE
00328 ,
00330 aplKeyRepeatInterval = 0x80,
00333 aplKeyRepeatWaitTime = 0x81
00334 #endif
00335 #if (defined PBP_ORG) || (defined PBP_REC)
00336 ,
00339 aplKeyExchangeTransferCount = 0x82
00340 #endif
00341 } SHORTENUM nib_attribute_t;
00342
00343
00349 typedef struct pairing_table_tag
00350 {
00352 uint16_t SourceNetworkAddress;
00354 uint8_t DestinationLogicalChannel;
00356 uint64_t DestinationIEEEaddress;
00358 uint16_t DestinationPANidentifier;
00360 uint16_t DestinationNetworkAddress;
00362 uint8_t RecipientCapabilities;
00364 uint32_t RecipientFrameCounter;
00365 #if (defined RF4CE_SECURITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00366
00367 uint8_t SecurityLinkKey[16];
00368 #endif
00369 } pairing_table_t;
00370
00371
00377 typedef enum nwk_addr_mode_tag
00378 {
00380 NWK_ADDR_MODE_16 = 0,
00382 NWK_ADDR_MODE_64 = 1
00383 } SHORTENUM nwk_addr_mode_t;
00384
00385
00391 typedef enum nwk_agility_mode_tag
00392 {
00394 AG_ONE_SHOT = 0,
00396 AG_PERIODIC = 1,
00398 AG_STOP = 2
00399 } SHORTENUM nwk_agility_mode_t;
00400
00401
00407 typedef enum dev_type_tag
00408 {
00409 DEV_TYPE_RESERVED = 0x00,
00410 DEV_TYPE_REMOTE_CONTROL = 0x01,
00411 DEV_TYPE_TELEVISION = 0x02,
00412 DEV_TYPE_PROJECTON = 0x03,
00413 DEV_TYPE_PLAYER = 0x04,
00414 DEV_TYPE_RECORDER = 0x05,
00415 DEV_TYPE_VIDEO = 0x06,
00416 DEV_TYPE_AUDIO = 0x07,
00417 DEV_TYPE_AV_RECORDER = 0x08,
00418 DEV_TYPE_SET_TOP_BOX = 0x09,
00419 DEV_TYPE_HOME_THEATER = 0x0A,
00420 DEV_TYPE_MEDIA_CENTER = 0x0B,
00421 DEV_TYPE_GAME_CONSOLE = 0x0C,
00422 DEV_TYPE_SAT_RADIO = 0x0D,
00423 DEV_TYPE_IR_EXTENDER = 0x0E,
00424 DEV_TYPE_MONITOR = 0x0F,
00425
00426 DEV_TYPE_GENERIC = 0xFE,
00427 DEV_TYPE_WILDCARD = 0xFF
00428 } SHORTENUM dev_type_t;
00429
00430
00436 typedef enum profile_id_tag
00437 {
00438 PROFILE_ID_RESERVED_00 = 0x00,
00440 PROFILE_ID_ZRC = 0x01,
00441
00442
00443 PROFILE_ID_VENDOR_DATA = 0xFE,
00445 PROFILE_ID_WILDCARD = 0xFF
00446 } SHORTENUM profile_id_t;
00447
00448
00449 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00450
00451 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00452 typedef void (*nwk_ch_agility_confirm_cb_t)(
00453 nwk_enum_t Status, bool ChannelChanged, uint8_t LogicalChannel);
00454 #endif
00455
00456 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00457 typedef void (*nwk_ch_agility_indication_cb_t)(uint8_t LogicalChannel);
00458 #endif
00459
00460 #if (NWK_UPDATE_KEY == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00461 typedef void (*nlme_update_key_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef);
00462 #endif
00463
00464 #if (NWK_UNPAIR_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00465 typedef void (*nlme_unpair_confirm_cb_t)(uint8_t Status, uint8_t PairingRef);
00466 #endif
00467
00468 typedef void (*nlme_start_confirm_cb_t)(nwk_enum_t Status);
00469
00470 #if (NWK_SET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00471 typedef void (*nlme_set_confirm_cb_t)(nwk_enum_t Status, nib_attribute_t NIBAttribute,
00472 uint8_t NIBAttributeIndex);
00473 #endif
00474
00475 typedef void (*nlme_rx_enable_confirm_cb_t)(nwk_enum_t Status);
00476
00477 typedef void (*nlme_reset_confirm_cb_t)(nwk_enum_t Status);
00478
00479 #if (NWK_PAIR_REQ_CONF == 1) || (defined DOXYGEN)
00480 typedef void (*nlme_pair_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef, uint16_t RecVendorId,
00481 uint8_t RecVendorString[7], uint8_t RecAppCapabilities,
00482 uint8_t RecUserString[15], dev_type_t RecDevTypeList[3],
00483 profile_id_t RecProfileIdList[7]);
00484 #endif
00485
00486 #if (NWK_GET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00487 typedef void (*nlme_get_confirm_cb_t)(nwk_enum_t Status, nib_attribute_t NIBAttribute,
00488 uint8_t NIBAttributeIndex, void *NIBAttributeValue);
00489 #endif
00490
00491 #if (NWK_DISCOVERY_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00492 typedef void (*nlme_discovery_confirm_cb_t)(nwk_enum_t Status, uint8_t NumNodes,
00493 node_desc_t *NodeDescList);
00494 #endif
00495
00496 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00497 typedef void (*nlme_auto_discovery_confirm_cb_t)(nwk_enum_t Status, uint64_t SrcIEEEAddr);
00498 #endif
00499
00500 typedef void (*nlde_data_confirm_cb_t)(nwk_enum_t Status, uint8_t PairingRef, profile_id_t ProfileId
00501 #if (defined NLDE_HANDLE) || (defined DOXYGEN)
00502 , uint8_t Handle
00503 #endif
00504 );
00505
00506 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00507 typedef void (*nlme_pair_indication_cb_t)(nwk_enum_t Status, uint16_t SrcPANId, uint64_t SrcIEEEAddr,
00508 uint8_t OrgNodeCapabilities, uint16_t OrgVendorId,
00509 uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities,
00510 uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3],
00511 profile_id_t OrgProfileIdList[7], uint8_t KeyExTransferCount,
00512 uint8_t ProvPairingRef);
00513 #endif
00514
00515 #if (NWK_UNPAIR_IND_RESP == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00516 typedef void (*nlme_unpair_indication_cb_t)(uint8_t PairingRef);
00517 #endif
00518
00519 #if (((defined RF4CE_TARGET) && (NWK_DISCOVERY_IND_RESP == 1)) || (defined DOXYGEN)) || (defined RF4CE_PLATFORM)
00520 typedef void (*nlme_discovery_indication_cb_t)(nwk_enum_t Status, uint64_t SrcIEEEAddr,
00521 uint8_t OrgNodeCapabilities, uint16_t OrgVendorId,
00522 uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities,
00523 uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3],
00524 profile_id_t OrgProfileIdList[7], dev_type_t SearchDevType,
00525 uint8_t RxLinkQuality);
00526 #endif
00527
00528 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00529 typedef void (*nlme_comm_status_indication_cb_t)(nwk_enum_t Status, uint8_t PairingRef,
00530 uint16_t DstPANId, uint8_t DstAddrMode,
00531 uint64_t DstAddr);
00532 #endif
00533
00534 typedef void (*nlde_data_indication_cb_t)(uint8_t PairingRef, profile_id_t ProfileId,
00535 uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu,
00536 uint8_t RxLinkQuality, uint8_t RxFlags);
00537
00538 #if (defined ZRC_PROFILE)
00539 typedef void (*zrc_data_indication_cb_t)(uint8_t PairingRef, uint16_t VendorId, uint8_t nsduLength,
00540 uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags);
00541 #endif
00542
00549 typedef struct nwk_indication_callback
00550 {
00551 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00552 nwk_ch_agility_indication_cb_t nwk_ch_agility_indication_cb;
00553 #endif
00554 #if (NWK_UNPAIR_IND_RESP == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00555 nlme_unpair_indication_cb_t nlme_unpair_indication_cb;
00556 #endif
00557 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00558 nlme_pair_indication_cb_t nlme_pair_indication_cb;
00559 #endif
00560 #if (((defined RF4CE_TARGET) && (NWK_DISCOVERY_IND_RESP == 1)) || (defined DOXYGEN)) || (defined RF4CE_PLATFORM)
00561 nlme_discovery_indication_cb_t nlme_discovery_indication_cb;
00562 #endif
00563 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00564 nlme_comm_status_indication_cb_t nlme_comm_status_indication_cb;
00565 #endif
00566 #ifdef ZRC_PROFILE
00567 zrc_data_indication_cb_t zrc_data_indication_cb;
00568 #endif
00569 nlde_data_indication_cb_t nlde_data_indication_cb;
00570 } SHORTENUM nwk_indication_callback_t;
00571 #endif
00572
00573
00574
00575
00576 #ifdef __cplusplus
00577 extern "C" {
00578 #endif
00579
00580
00581
00582
00603 bool nlde_data_request(uint8_t PairingRef, profile_id_t ProfileId,
00604 uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu,
00605 uint8_t TxOptions
00606 #if (defined NLDE_HANDLE) || (defined DOXYGEN)
00607 , uint8_t Handle
00608 #endif
00609 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00610 , FUNC_PTR confirm_cb
00611 #endif
00612 );
00613
00614 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00615
00632 void nlde_data_indication(uint8_t PairingRef, profile_id_t ProfileId,
00633 uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu,
00634 uint8_t RxLinkQuality, uint8_t RxFlags);
00635
00650 void nlde_data_confirm(nwk_enum_t Status, uint8_t PairingRef, profile_id_t ProfileId
00651 #if (defined NLDE_HANDLE) || (defined DOXYGEN)
00652 , uint8_t Handle
00653 #endif
00654 );
00655 #endif
00656
00673 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00674 bool nlme_auto_discovery_request(uint8_t RecAppCapabilities,
00675 dev_type_t RecDevTypeList[3],
00676 profile_id_t RecProfileIdList[7],
00677 uint32_t AutoDiscDuration
00678 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00679 , FUNC_PTR confirm_cb
00680 #endif
00681 );
00682 #endif
00683
00684 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00685
00698 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00699 void nlme_auto_discovery_confirm(nwk_enum_t Status, uint64_t SrcIEEEAddr);
00700 #endif
00701
00716 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00717 void nlme_comm_status_indication(nwk_enum_t Status, uint8_t PairingRef,
00718 uint16_t DstPANId, uint8_t DstAddrMode,
00719 uint64_t DstAddr);
00720 #endif
00721 #endif
00722
00757 #if (NWK_DISCOVERY_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00758 bool nlme_discovery_request(uint16_t DstPANId, uint16_t DstNwkAddr,
00759 uint8_t OrgAppCapabilities,
00760 dev_type_t OrgDevTypeList[3],
00761 profile_id_t OrgProfileIdList[7],
00762 dev_type_t SearchDevType,
00763 uint8_t DiscProfileIdListSize,
00764 profile_id_t DiscProfileIdList[7],
00765 uint32_t DiscDuration
00766 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00767 , FUNC_PTR confirm_cb
00768 #endif
00769 );
00770 #endif
00771
00803 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00804 #if (((defined RF4CE_TARGET) && (NWK_DISCOVERY_IND_RESP == 1)) || (defined DOXYGEN)) || (defined RF4CE_PLATFORM)
00805 void nlme_discovery_indication(nwk_enum_t Status, uint64_t SrcIEEEAddr,
00806 uint8_t OrgNodeCapabilities, uint16_t OrgVendorId,
00807 uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities,
00808 uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3],
00809 profile_id_t OrgProfileIdList[7],
00810 dev_type_t SearchDevType, uint8_t RxLinkQuality);
00811 #endif
00812 #endif
00813
00837 #if (((defined RF4CE_TARGET) && (NWK_DISCOVERY_IND_RESP == 1)) || (defined DOXYGEN)) || (defined RF4CE_PLATFORM)
00838 bool nlme_discovery_response(nwk_enum_t Status, uint64_t DstIEEEAddr,
00839 uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3],
00840 profile_id_t RecProfileIdList[7], uint8_t DiscReqLQI);
00841 #endif
00842
00857 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00858 #if (NWK_DISCOVERY_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00859 void nlme_discovery_confirm(nwk_enum_t Status, uint8_t NumNodes,
00860 node_desc_t *NodeDescList);
00861 #endif
00862 #endif
00863
00880 #if (NWK_GET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00881 bool nlme_get_request(nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex
00882 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00883 , FUNC_PTR confirm_cb
00884 #endif
00885 );
00886 #endif
00887
00904 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00905 #if (NWK_GET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00906 void nlme_get_confirm(nwk_enum_t Status, nib_attribute_t NIBAttribute,
00907 uint8_t NIBAttributeIndex, void *NIBAttributeValue);
00908 #endif
00909 #endif
00910
00940 #if (NWK_PAIR_REQ_CONF == 1) || (defined DOXYGEN)
00941 bool nlme_pair_request(uint8_t LogicalChannel, uint16_t DstPANId, uint64_t DstIEEEAddr,
00942 uint8_t OrgAppCapabilities, dev_type_t OrgDevTypeList[3],
00943 profile_id_t OrgProfileIdList[7], uint8_t KeyExTransferCount
00944 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00945 , FUNC_PTR confirm_cb
00946 #endif
00947 );
00948 #endif
00949
00983 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00984 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
00985 void nlme_pair_indication(nwk_enum_t Status, uint16_t SrcPANId, uint64_t SrcIEEEAddr,
00986 uint8_t OrgNodeCapabilities, uint16_t OrgVendorId,
00987 uint8_t OrgVendorString[7], uint8_t OrgAppCapabilities,
00988 uint8_t OrgUserString[15], dev_type_t OrgDevTypeList[3],
00989 profile_id_t OrgProfileIdList[7], uint8_t KeyExTransferCount,
00990 uint8_t ProvPairingRef);
00991 #endif
00992 #endif
00993
01019 #if (defined RF4CE_TARGET) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01020 bool nlme_pair_response(nwk_enum_t Status, uint16_t DstPANId, uint64_t DstIEEEAddr,
01021 uint8_t RecAppCapabilities, dev_type_t RecDevTypeList[3],
01022 profile_id_t RecProfileIdList[7], uint8_t ProvPairingRef);
01023 #endif
01024
01050 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01051 #if (NWK_PAIR_REQ_CONF == 1) || (defined DOXYGEN)
01052 void nlme_pair_confirm(nwk_enum_t Status, uint8_t PairingRef, uint16_t RecVendorId,
01053 uint8_t RecVendorString[7], uint8_t RecAppCapabilities,
01054 uint8_t RecUserString[15], dev_type_t RecDevTypeList[3],
01055 profile_id_t RecProfileIdList[7]);
01056 #endif
01057 #endif
01058
01077 bool nlme_reset_request(bool SetDefaultNIB
01078 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01079 , FUNC_PTR confirm_cb
01080 #endif
01081 );
01082
01094 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01095 void nlme_reset_confirm(nwk_enum_t Status);
01096 #endif
01097
01120 bool nlme_rx_enable_request(uint32_t RxOnDuration
01121 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01122 , FUNC_PTR confirm_cb
01123 #endif
01124 );
01125
01137 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01138 void nlme_rx_enable_confirm(nwk_enum_t Status);
01139 #endif
01140
01158 #if (NWK_SET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01159 bool nlme_set_request(nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex, uint8_t *NIBAttributeValue
01160 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01161 , FUNC_PTR confirm_cb
01162 #endif
01163 );
01164 #endif
01165
01182 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01183 #if (NWK_SET == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01184 void nlme_set_confirm(nwk_enum_t Status, nib_attribute_t NIBAttribute, uint8_t NIBAttributeIndex);
01185 #endif
01186 #endif
01187
01201 bool nlme_start_request(
01202 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01203 FUNC_PTR confirm_cb);
01204 #else
01205 void);
01206 #endif
01207
01219 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01220 void nlme_start_confirm(nwk_enum_t Status);
01221 #endif
01222
01239 #if (NWK_UNPAIR_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01240 bool nlme_unpair_request(uint8_t PairingRef
01241 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01242 , FUNC_PTR confirm_cb
01243 #endif
01244 );
01245 #endif
01246
01259 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01260 #if (NWK_UNPAIR_IND_RESP == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01261 void nlme_unpair_indication(uint8_t PairingRef);
01262 #endif
01263 #endif
01264
01280 #if (NWK_UNPAIR_IND_RESP == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01281 bool nlme_unpair_response(uint8_t PairingRef);
01282 #endif
01283
01296 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01297 #if (NWK_UNPAIR_REQ_CONF == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01298 void nlme_unpair_confirm(uint8_t Status, uint8_t PairingRef);
01299 #endif
01300 #endif
01301
01319 #if (NWK_UPDATE_KEY == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01320 bool nlme_update_key_request(uint8_t PairingRef, uint8_t NewLinkKey[16]
01321 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01322 , FUNC_PTR confirm_cb
01323 #endif
01324 );
01325 #endif
01326
01342 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01343 #if (NWK_UPDATE_KEY == 1) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01344 void nlme_update_key_confirm(nwk_enum_t Status, uint8_t PairingRef);
01345 #endif
01346 #endif
01347
01367 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01368 bool nwk_ch_agility_request(nwk_agility_mode_t AgilityMode
01369 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01370 , FUNC_PTR confirm_cb
01371 #endif
01372 );
01373 #endif
01374
01387 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01388 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01389 void nwk_ch_agility_indication(uint8_t LogicalChannel);
01390 #endif
01391 #endif
01392
01406 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01407 #if (defined CHANNEL_AGILITY) || (defined DOXYGEN) || (defined RF4CE_PLATFORM)
01408 void nwk_ch_agility_confirm(nwk_enum_t Status, bool ChannelChanged, uint8_t LogicalChannel);
01409 #endif
01410 #endif
01411
01412
01413
01425 nwk_enum_t nwk_init(void);
01426
01437 bool nwk_task(void);
01438
01439
01451 bool nwk_ready_to_sleep(void);
01452
01453
01462 bool nwk_stack_idle(void);
01463
01464
01479 void read_pairing_ref(uint8_t *pairing_ref, uint8_t length);
01480
01494 void store_pairing_ref(uint8_t *pairing_ref, uint8_t length);
01495
01509 void clear_pairing_ref(uint8_t first_ref, uint8_t length);
01510
01521 uint8_t nwk_get_nib_attribute_size(uint8_t nib_attribute_id);
01522
01536 #if (defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
01537 void register_nwk_indication_callback(nwk_indication_callback_t *nwk_indication_cb);
01538 #endif
01539
01540
01541 #endif