[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:
Abtin Keshavarzian
2025-06-30 14:39:30 -07:00
committed by GitHub
parent 0093b9caf5
commit a495a2284b
7 changed files with 136 additions and 101 deletions
+1
View File
@@ -129,6 +129,7 @@ OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_NAT64_TRANSLATOR=ON'
'-DOT_NETDATA_PUBLISHER=ON'
'-DOT_NETDIAG_CLIENT=ON'
'-DOT_OTNS=ON'
'-DOT_PING_SENDER=ON'
'-DOT_REFERENCE_DEVICE=ON'
'-DOT_SERVICE=ON'