Zigbee about QCLI_demo(2)

0.前言

    本文旨在说明创建endpoint。

    创建哪一个endpoint,以及什么类型的endpoint。

 

1.函数原型

static QCLI_Command_Status_t cmd_ZB_CL_CreateEndpoint(uint32_t Parameter_Count, QCLI_Parameter_t *Parameter_List)

Parameter_Count:Parameter_List中有多少个元素
Parameter_List: 包含有实际值,Parameter_List[0]表示endpoint使用的数字,Parameter_List[1]表示endpoint的类型

 

2.常量

(1)endpoint使用的范围:

#define QAPI_ZB_APS_MIN_ENDPOINT                                        (0x01) /**< Minimum endpoint that can be created. */
#define QAPI_ZB_APS_MAX_ENDPOINT                                        (0xF0) /**< Maximum endpoint that can be created. */

(2)endpoint的类型范围

#define ZCL_DEMO_ENDPOINT_TYPE_START_INDEX                              (1)
#define ZCL_DEMO_MAX_CLUSTER_LIST_SIZE                                  (16)

3.qapi_ZB_APS_Add_Endpoint_t

    endpoint配置类型的结构体

typedef struct qapi_ZB_APS_Add_Endpoint_s
{
   uint8_t         Endpoint;                //endpoint

   uint8_t         Version;                 //版本号

   uint16_t        ProfileId;               //profile ID

   uint16_t        DeviceId;                //endpoint 的设备ID

   uint8_t         InputClusterCount;       //输入cluster的数量

   const uint16_t *InputClusterList;        //输入cluster的列表(服务器)

   uint8_t         OutputClusterCount;      //输出cluster的数量

   const uint16_t *OutputClusterList;       //输出cluster的列表(客户端)

   uint8_t         BDBCommissioningMode;    //BDB 调试模式

   uint16_t        BDBCommissioningGroupId; //BDB 调试组ID
} qapi_ZB_APS_Add_Endpoint_t;

4.ZCL_Demo_Cluster_Info_t

/*
   Structure represents the information for a cluster.
*/
typedef struct ZCL_Demo_Cluster_Info_s
{
   qapi_ZB_Cluster_t         Handle;      //cluster的handle
   uint16_t                  ClusterID;   //cluster的ID
   uint8_t                   Endpoint;    //cluster的endpoint
   ZCL_Demo_ClusterType_t    ClusterType; //指示cluster是服务器或者客户端
   const char               *ClusterName; //cluster的名称
   const char               *DeviceName;  //cluster的设备名称
   void                     *PrivData;    //cluster的私有数据
   ZCL_Cluster_Cleanup_CB_t  Cleanup_CB;  //cluster被移除时调用的函数
} ZCL_Demo_Cluster_Info_t;

 

5.源码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值