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
f87d8ac5
Commit
f87d8ac5
authored
Sep 16, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2020/09/16
parent
bab0bf4f
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
860 additions
and
843 deletions
+860
-843
platform/zigbee/app/builder/Z3GatewayHost/Makefile
platform/zigbee/app/builder/Z3GatewayHost/Makefile
+4
-4
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
...m/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
+564
-323
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.h
...m/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.h
+7
-14
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.c
...bee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.c
+156
-94
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.h
...bee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.h
+12
-4
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
...zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
+46
-341
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
...zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
+5
-10
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.c
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.c
+21
-0
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.h
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.h
+35
-0
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
+1
-7
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
+5
-11
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
...p/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
+2
-1
platform/zigbee/app/builder/Z3GatewayHost/yjq_ezsp.c
platform/zigbee/app/builder/Z3GatewayHost/yjq_ezsp.c
+1
-33
platform/zigbee/protocol/zigbee/app/framework/plugin/device-table/device-table.c
...l/zigbee/app/framework/plugin/device-table/device-table.c
+1
-1
No files found.
platform/zigbee/app/builder/Z3GatewayHost/Makefile
View file @
f87d8ac5
...
@@ -87,7 +87,6 @@ INCLUDES= \
...
@@ -87,7 +87,6 @@ INCLUDES= \
-I
./../../../platform/base/hal/micro/unix/host
\
-I
./../../../platform/base/hal/micro/unix/host
\
-I
../../../platform/base/hal/micro/unix/host/board
\
-I
../../../platform/base/hal/micro/unix/host/board
\
-I
./rpc_api/inc
\
-I
./rpc_api/inc
\
-I
../../../../../common/curl/include
\
-I
./ZB
-I
./ZB
\
\
...
@@ -285,7 +284,8 @@ APPLICATION_FILES= \
...
@@ -285,7 +284,8 @@ APPLICATION_FILES= \
./ZB/kk_zigbee_api.c
\
./ZB/kk_zigbee_api.c
\
./ZB/kk_tsl_property_report.c
\
./ZB/kk_tsl_property_report.c
\
./ZB/kk_tsl_property_set.c
\
./ZB/kk_tsl_property_set.c
\
./ZB/kk_palt_ota.c
\
./ZB/kk_device_table_db.c
\
./ZB/kk_msg_report.c
\
./kk_test.c
\
./kk_test.c
\
./kk_sub_tsl.c
\
./kk_sub_tsl.c
\
./kk_tsl_zigbee_map.c
\
./kk_tsl_zigbee_map.c
\
...
@@ -375,10 +375,10 @@ $(TARGET_FILE): $(APPLICATION_OBJECTS) $(LIBRARIES)
...
@@ -375,10 +375,10 @@ $(TARGET_FILE): $(APPLICATION_OBJECTS) $(LIBRARIES)
else
else
$(TARGET_FILE)
:
$(APPLICATION_OBJECTS) $(LIBRARIES)
$(TARGET_FILE)
:
$(APPLICATION_OBJECTS) $(LIBRARIES)
ifeq
($(CONFIG_VENDOR),ubuntu)
ifeq
($(CONFIG_VENDOR),ubuntu)
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com_ubuntu
-lnanomsg_ubuntu
-lanl
-pthread
-lev_ubuntu
-l
kk_hal_ubuntu
-L
../../../../../common/curl
-lcurl_ubuntu
-o
$(TARGET_FILE)
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com_ubuntu
-lnanomsg_ubuntu
-lanl
-pthread
-lev_ubuntu
-l
sqlite3
-lkk_hal_ubuntu
-o
$(TARGET_FILE)
@
echo
-e
'\n$@ build success'
@
echo
-e
'\n$@ build success'
else
else
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com
-lnanomsg
-lanl
-pthread
-lev
-lkk_hal
-
L
../../../../../common/curl
-lcurl
-o
$(TARGET_FILE)
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com
-lnanomsg
-lanl
-pthread
-lev
-lkk_hal
-
lsqlite3
-o
$(TARGET_FILE)
@
echo
-e
'\n$@ build success'
@
echo
-e
'\n$@ build success'
endif
endif
endif
endif
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
View file @
f87d8ac5
This diff is collapsed.
Click to expand it.
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.h
View file @
f87d8ac5
...
@@ -4,33 +4,22 @@
...
@@ -4,33 +4,22 @@
#include "kk_sub_tsl.h"
#include "kk_sub_tsl.h"
#include "kk_tsl_zigbee_map.h"
#include "kk_tsl_zigbee_map.h"
#include "kk_product_code.h"
#include "kk_product_code.h"
#include "kk_zb_com.h"
/****************** ******************************************************************
/****************** ******************************************************************
* File Name : kk_device_manager.h
* File Name : kk_device_manager.h
* Author : yjq
* Author : yjq
* data : 2020/09/01
* data : 2020/09/01
*************************************************************************************/
*************************************************************************************/
typedef
struct
kk_device_table_s
{
EmberEUI64
mac
;
EmberNodeId
nodeId
;
uint16_t
deviceId
;
uint16_t
identifyCnt
;
char
productCode
[
33
];
struct
kk_device_table_s
*
next
;
}
kk_device_table_s
;
#define KK_MAX_SUPPORT_ENDPOINT_NUMBER 32
#define KK_MAX_SUPPORT_ENDPOINT_NUMBER 32
#define KK_MAX_READ_MODLE_ID_COUNT 30
#define KK_MAX_READ_MODLE_ID_COUNT 30
#define KK_NETWORK_PARAMETER_TX_POWER 10
#define KK_NETWORK_PARAMETER_TX_POWER 10
#define KK_NETWORK_PARAMETER_CHANNEL 0x0B
#define KK_NETWORK_PARAMETER_CHANNEL 0x0B
void
kk_print_device_table
(
void
);
kk_device_table_s
*
kk_device_find_by_mac
(
EmberEUI64
mac
);
void
kk_device_table_add
(
EmberEUI64
mac
,
EmberNodeId
nodeId
,
const
char
*
productCode
,
uint16_t
deviceId
);
void
kk_device_table_delete
(
EmberEUI64
mac
);
void
kk_add_device_to_table
(
EmberEUI64
mac
,
EmberNodeId
nodeId
,
uint16_t
deviceId
);
void
kk_productCode_tick
();
void
kk_productCode_tick
();
void
kk_read_attr_response
(
EmberNodeId
nodeId
,
void
kk_read_attr_response
(
EmberNodeId
nodeId
,
...
@@ -47,8 +36,12 @@ int kk_permit_join(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* da
...
@@ -47,8 +36,12 @@ int kk_permit_join(jrpc_context * ctx,EmberNodeId node,unsigned char ep,void* da
void
kk_load_dev_map_table
(
void
);
void
kk_add_dev_map_table_to_list
(
cJSON
*
root
);
char
*
kk_match_productCode
(
const
char
*
modelId
);
bool
kk_device_config_map_add
(
const
char
*
productCode
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.c
View file @
f87d8ac5
This diff is collapsed.
Click to expand it.
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_report.h
View file @
f87d8ac5
#ifndef __KK_TSL_PROPERTY_REPORT_H
#ifndef __KK_TSL_PROPERTY_REPORT_H
#define __KK_TSL_PROPERTY_REPORT_H
#define __KK_TSL_PROPERTY_REPORT_H
#include "kk_test.h"
#include "kk_zb_com.h"
#include "kk_msg_report.h"
typedef
enum
{
typedef
enum
{
...
@@ -23,15 +24,22 @@ void kk_tsl_report_attribute(EmberEUI64 eui64,
...
@@ -23,15 +24,22 @@ void kk_tsl_report_attribute(EmberEUI64 eui64,
int
kk_tsl_report_global_onoff
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_global_onoff
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_windowCovering_mode
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_windowCovering_mode
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_windowCovering_position
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_windowCovering_position
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_global_Brightness
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_global_RGB
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_ias_zoneStatus
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_metering_summationDelivered
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_global_Level
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_temperature_measure
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_illuminance_measure
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_local_temperature
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_OccupiedHeatingSetpoint
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_Formaldehyde
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_PM2_5
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
int
kk_tsl_report_CO2
(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
View file @
f87d8ac5
This diff is collapsed.
Click to expand it.
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.h
View file @
f87d8ac5
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
#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
);
...
@@ -13,14 +11,11 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
...
@@ -13,14 +11,11 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
int
kk_tsl_set_windowCovering_mode
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_windowCovering_mode
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_windowCovering_position
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_windowCovering_position
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_OnOff
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_ModeType
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
#define RPC_KK_TEST_FUNCTION_TABLE \
int
kk_tsl_set_colorlight_Mode
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
{(
rpc_function
*
)
kk_tsl_property_operation
,
"/thing/service/property/set"
}
\
int
kk_tsl_set_colorlight_Brightness
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_WhiteBrightness
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_RGB_red
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_RGB_green
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
int
kk_tsl_set_colorlight_RGB_blue
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.c
View file @
f87d8ac5
#include "kk_zigbee_api.h"
#include "kk_zigbee_api.h"
kk_rpc_set_api_s
kk_rpc_set_api
[]
=
KK_RPC_SET_FUNCTION_TABLE
;
kk_rpc_report_api_s
kk_rpc_report_api
[]
=
KK_RPC_REPORT_FUNCTION_TABLE
;
void
kk_rpc_test
(
void
)
{
emberAfAppPrintln
(
"!!!!!!!!!!!kk_rpc_test!!!!!!!!!!!!!!"
);
}
uint8_t
kk_get_rpc_set_api_size
(
void
)
{
return
sizeof
(
kk_rpc_set_api
)
/
sizeof
(
kk_rpc_set_api_s
);
}
uint8_t
kk_get_rpc_report_api_size
(
void
)
{
return
sizeof
(
kk_rpc_report_api
)
/
sizeof
(
kk_rpc_report_api_s
);
}
// network leave
// network leave
EmberStatus
kk_network_leave
(
void
)
EmberStatus
kk_network_leave
(
void
)
{
{
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_zigbee_api.h
View file @
f87d8ac5
...
@@ -2,6 +2,41 @@
...
@@ -2,6 +2,41 @@
#define __KK_ZIGBEE_API_H
#define __KK_ZIGBEE_API_H
#include "kk_test.h"
#include "kk_test.h"
typedef
int
(
*
kk_rpc_set
)(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
);
typedef
int
(
*
kk_rpc_report
)(
EmberEUI64
eui64
,
uint8_t
EP
,
EmberAfClusterId
clusterId
,
EmberAfAttributeId
attributeId
,
uint8_t
dataType
,
uint8_t
len
,
uint8_t
*
data
);
typedef
struct
{
const
char
*
name
;
kk_rpc_set
set
;
}
kk_rpc_set_api_s
;
typedef
struct
{
const
char
*
name
;
kk_rpc_report
report
;
}
kk_rpc_report_api_s
;
void
kk_rpc_test
(
void
);
#define KK_RPC_SET_FUNCTION_TABLE {\
{
"zclOnOff_On"
,
zclOnOff_On
},
\
{
"zclOnOff_Off"
,
zclOnOff_Off
}
\
}
#define KK_RPC_REPORT_FUNCTION_TABLE {\
{
"kk_tsl_report_global_onoff"
,
kk_tsl_report_global_onoff
},
\
{
"kk_tsl_report_global_onoff"
,
kk_tsl_report_global_onoff
}
\
}
kk_rpc_set_api_s
kk_rpc_set_api
[];
kk_rpc_report_api_s
kk_rpc_report_api
[];
uint8_t
kk_get_rpc_set_api_size
(
void
);
uint8_t
kk_get_rpc_report_api_size
(
void
);
EmberStatus
kk_network_leave
(
void
);
EmberStatus
kk_network_leave
(
void
);
EmberStatus
kk_network_form
(
bool
centralized
,
EmberPanId
panId
,
int8_t
radioTxPower
,
uint8_t
channel
);
EmberStatus
kk_network_form
(
bool
centralized
,
EmberPanId
panId
,
int8_t
radioTxPower
,
uint8_t
channel
);
void
kk_print_network_info
(
void
);
void
kk_print_network_info
(
void
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
View file @
f87d8ac5
...
@@ -95,13 +95,7 @@ void kk_rpc_reportLeftDevices(EmberEUI64 mac)
...
@@ -95,13 +95,7 @@ void kk_rpc_reportLeftDevices(EmberEUI64 mac)
}
}
int
kk_sendData2CCU
(
char
*
data
,
int
len
){
if
(
strcmp
(
GW2CCU_PROTOCOL
,
"tcp"
)
==
0
){
kk_tcp_client_send
(
data
,
len
);
}
else
{
kk_ipc_send
(
IPC_PLAT2MID
,
data
,
len
);
}
}
void
kk_rpc_reportDevices
(
EmberEUI64
mac
,
const
char
*
productCode
)
void
kk_rpc_reportDevices
(
EmberEUI64
mac
,
const
char
*
productCode
)
{
{
...
...
platform/zigbee/app/builder/Z3GatewayHost/kk_test.h
View file @
f87d8ac5
...
@@ -10,11 +10,13 @@
...
@@ -10,11 +10,13 @@
#include "kk_zigbee_api.h"
#include "kk_zigbee_api.h"
#include "kk_tsl_property_report.h"
#include "kk_tsl_property_report.h"
#include "kk_tsl_property_set.h"
#include "kk_tsl_property_set.h"
#include "kk_msg_report.h"
#include "kk_device_table_db.h"
#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"
...
@@ -27,8 +29,6 @@
...
@@ -27,8 +29,6 @@
#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"
...
@@ -47,8 +47,7 @@ int kk_sendData2CCU(char* data, int len);
...
@@ -47,8 +47,7 @@ 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
}
...
@@ -56,11 +55,6 @@ int kk_sendData2CCU(char* data, int len);
...
@@ -56,11 +55,6 @@ int kk_sendData2CCU(char* data, int len);
enum
{
WC_normal_dir
=
0
,
//"正转"
WC_reversed_dir
=
1
,
//"反转"
WC_calibration_mode
=
2
,
//"校验"
}
windowCoveringMode
;
...
...
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
View file @
f87d8ac5
...
@@ -224,6 +224,7 @@ static int eval_request(struct jrpc_server *server, cJSON *root) {
...
@@ -224,6 +224,7 @@ static int eval_request(struct jrpc_server *server, cJSON *root) {
#define KK_THING_OTA_DEVICE_UPGRADE "/ota/device/upgrade"
#define KK_THING_OTA_DEVICE_UPGRADE "/ota/device/upgrade"
void
_cb
(
void
*
data
,
int
len
,
char
*
chlmark
){
void
_cb
(
void
*
data
,
int
len
,
char
*
chlmark
){
if
(
data
!=
NULL
){
if
(
data
!=
NULL
){
printf
(
"plat_cb: %s RECEIVED
\r\n
"
,
data
);
printf
(
"plat_cb: %s RECEIVED
\r\n
"
,
data
);
...
@@ -237,7 +238,7 @@ void _cb(void* data, int len, char* chlmark){
...
@@ -237,7 +238,7 @@ void _cb(void* data, int len, char* chlmark){
if
(
info
!=
NULL
&&
strstr
(
rpc_cJSON_GetObjectItem
(
info
,
"msgType"
)
->
valuestring
,
KK_THING_OTA_DEVICE_UPGRADE
)
!=
NULL
){
if
(
info
!=
NULL
&&
strstr
(
rpc_cJSON_GetObjectItem
(
info
,
"msgType"
)
->
valuestring
,
KK_THING_OTA_DEVICE_UPGRADE
)
!=
NULL
){
kk_ota_process
(
root
);
//
kk_ota_process(root);
}
else
{
}
else
{
eval_request
(
&
my_server
,
root
);
eval_request
(
&
my_server
,
root
);
}
}
...
...
platform/zigbee/app/builder/Z3GatewayHost/yjq_ezsp.c
View file @
f87d8ac5
...
@@ -86,10 +86,7 @@ void kk_read_ncp_configuration_without_memory_allocation(void)
...
@@ -86,10 +86,7 @@ void kk_read_ncp_configuration_without_memory_allocation(void)
}
}
extern
void
kk_print_device_table
(
void
);
//extern void kk_device_table_add(EmberEUI64 mac,uint8_t epNum,uint8_t* epVal,char *productCode);
extern
void
kk_device_table_delete
(
EmberEUI64
mac
);
extern
bool
kk_device_find_by_mac11111
(
EmberEUI64
mac
);
extern
void
kk_print_network_info
(
void
);
extern
void
kk_print_network_info
(
void
);
void
kk_message_process
(
char
*
messageString
)
void
kk_message_process
(
char
*
messageString
)
...
@@ -102,35 +99,6 @@ void kk_message_process(char *messageString)
...
@@ -102,35 +99,6 @@ void kk_message_process(char *messageString)
emberAfAppPrint
(
"set txpower = 10
\r\n
"
);
emberAfAppPrint
(
"set txpower = 10
\r\n
"
);
setTxPower
(
10
);
setTxPower
(
10
);
}
}
if
(
MEMCOMPARE
(
messageString
,
"AT+123
\r\n
"
,
len
)
==
0
){
kk_print_device_table
();
}
if
(
MEMCOMPARE
(
messageString
,
"AT+KKTEST1
\r\n
"
,
len
)
==
0
){
uint8_t
ep
[
2
]
=
{
1
,
242
};
static
uint8_t
aaa
=
0x00
;
EmberEUI64
mac
=
{
0x00
,
0x11
,
0x22
,
0x33
,
0x44
,
0x55
,
0x66
,
0x77
};
mac
[
0
]
=++
aaa
;
//kk_device_table_add(mac,2,ep,"24");
}
if
(
MEMCOMPARE
(
messageString
,
"AT+456
\r\n
"
,
len
)
==
0
){
uint8_t
ep
[
2
]
=
{
1
,
242
};
static
uint8_t
aaa
=
0x01
;
EmberEUI64
mac
=
{
0x00
,
0x11
,
0x22
,
0x33
,
0x44
,
0x55
,
0x66
,
0x77
};
mac
[
0
]
=
aaa
++%
5
;
kk_device_table_delete
(
mac
);
}
if
(
MEMCOMPARE
(
messageString
,
"AT+678
\r\n
"
,
len
)
==
0
){
uint8_t
ep
[
2
]
=
{
1
,
242
};
EmberEUI64
mac
=
{
0x01
,
0x11
,
0x22
,
0x33
,
0x44
,
0x55
,
0x66
,
0x77
};
if
(
kk_device_find_by_mac11111
(
mac
)
==
true
){
emberAfAppPrint
(
" Exist!!!
\r\n
"
);
}
else
{
emberAfAppPrint
(
" not Exist!!!
\r\n
"
);
}
}
if
(
MEMCOMPARE
(
messageString
,
"AT+GETINFO
\r\n
"
,
len
)
==
0
){
if
(
MEMCOMPARE
(
messageString
,
"AT+GETINFO
\r\n
"
,
len
)
==
0
){
kk_print_network_info
();
kk_print_network_info
();
...
...
platform/zigbee/protocol/zigbee/app/framework/plugin/device-table/device-table.c
View file @
f87d8ac5
...
@@ -407,7 +407,7 @@ void emberAfPluginDeviceTableStackStatusCallback(EmberStatus status)
...
@@ -407,7 +407,7 @@ void emberAfPluginDeviceTableStackStatusCallback(EmberStatus status)
emberAfCorePrintln
(
"DeviceTable: Clear State"
);
emberAfCorePrintln
(
"DeviceTable: Clear State"
);
emberAfDeviceTableClear
();
emberAfDeviceTableClear
();
kk_device_table_clear
();
//
kk_device_table_clear();
}
}
}
}
...
...
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