Commit Graph

32 Commits

Author SHA1 Message Date
Marcin K Szczodrak 04564ac96d add missing ot types include (#479) 2016-08-26 11:00:20 -07:00
Lu Wang 3d04344cc9 Enhance otPlatRandomGet API to provide random stream (#471)
* Enhance otPlatRandomGet API to provide random stream
2016-08-25 23:41:40 -07:00
Shu Chen b5f97386ba diags: Add output buffer size limitation to avoid overflow issue (#442)
- add aOutputMaxLen parameter in each diagnostics feature process function
- use snprintf() to limit the size of output string
2016-08-22 12:38:29 -07:00
Marcin K Szczodrak a0c6f50051 Feature/ot plat rssi (#411)
* rename otPlatRadioGetNoiseFloor to otPlatRadioGetRssi

* update cli README with singleton command
2016-08-17 16:11:06 -07:00
Shu Chen 7130798123 Add diagnostics module in OpenThread (#343)
* Add diagnostics module in OpenThread

  - provide the same diagnostics interface for both CLI and NCP usage
  - implement common diagnostics features based on existing platform interface defined in 'include/platform/'
  - other more platform specific diagnostics features will be processed under platform layer
  - update CLI interface to support diagnostics feature
  - update both Posix and CC2538 platform to support diagnostics feature

* Add diagnostics module unit test

   - move platform.h from "examples/platform" to "include/platform"
   - add test_diag.cpp to test diagnostics module

* Add a configuration option that would enable/disable diagnostics module

Add --enable-diag configuration option to enable/disable diagnostics module when building OpenThread.
2016-08-11 10:26:51 -07:00
Jonathan Hui 2a493e7ec0 Support meshcop datasets and propagation. (#330) 2016-08-04 09:46:48 -07:00
Robert Quattlebaum ffe6af9bb6 otPlatform: New non-volatile settings API (#320)
* otPlatform: New non-volatile settings API

This is the new API for the storage and retrieval of non-volatile
settings. Platforms would implement this API in order to allow various
types of information to be preserved across resets or power loss.

* fixup! otPlatform: New non-volatile settings API
2016-08-01 15:08:27 -07:00
Abtin Keshavarzian 440ea46775 Add NCP as a log region option in logging.h (#304)
This commit adds new log region for  NCP (kLogRegionNcp). It also
adds the support for posix platform logging implementation.
2016-07-29 17:52:09 -07:00
Robert Quattlebaum f2f8a7a0fc Added platform APIs for handling resets. (#284)
This change includes the addition of two new platform API functions:

* `otPlatReset()`
* `otPlatGetResetReason()`

They are pretty straightforward. Every platform must implement both, but
`otPlatReset()` is allowed to simply return if the platform doesn't support
being reset (like the posix platform).

This commit addresses issue #283.
2016-07-26 12:00:36 -07:00
Marcin K Szczodrak 318fe4b415 turn on warnings and errors (#280) 2016-07-25 21:19:07 -07:00
Marcin K Szczodrak c595b240fb new radio fsm (#275)
* remove Idle calls
* apply radio state changes to posix radio
* apply radio state changes to cc2538
2016-07-25 14:55:58 -07:00
Robert Quattlebaum 5920d44488 ncp: First pass at NCP support for a SPI slave interface. (#254)
In order to avoid some race conditions, this change necessitated
some minor changes to the SPI slave platform API. Specifically,
the callback function now includes most of the arguments passed
to `otPlatSpiSlavePrepareTransaction()`.

This has not been tested outside of doing a simple compile test.
Once we have a platform up and running we can iron out the
bugs.
2016-07-11 11:58:28 -07:00
Jonathan Hui 9baa18e6e6 Rename otPlatSerial* to otPlatUart*. (#253) 2016-07-07 12:18:58 -07:00
Robert Quattlebaum 274b05c5e4 platform/spi-slave: Header for otPlatSpiSlave API (#248)
This commit introduces the header for the `otPlatSpiSlave` API. The
actual implementation of this API is not yet in place, so additional
work needs to be done to make this API useful.

This commit addresses issue #245.
2016-07-06 18:54:57 -07:00
Jonathan Hui a7d69c1726 Add macros for the channel bit-vector used with otActiveScan. (#236) 2016-07-06 18:53:45 -07:00
Abtin Keshavarzian 8590a067e5 Fix typos in header file comments. (#159) 2016-06-15 19:18:19 -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 5084009670 Update platform/radio.h doxygen to match implementation. (#138) 2016-06-14 08:45:29 -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 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
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
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 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
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