📄 mlmesap.nc
字号:
/** * this interface are MAC layer management entity-service access point * */ #include "ZBTYPES.h"#include "ZBCONFIG.h" interface MlmeSap{/** * scanDuration range from 0-14, * scan time is aBaseSuperframeDuration (60*16symbol period)* (2**scanDuration + 1) * * note that currently only support defined channel. **/command error_t positiveScan(uint32_t scanChannel, uint8_t scanDuration);event void positiveScanDone(mac_error_t error, uint32_t unScannedChannel, uint8_t panListNum, pan_descriptor_t* pPanList);#ifdef IS_COORD/*** * establishing network * currently channel have not use. **/command error_t establish(uint8_t channel, panid_t panId);event void establishDone(mac_error_t error);#endif#ifndef IS_COORD/** * request to join a network after positiveScanDone * descriptorSequence is the sequence in panDescriptorTable. */command error_t joinRequest(uint8_t descriptorSequence, uint8_t myCapInfo); event void joinDone(saddr_t assignedAddr, mac_error_t error);#endif#ifndef IS_RFD/** * join control function, only support by FFD * srcAddr is the long address of the node which want to join this network. * capInfo is the capInfo of the node which want to join this network. * pAssignedAddr point to the address which assigned to the node if join success * pStatus point to join result enum variable,may be join success, join refuse, join fail */event void joinControl(laddr_t srcAddr, uint8_t capInfo, saddr_t* pAssignedAddr, mac_error_t* pError);/** * ask one of children leave the network. */command error_t kickout(saddr_t intentAddr);event void kickoutDone(mac_error_t error);#endif/** * tell others that I will leave the network. * */ command error_t leave();event void leaveDone(mac_error_t error);/** * when mac layer received a orpan packet, it will notify next high layer, * next high layer check if the node is in his network. * this function is used to notify next high layer check if the node with orpanLAddr is in his network * *orpanSAddr is 0xFFFF indicate that the node is not in the network * *isChild indicate that if the node is my child. */event void orphan(laddr_t orpanLAddr, saddr_t* orpanSAddr, bool* isChild); /** * set and get association permit bit. * */command bool getMacAssociationPermit();command void setMacAssociationPermit(bool permit);/** * return the max length of beacon payload the mac layer can hold. */command uint8_t getMacBeaconPayloadMaxLength();/** * return the current length of beacon payload of mac layer. */command uint8_t getMacBeaconPayloadLength();/** * return the pointer of mac layer beacon payload, you can set mac layer beacon paylod by this pointer. */command uint8_t* getMacBeaconPayloadHandle();/** * set the current length of mac beacon payload after setting mac layer beacon payload. */command error_t setMacBeaconPayloadLength(uint8_t length);/** * get panId, when this node is not joined into a network, getMacPanId() will return a reserved value 0xFFFF, * note that next high layer can only get panId value in this impliment. */command uint16_t getMacPanId();/** * get short address of this node, when this node is not joined into a network, getMacShortAddr() will return * a reserved value 0xFFFF, note that next high layer can noly get short address in this implimenst. */command saddr_t getMacShortAddr();/*command uint8_t getMacBeaconPayloadLength();command error_t setMacBeaconPayloadLength(uint8_t length);command uint8_t* getMacBeaconPayload();command error_t setMacBeaconPayload(uint8_t* pPayload, uint8_t length)command uint16_t getMacPanId();command error_t setMacPanId(uint16_t panId);command saddr_t getMacShortAddr();command error_t setMacShortAddr(uint16_t shortAddr);*/}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -