Commit Graph

215 Commits

Author SHA1 Message Date
Yakun Xu eb8c6d90bd [diag] quick fix to support long output (#3436)
`Cli::Uart::OutputFormat()` current only supports output
`OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH` bytes, which isn't enough
for command *diag* by default. This PR removes that restriction
by using `Cli::Uart::Output`.

I think this is just a quick fix, an overall enhancement of Cli is
needed so that we can use small stack size but also get better
performance.
2019-01-09 09:43:14 -08:00
rongli 328239878d [data-poll-manager] check user-specified poll period (#3401) 2018-12-27 22:35:57 -08:00
Jing eca3e81fd3 [thci] update pollperiod command to accept ms resolution configuration (#3361) 2018-12-27 15:39:46 -08:00
Yakun Xu de63012c9e [dhcp6-client] remove dhcp6 client api (#3287) 2018-12-12 09:58:15 -08:00
Zhanglong Xia 71753b3cb6 [cli] add channel monitor and channel manager commands (#3286) 2018-11-26 10:28:59 -08:00
Jonathan Hui e14d763e2e [style] relocate OT_UNUSED_VARIABLE (#3299) 2018-11-17 12:04:41 -08:00
Joseph Newman a5f1ed263d [cli] fix network time format specifier (#3278) 2018-11-07 11:35:18 -08:00
Zhanglong Xia f8909593a9 [api] update message API to create message with priority (#3199) 2018-11-05 12:48:39 -08:00
Łukasz Duda 4a89cc63b6 [sntp] initial implementation of sntp client (#3237) 2018-11-03 08:11:05 -07:00
Łukasz Duda 597a81fd0a [dns] simplify defines name and clean up (#3209) 2018-10-25 12:58:29 -07:00
Jonathan Hui 5a489836cd [naming] rename FFD to FTD (#3102) 2018-09-27 09:33:03 -07:00
Christian Stauffer 2ce47a8e9c [coaps] CoAP Secure Client/Server accessible through OT API (#2716) 2018-09-24 11:22:08 -10:00
Shu Chen 9a9da5124f [cli] support energy scan command (#3036) 2018-09-06 07:30:55 -10:00
Shu Chen 3174c590c3 [utils] implement a common method for command line parsing (#3001) 2018-09-05 00:40:02 -07:00
Shu Chen 026badad96 [diags] use temporary buffer for diag output (#2992) 2018-08-28 09:24:23 -07:00
Yakun Xu 0cea4bc738 [cli] return number of bytes in ping reply (#2973) 2018-08-17 11:53:54 -07:00
Jonathan Hui 920197398b [api] change type from uint8_t* to otExtendedPanId (#2960) 2018-08-15 10:12:49 -07:00
Jonathan Hui 9d585edc46 [types] move types into specific headers (#2946) 2018-08-08 11:19:41 -07:00
Jonathan Hui 7be61df6ec [message-info] remove unnecessary memset initialization (#2937) 2018-07-31 14:10:02 -05:00
Jonathan Hui 1075e35327 [code-style] remove multiple return statements per free function or method (#2891)
There should be one return statement per free function or method at the end
of the free function or method.
2018-07-19 20:09:07 -05:00
Shu Chen e69019f962 [time-sync] network-wide time synchronization service (#2618)
OpenThread network-wide time synchronization service is an experimental feature, not part of the standard Thread protocol.

Feature Overview:
 * All the nodes in the same Thread partition sync to the same Thread network-wide time;
 * Microsecond level time synchronization precision;
 * Flexible time accuracy and time sync period configuration;
 * APIs for application layer use case, support both CLI and NCP version.

The feature is wrapped by OPENTHREAD_CONFIG_ENABLE_TIME_SYNC, there's no change to current Thread 1.1
implementation if OPENTHREAD_CONFIG_ENABLE_TIME_SYNC is not enabled.

If OPENTHREAD_CONFIG_ENABLE_TIME_SYNC is enabled, the node could:
 * Attach to a time sync enabled network, otherwise
 * Attach to a standard Thread 1.1 network, otherwise
 * Form a new time sync enabled network

In addition, if OPENTHREAD_CONFIG_TIME_SYNC_REQUIRED is also enable, the node could only:
 * Attach to a time sync enabled network, otherwise
 * Form a new time sync enabled network

Note:
Currently, the feature is only supported on nRF52840 and posix platforms. And the network time
is only synced among Routers and REEDs, the SEDs will be supported later as an optional feature.
2018-06-26 13:46:32 -05:00
Yakun Xu 1b14a36a35 [posix] radio only host side driver (#2690) 2018-06-25 16:32:32 -07:00
Abtin Keshavarzian 9ce38e0161 [notifier] always signal changed state/config for the first time (#2818)
This commit adds new logic in `Notifier` class (and how it is used) to
ensure when state/configuration is changed, each of the OT_CHANGED_*
events (e.g., channel, network name) is signaled for the first time
(even in case new set value is same as before).

This change addresses an issue where if user sets a parameter (using
OpenThread public APIs) before starting Thread operation the event
indicating the change would not be emitted.

This commit also defines `otChangedFlags` and `Notifier::Flags`
types, and updates the logging in `Notifier` to use `String` class.
2018-06-22 15:09:18 -07:00
Łukasz Duda 90b66eb6de [cli] align autostart command (#2755) 2018-05-30 09:00:49 -07:00
Jonathan Hui 64fed1ed4d [cli] fix router table command (#2747) 2018-05-29 16:30:43 -07:00
Abtin Keshavarzian 2abd7a2822 [code-utils] adding helper macro OT_ARRAY_LENGTH() (#2743)
This commit adds helper macro `OT_ARRAY_LENGTH()` to get the number
of elements in an array.
2018-05-29 15:53:53 -07:00
Jonathan Hui aabd06ab51 [cli] fix child table command (#2749) 2018-05-29 10:01:16 -07:00
Shu Chen 449d3e7f11 [cli] return error if the command's argument is not supported (#2620) 2018-03-20 15:54:38 +00:00
Shu Chen 59e9aab082 [cli] get external route list in the local Network Data (#2619) 2018-03-16 18:41:39 +00:00
Jonathan Hui 12237d07dc [code-style] fix initializers in constructors 2018-02-09 21:43:42 +00:00
Jonathan Hui 69d98d4a53 [code-style] apply clang-format 2018-02-09 21:43:42 +00:00
Abtin Keshavarzian 5fc97364f3 [locator] adding OwnerLocator (#2346)
This commit adds a new class `OwnerLocator` which is used by the
callback providing types (like `Timer` or `Tasklet`) to remember the
owner of the object. This change help simplify the handling of
callbacks from such objects. The object itself can be used to get
to its owner using `GetOwner<Type>()` method.  If support for multiple
OpenThread instances is enabled, an `OwnerLocator`  object maintains a
pointer to the owner. But for the single OpenThread instance scenario,
the owner is derived from the single `ot::Instance` object.
2017-11-28 22:42:54 +00:00
Jonathan Hui 741941e271 [radio] remove transmit power config from core (#2352)
Thread (and OpenThread) does not employ any form of transmit power control.
As a result, while OpenThread provides APIs to control transmit power, it
simply buffers and passes the transmit power value straight through to the
radio.

Currently, the transmit power APIs allow specifying an int8_t in units of
dBm.  This is overly constraining for platforms that have more advanced ways
of configuring the transmit power.

This commit removes the transmit power configuration from the core.  This
provides better flexibility in platform-specific ways to configure transmit
power.
2017-11-28 17:33:32 +00:00
Abtin Keshavarzian 02c876ef62 [instance] define ot::Instance class (#2307)
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).
2017-11-13 08:27:57 -08:00
Jonathan Hui 74b3160f9d [meshcop] use IEEE EUI-64 rather than Joiner ID on user input (#2311) 2017-11-07 09:41:46 -08:00
Kamil Burzynski 005781d066 [network-data] add Service/Server TLV support (#2256) 2017-10-26 12:27:19 -07:00
Łukasz Duda 7b084eca71 [toolchain] fix warnings/errors in Keil compiler (#2286) 2017-10-25 08:54:17 -07:00
rongli 28d08916a5 [cli] separate the result and child list in different lines for THCI (#2296) 2017-10-24 08:46:46 -07:00
Abtin Keshavarzian 2ea56446a4 [config-header] simplify config header file includes (#2255)
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.
2017-10-17 09:46:34 -07:00
rongli 11924b09ff [cli] networkdiagnostic: pass tlv types directly (#2261) 2017-10-16 07:52:56 -07:00
rongli b1baa7da52 [mac] rename mRxWhitelistFiltered to mRxAddressFiltered (#2263) 2017-10-13 09:33:23 -07:00
Giedrius e190edf8a0 [message] extend buffer info provided by otMessageGetBufferInfo() (#2249)
* Include application CoAP messages and buffers
* Include cached messages and buffers
* Set unused buffer info fields to zero
2017-10-09 23:53:03 -07:00
Robert Lubos 1bfa370f1f [cli] add neighbor command (#2244) 2017-10-04 21:19:38 -07:00
Jonathan Hui d1d3f5d63a [cli] remove useless call (#2228) 2017-09-27 23:06:52 -07:00
Wojciech Bober aa6e1a4c22 [cli] add support for extending CLI with user commands (#2223) 2017-09-27 06:12:35 -07:00
Robert Lubos 141ceb0446 [mac] fix tx counters (#2134) 2017-08-28 20:17:41 -07:00
DuaneEllis-TI e937542990 [debug] add debug uart (#2082) 2017-08-24 10:28:01 -07:00
Jonathan Hui 5ecab16f86 [configure] replace --with-platform-info using project config (#2077) 2017-08-08 22:10:07 -07:00
Jonathan Hui 5d7a03334f [radio] unify around otExtAddress type (#2029) 2017-07-28 08:05:06 -07:00
Jonathan Hui f88c537c6c [udp] add cli-based example for UDP APIs (#2027) 2017-07-26 12:14:44 -07:00