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
7fc8b819
Commit
7fc8b819
authored
Sep 29, 2020
by
陈伟灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hzl' into 'master'
Hzl See merge request chenweican/k-sdk!30
parents
740f213d
bf82a042
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
28 deletions
+37
-28
app.sh
app.sh
+19
-10
midware/midware/dm/kk_property_db.c
midware/midware/dm/kk_property_db.c
+1
-1
midware/midware/dm/kk_sub_db.c
midware/midware/dm/kk_sub_db.c
+1
-1
midware/tsl/tsl_handle/kk_tsl_load.c
midware/tsl/tsl_handle/kk_tsl_load.c
+3
-3
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
...m/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
+2
-2
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_table_db.h
.../zigbee/app/builder/Z3GatewayHost/ZB/kk_device_table_db.h
+1
-1
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
...zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
+9
-9
tools/build-rules/_rules-top.mk
tools/build-rules/_rules-top.mk
+1
-1
No files found.
app.sh
View file @
7fc8b819
...
@@ -3,32 +3,41 @@ nanomsg_File="/home/kk/lib/libnanomsg.so.5"
...
@@ -3,32 +3,41 @@ nanomsg_File="/home/kk/lib/libnanomsg.so.5"
ev_File
=
"/home/kk/lib/libev.so.4"
ev_File
=
"/home/kk/lib/libev.so.4"
sqlite_File
=
"/home/kk/lib/libsqlite3.so.0"
sqlite_File
=
"/home/kk/lib/libsqlite3.so.0"
run_Dir
=
"/"
run_Dir
=
"/usr/kk"
dev_cfg_Dir
=
"
${
run_Dir
}
/ZB/dev_config_table"
tsl_Dir
=
"
${
run_Dir
}
/tsl"
dev_cfg_Dir
=
"
${
run_Dir
}
/dev_config_table"
cd
/sbin/
cd
/sbin/
insmod /sbin/ssd1306-revision.ko
insmod /sbin/ssd1306-revision.ko
/sbin/oled
>
/dev/null 2>&1 &
/sbin/oled
>
/dev/null 2>&1 &
sleep
1
sleep
1
if
[
!
-d
"
$run_Dir
"
]
;
then
mkdir
${
run_Dir
}
fi
if
[
!
-d
"
$tsl_Dir
"
]
;
then
cp
-rf
/home/kk/tsl
${
run_Dir
}
/
fi
if
[
!
-d
"
$dev_cfg_Dir
"
]
;
then
if
[
!
-d
"
$dev_cfg_Dir
"
]
;
then
mkdir
/ZB
cp
-rf
/home/kk/dev_config_table
${
run_Dir
}
cp
-rf
/home/kk/dev_config_table /ZB
sleep
1
cp
-rf
/home/kk/dev_map_table.json /ZB
fi
fi
sleep
1
export
LD_LIBRARY_PATH
=
/home/kk/lib
export
LD_LIBRARY_PATH
=
/home/kk/lib
cd
/home/kk/lib
cd
/home/kk/lib
if
[
!
-f
"
$nanomsg_File
"
]
;
then
if
[
!
-f
"
$nanomsg_File
"
]
;
then
ln
-s
libnanomsg.so /lib/libnanomsg.so.5
ln
-s
f
/home/kk/lib/
libnanomsg.so /lib/libnanomsg.so.5
fi
fi
if
[
!
-f
"
$ev_File
"
]
;
then
if
[
!
-f
"
$ev_File
"
]
;
then
ln
-s
libev.so /lib/libev.so.4
ln
-s
f
/home/kk/lib/
libev.so /lib/libev.so.4
fi
fi
if
[
!
-f
"
$sqlite_File
"
]
;
then
if
[
!
-f
"
$sqlite_File
"
]
;
then
ln
-s
libsqlite3.so /lib/libsqlite3.so.0
ln
-s
f
/home/kk/lib/
libsqlite3.so /lib/libsqlite3.so.0
fi
fi
...
@@ -41,9 +50,9 @@ export LD_LIBRARY_PATH=/home/kk/lib
...
@@ -41,9 +50,9 @@ export LD_LIBRARY_PATH=/home/kk/lib
cd
${
run_Dir
}
cd
${
run_Dir
}
/home/kk/kk_midware
>
/dev/null 2>&1 &
/home/kk/kk_midware
>
/dev/null 2>&1 &
sleep
1
/home/kk/kcloud
>
/dev/null 2>&1 &
/home/kk/kcloud
>
/dev/null 2>&1 &
/home/kk/Z3GatewayHost
-f
x
-p
/dev/ttyS0
>
/dev/null 2>&1 &
/home/kk/Z3GatewayHost
-f
x
-p
/dev/ttyS0
>
/dev/null 2>&1 &
sleep
5
/home/kk/process_check.sh
>
/dev/null 2>&1 &
/home/kk/process_check.sh
>
/dev/null 2>&1 &
...
...
midware/midware/dm/kk_property_db.c
View file @
7fc8b819
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include "kk_property_db.h"
#include "kk_property_db.h"
#define KK_PROPERTIES_DB_FILE "kk_properties.db"
#define KK_PROPERTIES_DB_FILE "
/usr/kk/
kk_properties.db"
typedef
struct
{
typedef
struct
{
void
*
mutex
;
void
*
mutex
;
...
...
midware/midware/dm/kk_sub_db.c
View file @
7fc8b819
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include "sqlite3.h"
#include "sqlite3.h"
#include "kk_log.h"
#include "kk_log.h"
#define KK_SUB_DB_FILE "subDevice.db"
#define KK_SUB_DB_FILE "
/usr/kk/
subDevice.db"
typedef
struct
{
typedef
struct
{
void
*
mutex
;
void
*
mutex
;
...
...
midware/tsl/tsl_handle/kk_tsl_load.c
View file @
7fc8b819
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
#include "kk_tsl_common.h"
#include "kk_tsl_common.h"
#include "kk_dm_mng.h"
#include "kk_dm_mng.h"
#include "kk_log.h"
#include "kk_log.h"
#define TSL_SUBDEVICE_PATH_FILE "/
home
/kk/tsl/product_%s.json"
#define TSL_SUBDEVICE_PATH_FILE "/
usr
/kk/tsl/product_%s.json"
#define TSL_GATEWAY_PATH_FILE "/
home
/kk/tsl/gateway-%s.json"
#define TSL_GATEWAY_PATH_FILE "/
usr
/kk/tsl/gateway-%s.json"
#define TSL_CCU_PATH_FILE "/
home
/kk/tsl/ccu-%s.json"
#define TSL_CCU_PATH_FILE "/
usr
/kk/tsl/ccu-%s.json"
char
*
kk_load_json
(
const
char
*
productCode
,
int
type
)
char
*
kk_load_json
(
const
char
*
productCode
,
int
type
)
{
{
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
View file @
7fc8b819
...
@@ -254,7 +254,7 @@ error_return:
...
@@ -254,7 +254,7 @@ error_return:
#define KK_DEVICE_MAP_TABLE_FILE "
./ZB
/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_FILE "
/usr/kk/dev_config_table
/dev_map_table.json"
#define KK_DEVICE_MAP_TABLE_ARRAY_IDENTIFY "mapTable"
#define KK_DEVICE_MAP_TABLE_ARRAY_IDENTIFY "mapTable"
#define KK_DEVICE_CONFIG_MAP_TABLE_ARRAY_IDENTIFY "config"
#define KK_DEVICE_CONFIG_MAP_TABLE_ARRAY_IDENTIFY "config"
...
@@ -422,7 +422,7 @@ char *kk_match_productCode(const char* modelId)
...
@@ -422,7 +422,7 @@ char *kk_match_productCode(const char* modelId)
static
kk_dev_config_map
*
dev_config_map
=
NULL
;
static
kk_dev_config_map
*
dev_config_map
=
NULL
;
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "
./ZB
/dev_config_table/device_%s.json"
#define KK_DEVICE_CONFIG_MAP_TABLE_FILE_PREFIX "
/usr/kk
/dev_config_table/device_%s.json"
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_table_db.h
View file @
7fc8b819
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#define KK_DEVICE_DB_TABLE "kk_device"
#define KK_DEVICE_DB_TABLE "kk_device"
#define KK_DEVICE_DB_FILE "kk_device.db"
#define KK_DEVICE_DB_FILE "
/usr/kk/
kk_device.db"
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_tsl_property_set.c
View file @
7fc8b819
...
@@ -172,7 +172,7 @@ int kk_tsl_set_gloabl_OnOff(jrpc_context * ctx,EmberNodeId node,unsigned char ep
...
@@ -172,7 +172,7 @@ int kk_tsl_set_gloabl_OnOff(jrpc_context * ctx,EmberNodeId node,unsigned char ep
uint8_t
Onoff
=
0
;
uint8_t
Onoff
=
0
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
Onoff
=
*
(
uint8_
t
*
)
data
;
Onoff
=
*
(
in
t
*
)
data
;
emberAfAppPrintln
(
"[tsl set:OnOff],Onoff=0x%02x"
,
Onoff
);
emberAfAppPrintln
(
"[tsl set:OnOff],Onoff=0x%02x"
,
Onoff
);
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
...
@@ -206,7 +206,7 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
...
@@ -206,7 +206,7 @@ int kk_tsl_set_windowCovering_OperationMode(jrpc_context * ctx,EmberNodeId node,
uint8_t
Operation
=
0
;
uint8_t
Operation
=
0
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
Operation
=
*
(
uint8_
t
*
)
data
;
Operation
=
*
(
in
t
*
)
data
;
emberAfAppPrintln
(
"[tsl set:Window Covering Operation Mode],mode=0x%02x"
,
Operation
);
emberAfAppPrintln
(
"[tsl set:Window Covering Operation Mode],mode=0x%02x"
,
Operation
);
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
...
@@ -242,7 +242,7 @@ int kk_tsl_set_windowCovering_mode(jrpc_context * ctx,EmberNodeId node,unsigned
...
@@ -242,7 +242,7 @@ int kk_tsl_set_windowCovering_mode(jrpc_context * ctx,EmberNodeId node,unsigned
uint8_t
WCmode
=
0
;
uint8_t
WCmode
=
0
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
mode
=
*
(
uint8_
t
*
)
data
;
mode
=
*
(
in
t
*
)
data
;
emberAfAppPrintln
(
"[tsl set:Window Covering Run Mode],mode=0x%02x"
,
mode
);
emberAfAppPrintln
(
"[tsl set:Window Covering Run Mode],mode=0x%02x"
,
mode
);
if
(
mode
==
WC_calibration_mode
){
if
(
mode
==
WC_calibration_mode
){
...
@@ -288,7 +288,7 @@ int kk_tsl_set_windowCovering_position(jrpc_context * ctx,EmberNodeId node,unsig
...
@@ -288,7 +288,7 @@ int kk_tsl_set_windowCovering_position(jrpc_context * ctx,EmberNodeId node,unsig
uint8_t
position
=
0
;
uint8_t
position
=
0
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
position
=
*
(
uint8_
t
*
)
data
;
position
=
*
(
in
t
*
)
data
;
emberAfAppPrintln
(
"[tsl set:Window Covering Position],position=0x%02x"
,
position
);
emberAfAppPrintln
(
"[tsl set:Window Covering Position],position=0x%02x"
,
position
);
status
=
WindowCover_GotoLiftPercentage
(
node
,
ep
,
position
);
status
=
WindowCover_GotoLiftPercentage
(
node
,
ep
,
position
);
...
@@ -326,7 +326,7 @@ static int kk_zclColorControlMovetohueandsat(EmberNodeId node,unsigned char ep)
...
@@ -326,7 +326,7 @@ static int kk_zclColorControlMovetohueandsat(EmberNodeId node,unsigned char ep)
}
}
int
kk_tsl_set_colorlight_RGB_red
(
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
value
=
*
(
uint8_
t
*
)
data
;
int
value
=
*
(
in
t
*
)
data
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_red],value=0x%02x"
,
value
);
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_red],value=0x%02x"
,
value
);
//s_Red = value;
//s_Red = value;
...
@@ -337,7 +337,7 @@ int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned c
...
@@ -337,7 +337,7 @@ int kk_tsl_set_colorlight_RGB_red(jrpc_context * ctx,EmberNodeId node,unsigned c
}
}
int
kk_tsl_set_colorlight_RGB_green
(
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
value
=
*
(
uint8_
t
*
)
data
;
int
value
=
*
(
in
t
*
)
data
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_green],value=0x%02x"
,
value
);
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_green],value=0x%02x"
,
value
);
//s_Green = value;
//s_Green = value;
...
@@ -348,7 +348,7 @@ int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned
...
@@ -348,7 +348,7 @@ int kk_tsl_set_colorlight_RGB_green(jrpc_context * ctx,EmberNodeId node,unsigned
}
}
int
kk_tsl_set_colorlight_RGB_blue
(
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
)
{
{
int
value
=
*
(
uint8_
t
*
)
data
;
int
value
=
*
(
in
t
*
)
data
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_blue],value=0x%02x"
,
value
);
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_RGB_blue],value=0x%02x"
,
value
);
//s_Blue = value;
//s_Blue = value;
...
@@ -360,7 +360,7 @@ int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned
...
@@ -360,7 +360,7 @@ int kk_tsl_set_colorlight_RGB_blue(jrpc_context * ctx,EmberNodeId node,unsigned
int
kk_tsl_set_colorlight_Brightness
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
)
int
kk_tsl_set_colorlight_Brightness
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
)
{
{
int
value
=
*
(
uint8_
t
*
)
data
;
int
value
=
*
(
in
t
*
)
data
;
EmberStatus
status
=
0
;
EmberStatus
status
=
0
;
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_Brightness],value=0x%02x"
,
value
);
emberAfAppPrintln
(
"[tsl set:kk_tsl_set_colorloght_Brightness],value=0x%02x"
,
value
);
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
if
(
node
==
EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID
){
...
@@ -375,7 +375,7 @@ int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigne
...
@@ -375,7 +375,7 @@ int kk_tsl_set_colorlight_Brightness(jrpc_context * ctx,EmberNodeId node,unsigne
int
kk_tsl_set_colorlight_mode
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
)
int
kk_tsl_set_colorlight_mode
(
jrpc_context
*
ctx
,
EmberNodeId
node
,
unsigned
char
ep
,
void
*
data
)
{
{
int
value
=
*
(
uint8_
t
*
)
data
;
int
value
=
*
(
in
t
*
)
data
;
EmberStatus
status
=
EMBER_ERR_FATAL
;
EmberStatus
status
=
EMBER_ERR_FATAL
;
kk_dev_config_item_extra_data
*
mode
;
kk_dev_config_item_extra_data
*
mode
;
int
ix
=
1
;
int
ix
=
1
;
...
...
tools/build-rules/_rules-top.mk
View file @
7fc8b819
...
@@ -208,7 +208,7 @@ package:
...
@@ -208,7 +208,7 @@ package:
cp
-rf
$(TOP_DIR)/process_check.sh
$(TOP_DIR)/$(releaseDir)/
cp
-rf
$(TOP_DIR)/process_check.sh
$(TOP_DIR)/$(releaseDir)/
cp
-rf
$(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_config_table
$(TOP_DIR)/$(releaseDir)/
cp
-rf
$(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_config_table
$(TOP_DIR)/$(releaseDir)/
cp
-rf
$(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json
$(TOP_DIR)/$(releaseDir)/
cp
-rf
$(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json
$(TOP_DIR)/$(releaseDir)/
dev_config_table/
ifeq
($(CONFIG_VENDOR),ubuntu)
ifeq
($(CONFIG_VENDOR),ubuntu)
cp
-rf
$(TOP_DIR)/common/nanomsg/libnanomsg_ubuntu.so
$(TOP_DIR)/$(releaseDir)/lib/libnanomsg.so.5
cp
-rf
$(TOP_DIR)/common/nanomsg/libnanomsg_ubuntu.so
$(TOP_DIR)/$(releaseDir)/lib/libnanomsg.so.5
cp
-rf
$(TOP_DIR)/common/ev/libev_ubuntu.so
$(TOP_DIR)/$(releaseDir)/lib
cp
-rf
$(TOP_DIR)/common/ev/libev_ubuntu.so
$(TOP_DIR)/$(releaseDir)/lib
...
...
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