Commit Graph

285 Commits

Author SHA1 Message Date
Jonathan Hui 27f5d9a06e [mle] rename RouterRoleEnabled to RouterEligible (#4363) 2019-12-03 09:28:35 +08:00
Rongli Sun e860009914 [network-data] always support service registration at Leader (#4360)
A Leader should always be able to process service registration.

This commit:

- removes the OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE feature
  flag around code for handling service registrations by the leader.

- support service ALOC forwarding by all router-capable devices.

- adds ability for any device to read service information from the
  network data.
2019-12-03 00:42:46 +08:00
Piotr Koziar 61088c7782 [cli] mac/mle counters reset (#4341)
* Add counters reset cli command
2019-11-19 18:35:06 -08:00
Rafał Kuźnia 5a7e19062c [mac] add option to change direct/indirect TX retry number (#4256)
Add MAC option to change number of direct TX retries:
- add member variable containing maximum number of direct TX retries
- add getter/setter methods

Add public API for direct and indirect TX retries
- otLinkGetMaxFrameRetriesDirect
- otLinkSetMaxFrameRetriesDirect
- otLinkGetMaxFrameRetriesIndirect
- otLinkSetMaxFrameRetriesIndirect

Add NCP support for direct and indirect TX retry configuration.

Rename config definition for direct and direct TX retries.

Add cli command handler for direct and indirect TX retries.
2019-10-29 09:04:26 -07:00
Yakun Xu 9cb3fa50ef [cli] get preferred and supported channel mask (#4253) 2019-10-24 22:30:34 -07:00
Rongli Sun eac27c0f45 [cli] add hex string payload for udp send (#4241) 2019-10-24 10:33:08 -07:00
wgtdkp ff789e4ded [api] add API to get Thread Version (#4225) 2019-10-14 10:24:30 -07:00
Abtin Keshavarzian 4feadec950 [time] adding Time class (#4195)
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.
2019-10-04 15:35:53 -07:00
Abtin Keshavarzian 1555b21910 [key-manager] add Pskc class (#4174)
This commit adds a `Pskc` as a wrapper over `otPskc` and also
renames all the uses of `PSK` into `Psk` to follow our variable
and type naming convention which treats an acronym as a whole
word.
2019-09-18 19:11:07 -07:00
Zhanglong Xia c0ef327664 [radio] add radio coex control api (#4158) 2019-09-16 23:12:37 -07:00
Yakun Xu 957d79d786 [api] force linker failures when using disabled features (#4127) 2019-09-10 08:42:02 -07:00
Jonathan Hui d796b056c5 [child-table] add support for more than 64 children (#4118) 2019-08-23 09:15:37 -07:00
Yakun Xu 79c61a5700 [diag] clean up unnecessary variables and code (#4102) 2019-08-22 08:38:56 -07:00
Zhanglong Xia 27cac08e8a [radio] add coex metrics (#4108)
- Add platform get coex metrics API
- Add spinel property for coex metrics
2019-08-21 12:25:27 -07:00
Jonathan Hui 711598eb17 [cli] fix inconsistent printf format specifier (#4101) 2019-08-19 07:43:18 -07:00
Abtin Keshavarzian 31ce3d45c8 [style] harmonize boolean checks (#4048)
This commit simplifies boolean checks containing `== false` to use the
`!` operator instead, and removes redundant `== true` checks. This
commit aims to harmonize the boolean checks across core modules.
2019-08-01 10:30:08 -07:00
Jonathan Hui 02da206f39 [config] remaining configure options (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 149640da49 [config] tmf (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 926b9e8661 [config] time sync (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 8d61b4b99e [config] sntp client (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 0baaf1afba [config] mac (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 31ffd1645e [config] joiner (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 297ab4742f [config] dns client (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui a608896cd3 [config] diag (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui f72f792874 [config] commissioner (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 6c8a9a8661 [config] coap (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 01ebc18f97 [config] channel monitor (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui 1021946d6d [config] channel manager (#4020) 2019-07-31 14:16:30 -07:00
Jonathan Hui f18497395a [config] border router (#4020) 2019-07-31 14:16:30 -07:00
Mirek ec6057c524 [cli] make output of panid consistent with input (#4028) 2019-07-26 09:00:24 -07:00
Jonathan Hui e87bc42184 [diag] move factory diags into core (#4010)
- Simplifies make files by not having to deal with separate library.
- Combine factory diags source into single source file.
2019-07-23 08:47:16 -07:00
Abtin Keshavarzian d92733661c [posix-app] simplify makefiles (#3975)
* [cli] ensure legacy callback APIs are defined as `OT_TOOL_WEAK`

* [posix-app] simplify the makefile (link in ncp lib).

This commit simplifies the posix-app makefiles by removing the
`inc_<module>` source files (which included certain modules from
the `ncp` folder). Instead the library `libopenthread-ncp-ftd.a`
is included when linking thethe final posix-app executables
`ot-ncp`,  `ot-cli` and/or, `o-daemon`.

* [posix-app] ensure header files from ncp folder have "ncp/" prefix

This commit changes the posix-app platform makefile such that
the header files from `src/ncp` folder require "ncp/" prefix.
2019-07-09 13:24:41 -07:00
Yakun Xu d0285164a0 [cli] remove otPtr introduced by windows platform (#3973) 2019-07-09 04:36:08 -07:00
Christian Stauffer b983974aec [cli] delete redundant and unnecessary includes (#3959) 2019-07-03 10:54:50 -07:00
Jonathan Hui 1631d23a13 [netif] remove interface id specification from interfaces (#3925) 2019-06-20 09:30:56 -07:00
Jonathan Hui 6dfd716da1 [auto-start] remove auto-start feature (#3920) 2019-06-14 12:40:30 -07:00
Jonathan Hui 46bad7bee6 [cli] remove "s_" prefix from static methods (#3905) 2019-06-10 08:44:48 -07:00
Abtin Keshavarzian 2a5403d94a [sntp-clinet] simplify uint64 constants 2019-06-07 11:21:21 -07:00
Kamil Sroka c14cc60962 [windows] remove unsupported platform (#3878) 2019-06-06 11:55:18 -07:00
Łukasz Duda 6d1d7b2404 [cli] count failed ping try (#3882) 2019-05-31 09:10:40 -07:00
Łukasz Duda 99937016c0 [cli] extend ipaddr command for selective address printing (#3856) 2019-05-29 13:46:56 -07:00
Jonathan Hui 68beda5b07 [cli] move commissioner to separate source files (#3862) 2019-05-28 18:25:50 -07:00
Jonathan Hui 9cd11a2761 [cli] move joiner to separate source files (#3862) 2019-05-28 18:25:50 -07:00
Łukasz Duda eb46303ff8 [cli] clean up IPv6 address printing (#3855) 2019-05-22 10:59:04 -07:00
Jonathan Hui fa395d7205 [time-sync] remove reference operator in C API (#3833) 2019-05-20 08:50:43 -07:00
Kamil Sroka 56fa9ac9cd [entropy] allow for entropy source sharing (#3818) 2019-05-17 12:41:03 -07:00
Yakun Xu ae4ef9eb3e [timer] fix elapsed overflow (#3789)
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.
2019-05-02 08:44:37 -07:00
Ciaran Woodward 267a3b3e29 [cli] add 'childip' command to cli for getting ip addresses of MTD children (#3791) 2019-04-30 18:40:40 -07:00
Jonathan Hui f46fbb844d [pskc] switch to using otPSKc struct (#3769) 2019-04-18 08:45:14 -07:00
Shu Chen a43a263a0c [api] remove otLinkGetPhyChannel*() Link APIs (#3736) 2019-04-08 21:25:16 -07:00