commit | 4b31f570145f2df2229fbbdd1a74642c15badc5c | [log] [tgz] |
---|---|---|
author | Abtin Keshavarzian <abtink@google.com> | Sat Feb 12 10:23:59 2022 -0800 |
committer | Jonathan Hui <jonhui@google.com> | Tue Mar 08 17:55:02 2022 -0800 |
tree | 79c206b871b2591f60a898ce56f3bd84a1c2d8b7 | |
parent | 465518ec64db86182a1fcbf45dd8d84ef82e4a87 [diff] |
[common] adding `Heap::Array<Type>` a heap allocated flexible-length array (#7420) This commit adds `Heap::Array<Type>` class which allocates the buffer to store array elements from the heap. The `Array` implementation automatically grows the buffer when new entries are added. It also provides optional method `ReserveCapacity()` to allow user to allocate and reserve a certain capacity (number of elements user expects to add). The `Array` can safely be used with element `Type`s that are themselves heap allocated (manage allocated items). The `Array` implementation uses the move constructor and destructor of the `Type` class to ensure that copying the entries when growing the array is performed efficiently and that the removed entries are properly deleted. The `Array` implementation also provides helper methods to search in the array, e.g., `Find()`, `FindMatching()`, `Contains()`, and `ContainsMatching()`. It also supports range-based `for` loop iteration. This commit also adds a detailed unit test `test_heap_array` which covers behavior of `Array` with a simple `uint16_t` entry type and a more complex entry type (validating the constructors and destructor of entry are properly invoked by `Array` implementation).
OpenThread released by Google is...
...an open-source implementation of the Thread networking protocol. Google Nest has released OpenThread to make the technology used in Nest products more broadly available to developers to accelerate the development of products for the connected home.
...OS and platform agnostic, with a narrow platform abstraction layer and a small memory footprint, making it highly portable. It supports both system-on-chip (SoC) and network co-processor (NCP) designs.
...a Thread Certified Component, implementing all features defined in the Thread 1.2 specification, including all Thread networking layers (IPv6, 6LoWPAN, IEEE 802.15.4 with MAC security, Mesh Link Establishment, Mesh Routing) and device roles, as well as Border Router support.
More information about Thread can be found at threadgroup.org. Thread is a registered trademark of the Thread Group, Inc.
All end-user documentation and guides are located at openthread.io. If you're looking to do things like...
...then openthread.io is the place for you.
Note: For users in China, end-user documentation is available at openthread.google.cn.
If you're interested in contributing to OpenThread, read on.
We would love for you to contribute to OpenThread and help make it even better than it is today! See our Contributing Guidelines for more information.
Contributors are required to abide by our Code of Conduct and Coding Conventions and Style Guide.
OpenThread follows the Semantic Versioning guidelines for release cycle transparency and to maintain backwards compatibility. OpenThread's versioning is independent of the Thread protocol specification version but will clearly indicate which version of the specification it currently supports.
OpenThread is released under the BSD 3-Clause license. See the LICENSE
file for more information.
Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.
There are numerous avenues for OpenThread support:
openthread
tagThe openthread-users Google Group is the recommended place for users to discuss OpenThread and interact directly with the OpenThread team.