mirror of
https://github.com/espressif/openthread.git
synced 2026-08-31 06:19:54 +00:00
[otns] add default (weak) OTNS platform API implementation in core (#12308)
A default OTNS platform API function otPlatOtnsStatus() is now provided that writes the status push to the log always (regardless of configured log level). This is useful as a default handling for apps built with -DOT_OTNS=ON, avoiding linker errors while not mandating each platform to implement the API by itself. Specifically it enables the Posix CLI app ot-cli to be built with OTNS support, which is required to run Posix nodes in OTNS and receive the status-push events via stdout logging. The logging is emitted from the module named "Otns" so that a simulator or other tool can easily detect the OTNS format status push events in the log output.
This commit is contained in:
@@ -666,9 +666,5 @@ void otPlatDnssdStartRecordQuerier(otInstance *, const otPlatDnssdRecordQuerier
|
||||
|
||||
void otPlatDnssdStopRecordQuerier(otInstance *, const otPlatDnssdRecordQuerier *) {}
|
||||
|
||||
#if OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
void otPlatOtnsStatus(const char *aStatus) { OT_UNUSED_VARIABLE(aStatus); }
|
||||
#endif
|
||||
|
||||
void otPlatAssertFail(const char *, int) {}
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user