Expand description
Software Diagnostics, cluster 0x0034 (Core §11.13).
The Software Diagnostics Cluster attempts to centralize all metrics that are relevant to the software that may be running on a Node.
Heap and stack, essentially — how much is free now and how little has ever been free. On
the kind of device this crate is built for, the second number is the one that matters: a
node with 32 KB of RAM does not run out of memory gradually, it runs out once, three weeks
after shipping, in a code path nobody was watching. CurrentHeapHighWatermark and
StackFreeMinimum are the record of how close it came.
§A crate with no allocator still has something to report
matter-kit is no-alloc, so nothing here has a heap. The metrics are the device’s: a
node that runs an RTOS with a heap for its application reports that heap, and one that has
none reports nothing and declares neither attribute. Which is why every method of
SoftwareMetrics returns an Option and the absent case is
Status::UnsupportedAttribute rather than a zero — “0 bytes free” and “no heap” read the
same to a client and mean opposite things.
Structs§
- NoMetrics
- A node that reports no software metrics at all.
- Software
Diagnostics - The Software Diagnostics cluster (§11.13).
- Thread
Metrics - One entry of
ThreadMetrics(§11.13.5.1) — a software thread, not a Thread network.
Constants§
- ALL_
OPTIONAL - Everything §11.13.6 makes optional, for a runtime that reports all of it.
- CURRENT_
HEAP_ FREE CurrentHeapFree(§11.13.6.2) —uint64,RV C.- CURRENT_
HEAP_ HIGH_ WATERMARK CurrentHeapHighWatermark(§11.13.6.4) —uint64,RV C,WTRMRK.- CURRENT_
HEAP_ USED CurrentHeapUsed(§11.13.6.3) —uint64,RV C.- FEATURE_
WATERMARKS WTRMRK(§11.13.4) — “Node makes available the metrics for high watermark related to memory consumption”.- ID
0x0034(§11.13.3).- RESET_
WATERMARKS ResetWatermarks(§11.13.7.1) — Manage,WTRMRK.- REVISION
- The revision §11.13.1’s table ends on.
- SOFTWARE_
FAULT SoftwareFault(§11.13.8.1) — INFO.- THREAD_
METRICS ThreadMetrics(§11.13.6.1) —list[ThreadMetricsStruct], max 64,RV C.
Traits§
- Software
Metrics - What the device’s runtime knows about its own memory.
Functions§
- conforming
- The descriptor for an instance with these features.