Commit e3402700 authored by 尹佳钦's avatar 尹佳钦

新增属性获取功能

parent e589be90
......@@ -286,6 +286,7 @@ APPLICATION_FILES= \
./ZB/kk_zigbee_api.c\
./ZB/kk_tsl_property_report.c\
./ZB/kk_tsl_property_set.c\
./ZB/kk_tsl_property_get.c\
./ZB/kk_device_table_db.c\
./ZB/kk_msg_report.c\
./ZB/kk_plat_ota.c\
......
......@@ -536,8 +536,7 @@ void emberAfPluginDeviceTableInitialized(void)
kk_load_dev_map_table();
kk_device_map_print();
kk_device_config_load_from_db();
#define NCP_QUEUE_MAX_SIZE 50
ncp_queue_init(NCP_QUEUE_MAX_SIZE);
ncp_queue_init();
}
void test_123(int val)
......
......@@ -80,6 +80,11 @@ void kk_msg_report_alarm(cJSON *data,EmberEUI64 mac)
kk_msg_report(data,KK_REPORT_ALARM_TYPE,KK_REPORT_ALARM_METHOD,mac);
}
void kk_msg_get_property_reply(cJSON *data,EmberEUI64 mac)
{
kk_msg_report(data,KK_GET_PROPERTY_REPLY_MSG_TYPE,KK_GET_PROPERTY_REPLY_METHOD,mac);
}
void kk_msg_report_dev_joined(EmberEUI64 mac,const char* productCode)
......
......@@ -19,17 +19,36 @@
#define KK_REPORT_PROPERTY_MSG_TYPE "/thing/event/property/post"
#define KK_SET_PROPERTY_REPLY_MSG_TYPE "/thing/service/property/set_reply"
#define KK_GET_PROPERTY_REPLY_MSG_TYPE "/thing/service/property/get_reply"
#define KK_GET_PROPERTY_MSG_TYPE "/thing/service/property/get"
#define KK_GET_PROPERTY_REPLY_METHOD "thing.service.property.get"
#define KK_REPORT_ALARM_METHOD "thing.event.alarm.post"
#define KK_REPORT_ATTRIBUTE_METHOD "thing.event.property.post"
#define KK_READ_ATTRIBUTE_METHOD "thing.service.property.get"
#define KK_REPORT_ATTRIBUTE_TYPE "/thing/event/property/post"
#define KK_REPORT_DEVICE_BATCH_JOINED_TYPE "/thing/topo/batch_add"
#define KK_REPORT_DEVICE_JOINED_TYPE "/thing/topo/add"
#define KK_REPORT_DEVICE_LEFT_TYPE "/thing/topo/delete"
#define KK_REPORT_DEVICE_BATCH_LEFT_TYPE "/thing/topo/batch_delete"
#define KK_REPORT_ATTRIBUTE_TYPE "/thing/event/property/post"
#define KK_REPORT_ALARM_TYPE "/thing/event/alarm/post"
#define KK_REPORT_ADDWHITELIST_NOTIFY_TYPE "/thing/event/whiteListAddedNotification/post"
#define KK_REPORT_DELWHITELIST_NOTIFY_TYPE "/thing/event/whiteListDeletedNotification/post"
......
......@@ -3,26 +3,32 @@
static ncp_queue_s g_ncp_queue;
static ncp_queue_s *_ncp_queue_get_ctx(void)
#define NCP_QUEUE1_SIZE 50
#define NCP_QUEUE2_SIZE 20
#define NCP_QUEUE_SIZE(x) NCP_QUEUE##x##_SIZE
static ncp_queue_s g_ncp_queue[GET_PROPERTY];
static ncp_queue_s *_ncp_queue_get_ctx(NCP_QUEUE_ENUM ix)
{
return &g_ncp_queue;
return &g_ncp_queue[ix];
}
static void _ncp_queue_lock(void)
static void _ncp_queue_lock(NCP_QUEUE_ENUM ix)
{
int err_num;
ncp_queue_s *ctx = _ncp_queue_get_ctx();
ncp_queue_s *ctx = _ncp_queue_get_ctx(ix);
if (0 != (err_num = pthread_mutex_lock((pthread_mutex_t *)ctx->mutex))) {
printf("lock mutex failed: - '%s' (%d)", strerror(err_num), err_num);
}
}
static void _ncp_queue_unlock(void)
static void _ncp_queue_unlock(NCP_QUEUE_ENUM ix)
{
int err_num;
ncp_queue_s *ctx = _ncp_queue_get_ctx();
ncp_queue_s *ctx = _ncp_queue_get_ctx(ix);
if (0 != (err_num = pthread_mutex_unlock((pthread_mutex_t *)ctx->mutex))) {
printf("unlock mutex failed - '%s' (%d)", strerror(err_num), err_num);
......@@ -30,10 +36,10 @@ static void _ncp_queue_unlock(void)
}
int ncp_queue_init(int max_size)
static int _ncp_queue_init(NCP_QUEUE_ENUM ix,int max_size)
{
int err_num;
ncp_queue_s *ctx = _ncp_queue_get_ctx();
ncp_queue_s *ctx = _ncp_queue_get_ctx(ix);
memset(ctx, 0, sizeof(ncp_queue_s));
......@@ -49,6 +55,7 @@ int ncp_queue_init(int max_size)
}
ctx->magic = KK_NCP_QUEUE_MAGIC;
ctx->max_size = max_size;
INIT_LIST_HEAD(&ctx->list);
......@@ -56,69 +63,92 @@ int ncp_queue_init(int max_size)
}
int ncp_queue_init(void)
{
_ncp_queue_init(REV_MSG,NCP_QUEUE_SIZE(1));
_ncp_queue_init(GET_PROPERTY,NCP_QUEUE_SIZE(2));
}
void ncp_queue_deinit(void)
{
}
int ncp_queue_enqueue(void *data)
int ncp_queue_enqueue(NCP_QUEUE_ENUM ix,void *data)
{
ncp_queue_s *ctx = _ncp_queue_get_ctx();
ncp_queue_s *ctx = _ncp_queue_get_ctx(ix);
ncp_queue_msg_s *node = NULL;
if(ctx->magic!=KK_NCP_QUEUE_MAGIC){
return -1;
}
if (data == NULL) {
return -1;
}
_ncp_queue_lock();
_ncp_queue_lock(ix);
printf("list size: %d, max size: %d\n", ctx->size, ctx->max_size);
if (ctx->size >= ctx->max_size) {
printf("ncp queue list full");
_ncp_queue_unlock();
_ncp_queue_unlock(ix);
return -2;
}
node = malloc(sizeof(ncp_queue_msg_s));
if (node == NULL) {
_ncp_queue_unlock();
_ncp_queue_unlock(ix);
return -3;
}
memset(node, 0, sizeof(ncp_queue_msg_s));
node->data = data;
INIT_LIST_HEAD(&node->list);
ctx->size++;
list_add_tail(&node->list, &ctx->list);
_ncp_queue_unlock();
_ncp_queue_unlock(ix);
printf("add queue \n");
return 0;
}
int ncp_queue_dequeue(void **data)
int ncp_queue_dequeue(NCP_QUEUE_ENUM ix,void **data)
{
ncp_queue_s *ctx = _ncp_queue_get_ctx();
ncp_queue_s *ctx = _ncp_queue_get_ctx(ix);
ncp_queue_msg_s *node = NULL;
if(ctx->magic!=KK_NCP_QUEUE_MAGIC){
return -1;
}
if (data == NULL) {
return -1;
}
_ncp_queue_lock();
_ncp_queue_lock(ix);
if (list_empty(&ctx->list)) {
_ncp_queue_unlock();
_ncp_queue_unlock(ix);
return -2;
}
node = list_first_entry(&ctx->list, ncp_queue_msg_s, list);
list_del(&node->list);
ctx->size--;
*data = node->data;
free(node);
_ncp_queue_unlock();
_ncp_queue_unlock(ix);
printf("de queue \n");
return 0;
}
......
#include "klist.h"
#define KK_NCP_QUEUE_MAGIC 712341940
typedef struct {
void *data;
struct list_head list;
} ncp_queue_msg_s;
typedef struct {
int magic;
void *mutex;
int max_size;
int size;
......@@ -13,7 +16,13 @@ typedef struct {
}ncp_queue_s;
int ncp_queue_init(int max_size);
int ncp_queue_dequeue(void **data);
int ncp_queue_enqueue(void *data);
typedef enum{
REV_MSG = 0,
GET_PROPERTY,
NCP_QUEUE_ENUM_END
}NCP_QUEUE_ENUM;
int ncp_queue_init(void);
int ncp_queue_dequeue(NCP_QUEUE_ENUM ix,void **data);
int ncp_queue_enqueue(NCP_QUEUE_ENUM ix,void *data);
#include "kk_test.h"
#include "kk_tsl_property_get.h"
#include "kk_ncp_queue.h"
#define MAX_ATTRIBUTE_SIZE 10
#define MAX_CLUSTER_SIZE 10
typedef struct{
uint8_t ep;
uint16_t clu;
uint8_t len;
uint16_t attr[MAX_ATTRIBUTE_SIZE];
}property_s;
typedef struct
{
uint16_t node;
property_s property[MAX_CLUSTER_SIZE];
}get_property_s;
static get_property_s g_property;
static get_property_s *_get_g_property(void)
{
return &g_property;
}
void kk_tsl_get_property_s(uint16_t node)
{
uint8_t i,j;
get_property_s *pery = _get_g_property();
property_s *property = pery->property;
memset(pery,0,sizeof(get_property_s));
pery->node = node;
}
void kk_tsl_get_property_print(void)
{
uint8_t i,j;
get_property_s *pery = _get_g_property();
property_s *property = pery->property;
for(i=0;i<MAX_CLUSTER_SIZE;i++){
if(property[i].ep !=0){
for(j=0;j<property[i].len;j++){
printf("i=%d,j=%d,ep=%d,clu=0x%04X,attr=0x%04X\n",i,j,property[i].ep,property[i].clu,property[i].attr[j]);
}
}
}
return false;
}
/*
void kk_tsl_get_property(uint16_t node)
{
status = zclGRead(ptr->nodeId,
1,
1,
false,
ZCL_BASIC_CLUSTER_ID,
ZCL_MODEL_IDENTIFIER_ATTRIBUTE_ID,
true);
}
*/
void kk_tsl_get_property_e(uint16_t node)
{
uint8_t i,j;
get_property_s *pery = _get_g_property();
property_s *property = pery->property;
get_property_data_s *data;
kk_tsl_get_property_print();
for(i=0;i<MAX_CLUSTER_SIZE;i++){
if(property[i].ep !=0 &&property[i].len!=0){
data = (get_property_data_s *)malloc(sizeof(get_property_data_s));
data->node = pery->node;
data->ep = property[i].ep;
data->clu = property[i].clu;
data->len = property[i].len;
data->attr = (get_property_data_s *)malloc(sizeof(uint16_t)*data->len);
for(j=0;j<data->len;j++){
data->attr[j] = property[i].attr[j];
printf("ep=%d,clu=0x%04X,attr=0x%04X\n",data->ep,data->clu,data->attr[j]);
ncp_queue_enqueue(GET_PROPERTY,data);
}
}
}
}
uint8_t kk_tsl_get_pery_ix(uint8_t ep,uint16_t clu)
{
uint8_t i = 0;
get_property_s *pery = _get_g_property();
for (; i<MAX_CLUSTER_SIZE; i++) {
if(pery->property[i].ep == 0){
return i;
}
if(pery->property[i].ep==ep && pery->property[i].clu==clu)
break;
}
return i;
}
bool kk_tsl_get_pery_isExist(uint8_t ep,uint16_t clu,uint16_t attr)
{
uint8_t i,j;
get_property_s *pery = _get_g_property();
property_s *property = pery->property;
for(i=0;i<MAX_CLUSTER_SIZE;i++){
if(property[i].ep == ep && property[i].clu == clu){
for(j=0;j<MAX_ATTRIBUTE_SIZE;j++){
if(property[i].attr[j]==attr) return true;
}
}
}
return false;
}
bool kk_tsl_get_pery_attr_isExist(uint16_t *pAttr,uint16_t attr)
{
uint8_t i = 0;
for(;i<MAX_ATTRIBUTE_SIZE;i++,pAttr++){
if(pAttr==attr && pAttr!=0xffff){
return true;
}
}
return false;
}
uint8_t kk_tsl_get_pery_add(uint8_t ep,uint16_t clu,uint16_t attr)
{
uint8_t ix;
get_property_s *pery;
property_s *property;
uint16_t *pAttr;
if(kk_tsl_get_pery_isExist(ep,clu,attr)==true){
printf("property already add in array!!!\n");
return 0;
}
pery = _get_g_property();
ix = kk_tsl_get_pery_ix(ep,clu);
if(ix>=MAX_CLUSTER_SIZE){
printf("not find ix\n");
return -1;
}
property = &pery->property[ix];
property->ep = ep;
property->clu = clu;
pAttr = property->attr;
if(kk_tsl_get_pery_attr_isExist(pAttr,attr)==true){
printf("attr already add in array!!!\n");
return 0;
}
if(property->len>=MAX_ATTRIBUTE_SIZE){
printf("full!!!,len=%d,max attr array size = %d!!!\n",MAX_ATTRIBUTE_SIZE,property->len);
return -2;
}
property->attr[property->len++] = attr;
printf("[add]ep=%d,clu=0x%04X,attr=0x%04X\n",property->ep,property->clu,attr);
return 0;
}
void kk_tsl_get_property(uint8_t ep,uint16_t clu,uint16_t attr)
{
kk_tsl_get_pery_add(ep,clu,attr);
}
#ifndef __KK_TSL_PROPERTY_GET_H
#define __KK_TSL_PROPERTY_GET_H
typedef struct{
uint16_t node;
uint8_t ep;
uint16_t clu;
uint8_t len;
uint16_t *attr;
}get_property_data_s;
void kk_tsl_get_property_s(uint16_t node);
void kk_tsl_get_property_e(uint16_t node);
uint8_t kk_tsl_get_pery_add(uint8_t ep,uint16_t clu,uint16_t attr);
#endif
#include "kk_tsl_property_set.h"
#include "kk_rgb_hsl_convert.h"
#include "kk_tsl_property_get.h"
static uint8_t kk_global_buffer[256];
static uint8_t kk_global_len;
//emberAfAppPrintln("[tsl report:Gloabl] OnOff~~~~~~~~~");
//"identifier":["PowerSwitch_1","PowerSwitch_2","PowerSwitch_3"]
//cJSON *rpc_Control(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac)
cJSON *kk_tsl_get_property_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac)
{
kk_device_table_s *dev;
kk_dev_config_map *ptr;
kk_dev_config_map *dev_info = NULL;
kk_dev_config_item *item = NULL;
cJSON *array;
cJSON *identifier = NULL;
int num;
uint8_t eui64[EUI64_SIZE];
EmberNodeId nodeId = EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID;
UTIL_LOG_INFO("\n********************kk tsl get property operation********************\n");
if(params == NULL){
set_json_error_type(ctx,JRPC_INVALID_PARAMS,MSG_INVALID_PARAMS);
goto error_return;
}
rpc_get_mac(mac->valuestring,eui64);
nodeId = emberAfDeviceTableGetNodeIdFromEui64(eui64);
emberAfPrintBigEndianEui64(eui64);
emberAfAppFlush();
dev = kk_device_find_by_mac(eui64);
if(dev == NULL){
goto error_return;
}
dev_info = kk_device_config_find(dev->productCode);
if(dev_info == NULL){
goto error_return;
}
array = rpc_cJSON_GetObjectItem(params, "identifier");
if(array == NULL){
goto error_return;
}
num = rpc_cJSON_GetArraySize(array);
kk_tsl_get_property_s(nodeId);
for(int i=0;i<num;i++){
identifier = rpc_cJSON_GetArrayItem(array,i);
ptr = dev_info;
item = &ptr->item;
while(item!=NULL){
if(item == NULL) continue;
if(strcmp(item->identity,identifier->valuestring)==0){
printf("\n================================\n");
printf("ep=%d,cluster=0x%04X,attribute=0x%04X\n",item->endpoint,item->cluster,item->attribute);
printf("\n================================\n");
kk_tsl_get_pery_add(item->endpoint,item->cluster,item->attribute);
break;
}
item = item->next;
}
}
kk_tsl_get_property_e(nodeId);
return rpc_cJSON_CreateNumber(0);
error_return:
return rpc_cJSON_CreateNull();
}
cJSON *kk_topo_change_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac)
{
......
......@@ -26,8 +26,8 @@ void kk_rpc_test(void);
{"kk_tsl_set_colorlight_RGB_red",kk_tsl_set_colorlight_RGB_red},\
{"kk_tsl_set_colorlight_RGB_green",kk_tsl_set_colorlight_RGB_green},\
{"kk_tsl_set_colorlight_RGB_blue",kk_tsl_set_colorlight_RGB_blue},\
{"kk_tsl_set_colorlight_Brightness",kk_tsl_set_colorlight_Brightness},\
{"kk_tsl_set_colorlight_mode",kk_tsl_set_colorlight_mode},\
{"kk_tsl_set_colorlight_Brightness",kk_tsl_set_colorlight_Brightness},\
{"kk_tsl_set_colorlight_mode",kk_tsl_set_colorlight_mode},\
}
......
......@@ -40,12 +40,15 @@
int kk_zcl_onoff_set(jrpc_context * ctx,const char *mac,unsigned char ep,void* data);
extern cJSON *kk_tsl_get_property_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac);
#define RPC_KK_TEST_FUNCTION_TABLE \
{(rpc_function*)kk_tsl_property_operation,"/thing/service/property/set"},\
{(rpc_function*)kk_tsl_get_property_operation,KK_GET_PROPERTY_MSG_TYPE},\
{(rpc_function*)kk_tsl_property_operation,KK_READ_ATTRIBUTE_METHOD},\
{(rpc_function*)kk_topo_change_operation,KK_DEVICE_TOPO_CHANGE_TYPE}
......
......@@ -8,8 +8,8 @@
#define PORT 5555
void rpcInterfaceParse(void);
void ipcHandle(void);
void get_prey_handle(void);
void rpc_reportDevices(void);
......
......@@ -22,13 +22,42 @@
#include "rpc_onoff.h"
#include "kk_test.h"
#include "kk_ncp_queue.h"
#include "kk_tsl_property_get.h"
//#include "kk_log.h"
static struct jrpc_server my_server;
cJSON * test_func(jrpc_context * ctx, cJSON * params, cJSON *id);
void aaaBBB()
{
char *ptr;
const char *strings[3]={"PowerSwitch_1","PowerSwitch_2","PowerSwitch_3"};
cJSON *params = rpc_cJSON_CreateObject();
cJSON *id = rpc_cJSON_CreateObject();
cJSON *mac = rpc_cJSON_CreateObject();
cJSON *array = rpc_cJSON_CreateArray();
rpc_cJSON_AddItemToArray(array,rpc_cJSON_CreateString("PowerSwitch_1"));
rpc_cJSON_AddItemToArray(array,rpc_cJSON_CreateString("PowerSwitch_2"));
rpc_cJSON_AddItemToArray(array,rpc_cJSON_CreateString("PowerSwitch_3"));
rpc_cJSON_AddItemToObject(params, "identifier", array);
rpc_cJSON_AddStringToObject(id, "msgId","123");
rpc_cJSON_AddStringToObject(mac, "mac","1122334455667788");
ptr = rpc_cJSON_Print(params);
printf("params--->%s\n",ptr);
free(ptr);
ptr = rpc_cJSON_Print(id);
printf("id--->%s\n",ptr);
free(ptr);
ptr = rpc_cJSON_Print(mac);
mac = cJSON_GetObjectItem(mac, "mac");
printf("mac--->%s,%s\n",ptr,mac->valuestring);
free(ptr);
kk_tsl_get_property_operation(&my_server, params,id,mac);
}
typedef cJSON(*rpc_function)(jrpc_context * ctx, cJSON * params, cJSON *id);
typedef struct{
......@@ -37,54 +66,14 @@ typedef struct{
}rpc_table_s;
rpc_table_s rpc_table[]={
{test_func,"test_func"},
RPC_KK_TEST_FUNCTION_TABLE,
RPC_NETWORK_FUNCTION_TABLE,
RPC_COMMON_FUNCTION_TABLE,
RPC_GLOBAL_COMMAND_FUNCTION_TABLE,
RPC_COLOR_CONTROL_COMMAND_FUNCTION_TABLE,
RPC_OnOff_COMMAND_FUNCTION_TABLE,
};
void rpcInterfaceParse(void)
{
emberAfAppPrint( "Thread rpc Interface Parse create\n" );
jrpc_server_init(&my_server, PORT);
emberAfAppPrint("sizeof(rpc_table)=%d,sizeof(rpc_table_s)=%d,%d\n",sizeof(rpc_table),sizeof(rpc_table_s),sizeof(rpc_table)/sizeof(rpc_table_s));
for(int i=0;i<sizeof(rpc_table)/sizeof(rpc_table_s);i++){
emberAfAppPrint("i=%d,%s\r\n",i,rpc_table[i].name);
jrpc_register_procedure(&my_server, rpc_table[i].func, rpc_table[i].name, NULL );
}
jrpc_server_run(&my_server);
jrpc_server_destroy(&my_server);
}
cJSON * test_func(jrpc_context * ctx, cJSON * params, cJSON *id) {
cJSON * item1 = rpc_cJSON_CreateObject();
cJSON * item2 = rpc_cJSON_CreateObject();
rpc_cJSON_AddNullToObject(item1,"Null");
rpc_cJSON_AddTrueToObject(item1,"True");
rpc_cJSON_AddFalseToObject(item1,"False");
rpc_cJSON_AddNumberToObject(item1, "Number",12345);
rpc_cJSON_AddStringToObject(item1, "String","hello world!");
rpc_cJSON_AddNullToObject(item2,"1");
rpc_cJSON_AddTrueToObject(item2,"2");
rpc_cJSON_AddFalseToObject(item2,"3");
rpc_cJSON_AddNumberToObject(item2, "4",12345);
rpc_cJSON_AddStringToObject(item2, "5","hello world!");
rpc_cJSON_AddItemToObject(item1,"hhhhhh",item2);
return item1;
}
static int send_result_resp(cJSON * result,
cJSON * id) {
......@@ -229,10 +218,10 @@ void ncp_queue_tick(void)
{
cJSON *root = NULL;
char *str;
if(ncp_queue_dequeue(&root)==0){
if(ncp_queue_dequeue(REV_MSG,&root)==0){
str = rpc_cJSON_Print(root);
printf("dequeue cJson = %s\n",str);
printf("Dequeue cJson = %s\n",str);
free(str);
eval_request(&my_server, root);
rpc_cJSON_Delete(root);
......@@ -253,7 +242,7 @@ void _cb(void* data, int len, char* chlmark){
kk_ota_process(root);
}else{
ncp_queue_enqueue((void *)root);
ncp_queue_enqueue(REV_MSG,(void *)root);
//eval_request(&my_server, root);
}
}
......@@ -549,6 +538,28 @@ int kk_connect_check(){
}
}
void get_prey_handle(void)
{
get_property_data_s *data;
EmberStatus status;
while(1){
if(ncp_queue_dequeue(GET_PROPERTY,&data)==0){
printf("\n================dequeue==================\n");
printf("node = 0x%04X,ep=%d,clu=0x%04X,len=%d\n",data->node,data->ep,data->clu,data->len);
for(int i=0;i<data->len;i++){
printf("attr=0x%04X\n",data->attr[i]);
}
status = zclGReadAttrs(data->node,1,data->ep,false,data->clu,data->len,data->attr,true);
free(data->attr);
free(data);
}
}
}
void ipcHandle(void)
{
#ifdef GATEWAY_TYPE_NCP
......
......@@ -94,7 +94,7 @@ extern void kk_print_network_info(void);
extern void test_123(int val);
extern void kk_ota_test111();
extern void kk_ota_test123123123();
extern int ncp_queue_enqueue(void *data);
extern void aaaBBB();
void kk_message_process(char *messageString)
{
......@@ -120,6 +120,7 @@ void kk_message_process(char *messageString)
kk_ota_test123123123();
}
if(MEMCOMPARE(messageString,"AT+TEST\r\n",len)==0){
aaaBBB();
}
}
......
......@@ -81,8 +81,7 @@ extern void ColorCtrEmovehueCMD( unsigned short node,
//
extern void rpcInterfaceParse(void);
#endif
......@@ -596,9 +596,10 @@ int emberAfMain(MAIN_FUNCTION_PARAMETERS)
kk_device_gateway_add(eui64);
pthread_t tid;
pthread_t prey_tid;
//pthread_create(&tid, NULL, rpcInterfaceParse, NULL);
pthread_create(&tid, NULL, ipcHandle, NULL);
pthread_create(&prey_tid, NULL, get_prey_handle, NULL);
// initialize the ZCL framework ,(plug in) ,mqtt init is here
emAfInit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment