Commit Graph

30 Commits

Author SHA1 Message Date
Robert Quattlebaum dae1d3801d ncp: Various changes in order to better support address change events (#165)
There are two logical sets of changes presented here:

* core/thread/mle: Follow remove/change/add pattern for unicast addresses

  The goal here is to avoid modifying an address after it has been added to
  the netif. That way we get reliable removal/insertion eventing. This
  pattern has other advantages which will likely become apparent later.

* openthread-types: Add `OT_IP6_ML_ADDR_CHANGED` flag

  This allows us to know precisely when the mesh local address has changed
  its value.
2016-06-17 10:03:25 -07:00
Abtin Keshavarzian 8590a067e5 Fix typos in header file comments. (#159) 2016-06-15 19:18:19 -07:00
Jonathan Hui a7e34a6f17 Add notifications on configuration and state changes from OpenThread. (#146)
Example state changes that will cause a notification:
- IPv6 address added/removed
- Device state (offline, detached, attached)
- Device role (disabled, detached, child, router, leader)
- Partition ID
- Key Sequence
- Child added/removed
2016-06-15 12:17:05 -07:00
Jonathan Hui 469f925683 Remove otPlat*Init() functions that are no longer used. (#142) 2016-06-14 08:46:49 -07:00
Jonathan Hui e7ef0b0208 Remove redefinition of otMessage. (#140) 2016-06-14 08:46:22 -07:00
Jonathan Hui 5084009670 Update platform/radio.h doxygen to match implementation. (#138) 2016-06-14 08:45:29 -07:00
Lu Wang 9a7fa9b80e add mac layer counter (#90)
* add mac layer counter

* add more counters and Doxygen for MAC counters

* have a seperate counter for acked data transmission and refine the code based on the comments

* refine counters for acked and unacked transmissions

* fix check test error

* refine code style and use VerifyOrExit to exit

* move all events tracker to tx/rx done task, and add more counters

* fix other error counter

* refine counters structure to be clearer

* add Doxygen for the added thread errors

* fix conflicts
2016-06-12 00:32:51 -07:00
turon 3576322262 Added platform/toolchain.h toolchain abstraction layer via macros. (#107)
* Added platform/toolchain.h toolchain abstraction layer via macros:
   OT_TOOL_PACKED_BEGIN
   OT_TOOL_PACKED_END
   OT_TOOL_DEPRECATED(symbol)

* Make pretty.  Rekick travis-ci.

* Added doxygen.  Resolved review comments.

* Fixed doxygen sample for OT_TOOL_PACKED to include type name.

* Renamed OT_TOOL_PACKED_FIELD to simplify code searches for usage. Fixed all nested instances to use new naming.

* Fixed OT_TOOL_PACKED_FIELD renaming in doxygen.

* Make pretty.

* Documentation clarifications.

* Moved example into overview section.

* Fixed sdcc comment.

* Revised sdcc comment.

* Fix code style in toolchain packed doxygen example.

* Fixed example.  Moved toolchain test to better match code style.

* Added test for OT_TOOL_PACKED_FIELD.

* Added support for clang.  Just routes to gcc __attributes__.  Verified by running unit test through clang on macos.
2016-06-11 21:35:52 -07:00
Jonathan Hui 87e9508232 Add ability to capture all received IEEE 802.15.4 frames. (#120)
* Add API to register a callback for providing received IEEE 802.15.4 frames.
* Add API to enable/disable promiscuous mode.
2016-06-11 12:44:40 -07:00
Jonathan Hui 012fe7ebee Implement known missing OpenThread APIs needed for NCP support. (#122)
This change adds the following APIs:
* otGetLeaderRloc
* otGetMeshLocalEid
* otGetMeshLocalPrefix
* otSetMeshLocalPrefix
* otGetNetworkDataLeader
* otGetNetworkDataLocal
* otGetShortAddress
* otSetRawIp6ReceivedCallback
* otSendRawIp6
2016-06-11 12:44:23 -07:00
Jonathan Hui fa84ba7b5e Reduce logging.h to minimal needed for platform and move rest into core. (#104) 2016-06-02 19:40:45 -07:00
Jonathan Hui 1af6a399eb Install public headers. (#102) 2016-06-02 19:07:28 -07:00
Jonathan Hui c3009d0361 Move example apps to C-only API. (#99) 2016-06-02 18:38:27 -07:00
Lu Wang 4131e571b8 add enable/disable radio promiscuous mode method and simulated posix … (#84)
* add enable/disable radio promiscuous mode method and simulated posix radio that supports promiscuous mode

* fix code style
2016-05-31 10:13:50 -07:00
Jonathan Hui e2a85d62e3 Require radio driver to provide transmit and receive buffers. (#87)
Some radio chips have memory-mapped regions for transmit and receive buffers.
This change allows the radio driver to pass those buffers, when available,
directly to upper layers and avoid unnecessary copies.
2016-05-27 14:17:48 -07:00
Jonathan Hui 7d2e4a0267 Change API to require all calls be from the same context. (#78)
* Remove atomic driver and all uses of otPlatAtomic* in OpenThread.
* Change posix example to only use a single thread of execution.
2016-05-27 09:16:04 -07:00
Jonathan Hui 25f1fe5a21 Expose LQI from radio up through Thread stack. (#70)
* Add an LQI field to the radio packet structure.
* Add an LQI field to the ThreadMessageInfo.
* Add an LQI field to the scan result.
* Print LQI value in CLI scan result.
2016-05-26 15:08:11 -07:00
Jonathan Hui 3bc2809ea9 Do not blindly pass up unsecure frames from the link layer. (#68)
The following checks were added:
1) Any unsecure 6LoWPAN Mesh frames are dropped.
2) Any unsecure 6LoWPAN Fragment frames are only added to unsecure reassembly buffers.
3) Any unsecure MAC Data Poll frames are dropped.
4) Any unsecure IPv6 datagrams must have:
    a) Destination with link-local scope,
    b) Next Header set to UDP,
    c) UDP Destination Port set to MLE,
    d) Length long enough to carry IPv6 and UDP headers.
2016-05-26 11:45:44 -07:00
Marcin K Szczodrak e68e38b8e8 Feature/integ fix2 (#72)
* fix compilation issues

* second set of small fixes
2016-05-24 16:36:48 -07:00
Marcin K Szczodrak f7a0ddc2f9 fix compilation issues (#71) 2016-05-24 15:13:14 -07:00
Jonathan Hui 9cb7aad7bf Add support to handle 'CHANNEL_ACCESS_FAILURE' and 'NO_ACK' results from the PHY layer. (#67) 2016-05-24 15:09:05 -07:00
Lu Wang 96adf87cd0 add otPlatRadioGetCaps method to check radio capabilities (#53)
add doxygen for otRadioCaps

remove tmp file
2016-05-20 23:20:05 -07:00
Jonathan Hui d1b0fed201 Add code style formatting (pretty) and checker (pretty-check) targets. (#52)
* Add 'pretty' target to reformat sources to be compliant with code style.
* Add 'pretty-check' target to check if sources are compliant with code style.
* Update travis-ci script to use 'pretty-check' and enforce code style.
* The 'pretty' and 'pretty-check' targets rely on the 'astyle' tool.
2016-05-19 15:46:29 -07:00
pvanhorn 91cce9e0d7 Resolve several compile warnings and errors. (#43) 2016-05-18 14:16:10 -07:00
Jonathan Hui c8908cf687 Fix 'make dist'. (#40)
* Include header files for distribution.
* Include tests scripts for distribution.
* Include docs for distribution.
2016-05-16 21:41:38 -07:00
Robert Quattlebaum e54e83e9fc core: mac: Added new method: Mac::IsActiveScanInProgress() (#29)
* core: mac: Added new method: `Mac::IsActiveScanInProgress()`

* core: Add `otActiveScanInProgress()` for checking if a scan is in progress.
2016-05-13 18:41:14 -07:00
Jonathan Hui 1f24fa44fa Add active scan to API and CLI. (#27)
* Add active scan functions and definitions to core C api.
* Add active scan command to CLI.
* Add emulation of PHY channel isolation.
2016-05-13 15:14:04 -07:00
Marcin K Szczodrak 99870fae01 adjust license text width (#22) 2016-05-12 22:39:11 -07:00
pvanhorn a37ca1302d Add void to API prototypes which take no arguments. (#14)
LGTM.  Thanks @pvanhorn !
2016-05-11 15:37:02 -07:00
Jonathan Hui 4f9945c533 Initial commit 2016-05-10 22:49:53 -07:00