This commit changes the `NcpSpi` class implementation such that SPI
tx frame preparation always happens from the same task `mPrepareTxFrameTask`
This ensures that the callbacks to base class `Ncp` are also invoked from the
the same task (and not from the the task calling `OutboundFrameEnd()`).
* 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.