Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
490a67cf
Commit
490a67cf
authored
Sep 11, 2020
by
chen.weican
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】添加APP端主动删除子设备的消息处理
【提交人】陈伟灿
parent
4edd1128
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
861 additions
and
760 deletions
+861
-760
application/kcloud/kcloud_data_handle.c
application/kcloud/kcloud_data_handle.c
+34
-2
application/kcloud/kcloud_main.c
application/kcloud/kcloud_main.c
+74
-76
application/kcloud/kk_topic_mng.c
application/kcloud/kk_topic_mng.c
+217
-209
common/api/com_api.h
common/api/com_api.h
+52
-50
midware/midware/dm/kk_dm_msg.h
midware/midware/dm/kk_dm_msg.h
+60
-59
midware/midware/dm/kk_linkkit.c
midware/midware/dm/kk_linkkit.c
+31
-1
midware/midware/midware.c
midware/midware/midware.c
+0
-9
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
...zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
+277
-244
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
...zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
+36
-34
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
+80
-76
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
+0
-0
No files found.
application/kcloud/kcloud_data_handle.c
View file @
490a67cf
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
#define KK_FILTER_STATUS_ONLINE_REPLY "/thing/status/online_reply"
#define KK_FILTER_STATUS_ONLINE_REPLY "/thing/status/online_reply"
#define KK_FILTER_STATUS_OFFLINE "/thing/status/offline"
#define KK_FILTER_STATUS_OFFLINE "/thing/status/offline"
#define KK_FILTER_STATUS_OFFLINE_REPLY "/thing/status/offline_reply"
#define KK_FILTER_STATUS_OFFLINE_REPLY "/thing/status/offline_reply"
#define KK_FILTER_TOPO_CHANEG_REPLY "/thing/topo/change_reply"
#define KK_CLOUDSTATE_MSG "/thing/ccu/cloudstate"
#define KK_CLOUDSTATE_MSG "/thing/ccu/cloudstate"
#define KK_CLOUDSTATE_MSG_REPLY "/thing/ccu/cloudstate_reply"
#define KK_CLOUDSTATE_MSG_REPLY "/thing/ccu/cloudstate_reply"
#define KK_TOPO_CHANGE_MSG_STR "/thing/topo/change"
const
char
DM_MSG_TO_MIDDWARE
[]
=
"{
\"
msgtype
\"
:
\"
%s
\"
,
\"
productCode
\"
:
\"
%s
\"
,
\"
deviceCode
\"
:
\"
%s
\"
}"
;
const
char
DM_MSG_TO_MIDDWARE
[]
=
"{
\"
msgtype
\"
:
\"
%s
\"
,
\"
productCode
\"
:
\"
%s
\"
,
\"
deviceCode
\"
:
\"
%s
\"
}"
;
#define KK_TOPIC_SERVICE_DELIMITER '/'
#define KK_TOPIC_SERVICE_DELIMITER '/'
...
@@ -202,6 +204,9 @@ static int _check_invalid_topic(const char* topic)
...
@@ -202,6 +204,9 @@ static int _check_invalid_topic(const char* topic)
else
if
(
strstr
(
topic
,
KK_FILTER_SET_TOPIC_REPLY
)
!=
NULL
){
else
if
(
strstr
(
topic
,
KK_FILTER_SET_TOPIC_REPLY
)
!=
NULL
){
return
1
;
return
1
;
}
}
else
if
(
strstr
(
topic
,
KK_FILTER_TOPO_CHANEG_REPLY
)
!=
NULL
){
return
1
;
}
else
if
(
strstr
(
topic
,
KK_FILTER_EVENT_POST_TOPIC
)
!=
NULL
&&
\
else
if
(
strstr
(
topic
,
KK_FILTER_EVENT_POST_TOPIC
)
!=
NULL
&&
\
strstr
(
topic
,
KK_FILTER_LOGIN_TOPIC_REPLY
)
==
NULL
){
strstr
(
topic
,
KK_FILTER_LOGIN_TOPIC_REPLY
)
==
NULL
){
return
1
;
return
1
;
...
@@ -273,7 +278,31 @@ static int _kk_topic_parse_pkdn(_IN_ char *topic, _IN_ int start_deli,
...
@@ -273,7 +278,31 @@ static int _kk_topic_parse_pkdn(_IN_ char *topic, _IN_ int start_deli,
return
RETURN_SUCCESS
;
return
RETURN_SUCCESS
;
}
}
static
int
_kk_topo_change_handle
(
cJSON
*
payload
)
{
cJSON
*
paramStr
=
cJSON_GetObjectItem
(
payload
,
MSG_PARAMS_STR
);
if
(
paramStr
==
NULL
){
ERROR_PRINT
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
return
RETURN_FAIL
;
}
cJSON
*
state
=
cJSON_GetObjectItem
(
paramStr
,
MSG_TOPO_CHANGE_TYPE_STR
);
if
(
state
!=
NULL
&&
state
->
valueint
==
1
){
cJSON
*
deviceArray
=
cJSON_GetObjectItem
(
paramStr
,
MSG_TOPO_CHANGE_DEVICES_STR
);
if
(
deviceArray
==
NULL
){
ERROR_PRINT
(
"[%s][%d]
\n
"
,
__FUNCTION__
,
__LINE__
);
return
RETURN_FAIL
;
}
cJSON
*
item
=
deviceArray
->
child
;
while
(
item
!=
NULL
){
char
*
deviceCode
=
cJSON_GetObjectItem
(
item
,
MSG_DEVICE_CODE_STR
)
->
valuestring
;
char
*
productCode
=
cJSON_GetObjectItem
(
item
,
MSG_PRODUCT_CODE_STR
)
->
valuestring
;
KK_Subdev_UnSubscribe_By_DeviceCode
(
deviceCode
,
productCode
);
item
=
item
->
next
;
}
}
return
RETURN_SUCCESS
;
}
static
char
*
_kk_data_create
(
const
char
*
topic
,
const
char
*
data
)
static
char
*
_kk_data_create
(
const
char
*
topic
,
const
char
*
data
)
{
{
cJSON
*
root
;
cJSON
*
root
;
...
@@ -302,16 +331,19 @@ static char * _kk_data_create(const char *topic,const char *data)
...
@@ -302,16 +331,19 @@ static char * _kk_data_create(const char *topic,const char *data)
cJSON
*
payloadObj
=
cJSON_Parse
(
data
);
cJSON
*
payloadObj
=
cJSON_Parse
(
data
);
cJSON_AddItemToObject
(
root
,
MSG_INFO_STR
,
infoObj
);
cJSON_AddItemToObject
(
root
,
MSG_INFO_STR
,
infoObj
);
cJSON_AddItemToObject
(
root
,
MSG_PAYLOAD_STR
,
payloadObj
);
cJSON_AddItemToObject
(
root
,
MSG_PAYLOAD_STR
,
payloadObj
);
if
(
strstr
(
topic
,
KK_TOPO_CHANGE_MSG_STR
)){
_kk_topo_change_handle
(
payloadObj
);
}
out
=
cJSON_Print
(
root
);
out
=
cJSON_Print
(
root
);
cJSON_Delete
(
root
);
cJSON_Delete
(
root
);
free
(
msgStr
);
free
(
msgStr
);
free
(
infoStr
);
free
(
infoStr
);
INFO_PRINT
(
"[%s][%d]%s
\n
"
,
__FUNCTION__
,
__LINE__
,
out
);
INFO_PRINT
(
"[%s][%d]%s
\n
"
,
__FUNCTION__
,
__LINE__
,
out
);
return
out
;
return
out
;
//free(out); /* Print to text, Delete the cJSON, print it, release the string. */
//free(out); /* Print to text, Delete the cJSON, print it, release the string. */
}
}
const
char
DM_MSG_CLOUDSTATE
[]
=
"{
\"
msgId
\"
:
\"
1
\"
,
\"
version
\"
:
\"
1.0
\"
,
\"
params
\"
:{
\"
IOTCloudState
\"
:
\"
%d
\"
},
\"
method
\"
:
\"
thing.ccu.cloudstate_reply
\"
}"
;
const
char
DM_MSG_CLOUDSTATE
[]
=
"{
\"
msgId
\"
:
\"
1
\"
,
\"
version
\"
:
\"
1.0
\"
,
\"
params
\"
:{
\"
IOTCloudState
\"
:
\"
%d
\"
},
\"
method
\"
:
\"
thing.ccu.cloudstate_reply
\"
}"
;
int
KK_Send_CloudState
(
int
state
)
int
KK_Send_CloudState
(
int
state
)
{
{
char
*
infoStr
=
NULL
;
char
*
infoStr
=
NULL
;
...
...
application/kcloud/kcloud_main.c
View file @
490a67cf
...
@@ -66,8 +66,6 @@ int main(int argc, char* argv[])
...
@@ -66,8 +66,6 @@ int main(int argc, char* argv[])
kk_zlog_init
(
"kcloud"
);
kk_zlog_init
(
"kcloud"
);
/*set the callback to get the device date to cloud*/
/*set the callback to get the device date to cloud*/
HAL_SetProduct_Type
(
PRODUCT_TPYE
);
HAL_SetProduct_Code
(
PRODUCT_CODE
);
kk_ipc_init
(
IPC_APP2MID
,
KK_Data_FromDev
,
NULL
,
NULL
);
kk_ipc_init
(
IPC_APP2MID
,
KK_Data_FromDev
,
NULL
,
NULL
);
rc
=
mqtt_start
();
rc
=
mqtt_start
();
...
...
application/kcloud/kk_topic_mng.c
View file @
490a67cf
...
@@ -135,12 +135,29 @@ static int _kk_utils_topic(_IN_ const char *name, _IN_ char *product_code,
...
@@ -135,12 +135,29 @@ static int _kk_utils_topic(_IN_ const char *name, _IN_ char *product_code,
return
0
;
return
0
;
}
}
int
KK_Subdev_UnSubscribe
(
cJSON
*
payload
)
int
KK_Subdev_UnSubscribe_By_DeviceCode
(
const
char
*
deviceCode
,
const
char
*
productCode
)
{
{
cJSON
*
params
,
*
productCode
,
*
deviceCode
;
char
*
topic
=
NULL
;
char
*
topic
=
NULL
;
int
topic_len
=
0
;
int
topic_len
=
0
;
topic_len
=
strlen
(
KK_URI_SYS_PREFIX
)
+
strlen
(
productCode
)
+
strlen
(
deviceCode
)
+
1
;
topic
=
malloc
(
topic_len
);
if
(
topic
==
NULL
)
{
return
-
1
;
}
memset
(
topic
,
0
,
topic_len
);
snprintf
(
topic
,
topic_len
,
KK_URI_SYS_PREFIX
,
productCode
,
deviceCode
);
INFO_PRINT
(
"[%s][%d] TOPIC:%s
\n
"
,
__FUNCTION__
,
__LINE__
,
topic
);
KK_MQTT_UnsubTopic
(
topic
);
free
(
topic
);
return
0
;
}
int
KK_Subdev_UnSubscribe
(
cJSON
*
payload
)
{
cJSON
*
params
,
*
productCode
,
*
deviceCode
;
if
(
payload
==
NULL
){
if
(
payload
==
NULL
){
goto
errorreturn
;
goto
errorreturn
;
}
}
...
@@ -156,17 +173,8 @@ int KK_Subdev_UnSubscribe(cJSON *payload)
...
@@ -156,17 +173,8 @@ int KK_Subdev_UnSubscribe(cJSON *payload)
if
(
deviceCode
==
NULL
){
if
(
deviceCode
==
NULL
){
goto
errorreturn
;
goto
errorreturn
;
}
}
KK_Subdev_UnSubscribe_By_DeviceCode
(
deviceCode
->
valuestring
,
productCode
->
valuestring
);
topic_len
=
strlen
(
KK_URI_SYS_PREFIX
)
+
strlen
(
productCode
->
valuestring
)
+
strlen
(
deviceCode
->
valuestring
)
+
1
;
topic
=
malloc
(
topic_len
);
if
(
topic
==
NULL
)
{
goto
errorreturn
;
}
memset
(
topic
,
0
,
topic_len
);
snprintf
(
topic
,
topic_len
,
KK_URI_SYS_PREFIX
,
productCode
->
valuestring
,
deviceCode
->
valuestring
);
INFO_PRINT
(
"[%s][%d] TOPIC:%s
\n
"
,
__FUNCTION__
,
__LINE__
,
topic
);
KK_MQTT_UnsubTopic
(
topic
);
free
(
topic
);
return
0
;
return
0
;
errorreturn:
errorreturn:
return
-
1
;
return
-
1
;
...
...
common/api/com_api.h
View file @
490a67cf
...
@@ -37,6 +37,8 @@ typedef enum {
...
@@ -37,6 +37,8 @@ typedef enum {
#define MSG_INDENTIFIER_STR "identifier"
#define MSG_INDENTIFIER_STR "identifier"
#define MSG_PARAMS_STR "params"
#define MSG_PARAMS_STR "params"
#define MSG_IOTClOUDSTATE_STR "IOTCloudState"
#define MSG_IOTClOUDSTATE_STR "IOTCloudState"
#define MSG_TOPO_CHANGE_TYPE_STR "changeType"
#define MSG_TOPO_CHANGE_DEVICES_STR "devices"
typedef
void
ipc_cb
(
void
*
data
,
int
len
,
char
*
chalMark
);
typedef
void
ipc_cb
(
void
*
data
,
int
len
,
char
*
chalMark
);
int
kk_ipc_init
(
ipc_type
type
,
ipc_cb
cb
,
char
*
chalMark
,
char
*
ip
);
int
kk_ipc_init
(
ipc_type
type
,
ipc_cb
cb
,
char
*
chalMark
,
char
*
ip
);
...
...
midware/midware/dm/kk_dm_msg.h
View file @
490a67cf
...
@@ -51,6 +51,7 @@ const char DM_MSG_INFO[] DM_READ_ONLY;
...
@@ -51,6 +51,7 @@ const char DM_MSG_INFO[] DM_READ_ONLY;
#define KK_THING_TOPO_ADD_MSG "/thing/topo/add"
#define KK_THING_TOPO_ADD_MSG "/thing/topo/add"
#define KK_THING_PROPERTY_POST "property/post"
#define KK_THING_PROPERTY_POST "property/post"
#define KK_THING_TOPO_DELETE_MSG "/thing/topo/delete"
#define KK_THING_TOPO_DELETE_MSG "/thing/topo/delete"
#define KK_THING_TOPO_CHANGE_MSG "/thing/topo/change"
//const char DM_URI_SYS_PREFIX[] DM_READ_ONLY = "/sys/%s/%s/";
//const char DM_URI_SYS_PREFIX[] DM_READ_ONLY = "/sys/%s/%s/";
...
...
midware/midware/dm/kk_linkkit.c
View file @
490a67cf
...
@@ -234,6 +234,31 @@ int kk_get_cloud_recv_status(void){
...
@@ -234,6 +234,31 @@ int kk_get_cloud_recv_status(void){
return
s_CloudStatusRecv
;
return
s_CloudStatusRecv
;
}
}
static
int
_iotx_linkkit_delete_handle
(
cJSON
*
payload
)
{
if
(
payload
==
NULL
){
return
FAIL_RETURN
;
}
cJSON
*
paramStr
=
cJSON_GetObjectItem
(
payload
,
MSG_PARAMS_STR
);
cJSON
*
state
=
cJSON_GetObjectItem
(
paramStr
,
MSG_TOPO_CHANGE_TYPE_STR
);
if
(
state
!=
NULL
&&
state
->
valueint
==
1
){
cJSON
*
deviceArray
=
cJSON_GetObjectItem
(
paramStr
,
MSG_TOPO_CHANGE_DEVICES_STR
);
if
(
deviceArray
==
NULL
){
return
FAIL_RETURN
;
}
cJSON
*
item
=
deviceArray
->
child
;
while
(
item
!=
NULL
){
char
*
deviceCode
=
cJSON_GetObjectItem
(
item
,
MSG_DEVICE_CODE_STR
)
->
valuestring
;
dm_mgr_subdev_delete
(
deviceCode
);
item
=
item
->
next
;
}
}
return
SUCCESS_RETURN
;
}
static
void
_iotx_linkkit_event_callback
(
iotx_dm_event_types_t
type
,
char
*
data
)
static
void
_iotx_linkkit_event_callback
(
iotx_dm_event_types_t
type
,
char
*
data
)
{
{
INFO_PRINT
(
"_iotx_linkkit_event_callback ================== [%s]
\n
"
,
data
);
INFO_PRINT
(
"_iotx_linkkit_event_callback ================== [%s]
\n
"
,
data
);
...
@@ -331,7 +356,12 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
...
@@ -331,7 +356,12 @@ static void _iotx_linkkit_event_callback(iotx_dm_event_types_t type, char *data)
INFO_PRINT
(
"ota upgrade...
\n
"
);
INFO_PRINT
(
"ota upgrade...
\n
"
);
kk_dm_ota_send
(
data
,
strlen
(
data
)
+
1
);
kk_dm_ota_send
(
data
,
strlen
(
data
)
+
1
);
}
else
{
}
else
if
(
strstr
(
typeJson
->
valuestring
,
KK_THING_TOPO_CHANGE_MSG
)){
INFO_PRINT
(
" topo change
\n
"
);
_iotx_linkkit_delete_handle
(
payload
);
}
else
{
INFO_PRINT
(
"Error 222222222222222
\n
"
);
INFO_PRINT
(
"Error 222222222222222
\n
"
);
}
}
...
...
midware/midware/midware.c
View file @
490a67cf
...
@@ -618,14 +618,6 @@ void *ccu_property_monitor(void *args)
...
@@ -618,14 +618,6 @@ void *ccu_property_monitor(void *args)
}
}
static
int
kk_set_product_info
(
void
)
{
HAL_SetProduct_Type
(
PRODUCT_TPYE
);
HAL_SetProduct_Code
(
PRODUCT_CODE
);
return
0
;
}
int
main
(
const
int
argc
,
const
char
**
argv
)
int
main
(
const
int
argc
,
const
char
**
argv
)
{
{
...
@@ -638,7 +630,6 @@ int main(const int argc, const char **argv)
...
@@ -638,7 +630,6 @@ int main(const int argc, const char **argv)
kk_zlog_init
(
"midware"
);
kk_zlog_init
(
"midware"
);
memset
(
mid_ctx
,
0
,
sizeof
(
mid_ctx_t
));
memset
(
mid_ctx
,
0
,
sizeof
(
mid_ctx_t
));
kk_set_product_info
();
kk_tsl_api_init
();
kk_tsl_api_init
();
kk_ipc_init
(
IPC_MID2APP
,
mid_cb
,
NULL
,
NULL
);
kk_ipc_init
(
IPC_MID2APP
,
mid_cb
,
NULL
,
NULL
);
kk_ipc_init
(
IPC_MID2PLAT
,
mid2p_cb
,
NULL
,
"*"
);
kk_ipc_init
(
IPC_MID2PLAT
,
mid2p_cb
,
NULL
,
"*"
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
View file @
490a67cf
...
@@ -4,6 +4,39 @@
...
@@ -4,6 +4,39 @@
//emberAfAppPrintln("[tsl report:Gloabl] OnOff~~~~~~~~~");
//emberAfAppPrintln("[tsl report:Gloabl] OnOff~~~~~~~~~");
//cJSON *rpc_Control(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac)
//cJSON *rpc_Control(jrpc_context * ctx, cJSON *params, cJSON *id,cJSON *mac)
cJSON
*
kk_topo_change_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
)
{
int
res
=
0
;
cJSON
*
changeTypeStr
=
NULL
;
UTIL_LOG_INFO
(
"
\n
********************kk_topo_change_operation********************
\n
"
);
if
(
params
==
NULL
){
set_json_error_type
(
ctx
,
JRPC_INVALID_PARAMS
,
MSG_INVALID_PARAMS
);
goto
error_return
;
}
else
{
changeTypeStr
=
rpc_cJSON_GetObjectItem
(
params
,
MSG_TOPO_CHANGE_TYPE_STR
);
if
(
changeTypeStr
!=
NULL
&&
changeTypeStr
->
valueint
==
1
){
cJSON
*
deviceArray
=
rpc_cJSON_GetObjectItem
(
params
,
MSG_TOPO_CHANGE_DEVICES_STR
);
if
(
deviceArray
==
NULL
){
goto
error_return
;
}
cJSON
*
item
=
deviceArray
->
child
;
while
(
item
!=
NULL
){
char
*
deviceCode
=
rpc_cJSON_GetObjectItem
(
item
,
MSG_DEVICE_CODE_STR
)
->
valuestring
;
item
=
item
->
next
;
}
}
}
return
rpc_cJSON_CreateNumber
(
res
);
error_return:
return
rpc_cJSON_CreateNull
();
}
cJSON
*
kk_tsl_property_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
)
cJSON
*
kk_tsl_property_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
)
{
{
sub_dev_node_t
*
node
=
NULL
;
sub_dev_node_t
*
node
=
NULL
;
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
View file @
490a67cf
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
#define __KK_TSL_PROPERTY_SET_H
#define __KK_TSL_PROPERTY_SET_H
#include "kk_test.h"
#include "kk_test.h"
cJSON
*
kk_topo_change_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
);
cJSON
*
kk_tsl_property_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
);
cJSON
*
kk_tsl_property_operation
(
jrpc_context
*
ctx
,
cJSON
*
params
,
cJSON
*
id
,
cJSON
*
mac
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
View file @
490a67cf
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#define KK_REPORT_DEVICE_JOINED_TYPE "/thing/topo/add"
#define KK_REPORT_DEVICE_JOINED_TYPE "/thing/topo/add"
#define KK_REPORT_DEVICE_LEFT_TYPE "/thing/topo/delete"
#define KK_REPORT_DEVICE_LEFT_TYPE "/thing/topo/delete"
#define KK_REPORT_ATTRIBUTE_TYPE "/thing/event/property/post"
#define KK_REPORT_ATTRIBUTE_TYPE "/thing/event/property/post"
#define KK_DEVICE_TOPO_CHANGE_TYPE "/thing/topo/change"
#define KK_IPC_VERSION "1.0"
#define KK_IPC_VERSION "1.0"
#define KK_REPORT_DEVICE_JOINED_METHOD "thing.topo.add"
#define KK_REPORT_DEVICE_JOINED_METHOD "thing.topo.add"
...
@@ -26,6 +27,8 @@
...
@@ -26,6 +27,8 @@
#define TEST_PRODUCT_CODE "24"
#define TEST_PRODUCT_CODE "24"
#define GW2CCU_PROTOCOL "tcp"
#define GW2CCU_PROTOCOL "tcp"
#define MSG_TOPO_CHANGE_TYPE_STR "changeType"
#define MSG_TOPO_CHANGE_DEVICES_STR "devices"
...
@@ -44,7 +47,8 @@ int kk_sendData2CCU(char* data, int len);
...
@@ -44,7 +47,8 @@ int kk_sendData2CCU(char* data, int len);
#define RPC_KK_TEST_FUNCTION_TABLE \
#define RPC_KK_TEST_FUNCTION_TABLE \
{(
rpc_function
*
)
kk_tsl_property_operation
,
"/thing/service/property/set"
},
\
{(
rpc_function
*
)
kk_tsl_property_operation
,
"/thing/service/property/set"
},
\
{(rpc_function*)kk_tsl_property_operation,KK_READ_ATTRIBUTE_METHOD}
{(
rpc_function
*
)
kk_tsl_property_operation
,
KK_READ_ATTRIBUTE_METHOD
},
\
{(
rpc_function
*
)
kk_topo_change_operation
,
KK_DEVICE_TOPO_CHANGE_TYPE
}
...
...
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
View file @
490a67cf
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment