概述
1.编译选项:
HOLD_AUTO_START | –网络设备启动应用程序 |
NV_RESTORE | –在NV中保存网络状态 |
RTR_NWK | |
HAL_ADC | –是否自持ADC |
HAL_DMA | –是否支持DMA |
HAL_AES | |
HAL_LCD | |
HAL_LED | |
HAL_UART | |
HAL_KEY | |
ZDO_MGMT_NWKDISC_REQUEST | –请求目标设备执行网络扫描 |
ZDO_MGMT_NWKDISC_RESPONSE | –响应目标设备执行网络扫描 |
ZDO_MGMT_LQI_REQUEST | –请求目标设备相邻设备列表 |
ZDO_MGMT_LQI_RESPONSE | –响应目标设备相邻设备列表 |
ZDO_MGMT_RTG_REQUEST | –请求目标设备路由表 |
ZDO_MGMT_RTG_RESPONSE | |
ZDO_MGMT_BIND_REQUEST | –请求目标设备绑定表 |
ZDO_MGMT_BIND_RESPONSE | |
ZDO_MGMT_LEAVE_REQUEST | –请求目标设备离开网络 |
ZDO_MGMT_LEAVE_RESPONSE | |
ZDO_MGMT_ JOINDIRECT_REQUEST | –请求目标设备直接连接另一个设备 |
ZDO_MGMT_ JOINDIRECT_RESPONSE | |
ZDO_MGMT_PERMIT_JOIN_RESPONSE | –响应设备允许或拒绝连接 |
2.宏:
MAC_RADIO_TURN_OFF_POWER | –关闭无线电 |
MAC_RADIO_TURN_ON_POWER | –打开无线电 |
3.返回值状态:
ZSUCCESS | 0 |
INVALID_TASK | 1 |
MSG_BUFFER_NOT_AVAIL | 2 |
INVALID_MSG_POINTER | 3 |
INVALID_LEN | 4 |
INVALID_SENDING_TASK | 5 |
INVALID_DESTINATION_TASK | 6 |
INVALID_EVENT_ID | 7 |
INVALID_TIMEOUT_VALUE | 8 |
INVALID_INTERRUPT_ID | 9 |
INVALID_ISR_PTR | 10 |
INVALID_TASK_TABLE | 11 |
NO_TIMER_AVAIL | 12 |
INVALID_MSG_LEN | 13 |
NOT_READY | 14 |
NV_ITEM_UNINIT | 15 |
NV_OPER_FAILED | 16 |
INVALID_MEM_SIZE | 17 |
NV_BAD_ITEM_LEN | 18 |
4.全局状态值:
ZSuccess | | 0x00 |
ZFailure | –失败 | 0x01 |
ZInvalidParameter | –无效参数 | 0x02 |
5.ZStack状态值:
ZMemError | –系统内存错误 | 0x10 |
ZBufferFull | –缓冲区满 | 0x11 |
ZUnsupportedMode | –未支持的模式 | 0x12 |
ZMacMemError | –MAC内存错误 | 0x13 |
ZSapiInProgress | 0x20 | |
ZSapiTimeout | 0x21 | |
ZSapiInit | 0x22 |
6.APS层状态值:
ZApsFail | –失败 | 0xb1 |
ZApsTableFull | –表满 | 0xb3 |
ZApsIllegalRequest | ||
ZApsInvalidBinding | –绑定无效 | 0xb4 |
ZApsUnsupportedAttrib | –未支持的属性 | 0xb5 |
ZApsNotSupported | –未支持 | 0xb6 |
ZApsNoAck | –没有Ack | 0xb7 |
ZApsDuplicateEntry | –条目重复 | 0xb8 |
ZApsNoBoundDevice | –没有绑定设备 | 0xb9 |
7.SEC层状态值:
ZSecNoKey | –没有密钥 | 0xa1 |
ZSecOldFrmCount | 0xa2 | |
ZSecMaxFrmCount | –最大帧数 | 0xa3 |
ZSecCcmFail | 0xa4 |
8.NWK层状态值:
ZNwkInvalidParam | –无效参数 | 0xc1 |
ZNwkInvalidRequest | –无效请求 | 0xc2 |
ZNwkNotPermitted | –不允许 | 0xc3 |
ZNwkStartupFailure | –启动失败 | 0xc4 |
ZNwkAlreadyPresent | –已存在 | 0xc5 |
ZNwkSyncFailure | –同步失败 | 0xc6 |
ZNwkTableFull | –表满 | 0xc7 |
ZNwkUnknownDevice | –未知设备 | 0xc8 |
ZNwkUnsupportedAttribute | –未支持的属性 | 0xc9 |
ZNwkNoNetworks | –没有网络 | 0xca |
ZNwkLeaveUnconfirmed | –离开未确认 | 0xcb |
ZNwkNoAck | –没有ACK | 0xcc |
ZNwkNoRoute | –没有路由 | 0xcd |
9.MAC层状态值:
ZMacSuccess | –成功 | 0x00 |
ZMacBeaconLoss | –信标丢失 | 0xe0 |
ZMacChannelAccessFailure | 0xe1 | |
ZMacDenied | | |
ZMacDisableTrxFailure | 0xe3 | |
ZMacFailedSecurityCheck | 0xe4 | |
ZMacFrameTooLong | 0xe5 | |
ZMacInvalidGTS | 0xe6 | |
ZMacInvalidHandle | 0xe7 | |
ZMacInvalidParameter | 0xe8 | |
ZMacNoACK | 0xe9 | |
ZMacNoBeacon | 0xea | |
ZMacNoData | 0xeb | |
ZMacNoShortAddr | 0xec | |
ZMacOutOfCap | 0xed | |
ZMacPANIDConflict | 0xee | |
ZMacRealignment | 0xef | |
ZMacTransactionExpired | 0xf0 | |
ZMacTransactionOverFlow | 0xf1 | |
ZMacTxActive | 0xf2 | |
ZMacUnAvailableKey | 0xf3 | |
ZMacUnsupportedAttribute | 0xf4 | |
ZMacUnsupported | 0xf5 |
10.组件标示:
COMPID_OSAL | 0 |
COMPID_MTEL | 1 |
COMPID_MTSPCI | 2 |
COMPID_NWK | 3 |
COMPID_NWKIF | 4 |
COMPID_MACCB | 5 |
COMPID_MAC | 6 |
COMPID_APP | 7 |
COMPID_TEST | 8 |
COMPID_RTG | 9 |
COMPID_DATA | 11 |
11.测试中的组件标示:
COMPID_TEST_NWK_STARTUP | 20 |
COMPID_TEST_SCAN_CONFIRM | 21 |
COMPID_TEST_ASSOC_CONFIRM | 22 |
COMPID_TEST_REMOTE_DATA_CONFIRM | 23 |
12.系统事件:
SYS_EVENT_MSG
系统消息:
SPI_INCOMING_ZTOOL_PORT | 0x21 |
SPI_INCOMING_ZAPP_DATA | 0x22 |
MT_SYS_APP_MSG | 0x23 |
MT_SYS_APP_RSP_MSG | 0x24 |
AF_DATA_CONFIRM_CMD | 0xFD |
AF_INCOMING_MSG_CMD | 0x1A |
AF_INCOMING_KVP_CMD | 0x1B |
AF_INCOMING_GRP_KVP_CMD | 0x1C |
KEY_CHANGE | 0xC0 |
ZDO_NEW_DSTADDR | 0xD0 |
ZDO_STATE_CHANGE | 0xD1 |
ZDO_MATCH_DESC_RSP_SENT | 0xD2 |
ZDO_CB_MSG | 0xD3 |
为用户所保留的消息id(用户自定义)
0xE0—0xFF
13.各层簇定义:
APP层簇ID
void SampleApp_MessageMSGCB( afIncomingMSGPacket_t *pkt )
SAMPLEAPP_MAX_CLUSTERS | –最大簇数 | 2 |
SAMPLEAPP_PERIODIC_CLUSTERID | –一个簇标识的周期 | 1 |
SAMPLEAPP_FLASH_CLUSTERID | –一个簇标识的闪烁 | 2 |
ZDO层簇ID
void ZDApp_ProcessMsgCBs( zdoIncomingMsg_t *inMsg )
ZDO, _RESPONSE_BIT_V1_0 | –响应位V1.0版本 | 0x80 |
ZDO_RESPONSE_BIT | –相应位 | 0x8000 |
NWK_addr_req | –网络地址请求 | 0x0000 |
IEEE_addr_req | –IEEE地址请求 | 0x0001 |
Node_Desc_req | –节点描述符请求 | 0x0002 |
Power_Desc_req | –电源描述符请求 | 0x0003 |
Simple_Desc_req | –简单描述符请求 | |
Active_EP_req | –动态端点/接口请求 | 0x0005 |
Match_Desc_req | –匹配描述符请求 | 0x0006 |
NWK_addr_rsp | (NWK_addr_req | ZDO_RESPONSE_BIT) |
IEEE_addr_rsp | (IEEE_addr_req | ZDO_RESPONSE_BIT) |
Node_Desc_rsp | (Node_Desc_req | ZDO_RESPONSE_BIT) |
Power_Desc_rsp | (Power_Desc_req | ZDO_RESPONSE_BIT) |
Simple_Desc_rsp | (Simple_Desc_req | ZDO_RESPONSE_BIT) |
| (Active_EP_req | ZDO_RESPONSE_BIT) |
Match_Desc_rsp | (Match_Desc_req | ZDO_RESPONSE_BIT) |
Complex_Desc_req | –复杂描述符请求 | 0x0010 |
User_Desc_req | –用户描述符请求 | 0x0011 |
Discovery_Cache_req | –缓存发现请求 | 0x0012 |
End_Device_annce | –终端设备性能 | 0x0013 |
User_Desc_set | –设置用户描述符 | 0x0014 |
Server_Discovery_req | –服务发现请求 | 0x0015 |
Complex_Desc_rsp | (Complex_Desc_req | ZDO_RESPONSE_BIT) |
User_Desc_rsp | (User_Desc_req | ZDO_RESPONSE_BIT) |
Discovery_Cache_rsp | (Discovery_Cache_req | ZDO_RESPONSE_BIT) |
User_Desc_conf | (User_Desc_set | ZDO_RESPONSE_BIT) |
Server_Discovery_rsp | (Server_Discovery_req | ZDO_RESPONSE_BIT) |
End_Device_Bind_req | –终端设备绑定请求 | 0x0020 |
Bind_req | –绑定请求 | 0x0021 |
Unbind_req | –解除绑定请求 | 0x0022 |
Bind_rsp | (Bind_req | ZDO_RESPONSE_BIT) |
End_Device_Bind_rsp | (End_Device_Bind_req | ZDO_RESPONSE_BIT) |
Unbind_rsp | (Unbind_req | ZDO_RESPONSE_BIT) |
Mgmt_NWK_Disc_req | –网络扫描请求 | 0x0030 |
Mgmt_Lqi_req | –相邻设备请求 |
Mgmt_Rtg_req | ((uint16)0x0032) |
Mgmt_Bind_req | ((uint16)0x0033) |
Mgmt_Leave_req | ((uint16)0x0034) |
Mgmt_Direct_Join_req | ((uint16)0x0035) |
Mgmt_Permit_Join_req | ((uint16)0x0036) |
Mgmt_NWK_Disc_rsp | (Mgmt_NWK_Disc_req | ZDO_RESPONSE_BIT) |
Mgmt_Lqi_rsp | (Mgmt_Lqi_req | ZDO_RESPONSE_BIT) |
Mgmt_Rtg_rsp | (Mgmt_Rtg_req | ZDO_RESPONSE_BIT) |
Mgmt_Bind_rsp | (Mgmt_Bind_req | ZDO_RESPONSE_BIT) |
Mgmt_Leave_rsp | (Mgmt_Leave_req | ZDO_RESPONSE_BIT) |
Mgmt_Direct_Join_rsp | (Mgmt_Direct_Join_req | ZDO_RESPONSE_BIT) |
Mgmt_Permit_Join_rsp | (Mgmt_Permit_Join_req | ZDO_RESPONSE_BIT) |
最后
以上就是开朗音响为你收集整理的Zstack宏、返回状态、簇ID的全部内容,希望文章能够帮你解决Zstack宏、返回状态、簇ID所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复