This commit adds `Time` class which represents an instance of time
(it is a simple wrapper over a `uint32_t` corresponding to a
numerical time value). The `Time` class provides helpful operator
overloads:
- Operators `+` and `-` with a `Time` instance and a `Duration` to
get a `Time` instance after or before.
- Operator `-` with two `Time` instances to calculate the `Duration`
duration between two time instances.
- Operators `<`, `<=`, `>`,'>=', '==' and `!=` to compare two `Time`
instances. They correctly handle the wrapping of numeric time value.
The core modules are updated to use the new `Time` and `Duration`
types which help make the code simpler. This commit also updates the
unit test `test_timer` to add test cases for newly added types.
This commit adds `Mac::NetworkName` class as C++ wrapper over the
`otNetworkName`. It also adds `NetworkName::Data` to represent the
network name as a pointer to a char array buffer (not necessarily null
terminated) with a given length. This representation is used by
`Mac::BeaconPlayload` and `MeshCop::NetworkNameTlv`. This commit also
adds a unit test for `Mac::NetworkName` class.
This commit adds a `Mle::DeviceMode` class which is warpper over
a device mode bitmask (`uint8_t`) and provides the common helper
functions like `IsRxOnWhenIdle()`, `IsFullThreadDevice()`, etc.
This commit fixes a bug in the commissioner when a joiner's expiration
time has alerady elapsed.
This commit also introduces convenience methods for computing time
elapsed and diffs.
This commit changes how the objects in OpenThread access each other.
It adds a template `Get<Type>()` method in `InstanceLocator`. This
method returns a reference to a given `Type` object belonging to the
OpenThread instance (e.g. `Get<MeshForwarder>()` returns a reference
to `MeshForwarder` object on the OpenThread instance). The
`InstanceLocator` is used as base class of all OpenThread classes so
every class can easily access any other object. This commit also
changes how the main instance is retrieved in `InstanceLocator` for
the single-instance case. The method `GetInstance()` directly uses the
raw buffer `gInstanceRaw`. This change helps make the `GetInstance()`
and in turn all `Get<Type>()` methods in-line. This commit also
removes the existing getters across all classes to use the new
`Get<Type>()` model.
This commit simplifies the `Mle::Start()` by combining its parameters.
With the new definition `Start()` would always try to reattach using
any saved active/pending dataset unless it is asked to attach on an
announced network (i.e., `aAnnounceAttach` is `true`).
This commit adds support for a set of MLE counters (e.g., counters to
track number of times device entered different roles, or counters
tracking number of attach attempts, partition ID or parent changes).
The existing router table allocated a router entry for every possible router
id value (63). Beacuse Thread only allows at most 32 active routers in a
given network, allocating 63 router entries is wasteful. This commit
allocates only 32 router entries and dynamically manages the pool of router
entries.
This commit makes the following changes: It defines the public
`otInstance` as an empty opaque structure which is used by all public
C OpenThread APIs. It defines a new class `ot::Instance` (inheriting
from `otInstance) which is then used in core source files. The
functionality related to the instance is also moved/added into the
newly added `Instance` class (as class/static or member methods).
This commit simplifies the config header files includes in
OpenThread core and non-public source files. With this change the
"openthread-core-config.h" becomes the main config header file. This
header file includes all other config ones:
1) The `configure` generated `<openthread/config.h>;
2) The project specific one by `OPENTHREAD_PROJECT_CORE_CONFIG_FILE`;
3) The "openthread-core-default-config.h" defining default settings.
With the change in this commit, all header files include "openthread-
core-config.h" as the first `#include`, and in `.cpp` files, the first
`#include` continues to be the unit's corresponding header file. The
new model ensures that the configuration settings are visible and
consistent in all the source files. This commit also updates the
style guide document accordingly.
This commit introduces a new class `RssAverager` (which contains the
existing averaging logic from`LinkQualityInfo` class). It also updates
`Message` class to maintain the average RSS for a received message
(note that a message may be composed of multiple 802.15.4 fragments
data frames each received with different signal strength). The
`MeshForwarder::LogIp6Message()` is updated to log the RSS value for
received/dropped messages.
* [timer] multiple microseconds timer support
* Remove TimerSchedulerLocator, Timer inherit from Ip6Locator instead to get TimerScheduler.
* Add separate UsecTimer and UsecTimerScheduler for multiple microseconds timer support.
* [timer] refine Timer names
* Rename alarm header files to alarm-milli.h and alarm-micro.h
* Rename alarm APIs to start with otPlatAlarmMilli and otPlatAlarmMicro
* Rename Timer classes to TimerMilli/TimerMilliScheduler and TimerMicro/TimerMicroScheduler
* [Timer] Refactor Timer code structure
* Create TimerBase and TimerSchedulerBase class for common functions;
* Use TimerMilli/TimerMicro and TimerMilliScheduler/TimerMicroScheduler for different functions;
* Define AlarmApi, so then TimerMilliScheduler/TimerMicroScheduler could use different AlarmApi.
The local Active and Pending Operational Datsets are stored in non-volatile
memory. This commit dynamically retrieves those datasets from non-volatile
memory when they are needed.
This commit also simplifies the use of the Operational Datasets by having the
RAM buffer store the local Operational Dataset when in the detached state.
* Added ip level counters
* Fixed style issue
* Added const to function prototype
* Removed SPINEL_ from the property return strings
* Added descriptions for ipv6 counters and moved counter logic out of logging function
* Added public API to get the IPv6 counters
* Fixed build errors with bad call to otThreadGetIPv6Counters
* Changed otThreadGetIp6Counters to return a const *
* make pretty
* Add dhcp6 client define, and update openthred-config include scheme
* #1663 - update include to use quotes instead of angle brackets
* #1663 - update file to use underscore instead of dash
* #1663 - remove extra space
* #1663 - update location of new header file and update files to point to it
* #1663 - update location of new header file and update files to point to it
* #1663 update makefile.am to include new header
* update for make pretty changes
* more pretty fixes
* cleanup, and remove automatic mbedtls change
* remove debugging change
* #1663 - Remove extra space, and change include to use angle brackets instead of quotes.
* rename the enable defines file to openthred_config
* #1663 clean up for code review
* #1663 - clean up last nits
* #1663 - missed merge conflicts - file openthread-config.h -> openthread/openthread_config.h
This commit add a new API `otThreadGetLinkLocalIp6Address()` to
get the Thread link-local address (which is is derived using
IEEE802.15.4 Extended Address as Interface Identifier). The new
API is then used to implement the get handler for spinel property
`IPV6_LL_ADDR` in `NcpBase` class.