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
5f1910e5
Commit
5f1910e5
authored
Aug 10, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 LightStatus控制
parent
5f8bedfa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
platform/zigbee/app/builder/Z3GatewayHost/afv2-bookkeeping.c
platform/zigbee/app/builder/Z3GatewayHost/afv2-bookkeeping.c
+15
-7
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
...p/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
+2
-1
No files found.
platform/zigbee/app/builder/Z3GatewayHost/afv2-bookkeeping.c
View file @
5f1910e5
...
@@ -89,25 +89,33 @@ void emAfZigbeeKeyEstablishment(EmberEUI64 partner, EmberKeyStatus status)
...
@@ -89,25 +89,33 @@ void emAfZigbeeKeyEstablishment(EmberEUI64 partner, EmberKeyStatus status)
// ReadAttributesResponse function declarations.
// ReadAttributesResponse function declarations.
bool
emberAfReadAttributesResponseCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
emberAfReadAttributesResponseCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
emAfReadAttributesResponse
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
)
{
return
emberAfReadAttributesResponseCallback
(
clusterId
,
buffer
,
bufLen
);
}
// ReportAttributes function declarations.
// ReportAttributes function declarations.
bool
emberAfReportAttributesCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
emberAfReportAttributesCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
rpc_ReportAttributesCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
rpc_ReadAttributesResponseCallback
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
);
bool
emAfReportAttributes
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
)
bool
emAfReportAttributes
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
)
{
{
return
emberAfReportAttributesCallback
(
clusterId
,
buffer
,
bufLen
);
return
rpc_ReportAttributesCallback
(
clusterId
,
buffer
,
bufLen
);
//return emberAfReportAttributesCallback(clusterId, buffer, bufLen);
}
bool
emAfReadAttributesResponse
(
EmberAfClusterId
clusterId
,
uint8_t
*
buffer
,
uint16_t
bufLen
)
{
rpc_ReadAttributesResponseCallback
(
clusterId
,
buffer
,
bufLen
);
return
emberAfReadAttributesResponseCallback
(
clusterId
,
buffer
,
bufLen
);
}
}
// PluginDeviceTableDeviceLeft function declarations.
// PluginDeviceTableDeviceLeft function declarations.
void
emAfPluginCommandRelayRemoveDeviceByEui64
(
EmberEUI64
newNodeEui64
);
void
emAfPluginCommandRelayRemoveDeviceByEui64
(
EmberEUI64
newNodeEui64
);
void
emberAfPluginDeviceTableDeviceLeftCallback
(
EmberEUI64
newNodeEui64
);
void
emberAfPluginDeviceTableDeviceLeftCallback
(
EmberEUI64
newNodeEui64
);
void
emAfPluginDeviceTableDeviceLeftCallback
(
EmberEUI64
newNodeEui64
)
void
emAfPluginDeviceTableDeviceLeftCallback
(
EmberEUI64
newNodeEui64
)
{
{
emAfPluginCommandRelayRemoveDeviceByEui64
(
newNodeEui64
);
//
emAfPluginCommandRelayRemoveDeviceByEui64(newNodeEui64);
emberAfPluginDeviceTableDeviceLeftCallback
(
newNodeEui64
);
emberAfPluginDeviceTableDeviceLeftCallback
(
newNodeEui64
);
}
}
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
View file @
5f1910e5
...
@@ -90,6 +90,7 @@ static int send_result_resp(cJSON * result,
...
@@ -90,6 +90,7 @@ static int send_result_resp(cJSON * result,
cJSON
*
result_root
=
rpc_cJSON_CreateObject
();
cJSON
*
result_root
=
rpc_cJSON_CreateObject
();
if
(
result
)
if
(
result
)
rpc_cJSON_AddItemToObject
(
result_root
,
"code"
,
result
);
rpc_cJSON_AddItemToObject
(
result_root
,
"code"
,
result
);
printf
(
"id json:
\n
%s
\n
"
,
id
->
valuestring
);
rpc_cJSON_AddItemToObject
(
result_root
,
"msgId"
,
id
);
rpc_cJSON_AddItemToObject
(
result_root
,
"msgId"
,
id
);
char
*
str_result
=
rpc_cJSON_Print
(
result_root
);
char
*
str_result
=
rpc_cJSON_Print
(
result_root
);
...
@@ -154,7 +155,7 @@ static int eval_request(struct jrpc_server *server, cJSON *root) {
...
@@ -154,7 +155,7 @@ static int eval_request(struct jrpc_server *server, cJSON *root) {
params
=
rpc_cJSON_GetObjectItem
(
root
,
"params"
);
params
=
rpc_cJSON_GetObjectItem
(
root
,
"params"
);
if
(
params
==
NULL
||
params
->
type
==
cJSON_Array
if
(
params
==
NULL
||
params
->
type
==
cJSON_Array
||
params
->
type
==
cJSON_Object
)
{
||
params
->
type
==
cJSON_Object
)
{
id
=
rpc_cJSON_GetObjectItem
(
root
,
"
i
d"
);
id
=
rpc_cJSON_GetObjectItem
(
root
,
"
msgI
d"
);
if
(
id
==
NULL
||
id
->
type
==
cJSON_String
if
(
id
==
NULL
||
id
->
type
==
cJSON_String
||
id
->
type
==
cJSON_Number
)
{
||
id
->
type
==
cJSON_Number
)
{
//We have to copy ID because using it on the reply and deleting the response Object will also delete ID
//We have to copy ID because using it on the reply and deleting the response Object will also delete ID
...
...
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