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.
This commit is contained in:
Shu Chen
2016-08-11 10:26:51 -07:00
committed by Jonathan Hui
parent cefea1a3c6
commit 7130798123
38 changed files with 1476 additions and 16 deletions
+16
View File
@@ -59,6 +59,22 @@ extern "C" void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
(void)aBufLength;
}
extern "C" void otPlatDiagAlarmFired()
{
}
extern "C" void otPlatDiagRadioTransmitDone(bool aRxPending, ThreadError aError)
{
(void)aRxPending;
(void)aError;
}
extern "C" void otPlatDiagRadioReceiveDone(RadioPacket *aFrame, ThreadError aError)
{
(void)aFrame;
(void)aError;
}
ThreadNetif sMockThreadNetif;
Lowpan::Lowpan sMockLowpan(sMockThreadNetif);