* 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.
This commit changes the posix logging implementation to write the
entire log line in a single `fprintf()` command. This change helps
keep the open thread logs separate from other wpantund logs (syslog)
in simulator (posix) run.
This commit modifies the `NcpBase` and `NcpUart` classes to use new
Ncp buffer model (defined `in NcpFrameBuffer` class).
Here are the main changes in this commit:
- It changes the 'NcpUart` to adopt the `NcpFrameBuffer` for storing the
outbound frames. This allows multiple frames to be queued for tx.
- `NcpUart` is changed so that the outgoing frames are encoded and
sent over to Uart in smaller chunks. This helps reduce the required
buffer size for storing the encoded outbound uart data.
- The spinel command handler methods in `NcpBase` are modified to return
ThreadError status to indicate success or failure (e.g., when there is no
buffer space for a response frame).
- If the response to a spinel command cannot be sent (no buffer space) the
`NcpBase` remembers the set of TIDs (transaction ids) of such commands
so to reply later with error status `SPINEL_STATUS_NOMEM` when buffer
space becomes available. This ensures that spinel commands will get
a response even in case of full buffer.
- The `NcpSpi` class is modified to address the changes from `NcpBase` but
this commit does not change the buffer model for the `NcpSpi`. It adds
`spi-stubs.c` to enable building the ncp app with spi feature under
posix platform.
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.
* Redefine otEnable/otDisable to just initialize/uninitialize the OpenThread stack.
* Remove otInit API since it is replaced by otEnable.
* Add otInterfaceUp/otInterfaceDown APIs to bring up/down IPv6 interface.
* Add otThreadStart/otThreadStop APIs to start/stop Thread protocol operation.
* Updated NCP implementation to utilize new APIs.
* 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.
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.
* 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.
In addition to the "SoC/CLI" implementation that is already included,
OpenThread needs a Network Control Processor (NCP) implementation to
facilitate applications where the Host Controller is logically
separate from the controller that implements the Thread stack (Which
is the NCP). This task also necessitates the definition of the
protocol that the Host Controller and the NCP use to communicate with
each other.
This commit represents a functional starting point for both of these.
The initial name of the line protocol is "Spinel" (Named after the
[gemstone][1]). The long-term goal is to standardize the Spinel
protocol to be the official line protocol for host-to-NCP comunication
for Thread.
A [draft of the Spinel protocol document][2] is included in this
commit. At this point everything is subject to change, but as-is the
protocol has been demonstrated to work fairly well.
The NCP implementation in the has been tested and is working well
enough for basic connectivity, but it is far from complete. A Host
implementation is not yet provided in the tree, but will eventually be
included. A separate host implementation for Linux has been written
and is anticipated to be released as a separate project over the next
few weeks.
[1]: https://en.wikipedia.org/wiki/Spinel
[2]: https://github.com/openthread/openthread/blob/feature/ncp-spinel/src/ncp/PROTOCOL.md#spinel-host-controller-interface
* 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.