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
cc8d5de8
Commit
cc8d5de8
authored
Aug 28, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://172.17.3.10:17001/chenweican/k-sdk
parents
d6b62c66
999cbb39
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
common/api/com_api.c
common/api/com_api.c
+14
-4
common/api/com_api.h
common/api/com_api.h
+1
-0
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
+0
-0
No files found.
common/api/com_api.c
View file @
cc8d5de8
...
...
@@ -97,13 +97,23 @@ static void watcher_cb (struct ev_loop *loop ,struct ev_io *w, int revents)
}
//for test ipc connect or not
if
(
loop_ctrl
->
isconnect
==
0
){
/*
if (loop_ctrl->isconnect == 0 ){
loop_ctrl->isconnect =1;
if (strncmp(validDat,MAGIC, strlen(MAGIC)) == 0){
kk_ipc_send
(
loop_ctrl
->
type
,
validDat
,
bytes
);
kk_ipc_send
_ex(loop_ctrl->type, validDat, bytes, chlMark
);
nn_freemsg(dat);
return;
}
}*/
if
(
strncmp
(
validDat
,
MAGIC
,
strlen
(
MAGIC
))
==
0
){
if
(
loop_ctrl
->
isconnect
==
0
){
kk_ipc_send_ex
(
loop_ctrl
->
type
,
validDat
,
bytes
,
chlMark
);
loop_ctrl
->
isconnect
=
1
;
}
nn_freemsg
(
dat
);
return
;
}
else
if
(
IPC_MID2PLAT
==
loop_ctrl
->
type
){
//
loop_ctrl
->
isconnect
=
0
;
}
if
(
loop_ctrl
->
cb
!=
NULL
){
...
...
@@ -400,9 +410,9 @@ int kk_ipc_send_ex(ipc_type type, void* data, int len, char* chalMark)
memcpy
(
buf
+
filterlen
,
data
,
len
);
if
(
type
==
IPC_MID2PLAT
){
nn_send
(
Mloop_ctrl
.
ab
.
n
,
&
buf
,
NN_MSG
,
NN_DONTWAIT
);
nn_send
(
Mloop_ctrl
.
ab
.
n
,
&
buf
,
NN_MSG
,
0
);
//NN_DONTWAIT
}
else
{
nn_send
(
Bloop_ctrl
.
ba
.
n
,
&
buf
,
NN_MSG
,
NN_DONTWAIT
);
nn_send
(
Bloop_ctrl
.
ba
.
n
,
&
buf
,
NN_MSG
,
0
);
}
}
...
...
common/api/com_api.h
View file @
cc8d5de8
...
...
@@ -36,6 +36,7 @@ typedef enum {
#define MSG_INFO_STR "info"
#define MSG_INDENTIFIER_STR "identifier"
#define MSG_PARAMS_STR "params"
#define MSG_IOTClOUDSTATE_STR "IOTCloudState"
typedef
void
ipc_cb
(
void
*
data
,
int
len
,
char
*
chalMark
);
int
kk_ipc_init
(
ipc_type
type
,
ipc_cb
cb
,
char
*
chalMark
,
char
*
ip
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
View file @
cc8d5de8
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