Skip to content

Commit 1340478

Browse files
author
Unify Automated
committed
Release ver_1.0.3
1 parent 9554f32 commit 1340478

File tree

4,906 files changed

+37764
-32337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,906 files changed

+37764
-32337
lines changed

applications/angel/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# ANGEL Release Notes
33

4+
## [1.0.3] - Nov 2021
5+
46
## [1.0.2] - Oct 2021
57
### Fixed
68
* Fixed to publish group capabilities correctly
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Dev GUI Release Notes
22

3-
## [1.0.2] - Oct 2021
3+
## [1.0.3] - Nov 2021
4+
5+
## [1.0.2] - Oct 2021

applications/image_provider/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# Image Provider Release Notes
33

4+
## [1.0.3] - Nov 2021
5+
46
## [1.0.2] - Oct 2021
57
### Changed
68
* Changed the example that demonstrates Firmware Update

applications/upvl/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# UPVL Release Notes
33

4+
## [1.0.3] - Nov 2021
5+
46
## [1.0.2] - Oct 2021
57

68
## Known Bugs

applications/zigpc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ target_link_libraries(
1515
zigpc_gateway
1616
zigpc_net_mgmt
1717
zigpc_group_mgmt
18-
zigpc_node_state
1918
zigpc_ucl
2019
zigpc_smartstart
2120
zigpc_stdin

applications/zigpc/components/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ add_subdirectory(controller)
44
add_subdirectory(datastore)
55
add_subdirectory(diagnostics)
66
add_subdirectory(group_mgmt)
7-
add_subdirectory(node_state)
87
add_subdirectory(ota_zigbee)
98
add_subdirectory(smartstart)
109
add_subdirectory(stdin)

applications/zigpc/components/attribute_management/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
find_program(ZAP_EXECUTABLE "zap" REQUIRED)
22
run_zap(zap/gen-templates.json)
33

4+
set(Boost_USE_MULTITHREADED ON)
5+
find_package(Boost REQUIRED)
6+
47
add_library(
58
zigpc_attribute_management
69
${CMAKE_CURRENT_BINARY_DIR}/src/zigpc_attrmgmt_publish.c
@@ -10,7 +13,8 @@ add_library(
1013
src/zigpc_attrmgmt_gateway.c
1114
src/zigpc_attrmgmt_receive.c
1215
src/zigpc_attrmgmt_reporting.cpp
13-
src/zigpc_attrmgmt_send.cpp)
16+
src/zigpc_attrmgmt_send.cpp
17+
src/zigpc_attrmgmt_poll.cpp)
1418

1519
target_include_directories(
1620
zigpc_attribute_management

applications/zigpc/components/attribute_management/src/attribute_management_int.h

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ extern "C" {
2626
static const unsigned int ZIGPC_ATTR_MGMT_DELAY_READ_ATTRIBUTES
2727
= CLOCK_SECOND * 5;
2828

29+
static const unsigned int ZIGPC_ATTR_MGMT_POLL_PERIOD_MS
30+
= CLOCK_SECOND; //1000ms
31+
2932
/**
3033
* @brief Limit of Read Attribute Records to send per ZCL Message
3134
*
@@ -80,6 +83,12 @@ static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MAX_DEFAULT = 60;
8083
*/
8184
static const uint32_t ZIGPC_ATTRMGMT_REPORT_CHANGE_DEFAULT = 0x0000;
8285

86+
/**
87+
* @brief Default poll list size. The maximum number of clusters that
88+
* can be stoed in the poll list
89+
*/
90+
static const uint32_t ZIGPC_ATTRMGMT_DEFAULT_POLL_SIZE = 256;
91+
8392
/**
8493
* attr_mgmt_evt
8594
*
@@ -96,6 +105,7 @@ enum attr_mgmt_evt {
96105
*
97106
*/
98107
ZIGPC_ATTR_MGMT_EVT_ATTR_UPDATE,
108+
ZIGPC_ATTR_MGMT_EVT_CONFIGURE_RESPONSE,
99109
ZIGPC_ATTR_MGMT_EVT_READ_ATTRIBUTES_COMMAND,
100110
};
101111

@@ -312,6 +322,24 @@ sl_status_t
312322
bool is_read_response,
313323
const zcl_frame_t *frame);
314324

325+
/**
326+
* @brief zigpc_attrmgmt_receive_configure_response_frame
327+
* Process a configure attribute response frame
328+
* Accepts a ZCL frame for the response to a configure
329+
* reports command. On a failed configure, adds the given EUI64,
330+
* endpoint and cluster combination to the poll lis
331+
*
332+
* @param eui64 Device identifier.
333+
* @param endpoint_id Device endpoint identifier
334+
* @param cluster_id Cluster identifer of the source from
335+
* @param frame ZCL Frame containing configure report response
336+
*/
337+
sl_status_t zigpc_attrmgmt_receive_configure_response_frame(
338+
const zigbee_eui64_t eui64,
339+
zigbee_endpoint_id_t endpoint_id,
340+
zcl_cluster_id_t cluster_id,
341+
const zcl_frame_t *frame);
342+
315343
#ifdef COMPILE_UNUSED_CODE
316344

317345
/**
@@ -350,6 +378,74 @@ sl_status_t
350378
const zcl_cluster_id_t cluster_id,
351379
const zcl_attribute_id_t attr_id,
352380
const uint8_t *attr_value);
381+
382+
/**
383+
* @brief zigpc_attrmgmt_get_poll_list_size
384+
*
385+
* Get the size of the current list we are polling
386+
* with ReadAttributes
387+
*
388+
* @return the number of clusters on the list we are polling
389+
**/
390+
size_t zigpc_attrmgmt_get_poll_list_current_size();
391+
392+
/**
393+
* @brief zigpc_attrmgmt_get_poll_list_Max_size
394+
*
395+
* Get the maximum size of the polling list
396+
*
397+
* @return the maximum number of clusters the poll list can contain
398+
**/
399+
size_t zigpc_attrmgmt_get_poll_list_max_size();
400+
401+
/**
402+
* @brief zigpc_attrmgmt_send_poll_attributes
403+
*
404+
* Send a ReadAttribute command to the next entry in
405+
* the polling list
406+
*
407+
* @return SL_STATUS_OK if the command could be sent properly
408+
**/
409+
sl_status_t zigpc_attrmgmt_send_poll_attributes();
410+
411+
/**
412+
* @brief zigpc_attrmgmt_add_poll_entry
413+
*
414+
* Add a new entry to be polled by ReadAttribute commands
415+
* Will be put at the end of the list
416+
*
417+
* @param eui64 - the eui64 of the node
418+
* @param endpoint_id - the endpoint specified
419+
* @param cluster_id - the cluster specified
420+
*
421+
* @return SL_STATUS_OK if the new entry could be added properly
422+
**/
423+
sl_status_t zigpc_attrmgmt_add_poll_entry(const zigbee_eui64_t eui64,
424+
zigbee_endpoint_id_t endpoint_id,
425+
zcl_cluster_id_t cluster_id);
426+
427+
/**
428+
* @briefzigpc_attrmgmt_remove_poll_entry
429+
*
430+
* Remove a eui64, endpoint and cluster combination from the poll list
431+
*
432+
* @param eui64 - the eui64 of the node
433+
* @param endpoint_id - the endpoint specified
434+
* @param cluster_id - the cluster specified
435+
*
436+
* @return SL_STATUS_OK if the new entry could be removed properly
437+
**/
438+
sl_status_t zigpc_attrmgmt_remove_poll_entry(const zigbee_eui64_t eui64,
439+
zigbee_endpoint_id_t endpoint_id,
440+
zcl_cluster_id_t cluster_id);
441+
442+
/**
443+
* @brief zigpc_attrmgmt_empty_poll_list
444+
*
445+
* Empty the polling list
446+
**/
447+
void zigpc_attrmgmt_empty_poll_list();
448+
353449
#ifdef __cplusplus
354450
}
355451
#endif

applications/zigpc/components/attribute_management/src/attribute_management_process.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/* Contiki include */
1717
#include "process.h"
1818
#include "sys/ctimer.h"
19+
#include "sys/etimer.h"
1920

2021
/* Logger includes */
2122
#include "sl_log.h"
@@ -85,8 +86,12 @@ PROCESS(attribute_management_process, "attribute_management_process");
8586

8687
PROCESS_THREAD(attribute_management_process, ev, data)
8788
{
89+
static struct etimer zigpc_attrmgmt_poll_timer;
90+
8891
PROCESS_BEGIN();
8992

93+
etimer_set(&zigpc_attrmgmt_poll_timer, ZIGPC_ATTR_MGMT_POLL_PERIOD_MS);
94+
9095
while (1) {
9196
sl_status_t status = SL_STATUS_INVALID_TYPE;
9297

@@ -138,7 +143,22 @@ PROCESS_THREAD(attribute_management_process, ev, data)
138143
receive_data->cluster_id,
139144
receive_data->is_read_response,
140145
&receive_data->frame);
146+
} else if (ev == ZIGPC_ATTR_MGMT_EVT_CONFIGURE_RESPONSE) {
147+
const zigpc_attrmgmt_on_frame_receive_t *receive_data
148+
= (zigpc_attrmgmt_on_frame_receive_t *)data;
149+
150+
status = zigpc_attrmgmt_receive_configure_response_frame(
151+
receive_data->eui64,
152+
receive_data->endpoint_id,
153+
receive_data->cluster_id,
154+
&receive_data->frame);
155+
} else if ((ev == PROCESS_EVENT_TIMER)
156+
&& (data == &zigpc_attrmgmt_poll_timer)) {
157+
status = zigpc_attrmgmt_send_poll_attributes();
158+
159+
etimer_reset(&zigpc_attrmgmt_poll_timer);
141160
}
161+
142162
// must be freed!
143163
// allocated in zigpc_attrmgmt_process_send_event())
144164
if ((data != NULL) && (ev < PROCESS_EVENT_NONE)) {
@@ -168,6 +188,7 @@ sl_status_t node_send_report_config_cmd(const zigbee_node_t node)
168188
}
169189
return status;
170190
}
191+
171192
#ifdef COMPILE_UNUSED_CODE
172193
sl_status_t update_attribute_from_report(const attribute_report_t report)
173194
{

applications/zigpc/components/attribute_management/src/zigpc_attrmgmt_gateway.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ void zigpc_attrmgmt_callback_on_attribute_frame(
4848
}
4949
}
5050

51+
void zigpc_attrmgmt_callback_on_configure_response_frame(
52+
const zigpc_gateway_on_attribute_reported_t *received_data)
53+
{
54+
if (received_data != NULL) {
55+
zigpc_attrmgmt_on_frame_receive_t ev;
56+
57+
memcpy(ev.eui64, received_data->eui64, ZIGBEE_EUI64_SIZE);
58+
ev.endpoint_id = received_data->endpoint_id;
59+
ev.cluster_id = received_data->cluster_id;
60+
ev.frame.size = received_data->frame.size;
61+
memcpy(ev.frame.buffer,
62+
received_data->frame.buffer,
63+
received_data->frame.size);
64+
65+
zigpc_attrmgmt_process_send_event(
66+
ZIGPC_ATTR_MGMT_EVT_CONFIGURE_RESPONSE,
67+
(void *)&ev,
68+
sizeof(zigpc_attrmgmt_on_frame_receive_t));
69+
}
70+
}
71+
5172
void zigpc_attrmgmt_callback_on_attr_report(void *data)
5273
{
5374
if (data != NULL) {
@@ -65,6 +86,14 @@ void zigpc_attrmgmt_callback_on_attr_read_response(void *data)
6586
}
6687
}
6788

89+
void zigpc_attrmgmt_callback_on_configure_response(void *data)
90+
{
91+
if (data != NULL) {
92+
zigpc_attrmgmt_callback_on_configure_response_frame(
93+
(const zigpc_gateway_on_attribute_reported_t *)data);
94+
}
95+
}
96+
6897
sl_status_t attr_mgmt_gateway_init_observer(void)
6998
{
7099
sl_status_t result;
@@ -77,6 +106,12 @@ sl_status_t attr_mgmt_gateway_init_observer(void)
77106
result = zigpc_gateway_register_observer(
78107
ZIGPC_GATEWAY_NOTIFY_READ_ATTRIBUTE_RESPONSE,
79108
zigpc_attrmgmt_callback_on_attr_read_response);
109+
110+
if (result == SL_STATUS_OK) {
111+
result = zigpc_gateway_register_observer(
112+
ZIGPC_GATEWAY_NOTIFY_CONFIGURE_REPORTING_RESPONSE,
113+
zigpc_attrmgmt_callback_on_configure_response);
114+
}
80115
}
81116

82117
return result;

0 commit comments

Comments
 (0)