silicon lab ember zigbee学习杂谈 --------- 发送zcl command

Ember zigbee协议栈有专门提供发送zcl command 的API可调用,那么下面来看一下如何调用API发送zcl command。

1、先使用填充宏定义(fill macro)来构造你要发的zcl command,填充宏定义可在<install path>/app/builder/STM32/clientcommand-macro.h中找到,包括自定义的command也自动在此文件生成填充宏。如要发送一个identify command只需调用emberAfFillCommandIdentifyClusterIdentify(identifyTime)就能构造一个identify command。

2、确定command发送的源端点(source endpoint)和目标端点(target endpoint)来构造EmberApsFrame,直接调用void emberAfSetCommandEndpoints(int8u sourceEndpoint, int8u destinationEndpoint)函数。

3、发送指令,有三种发送方式,单播,组播和广播。分别调用以下函数:
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值