mirror of
https://github.com/espressif/openthread.git
synced 2026-09-03 07:40:10 +00:00
[otns] make various enhancements to Otns (#11643)
This commit contains various enhancements to the `Otns` class: - Makes `Otns` methods non-static. This aligns their use with the clang-tidy `readability-static-accessed-through-instance` check, which disallows accessing static methods through an instance. - Updates the `make-pretty` script to enable OTNS and include it in `clang-tidy` checks. - Adds a stub implementation of `otPlatOtnsStatus()` in the simulation and fake platforms. This allows the OTNS feature to be enabled in `make-pretty` builds and covered by GitHub Action CI checks. - Simplifies the `EmitStatus` methods to use the `String` class for constructing the status string. - Adds a new helper method to construct the CoAP status string, removing duplicated code.
This commit is contained in:
@@ -122,3 +122,7 @@ void otPlatAssertFail(const char *aFilename, int aLineNumber)
|
||||
assert(false);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_OTNS_ENABLE && !OPENTHREAD_SIMULATION_VIRTUAL_TIME
|
||||
void otPlatOtnsStatus(const char *aStatus) { OT_UNUSED_VARIABLE(aStatus); }
|
||||
#endif
|
||||
|
||||
@@ -76,17 +76,6 @@
|
||||
#define OPENTHREAD_CONFIG_NCP_SPI_ENABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check OTNS configurations
|
||||
*/
|
||||
#if OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
|
||||
#if !OPENTHREAD_SIMULATION_VIRTUAL_TIME
|
||||
#error "OTNS requires virtual time simulations"
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user