51 #define NWK_CFG_PANID "\xFF\xFF"
55 #define NWK_CFG_CHANLIST "\x00\x00\x01\x00"
59 #define NWK_CFG_PRECFGKEY "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"
63 #define NWK_CFG_PRECFGKEYS_ENABLE "\x01"
67 #define NWK_CFG_SECURITY_MODE "\x00"
71 #define NWK_CFG_BCAST_RETRIES "\x02"
75 #define NWK_CFG_PASSIVE_ACK_TIMEOUT "\x05"
79 #define NWK_CFG_BCAST_DELIVERY_TIME "\x1E"
83 #define NWK_CFG_ROUTE_EXPIRY_TIME "\x3C"
101 #define NWK_CFG_APPENDPOINT 1
109 #define NWK_CFG_APPPROFILEID 0x0F10
116 #define NWK_CFG_DEVICEID 0x0003
123 #define NWK_CFG_DEVICEVERSION 1
129 #define NWK_CFG_INPUTCMDCOUNT 2
136 #define NWK_CFG_INPUTCMDLIST "\x01\x00\x02\x00"
142 #define NWK_CFG_OUTPUTCMDCOUNT 2
149 #define NWK_CFG_OUTPUTCMDLIST "\x01\x00\x02\x00"
157 #define NWK_CMDIDHEARTBEAT 1
163 #define NWK_CMDIDRPT 2
184 #define NWK_DEFDEST 0xFFFE
194 #define NWK_DEFRADIUS 10
202 #define NWK_DEVTYPE_DEFALUT NWK_DEVTYPE_ROUTER
207 #define NWK_NEIGHBORMAX 3
229 UInt16 foreignAddress;
271 UInt8
nwk_bind_device(UInt8 create, UInt16 commandId, uint64_t destination);
287 UInt16 nwk_getParentShortAddress();
294 UInt8
nwk_startFrame(UInt16 destination, UInt16 cmdId, UInt8 radius, UInt8 len);
295 UInt8
nwk_snd(UInt8 size,
void *pBuf);
UInt8 nwk_isSink()
Is sink.
uint64_t * nwk_getPIeeeAddress()
Get pointer to the IEEE address.
void nwk_allow_bindConfirm(char *pBuf)
Allow bind confirmation.
UInt8 nwk_sndInt64(int64_t *p)
Send signed 64 bits integer.
UInt8 nwk_register()
Register application request.
UInt8 nwk_start()
Start network request.
UInt8 nwk_sndUInt64(uint64_t *p)
Send unsigned 64 bits integer.
UInt8 nwk_setPermitJoin(UInt8 timeout)
Permit join request.
void nwk_allow_bindRsp()
Allow bind response.
UInt8 nwk_getNeighborForeignPort(UInt8 i)
Get neighbor foreign port.
None, invalid in a network.
void nwk_registerRsp(UInt8 status)
Register application response.
UInt8 nwk_wakeUp()
Network wake up.
void nwk_suspend()
network suspend
void nwk_setPermitJoinRsp()
Permit join response.
void nwk_configureWriteRsp(UInt8 status)
Response to a configuration write.
UInt8 nwk_sndUInt48(uint64_t *p)
Send unsigned 48 bits integer.
void nwk_setSink(UInt8 sink)
Set sink.
UInt8 nwk_isClient()
Is client.
void nwk_bind_deviceRsp()
Bind device response.
UInt16 nwk_getShortAddress()
Get shotr address.
nwk_neighbor nwk_neighbors[NWK_NEIGHBORMAX]
Neighbors information.
UInt8 nwk_sndUInt32(UInt32 *p)
Send unsigned 32 bits integer.
UInt8 nwk_isBound()
Is bound.
UInt8 nwk_sndUInt16(UInt16 v)
Send unsigned 16 bits integer.
void nwk_startRsp()
Start network response.
void nwk_setDeviceType(nwk_devType newType)
Set device type.
UInt8 nwk_sndUInt8(UInt8 v)
Send unsigned 8 bits integer.
UInt8 nwk_disallowJoin()
Disallow join.
UInt8 nwk_getDeviceInfo()
Get device information request.
void nwk_init()
Network initialization.
void nwk_resetResume()
Resume from CC2480 reset.
#define NWK_NEIGHBORMAX
Max number of expected direct neighbors.
UInt16 nwk_process()
Network process.
nwk_devType nwk_getDeviceType()
This function gets the device type.
void nwk_rcv(char *pBuf)
Network receive.
struct nwk_neighbor nwk_neighbor
Neighbor data.
void nwk_send_dataConfirm(UInt8 dataHandle, UInt8 status)
Send data confirmation.
UInt8 nwk_allowJoin()
Allow join.
void nwk_getDeviceInfoRsp(UInt8 param, void *pValue)
Get device information response.
uint64_t nwk_getIeeeAddress()
Get IEEE address.
UInt8 nwk_bind_device(UInt8 create, UInt16 commandId, uint64_t destination)
Bind device request.
UInt8 nwk_startFrame(UInt16 destination, UInt16 cmdId, UInt8 radius, UInt8 len)
Start Frame.
UInt8 nwk_snd(UInt8 size, void *pBuf)
Send data.
UInt8 nwk_configureWrite()
Write configuration.
void nwk_bind_deviceConfirm(char *pBuf)
Bind device confirmation.
UInt8 nwk_allow_bind(UInt8 timeout)
Allow bind request.
UInt8 nwk_getNeighborPort(UInt16 a)
Get neighbor port.
void nwk_endFrame(UInt8 forwardToSerial)
End frame.
UInt8 nwk_registerNeighbor(UInt16 a)
Register neighbor.
UInt16 nwk_getNeighborAddress(UInt8 i)
Get neighbor address.
void nwk_startConfirm(UInt8 status)
Start network confirmation.