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
326a6eec
Commit
326a6eec
authored
Sep 07, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20200907
parent
65243975
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
midware/midware/dm/kk_property_db.c
midware/midware/dm/kk_property_db.c
+0
-1
platform/zigbee/app/builder/Z3GatewayHost/Makefile
platform/zigbee/app/builder/Z3GatewayHost/Makefile
+2
-2
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
...m/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
+21
-0
No files found.
midware/midware/dm/kk_property_db.c
View file @
326a6eec
...
...
@@ -141,7 +141,6 @@ int kk_property_db_insert(const char *deviceCode,const char *identifier,kk_tsl_d
char
*
zErrMsg
=
0
;
kk_property_db_ctx_t
*
ctx
=
_kk_property_db_get_ctx
();
if
(
_kk_check_property_exist
(
deviceCode
,
identifier
)
==
1
)
{
WARNING_PRINT
(
"[%s][%d] DATA ALREADY EXIST!!!
\n
"
,
__FUNCTION__
,
__LINE__
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/Makefile
View file @
326a6eec
...
...
@@ -373,10 +373,10 @@ $(TARGET_FILE): $(APPLICATION_OBJECTS) $(LIBRARIES)
else
$(TARGET_FILE)
:
$(APPLICATION_OBJECTS) $(LIBRARIES)
ifeq
($(CONFIG_VENDOR),ubuntu)
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com_ubuntu
-lnanomsg_ubuntu
-lanl
-pthread
-lev_ubuntu
-lkk_hal_ubuntu
-o
$(TARGET_FILE)
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com_ubuntu
-lnanomsg_ubuntu
-lanl
-pthread
-lev_ubuntu
-l
sqlite3
-l
kk_hal_ubuntu
-o
$(TARGET_FILE)
@
echo
-e
'\n$@ build success'
else
$(LD)
$^
$(LINKER_FLAGS)
-lm
-L
.
-lapi_com
-lnanomsg
-lanl
-pthread
-lev
-lkk_hal
-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'
endif
endif
...
...
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
View file @
326a6eec
#include "kk_device_manager.h"
#include <fcntl.h>
#include "sqlite3.h"
/****************** ******************************************************************
* File Name : kk_device_manager.c
* Author : yjq
...
...
@@ -310,9 +315,25 @@ static const char *kk_match_tsl_productCode(const char* modelId)
////////////////////////////////////////////////////
void
kk_db
()
{
sqlite3
*
db
=
NULL
;
char
create
[]
=
"create table kk_device(number integer PRIMARY KEY, name text, sex text, age integer);"
;
int
ret
=
sqlite3_open
(
"kk_device.db"
,
&
db
);
if
(
ret
)
{
emberAfDebugPrintln
(
"can not open database.
\n
"
);
}
else
{
emberAfDebugPrintln
(
"open database succsee.
\n
"
);
}
}
void
emberAfPluginDeviceTableInitialized
(
void
)
{
kk_device_table_load
();
kk_db
();
}
...
...
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