?? nlmesap.nc
字號:
/** * this interface are NETWORK layer management entity-service access point * */ #include "ZBTYPES.h" interface NlmeSap{/** * * scanChannel is 32bit bitmap indicate which channel whill be scan. * scanDuration range from 0-14, * the scan time is aBaseSuperframeDuration (60*16symbol period)* (2**scanDuration + 1) * **/command error_t nwkDiscover(uint32_t scanChannel, uint8_t scanDuration);/** * networkCount indicate how many network have been discovered. * pList is the entry of the discovered network list. * networkCount and pList make sense only when error = SUCCESS. **/event void nwkDiscoverDone(uint8_t networkCount, pan_desc_t* pList, nwk_error_t error);#ifdef IS_COORD/** * channel is the channel which next high layer want to formation network on. * panId is pan id which next high layer want to use as network's pan id. * Note that currently does not support energy scan befor formation network. **/command error_t nwkFormation(uint8_t channel, uint16_t panId);/** * error = SUCCESS indicate formation success, FAIL otherwise. **/event void nwkFormationDone(nwk_error_t error);#endif#ifndef IS_RFD/** * nwkPermitJoin(uint8_t permitDuration) set the time duration that permit other node join this network. * permitDuration = 0x00 indicate forbid join; permitDuration = 0xFF indicate always permit join. * permitDuration = 0x01-0xfe indicate the time in seconds permit join. **/command error_t nwkPermitJoin(uint8_t permitDuration);#endif/** * Should use joinRequst after nwkDiscoverDone signal. * extendedPanId is the long address of the intent * isJoinAsRoute = TRUE indicate this device want to join as route, isJoinAsRoute = FALSE indicate want to join as end device. * joinType = 0x00 if this device is requesting to join a network through association * joinType = 0x01 if this device is joining directly or rejoining the network using the orphaning procedure * joinType = 0x02 if this device is joining the network using the NWK rejoining procedure. * powerSource = 0x01 indicate Mains-powered device; powerSource = 0x00 indicate other power source. **/command joinRequest(laddr_t extendedPanId, bool isJoinAsRoute, uint8_t joinType, uint8_t powerSource);/** * panId is the pan identifer which this device have join into. * shortAddr is the short address which malloced to this device. * panId and shortAddress only have sense when error = SUCCESS. **/event void joinRequestDone(uint16_t panId, uint16_t shortAddr, nwk_error_t error);#ifndef IS_RFD/** * childJoinNotify notify next high layer that a new device have join as this device's child. * shortAddr is the address which have malloced to child device. * longAddr is the child device's long address. * capInfo is the child device's Capability Information bitmap. **/event void childJoinNotify(uint16_t shortAddr, laddr_t longAddr, uint8_t capInfo);/** * directAddChild enable next high layer of a FFD add a new device directly to its network without any data transmissions. * longAddr is the child device's long address. * capInfo is the child device's Capability Information bitmap. **/command error_t directAddChild(laddr_t longAddr, uint8_t capInfo);/** * * ask one of children leave the network, currently only support ask RFD child leave network. * intentAddr is the short address of the RFD child. * rejoin = TRUE indicate the RFD child being asked to leave from the current parent is requested to rejoin * the network; FALSE Otherwise. * reuseAddress indicate that NWK layer may reuse the address formerly in use by the leaving device and FALSE otherwise. * */command error_t kickout(saddr_t intentAddr, bool rejoin, bool reuseAddress));/** * kickoutDone notify the result of kickout. **/event void kickoutDone(nwk_error_t error);/** * notify next high layer that one of his RFD child has leave the network. * childAddr is the short address of the left RFD child, this device can malloc this short address to other device * which want to join the network. **/event void childLeaveNotify(saddr_t childAddr);#endif#ifdef IS_RFD /** * tell others that this device will leave the network. * currently only support RFD leave network. * */command error_t requestLeave();/** * notify the result of request leave. **/event void RequestLeaveDone(nwk_error_t error);/** * notify next high layer that this device(RFD) have be kickout. * rejoin is TRUE indicate that the parent want this device rejoin the network, FALSE otherwise. **/event kickoutNotify(bool rejoin); #endif#ifndef IS_RFD/** * request to find route to the giving dest devie. * addrMode = 0x01 indicate find route to a group address; addrMode = 0x02 indicate find route to unicast address. **/ command error_t routeDiscover(uint8_t addrMode, saddr_t dstAddr, uint8_t radius);/** * error = SUCCESS indicate find route success, FAIL otherwise. **/event void routeDiscoverDone(nwk_error_t error);#endif/** * * **//* event void routeErrorNotify(uint16_t shortAddr, uint8_t errorCode); *//***************** get and set nwk pib variable *********************************/command uint8_t getBroadcastRetries();command void setBoradcastRetries(uint8_t retries);command uint8_t getRouteDiscoveryRetries();command void setRouteDiscoveryRetries();command uint8_t getMaxDepth();command uint8_t getMaxRouters();command uint8_t getMaxChildren();command bool getSymLink();command void setSymLink(bool symLink);command uint8_t getCapInfo();command void setCapInfo(uint8_t capInfo);command bool getUseTreeRouting();command void setUseTreeRouting();}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -