📄 apsdesap.nc
字号:
/** * this interface are aps layer data service access point * */ #include "ZBTYPES.h" interface ApsdeSap{/** * creat socket before send receive data. **/ command error_t createSocket(uint8_t srcEndpoint, uint16_t clusterId, uint16_t profileId);/** * free socket for other application use. **/command error_t remove();/** * dstAddrMode = 0x01 indicate that dstAddr is 16bit group address and dstEndpoint does not make sense; * dstAddrMode = 0x02 indicate that dstAddr is 16bit short address and dstEndpoint is destination end point. * dstAddrMode = 0x03 indicate that dstAddr is 64bit long address and dstEndpoint is destination end point. * * ackSend is TRUE if is Acknowledged transmission, FALSE otherwise. * * radius indicate the distance, in hops, that a transmitted frame will be allowed to travel through the network **/command error_t send(uint8_t dstAddrMode, addr_union_t dstAddr, uint8_t dstEndpoint, uint8_t length, uint8_t* pasdu, bool ackSend, uint8_t radius);event void sendDone(aps_error_t error);/** * dstAddrMode = 0x01 indicate that dstAddr is group address and dstEndpoint in socket does not make sense; * dstAddrMode = 0x02 indicate that dstAddr is 16bit short address. * * srcAddrMode = 0x02 indicate that srcAddr is 16bit long address. * srcAddrMode = 0x03 indicate that srcAddr is 64bit short address. * * wasBroadcast is TRUE indicate that this packet is a broadcast packet, FALSE otherwise. **/event void receive(uint8_t dstAddrMode, saddr_t dstAddr, uint8_t srcAddrMode, addr_union_t srcAddr, uint8_t srcEndpoint, uint8_t length, uint8_t* pMsg, bool wasBroadcast); /************************ reference *********************//* ** * dstAddrMode = 0x01 indicate that dstAddr is 16bit group address and dstEndpoint does not make sense; * dstAddrMode = 0x02 indicate that dstAddr is 16bit short address and dstEndpoint is destination end point. * dstAddrMode = 0x03 indicate that dstAddr is 64bit long address and dstEndpoint is destination end point. * * ackSend is TRUE if is Acknowledged transmission, FALSE otherwise. * * radius indicate the distance, in hops, that a transmitted frame will be allowed to travel through the network **command error_t send(uint8_t dstAddrMode, addr_union_t dstAddr, uint8_t dstEndpoint, uint16_t profileId, uint16_t clusterId, uint8_t srcEndpoint, uint8_t length, uint8_t* pasdu, bool ackSend, uint8_t radius);event void sendDone(aps_error_t error);/** * dstAddrMode = 0x01 indicate that dstAddr is group address and dstEndpoint does not make sense; * dstAddrMode = 0x02 indicate that dstAddr is 16bit short address and dstEndpoint is destination end point. * * srcAddrMode = 0x02 indicate that srcAddr is 16bit long address and srcEndpoint is source end point; * srcAddrMode = 0x03 indicate that srcAddr is 64bit short address and srcEndpoint is source end point. * wasBroadcast is TRUE indicate that this packet is a broadcast packet, FALSE otherwise. **event void receive(uint8_t dstAddrMode, saddr_t dstAddr, uint8_t dstEndpoint, uint8_t srcAddrMode, addr_union_t srcAddr, uint8_t srcEndpoint, uint16_t profileId, uint16_t clusterId, uint8_t length, uint8_t* pasdu, bool wasBroadcast); */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -