Commit 82aa5a66 authored by 陈伟灿's avatar 陈伟灿

Merge branch 'yjq' into 'master'

Yjq

See merge request chenweican/k-sdk!111
parents 6e9cbe48 b906dd20
#include "kk_ccu_msg.h"
cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *int_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *double_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *string_bool_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *string_int_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *string_double_type_convert(cJSON *n_id,cJSON *n_dataType);
cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType);
typedef cJSON *(*convert_func)(cJSON *,cJSON *);
typedef struct
......@@ -16,6 +8,15 @@ typedef struct
convert_func func;
}CONVERT_ITEM_S;
static cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *int_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *double_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_bool_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_int_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_double_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType);
static cJSON *fit_type_convert(cJSON *n_id,cJSON *n_dataType);
static CONVERT_ITEM_S convert_table[] = {
{"bool",bool_type_convert},
......@@ -24,16 +25,14 @@ static CONVERT_ITEM_S convert_table[] = {
{"string_bool",string_bool_type_convert},
{"string_int",string_int_type_convert},
{"string_double",string_double_type_convert},
{"string_time",string_time_type_convert}
{"string_time",string_time_type_convert},
{"fit",fit_type_convert}
};
cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType)
static cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType)
{
cJSON *args = NULL;
int bVal = 0;
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strcmp(n_dataType->valuestring,"dummy")==0) {
return NULL;
......@@ -65,12 +64,10 @@ cJSON *bool_type_convert(cJSON *n_id,cJSON *n_dataType)
return args;
}
cJSON *int_type_convert(cJSON *n_id,cJSON *n_dataType)
static cJSON *int_type_convert(cJSON *n_id,cJSON *n_dataType)
{
cJSON *args = NULL;
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strcmp(n_dataType->valuestring,"dummy")==0) {
return NULL;
}
......@@ -96,17 +93,15 @@ cJSON *int_type_convert(cJSON *n_id,cJSON *n_dataType)
return args;
}
cJSON *double_type_convert(cJSON *n_id,cJSON *n_dataType)
static cJSON *double_type_convert(cJSON *n_id,cJSON *n_dataType)
{
return int_type_convert(n_id,n_dataType);
}
cJSON *string_bool_type_convert(cJSON *n_id,cJSON *n_dataType)
static cJSON *string_bool_type_convert(cJSON *n_id,cJSON *n_dataType)
{
cJSON *args = NULL;
int flag = -1;
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strcmp(n_dataType->valuestring,"dummy")==0) {
return NULL;
......@@ -149,8 +144,6 @@ static cJSON *string_val_type_convert(int type,cJSON *n_id,cJSON *n_dataType)
double dVal;
}val = {0};
memset(sVal,0,sizeof(sVal));
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strcmp(n_dataType->valuestring,"dummy")==0) {
return NULL;
......@@ -223,7 +216,6 @@ cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType)
cJSON *args = NULL;
int val;
char tm[10] = {0};
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if(strcmp(n_dataType->valuestring,"dummy")==0) {
return NULL;
......@@ -242,21 +234,46 @@ cJSON *string_time_type_convert(cJSON *n_id,cJSON *n_dataType)
return args;
}
cJSON *fit_type_convert(cJSON *n_id,cJSON *n_dataType)
{
cJSON *args = NULL;
if(n_id->type == cJSON_True) {
args = cJSON_CreateTrue();
}else if(n_id->type == cJSON_False){
args = cJSON_CreateFalse();
}else if(n_id->type == cJSON_NULL){
args = cJSON_CreateNull();
}else if(n_id->type == cJSON_Number){
args = cJSON_CreateNumber(n_id->valuedouble);
}else if(n_id->type == cJSON_String){
args = cJSON_CreateString(n_id->valuestring);
}
return args;
}
cJSON * msg_convert_value(cJSON *d_type,cJSON *s_type,cJSON *value)
{
int i,size;
char *pVal = NULL;
cJSON *rlt = NULL;
CONVERT_ITEM_S *crt;
printf("[%s][%d]%s->%s,val=%s\n",__FUNCTION__,__LINE__,cJSON_Print(s_type),cJSON_Print(d_type),cJSON_Print(value));
if(d_type==NULL||s_type==NULL||value==NULL||
d_type->type!=cJSON_String||s_type->type!=cJSON_String){
debug_log(LOG_DEBUG,"[ERR] para.\n");
return NULL;
}
pVal = cJSON_Print(value);
debug_log(LOG_NORMAL,"[convert]type:%s->%s,val=%s.\n",s_type->valuestring,d_type->valuestring,pVal);
free(pVal);
size = sizeof(convert_table)/sizeof(CONVERT_ITEM_S);
crt = &convert_table[0];
......@@ -275,10 +292,36 @@ cJSON *map_type_convert(cJSON *s_dataType,cJSON *s_valueRange,cJSON *value,cJSON
{
cJSON *args = NULL;
cJSON *rlt;
char *sVrg = NULL,*dVrg = NULL,*pVal = NULL;
int j;
int vra_size;
if(s_valueRange==NULL||s_valueRange->type!=cJSON_Array||
d_valueRange==NULL||d_valueRange->type!=cJSON_Array){
debug_log(LOG_DEBUG,"[ERR] range.\n");
return NULL;
}
if(s_dataType==NULL||s_dataType->type!=cJSON_String){
debug_log(LOG_DEBUG,"[ERR] dataType.\n");
return NULL;
}
int vra_size = cJSON_GetArraySize(s_valueRange);
sVrg = cJSON_Print(s_valueRange);
dVrg = cJSON_Print(d_valueRange);
pVal = cJSON_Print(value);
debug_log(LOG_NORMAL,"[convert] s_dataType:%s,val=%s\n",s_dataType->valuestring,pVal);
debug_log(LOG_INFO,"s_valueRange=%s\n",sVrg);
debug_log(LOG_INFO,"d_valueRange=%s\n",dVrg);
free(sVrg);
free(dVrg);
free(pVal);
vra_size = cJSON_GetArraySize(s_valueRange);
for(j=0;j<vra_size;j++){
if(strcmp(s_dataType->valuestring,"dummy")==0){
continue ;
......@@ -289,6 +332,7 @@ cJSON *map_type_convert(cJSON *s_dataType,cJSON *s_valueRange,cJSON *value,cJSON
strcmp(s_dataType->valuestring,"int")==0) {
if(rlt->valueint == value->valueint) {
args = cJSON_GetArrayItem(d_valueRange,j);
printf("222:%s\n",cJSON_Print(args));
break ;
}
}else if(strcmp(s_dataType->valuestring,"double")==0){
......@@ -327,37 +371,22 @@ cJSON *map_type_convert(cJSON *s_dataType,cJSON *s_valueRange,cJSON *value,cJSON
void add_val_to_obj(cJSON *obj,cJSON *val,const char *identifier)
{
if(val->type==cJSON_False){
cJSON_AddFalseToObject(obj,identifier);
}else if(val->type==cJSON_True){
cJSON_AddTrueToObject(obj,identifier);
}else if(val->type==cJSON_NULL){
cJSON_AddNullToObject(obj,identifier);
}else if(val->type==cJSON_Number){
cJSON_AddNumberToObject(obj,identifier,val->valuedouble);
}else if(val->type==cJSON_String){
cJSON_AddStringToObject(obj,identifier,val->valuestring);
}else if(val->type==cJSON_Array){
printf("......................\n");
}
}
cJSON *ccu_value_convert(cJSON *s_dType,cJSON *s_range,cJSON *d_dType,cJSON *d_range,cJSON *value)
{
cJSON *val = NULL;
printf("[ccu val convert] s_dType=%s,s_range=%s,d_dType=%s,d_range=%s,value=%s\n",
cJSON_Print(s_dType),cJSON_Print(s_range),cJSON_Print(d_dType),cJSON_Print(d_range),cJSON_Print(value));
if(strcmp(d_dType->valuestring,"map")==0){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
val = map_type_convert(s_dType,s_range,value,d_range);
}else{
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
val = msg_convert_value(d_dType,s_dType,value);
}
//printf("[val]%s\n",cJSON_Print(val));
return val;
}
......@@ -383,7 +412,61 @@ int kk_lan_get_msg_id_str(char *msgId,int size)
int kk_lan_add_val_to_obj(cJSON *obj,cJSON *val,const char *id)
{
if(id==NULL||obj==NULL||obj->type!=cJSON_Object||val==NULL){
debug_log(LOG_DEBUG,"[err] para.\n");
return -1;
}
debug_log(LOG_NORMAL,"[add] id(%s),type(%d).\n",id,val->type);
if(val->type==cJSON_False){
cJSON_AddFalseToObject(obj,id);
}else if(val->type==cJSON_True){
cJSON_AddTrueToObject(obj,id);
}else if(val->type==cJSON_NULL){
cJSON_AddNullToObject(obj,id);
}else if(val->type==cJSON_Number){
cJSON_AddNumberToObject(obj,id,val->valuedouble);
}else if(val->type==cJSON_String){
cJSON_AddStringToObject(obj,id,val->valuestring);
}else{
debug_log(LOG_DEBUG,"[err] nonsupport type(%s).\n",val->type);
return -1;
}
return 0;
}
int kk_lan_replace_val_to_obj(cJSON *obj,cJSON *val,const char *id)
{
char *pVal = NULL;
if(id==NULL||obj==NULL||obj->type!=cJSON_Object||val==NULL){
debug_log(LOG_DEBUG,"[err] para.\n");
return -1;
}
pVal = cJSON_Print(val);
debug_log(LOG_NORMAL,"[replace] id=%s,type=%d,val=%s.\n",id,val->type,pVal);
free(pVal);
if(val->type==cJSON_False){
cJSON_ReplaceItemInObject(obj, id, cJSON_CreateFalse());
}else if(val->type==cJSON_True){
cJSON_ReplaceItemInObject(obj, id, cJSON_CreateTrue());
}else if(val->type==cJSON_NULL){
cJSON_ReplaceItemInObject(obj, id, cJSON_CreateNull());
}else if(val->type==cJSON_Number){
cJSON_ReplaceItemInObject(obj, id, cJSON_CreateNumber(val->valuedouble));
}else if(val->type==cJSON_String){
cJSON_ReplaceItemInObject(obj, id, cJSON_CreateString(val->valuestring));
}else{
debug_log(LOG_DEBUG,"[err] nonsupport type(%s).\n",val->type);
return -1;
}
return 0;
}
......
......@@ -9,6 +9,8 @@
#include "kk_lan_ctrl.h"
#include "kk_data_mng.h"
#include "cJSON.h"
#include "kk_lan_debug.h"
#define WILDCARD_CHARACTER_STR "*"
#define SUCCESS_STR "success"
......@@ -77,6 +79,12 @@ void add_val_to_obj(cJSON *obj,cJSON *val,const char *identifier);
cJSON *ccu_value_convert(cJSON *s_dType,cJSON *s_range,cJSON *d_dType,cJSON *d_range,cJSON *value);
int kk_lan_add_val_to_obj(cJSON *obj,cJSON *val,const char *id);
int kk_lan_replace_val_to_obj(cJSON *obj,cJSON *val,const char *id);
#endif
......@@ -17,6 +17,7 @@
#include "kk_data_mng.h"
#include "kk_lan_ctrl.h"
#include "kk_lan_sync.h"
#include "kk_lan_debug.h"
#include "kk_voice_panel_handle.h"
......@@ -112,7 +113,9 @@ void kk_handle_sync_info(void)
if(send_data == NULL){
return;
}
printf("kk_ipc_send........%s \n",send_data);
debug_log(LOG_INFO,"[sync] send.\n");
kk_ipc_send(IPC_APP2MID, send_data, strlen(send_data)+1);
free(send_data);
}
......@@ -350,6 +353,8 @@ int kk_data_handle(cJSON *json,int sockfd)
{
cJSON *opcode;
cJSON *arg;
opcode = cJSON_GetObjectItem(json, OPCODE_STRING);
if(opcode != NULL){
if(strcmp(opcode->valuestring,LOGIN_OPCODE) == 0){
......@@ -374,6 +379,7 @@ int kk_data_handle(cJSON *json,int sockfd)
kk_ccu_opcode_handle(json);
}
}
return 0;
}
static int kk_parse_syncinfo(cJSON *payload)
......@@ -425,7 +431,7 @@ static int kk_parse_syncinfo(cJSON *payload)
kk_map_dev_node_add(deviceCode,productCode,gwdevicecode,(onlineStatus->valueint==1)?"1":"0");
property_syn_deal(deviceCode,properties);
kk_lan_property_post_deal(deviceCode,properties);
......@@ -681,6 +687,40 @@ static int kk_device_historyalarm_handle(cJSON *payload)
cJSON_Delete(root);
return 0;
}
static int kk_lan_scene_handle(cJSON *payload,int isAdd)
{
cJSON *params = NULL;
cJSON *sceneId = NULL;
if(payload == NULL){
debug_log(LOG_DEBUG,"[err] payload.\n");
return -1;
}
if((params = cJSON_GetObjectItem(payload, MSG_PARAMS_STR))==NULL||
params->type!=cJSON_Object){
debug_log(LOG_DEBUG,"[err] params err.\n");
return -1;
}
if((sceneId = cJSON_GetObjectItem(params, MSG_SCENE_SCENEID))==NULL ||
sceneId->type!=cJSON_String){
debug_log(LOG_DEBUG,"[err] sceneId err.\n");
return -1;
}
if(isAdd!=0){
kk_lan_add_scene_notify(sceneId->valuestring);
}else{
kk_lan_delete_scene_notify(sceneId->valuestring);
}
return 0;
}
void KK_Data_FromMid(void* str,int len)
{
cJSON *json;
......@@ -724,13 +764,13 @@ void KK_Data_FromMid(void* str,int len)
int type;
if((type = is_arming_status_notify(payload))!=-1){
arming_status_notify(type);
kk_lan_arming_status_notify(type);
}
}else{
property_post_deal(deviceCode->valuestring,payload);
kk_lan_property_post_deal(deviceCode->valuestring,payload);
}
}else if(strstr(msgtype->valuestring,"/thing/topo/delete")!= NULL){
device_delete_sync(payload);
kk_lan_device_delete_notify(payload);
}else if(strstr(msgtype->valuestring,"/thing/status/online")!= NULL){
kk_device_onoffline_handle(payload,1);
}else if(strstr(msgtype->valuestring,"/thing/status/offline")!= NULL){
......@@ -746,7 +786,13 @@ void KK_Data_FromMid(void* str,int len)
kk_device_historyalarm_handle(payload);
}else if(strstr(msgtype->valuestring,"/thing/service/delAlarm_reply")!= NULL){
kk_del_historyalarm_handle(payload);
}else if(strstr(msgtype->valuestring,"/thing/event/addSceneNotification/post")!= NULL){
kk_lan_scene_handle(payload,1);
}else if(strstr(msgtype->valuestring,"/thing/event/deleteSceneNotification/post")!= NULL){
kk_lan_scene_handle(payload,0);
}
//
cJSON_Delete(json);
}
......@@ -754,3 +800,4 @@ void KK_Data_FromMid(void* str,int len)
......@@ -187,7 +187,7 @@ static char *kk_open_lan_cfg_file(char *deviceCode)
memset(buf,0x0,filesize+1);
fseek(fp, 0L, SEEK_SET);
fread(buf, 1, filesize, fp);
printf("[read lan cfg]:%s\n",buf);
//printf("[read lan cfg]:%s\n",buf);
fclose(fp);
return buf;
......@@ -409,16 +409,14 @@ int kk_map_dev_search_by_deviceCode(char *deviceCode, kk_map_dev_node_t **node)
kk_map_dev_node_t *n = NULL;
//list_for_each_entry_safe
printf("[QAQ] kk_map_dev_search_by_deviceCode\n");
list_for_each_entry(search_node, &ctx->dev_list, linked_list, kk_map_dev_node_t) {
printf("+++\n");
if ( (strlen(search_node->deviceCode) == strlen(deviceCode)) &&
(memcmp(search_node->deviceCode, deviceCode, strlen(deviceCode)) == 0)) {
/* dm_log_debug("Device Found, devid: %d", devid); */
if (node) {
*node = search_node;
}
printf("[find]%s\n",search_node->deviceCode);
return 0;
}
}
......
......@@ -60,40 +60,43 @@ cJSON * kk_control_protocol_convert(kk_map_dev_node_t *devNode,int nodeId,cJSON
int channel;
char ch[33];
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_lan_db_channel_get(nodeId,&channel);
snprintf(ch,33,"%d",channel);
printf("nodeId=%d,channel=%d,ch=%s\n",nodeId,channel,ch);
pos = match_opcode_pos(devNode->oldccu,opcode->valuestring,channel);
printf("[opcode->valuestring]%s\n",opcode->valuestring);
printf("[match pos]%d\n",pos);
if(pos==-1){
debug_log(LOG_FOCUS,"not find\n");
return NULL;
}
debug_log(LOG_FOCUS,"1\n");
newccuItem = cJSON_GetArrayItem(devNode->newccu,pos);
oldccuItem = cJSON_GetArrayItem(devNode->oldccu,pos);
debug_log(LOG_FOCUS,"2\n");
o_dataType = cJSON_GetObjectItem(oldccuItem,"dataType");
o_valueRange = cJSON_GetObjectItem(oldccuItem,"valueRange");
debug_log(LOG_FOCUS,"3\n");
n_dataType = cJSON_GetObjectItem(newccuItem,"dataType");
n_valueRange = cJSON_GetObjectItem(newccuItem,"valueRange");
n_identifier = cJSON_GetObjectItem(newccuItem,"identifier");
epNum = cJSON_GetObjectItem(newccuItem,"channel");
debug_log(LOG_FOCUS,"4\n");
if(strcmp(o_dataType->valuestring,"map")==0){
debug_log(LOG_FOCUS,"5\n");
val = map_type_convert(o_dataType,o_valueRange,arg,n_valueRange);
}else{
debug_log(LOG_FOCUS,"6\n");
val = msg_convert_value(o_dataType,n_dataType,arg);
}
debug_log(LOG_FOCUS,"7\n");
printf("----------->epNum=%s\n",epNum->valuestring);
cJSON_AddStringToObject(params,"epNum",epNum->valuestring);
debug_log(LOG_FOCUS,"8\n");
if(val->type==cJSON_False){
cJSON_AddFalseToObject(params,n_identifier->valuestring);
......@@ -108,6 +111,7 @@ cJSON * kk_control_protocol_convert(kk_map_dev_node_t *devNode,int nodeId,cJSON
}else if(val->type==cJSON_Array){
printf("......................\n");
}
debug_log(LOG_FOCUS,"9\n");
return params;
}
......
#ifndef _LOG_DEBUG_H
#define _LOG_DEBUG_H
#include <stdio.h>
#include <time.h>
#define LOG_NORMAL 1 //亮白色
#define LOG_DEBUG 2 //绿色
#define LOG_INFO 3 //蓝色
#define LOG_FOCUS 4 //黄色
#define LOG_WARNING 5 //蓝绿色
#define LOG_ERROR 6 //紫色
#define LOG_CRITICAL 7 //红色
#define LOG_NORMAL_ACT "\033[0;1;37m"
#define LOG_DEBUG_ACT "\033[0;1;32m"
#define LOG_INFO_ACT "\033[0;1;34m"
#define LOG_FOCUS_ACT "\033[0;1;33m"
#define LOG_WARNING_ACT "\033[0;1;36m"
#define LOG_ERROR_ACT "\033[0;1;35m"
#define LOG_CRITICAL_ACT "\033[0;1;31m"
#define syslog_en 1
#define LOG_LEVEL LOG_NORMAL
#define LOG_LEVEL_1 LOG_NORMAL_ACT
#define LOG_LEVEL_2 LOG_DEBUG_ACT
#define LOG_LEVEL_3 LOG_INFO_ACT
#define LOG_LEVEL_4 LOG_FOCUS_ACT
#define LOG_LEVEL_5 LOG_WARNING_ACT
#define LOG_LEVEL_6 LOG_ERROR_ACT
#define LOG_LEVEL_7 LOG_CRITICAL_ACT
#define LOG_LEVEL_(x) LOG_LEVEL_##x
#if (syslog_en)
#define debug_log(level,format,...) do { \
if( level >= LOG_LEVEL && level <= LOG_CRITICAL) { \
char buff[64] = {0};\
time_t curTime = time(NULL); \
struct tm *c = gmtime(&curTime);\
snprintf(buff,sizeof(buff),"%d-%d-%d %d:%d:%d",(c->tm_year+1900),(c->tm_mon+1),c->tm_mday,c->tm_hour,c->tm_min,c->tm_sec);\
printf("%s%s [%s:%d(%s)] "format"\033[m", LOG_LEVEL_(level),buff,__FILE__,__LINE__,__func__,##__VA_ARGS__); \
} \
}while(0)
#else
#define debug_log(level,format,...)
#endif
#endif
......@@ -33,6 +33,8 @@
#include "kk_lan_node_db.h"
#include "kk_lan_voice_panel.h"
#include "kk_data_mng.h"
#include "kk_lan_debug.h"
static char s_ccuid[DEVICE_CODE_LEN] = {0};
int kk_lan_get_ccuid(_OU_ char *device_code)
......@@ -78,13 +80,12 @@ int main(int argc, char* argv[])
kk_findccu_handle_init();
kk_map_dev_init();
kk_login_init();
kk_voice_panel_init();
//kk_voice_panel_init();
//lan_queue_init();
kk_lan_db_node_init();
//kk_handle_sync_info();
while(1){
sleep(1);
}
......
......@@ -6,7 +6,7 @@
#include "kk_data_mng.h"
#include "kk_ccu_msg.h"
#include "kk_lan_sync.h"
#include "kk_lan_debug.h"
......@@ -407,16 +407,10 @@ int kk_sync_devices_to_sdk(cJSON *root,cJSON *data)
int i,num = cJSON_GetArraySize(rooms);
cJSON *roomId,*devices;
printf("kk_sync_devices_to_sdk,num=%d\n",num);
for(i=0;i<num;i++){
printf("i=%d\n",i);
cJSON *room = cJSON_GetArrayItem(rooms,i);
roomId = cJSON_GetObjectItem(room,ROOMS_ID_STR);
devices = cJSON_GetObjectItem(room,DEVICES_STR);
printf("devices...=%s\n",cJSON_Print(devices));
kk_sync_device(roomId,devices,deviceAry);
}
......@@ -481,7 +475,7 @@ cJSON *_kk_sync_devicestatus_arg_build(kk_map_dev_node_t *node)
}else{
if((val = val_conver_new2old(newccuItem,oldccuItem,1))!=NULL){
add_val_to_obj(arg,val,synKey->valuestring);
kk_lan_add_val_to_obj(arg,val,synKey->valuestring);
}
}
}
......@@ -511,13 +505,15 @@ static int _kk_sync_devices_status_arg_str(kk_map_dev_node_t *node,cJSON *devSta
}
num = cJSON_GetArraySize(newccu);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
for(i=0;i<num;i++){
cJSON * newccuItem = cJSON_GetArrayItem(newccu,i);
cJSON * oldccuItem = cJSON_GetArrayItem(oldccu,i);
cJSON *val = NULL;
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if((val = val_conver_new2old(newccuItem,oldccuItem,0))!=NULL){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
char indexId[4] = {0};
char nodeid[32] = {0};
cJSON *epNum = cJSON_GetObjectItem(newccuItem,CHANNEL_STRING);
......@@ -529,7 +525,7 @@ static int _kk_sync_devices_status_arg_str(kk_map_dev_node_t *node,cJSON *devSta
}
dev_status = cJSON_CreateObject();
add_val_to_obj(dev_status,val,"arg");
kk_lan_add_val_to_obj(dev_status,val,"arg");
kk_creater_nodeid(node->deviceCode,atoi(epNum->valuestring),nodeid);
......@@ -600,6 +596,7 @@ int kk_sync_devices_status_to_sdk(cJSON *root)
}else{
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
_kk_sync_devices_status_arg_str(node,devStatusAry,&idx);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//_kk_sync_devicestatus(node,devStatusAry);
}
......@@ -1064,8 +1061,8 @@ int kk_create_syncinfo_to_sdk(cJSON *payload)
cJSON *expand_rules;
cJSON *data = kk_get_sync_data(payload);
char *out = NULL;
printf("!!!!!!!!!!!!!!!!!!!!------>%x\n",&out);
cJSON *root=cJSON_CreateObject();
cJSON *aiks_controllers = cJSON_CreateArray();
cJSON_AddItemToObject(root, "aiks_controllers", aiks_controllers);
......@@ -1087,95 +1084,67 @@ int kk_create_syncinfo_to_sdk(cJSON *payload)
cJSON_AddItemToObject(root, "cnwise_music_controllers", cnwise_music_controllers);
code_lib_controllers = cJSON_CreateArray();
cJSON_AddItemToObject(root, "code_lib_controllers", code_lib_controllers);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
controllers = cJSON_CreateArray();
cJSON_AddItemToObject(root, "controllers", controllers);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_sync_devices_status_to_sdk(root);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_sync_devices_to_sdk(root,data);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_rooms_to_sdk(root,data);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_scence_to_sdk(root,data);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_gw_version_to_sdk(root,data);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_ccu_version_to_sdk(root,data);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_guard_to_sdk(root,data);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_sync_central_ac_to_sdk(root,data);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_central_ac_indoorunits_to_sdk(root,data);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_sync_groups_to_sdk(root,data);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
kk_create_floors_to_sdk(root,data);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
#if 1
expand_rules = cJSON_CreateArray();
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON_AddItemToObject(root, "expand_rules", expand_rules);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
cJSON_AddItemToObject(root, "expand_rules", expand_rules);
#endif
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,(root==NULL)?"NULL":"1");
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
out=cJSON_Print(root);
printf("out:%s\n",out);
printf("[%s][%d]%s\n",__FUNCTION__,__LINE__,out);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
cJSON *msg = old_ccu_msg_build_json("*","SYNC_INFO",NULL,root);
send_msg_to_module(msg);
cJSON_Delete(msg);
free(out);
return 0;
}
......
......@@ -8,10 +8,11 @@
#include "kk_lan_voice_panel.h"
#include "kk_voice_panel_cfg.h"
#include "kk_voice_panel_handle.h"
#include "kk_lan_debug.h"
#include "Serial.h"
#include "uart_proto.h"
static pthread_mutex_t v_mux;
......@@ -308,6 +309,8 @@ void *kk_vp_manage_thread(void *arg)
break;
case UPDATING_8009_CONFIG_FILE_INFO:
debug_log(LOG_INFO,"updating...\n");
sleep(1);
//todo :超时取消
break;
......
......@@ -13,6 +13,7 @@
#include <signal.h>
#include "kk_login_handle.h"
#include "kk_data_handle.h"
#include "kk_lan_debug.h"
#define LISTEN_MAX 5
#define BUF_SIZE 1500
......@@ -60,6 +61,7 @@ static int _kk_handle_data(char *buf,int sockfd){
memset(tmpBuf,0x0,sizeof(tmpBuf));
memcpy(tmpBuf,pStart+1,(pEnd - pStart - 1));
}
debug_log(LOG_NORMAL,"[recv]%s\n",tmpBuf);
json=cJSON_Parse(tmpBuf);
if (!json) {
WARNING_PRINT("Error before: [%s]\n","cJSON_Parse");
......@@ -193,10 +195,15 @@ void *TCPServer()
}else{
for(i=0;i<LISTEN_MAX;i++)
{
if(s_ConnInfo[i].socketfd==-1){
continue ;
}
if(FD_ISSET(s_ConnInfo[i].socketfd,&server_fd_set))
{
memset(Buf,0,sizeof(Buf));
ret = recv(s_ConnInfo[index].socketfd,Buf,sizeof(Buf), 0);//最后一个参数为0,表示默认阻塞接收,前面select解除了阻塞说明有数据可读
if(ret > 0)
{
_kk_handle_data(Buf,s_ConnInfo[index].socketfd);
......@@ -217,6 +224,8 @@ void *TCPServer()
}
FD_CLR(Listenfd, &fds);// 清除 fds中相应的文件描述符
close(Listenfd);
return NULL;
}
......
This diff is collapsed.
......@@ -12,10 +12,15 @@ int send_msg_to_module(cJSON *root);
cJSON * val_conver_new2old(cJSON *newccuItem,cJSON *oldccuItem,int syn_type);
int arming_status_notify(int type);
int kk_lan_property_post_deal(const char *deviceCode,cJSON *payload);
int kk_lan_property_syn_deal(const char *deviceCode,cJSON *properties);
int kk_lan_arming_status_notify(int type);
void kk_lan_add_scene_notify(const char* scene_id);
void kk_lan_delete_scene_notify(const char* scene_id);
int kk_lan_device_delete_notify(cJSON *payload);
......
......@@ -53,23 +53,23 @@ static _OUT int kk_vp_get_room_id_by_scene_id(_IN cJSON *data,_IN const char *sc
if(scene_id==NULL ){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
if((roomsAry = cJSON_GetObjectItem(data,ROOMS_STR))==NULL||
roomsAry->type!=cJSON_Array){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
roomNum = cJSON_GetArraySize(roomsAry);
printf("[%s][%d]roomNum=%d,scene_id=%s\n",__FUNCTION__,__LINE__,roomNum,scene_id);
//printf("[%s][%d]roomNum=%d,scene_id=%s\n",__FUNCTION__,__LINE__,roomNum,scene_id);
for(i=0;i<roomNum;i++){
roomObj = cJSON_GetArrayItem(roomsAry,i);
if(roomObj->type!=cJSON_Object){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
roomId = cJSON_GetObjectItem(roomObj,ROOMS_ID_STR);
......@@ -77,32 +77,32 @@ static _OUT int kk_vp_get_room_id_by_scene_id(_IN cJSON *data,_IN const char *sc
if(roomId==NULL||roomId->type!=cJSON_String||
scenes==NULL||scenes->type!=cJSON_Array){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
sceneNum = cJSON_GetArraySize(scenes);
printf("[%s][%d]sceneNum=%d\n",__FUNCTION__,__LINE__,sceneNum);
//printf("[%s][%d]sceneNum=%d\n",__FUNCTION__,__LINE__,sceneNum);
for(j=0;j<sceneNum;j++){
sceneItem = cJSON_GetArrayItem(scenes,j);
if((sceneId = cJSON_GetObjectItem(sceneItem,"sceneId"))==NULL ||
sceneId->type!=cJSON_String){
printf("[%s][%d]sceneId->type=%d\n",__FUNCTION__,__LINE__,sceneId->type);
//printf("[%s][%d]sceneId->type=%d\n",__FUNCTION__,__LINE__,sceneId->type);
continue ;
}
printf("[%s][%d]%d,%d,%s,%s\n",__FUNCTION__,__LINE__,strlen(sceneId->valuestring),strlen(scene_id),
scene_id,sceneId->valuestring);
//printf("[%s][%d]%d,%d,%s,%s\n",__FUNCTION__,__LINE__,strlen(sceneId->valuestring),strlen(scene_id),
// scene_id,sceneId->valuestring);
if(strlen(sceneId->valuestring)==strlen(scene_id) &&
!strcmp(sceneId->valuestring,scene_id)) {
memset(buf,0,size);
snprintf(buf,size,"%s",roomId->valuestring);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 1;
}
}
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
......@@ -172,12 +172,12 @@ static _OUT cJSON *kk_vp_sync_scences(_IN cJSON *data)
if((scenes = cJSON_GetObjectItem(data,SCENES_STR))==NULL||
scenes->type!=cJSON_Array){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
////printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return scenes_ary_build(0,NULL);
}
if((sceneNum = cJSON_GetArraySize(scenes))==0){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
////printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return scenes_ary_build(0,NULL);
}
......@@ -197,7 +197,7 @@ static _OUT cJSON *kk_vp_sync_scences(_IN cJSON *data)
if(sceneId==NULL||sceneId->type!=cJSON_String||
sceneType==NULL||sceneType->type!=cJSON_Number||
sceneName==NULL||sceneName->type!=cJSON_String){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
......@@ -210,7 +210,7 @@ static _OUT cJSON *kk_vp_sync_scences(_IN cJSON *data)
snprintf(pScene->id,sizeof(pScene->id)-1,"%d",map_id);
snprintf(pScene->type,sizeof(pScene->type)-1,"%d",sceneType->valueint);
snprintf(pScene->name,sizeof(pScene->name)-1,"%s",sceneName->valuestring);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
}
}
vp_scene_id_map_save();
......@@ -231,11 +231,11 @@ static int kk_vp_get_device_name(_IN cJSON *devices,_IN const char*epNum,_IN con
cJSON *deviceItem = NULL,*devCodeObj = NULL;
devNum = cJSON_GetArraySize(devices);
printf("[%s][%d]devNum=%d\n",__FUNCTION__,__LINE__,devNum);
//printf("[%s][%d]devNum=%d\n",__FUNCTION__,__LINE__,devNum);
for(i=0;i<devNum;i++){
deviceItem = cJSON_GetArrayItem(devices,i);
if(deviceItem->type!=cJSON_Object){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
......@@ -243,27 +243,26 @@ static int kk_vp_get_device_name(_IN cJSON *devices,_IN const char*epNum,_IN con
devCodeObj = cJSON_GetObjectItem(deviceItem,"deviceCode");
if(devCodeObj==NULL||devCodeObj->type!=cJSON_String){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
printf("[%s][%d]%d,%d,%s,%s\n",__FUNCTION__,__LINE__,strlen(devCodeObj->valuestring),
strlen(deviceCode),devCodeObj->valuestring,deviceCode);
//printf("[%s][%d]%d,%d,%s,%s\n",__FUNCTION__,__LINE__,strlen(devCodeObj->valuestring),strlen(deviceCode),devCodeObj->valuestring,deviceCode);
if((strlen(devCodeObj->valuestring)==strlen(deviceCode)) &&
!strcmp(devCodeObj->valuestring,deviceCode)){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if((name = cJSON_GetObjectItem(deviceItem,"name"))!=NULL &&
name->type==cJSON_String){
printf("[%s][%d]name=%s\n",__FUNCTION__,__LINE__,name->valuestring);
//printf("[%s][%d]name=%s\n",__FUNCTION__,__LINE__,name->valuestring);
snprintf(buf,size,"%s",name->valuestring);
return 1;
}
}
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
......@@ -277,19 +276,19 @@ static int kk_vp_get_device_info(_IN cJSON *rooms,_IN VP_ZB_DEV_ITEM *pDevs)
roomNum = cJSON_GetArraySize(rooms);
printf("[%s][%d]roomNum=%d\n",__FUNCTION__,__LINE__,roomNum);
//printf("[%s][%d]roomNum=%d\n",__FUNCTION__,__LINE__,roomNum);
for(i=0;i<roomNum;i++){
roomItem = cJSON_GetArrayItem(rooms,i);
if((roomId = cJSON_GetObjectItem(roomItem,ROOMS_ID_STR))==NULL||
roomId->type!=cJSON_String){
printf("[prase fail]roomId...\n");
//printf("[prase fail]roomId...\n");
continue ;
}
if((devices= cJSON_GetObjectItem(roomItem,DEVICES_STR))==NULL ||
devices->type!=cJSON_Array){
printf("[prase fail]devices...\n");
//printf("[prase fail]devices...\n");
continue ;
}
......@@ -297,12 +296,12 @@ static int kk_vp_get_device_info(_IN cJSON *rooms,_IN VP_ZB_DEV_ITEM *pDevs)
if(isFind!=0){
snprintf(pDevs->room,sizeof(pDevs->room),"%s",roomId->valuestring);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return isFind;
}
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
......@@ -350,7 +349,7 @@ static int kk_vp_sync_device_multi_eps(_IN cJSON *zbDevsAry,_IN cJSON *dev,_IN c
num = cJSON_GetArraySize(eps);
printf("[%s][%d]num=%d\n",__FUNCTION__,__LINE__,num);
for(i=0;i<num;i++){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
memset(pDevs->ch,0,sizeof(pDevs->ch));
memset(pDevs->name,0,sizeof(pDevs->name));
......@@ -360,7 +359,7 @@ static int kk_vp_sync_device_multi_eps(_IN cJSON *zbDevsAry,_IN cJSON *dev,_IN c
if((epNum = cJSON_GetObjectItem(epItem,"epNum"))==NULL ||
epNum->type!=cJSON_String){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
continue ;
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
......@@ -389,7 +388,7 @@ static int kk_vp_sync_device_multi_eps(_IN cJSON *zbDevsAry,_IN cJSON *dev,_IN c
}
free(pDevs);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return isFind;
}
......@@ -445,17 +444,17 @@ static int kk_vp_sync_device_single_ep(_IN cJSON *zbDevsAry,_IN cJSON *dev,_IN c
if(kk_vp_get_device_info(rooms,pDevs)!=0){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
if((zbDevObj = zigbee_devices_item_build(pDevs))!=NULL){
cJSON_AddItemToArray(zbDevsAry,zbDevObj);
free(pDevs);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 1;
}
}
free(pDevs);
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
......@@ -533,15 +532,15 @@ static _OUT cJSON *kk_vp_sync_device(_IN cJSON *data)
}
if(eps==NULL){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_vp_sync_device_single_ep(zbDevsAry,dev,roomsAry);
}else if(eps->type==cJSON_Array){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
kk_vp_sync_device_multi_eps(zbDevsAry,dev,roomsAry,eps);
}
}
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return zbDevsAry;
}
......@@ -673,7 +672,7 @@ static _OUT cJSON *zigbee_devices_item_build(_IN VP_ZB_DEV_ITEM *item)
if(item == NULL ||item->operateType==NULL||item->nodeId==NULL||
item->name==NULL||item->room == NULL||item->mac == NULL||
item->online == NULL||item->pid == NULL){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return NULL;
}
......@@ -935,11 +934,11 @@ _OUT int kk_vp_syncinfo(_IN cJSON *payload,_IN int ver,_OUT cJSON **root)
json.other_devices = kk_vp_sync_ac_indoors(data);
if((*root = kk_voice_panel_cfg_build(&json,ver))!=NULL){
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return 0;
}
printf("[%s][%d]\n",__FUNCTION__,__LINE__);
//printf("[%s][%d]\n",__FUNCTION__,__LINE__);
return -1;
}
......
......@@ -100,7 +100,7 @@ static cJSON * kk_get_room_devices(const char *roomId)
res = dm_mgr_get_device_by_devicecode((char*)deviceCode,&node);
if (res != SUCCESS_RETURN) {
ERROR_PRINT("ERROR [%s][%d] res:%d\n",__FUNCTION__,__LINE__,res);
return FAIL_RETURN;
return devs;
}
if(kk_check_multi_ep_num(deviceCode)){
cJSON_AddStringToObject(dev,KK_SYNC_SCENE_EPNUM_STR,epNum);
......
......@@ -24,10 +24,10 @@
"opcodemap":"FAN_COIL_SET_FUN_SPEED",
"dataType":"int",
"channel":"1",
"valueRange":[1,2,3,4],
"valueRange":[0,2,3,4],
"value": 1
},{
"identifier":"TargetTemperature",
"identifier":"Temperature",
"opcodemap":"FAN_COIL_SET_TEMPERATURE",
"dataType":"double",
"channel":"1",
......@@ -123,12 +123,12 @@
"identifiermap":"WindSpeed",
"dataType":"map",
"channel":"1",
"valueRange":["AUTO","HIGH","MID","LOW"],
"valueRange":["AUTO","LOW","MID","HIGH"],
"syn":"fan_speed",
"synType":"map"
},{
"opcode":"FAN_COIL_SET_TEMPERATURE",
"identifiermap":"TargetTemperature",
"identifiermap":"Temperature",
"dataType":"double",
"channel":"1",
"valueRange":[],
......
{
"schema": "https://iot-ap.ikonke.com/model/product_3029.json",
"productType": "floorHeating",
"version": "1.0",
"version": "1.2",
"profile": {
"heartbeat": "300",
"productCode": "3029",
......@@ -67,13 +67,9 @@
"identifier": "TimingOffTime",
"name": "延时关机时间",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "24",
"unit": "h",
"unitName": "小时",
"step": "0.5"
"type":"text",
"specs":{
"length":"10"
}
}
}
......@@ -161,13 +157,9 @@
"identifier": "TimingOffTime",
"name": "延时关机时间",
"dataType": {
"type" : "double",
"specs": {
"min": "0",
"max": "24",
"unit": "h",
"unitName": "小时",
"step": "0.5"
"type":"text",
"specs":{
"length":"10"
}
}
}
......@@ -252,13 +244,9 @@
"accessMode": "rw",
"required": true,
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "24",
"unit": "h",
"unitName": "小时",
"step": "0.5"
"type":"text",
"specs":{
"length":"10"
}
}
}
......@@ -337,13 +325,9 @@
"identifier": "TimingOffTime",
"name": "延时关机时间",
"dataType": {
"type": "double",
"specs": {
"min": "0",
"max": "24",
"unit": "h",
"unitName": "小时",
"step": "0.5"
"type":"text",
"specs":{
"length":"10"
}
}
}
......
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