Commit Graph

3041 Commits

Author SHA1 Message Date
Abtin Keshavarzian c862afc6b3 [mac-filter] hide the mFiltered in public filter APIs (#3722)
This commit improves the `Mac::Filter` implementation. It mainly
removes the internally used `mFiltered` variable from the public
`otMacFilterEntry` definition and moves it inside `Mac::Filter`
private definitions.
2019-04-02 10:20:22 -07:00
Abtin Keshavarzian b6a539c8d5 [code-utils] add OT_ARRAY_END() macro (#3722)
This commit adds `OT_ARRAY_END(aArray)` macro which returns a
pointer to the end of a given array (pointing to the past-the-end
element).
2019-04-02 10:20:22 -07:00
Yakun Xu dd1e0f4695 [cli] add legacy stub in cli (#3729)
This commit adds stubs for legacy APIs.
2019-04-02 09:11:46 -07:00
Abtin Keshavarzian 8f112eeb5a [locator] adding Get<Type> to InstanceLocator (#3714)
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.
2019-04-02 09:07:25 -07:00
Łukasz Duda 9dfa4e2b31 [nrf528xx] remove unnecessary dependencies from app_error_weak implementation (#3725) 2019-04-01 09:06:43 -07:00
Abtin Keshavarzian 2daa892f56 [dataset] use Read/Save method names instead of Get/Set (#3723)
This commit renames methods in `DatasetLocal`, `DatasetManager`,
'ActiveDataset' and `PendingDataset` to use `Read()` and `Save()`
in place of `Get()` and `Set()` respectively. This aligns the
names with `Setting` class indicating that these method do
read/save Dataset info in non-volatile memory.
2019-04-01 09:05:58 -07:00
Jiacheng Guo 88912d23ae [nrf52840] signal event in usb cdc (#3715) 2019-04-01 09:05:10 -07:00
dismirlian 81fd8a8b10 [examples] software implementation of source match table (#3717)
* [examples] add software implementation of source match table

* [efr32] modify radio driver to use generic implementation of source match table

* [efr32] configure soft source match table PAN ID
2019-04-01 08:52:47 -07:00
Jonathan Hui 19544490e3 [style] replace reinterpret_cast with static_cast where possible (#3718) 2019-03-28 22:29:58 -07:00
Joseph Newman ecad71733d [ncp] add service spinel bindings (#3659)
* add spinel bindings for service add/remove/get
* add leader services query
2019-03-28 22:29:25 -07:00
Jeff Bumgardner ca0b1d8229 [docs] fix instances of "the the" in comments (#3720) 2019-03-27 18:44:41 -07:00
Łukasz Duda 0b6cd5b115 [nrf528xx] add otSysEventSignalPending call in spi-slave driver (#3716) 2019-03-27 08:47:13 -07:00
Jonathan Hui 3b41c7ef44 [fuzz] advance alarm time to cover timer handlers (#3710) 2019-03-26 12:17:31 -07:00
dismirlian 24d5d3db66 [efr32] minor enhancements to radio driver (#3713)
* Add static linkage to local functions

* Simplify clearing checksum of source match table entry
2019-03-26 08:53:10 -07:00
Jonathan Hui 1fefe2e683 [dtls] return error on multiple calls to Dtls::Open() (#3709) 2019-03-25 08:36:19 -07:00
Jonathan Hui a9e0fe9ec6 [udp] add Udp::IsBound() method (#3708) 2019-03-25 08:35:56 -07:00
Yakun Xu 23ff1015d4 [core] change return type of otMessageRead() (#3707) 2019-03-22 08:12:55 -07:00
Jonathan Hui 49c4b63491 [style] make parameter names consistent across decls and defs (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui d32ca03a8b [style] remove redundant control flow (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui 0de1fff570 [style] remove redundant declarations (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui 63cf08d04a [style] const-qualify pointer args where possible (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui cadfc6d299 [style] remove static member access through instances (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui c7cd21f8b7 [style] remove const values in declarations (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui e00114b3f1 [style] mark single-arg constructors as explicit (#3705)
Avoids unintentional implicit conversions.
2019-03-22 08:12:26 -07:00
Jonathan Hui f2d93917c2 [style] remove using decls from global namespace in headers (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui 8656101724 [style] remove unused using decls (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui 2ab9b49042 [style] use C++-style casts (#3705) 2019-03-22 08:12:26 -07:00
Jonathan Hui 8ed382207d [efr32] fix build issues when sub-GHz support is not configured (#3704) 2019-03-22 08:11:56 -07:00
Yakun Xu 5f220682cd [tests] add an inspector for travis certification tests (#3700)
This commit adds a debugger to inspect nodes status.
2019-03-22 08:11:39 -07:00
rongli 1b8b797919 [netdata] fix stable network data version when service updates (#3702) 2019-03-21 12:13:20 -07:00
Yakun Xu e3d0368070 [travis] remove unused sources (#3701)
This commit removes unused sources from apt update list to avoid fetch
failures.
2019-03-21 08:21:18 -07:00
Jonathan Hui 4f734fa24f [udp] return error on source port mismatch in Udp::SendTo() (#3698) 2019-03-20 03:18:51 -07:00
Jonathan Hui b6ef4988f3 [travis] add travis_retry to before_install (#3697) 2019-03-19 21:17:45 -07:00
Jonathan Hui aaaae937d3 [style] prefer OT_UNUSED_VARIABLE (#3696) 2019-03-19 21:17:33 -07:00
Irving-cl a637cdccf4 [tests] add test case Cert_9_2_02 (#3589)
1. Add new test case **Cert_9_2_02**. Since the test case contains 2
topologies, added 2 new files:
- `Cert_9_2_02A_MGMTCommissionerSet.py`,
- `Cert_9_2_02B_MGMTCommissionerSet.py`.

2. Add mesh_cop tlvs parsing. The corresponding file is
`mesh_cop.py`. The mesh_cop tlvs are used in many cases. For example,
`CommissionerSessionId` is used in both the parsing of **Commissioning
Data**(in mle) and the parsing of **CoAP**. Collected all mesh_cop
tlvs refered in Thread into this file with some unused tlvs
unimplemented.

3. Reuse `SubTlvsFactory` in `network_data.py`. `SubTlvsFactory` are
used to choose the corresponding factory of specific tlv and do the
parsing of it. The `NetworkLayerTlvsFactory` in `network_layer.py` had
exactly the same function with it (almost the same code). Moved the
`SubTlvsFactory` into a new file `tlvs_parsing.py` and change the
usage in `network_data.py` and `network_layer.py`. This helps us
remove some redundant code.

4. Some format issues. Remove some trailing spaces.
2019-03-19 21:17:15 -07:00
Łukasz Duda a3f398b30f [doc] update documentation of CLI counters command (#3695) 2019-03-19 14:00:55 -07:00
Jonathan Hui c0de3be7f3 [dtls] cleanup method names (#3694)
- Rename Close() to Disconnect() to better pair with Connect()
- Rename Stop() to Close() to better pair with Open()
- Make Setup() private.
2019-03-18 22:58:38 -07:00
Jonathan Hui a39f2c86d3 [dtls] do not allow Open() or Bind() when DTLS session is started (#3694) 2019-03-18 22:58:38 -07:00
Abtin Keshavarzian 8bddf61ae2 [toranj] add test to cover OT/NCP SLAAC module behavior (#3688)
This commit updates and renames the existing `test-026-slaac-address`
to indicate that it covers the behavior of `wpantund` related to
SLAAC address management (in `test-026` we disable NCP SLAAC module).

It adds a new test `test-030-slaac-address-ncp` to cover behavior of
OpenThread/NCP SLAAC module:

- Verify that adding prefix (with SLAAC flag) causes a corresponding
  SLAAC IPv6 address to be added.
- Verify that removing the prefix would remove the SLAAC address.
- Verify behavior when same prefix is added and removed on multiple nodes
  (with or without SLAAC flag).
- Check behavior when an IPv6 address with the same prefix already exists.
- Check behavior when the address with same prefix is removed (SLAAC module
  should add a SLAAC address upon removal of the address).
- Verify that removal of prefix does not remove user-added addresses with
  same prefix.
- Verify disabling SLAAC module removes any previously added SLAAC
  addresses, and re-enabling it adds them back (with same IID).
- Check behavior when prefix is added while SLAAC module is disabled and
  then enabled later.
2019-03-18 22:58:13 -07:00
Jonathan Hui 037896c5cd [meshcop] fix doxygen in ChannelMaskTlv::SetChannelMask() (#3693) 2019-03-18 16:54:20 -07:00
Yakun Xu 728e19b47a [cli] avoid input overflow (#3691) 2019-03-18 09:01:02 -07:00
Jonathan Hui fab45352f5 [meshcop] process ChannelMaskTlv in message (#3690)
Allows arbitrary number of Channel Mask entries.
2019-03-15 21:46:02 -07:00
Zhanglong Xia 61e9288805 [ip6] correct annotations (#3692) 2019-03-15 21:39:23 -07:00
Yakun Xu ea459d4cc3 [posix-app] fix debug flag (#3689) 2019-03-14 21:58:48 -07:00
Abtin Keshavarzian 6256b5cdde [link-raw] log frame tx attempt failures (#3687)
This commit adds logs to indicate frame tx attempt failures on
`LinkRaw` class for RCP model.
2019-03-14 19:55:21 -07:00
Zhanglong Xia 1af2933449 [efr32] enable BRD4170A to support 915MHz and 2.4GHz by default (#3664) 2019-03-14 09:44:35 -07:00
Yakun Xu dea08b2db7 [posix-app] add readline for CLI (#3511) 2019-03-13 23:32:32 -07:00
Jonathan Hui 160ef467e6 [dtls] handle MBEDTLS_ERR_PEM_ALLOC_FAILED in Dtls::MapError() (#3674) 2019-03-13 23:20:56 -07:00
Abtin Keshavarzian 89396ab5d3 [ncp] add SLAAC related spinel capability and property (#3667)
This commit adds `SPINEL_CAP_SLAAC` which indicates to host whether
SLAAC feature is supported. It also adds `SPINEL_PROP_SLAAC_ENABLED`
spinel property to let host enable/disable SLAAC module at run-time.
2019-03-13 23:20:41 -07:00
Abtin Keshavarzian cce16b6dda [slaac] add IsEnabled() method and public API otIp6IsSlaacEnabled (#3667) 2019-03-13 23:20:41 -07:00