pw_metric: Refactor Metric for 64-bit support Refactor the core Metric class into a type-discriminated hierarchy: - UntypedMetric: Common base class stored in intrusive lists. Holds the token and type. - TypedMetric<T>: Templates specializing for float and uint32_t, inheriting directly from UntypedMetric and holding their own atomic values. Minor fixes: - Save metric value to be used for size calculations and encoding it. - Move atomic write limits checks inside loop to avoid redundant writes to max value. All services and tests are updated to use the new type-discriminated UntypedMetric / TypedMetric<T> classes. Bug: 527616876 TAG=agy CONV=00d042e4-0d7a-44c6-88b5-7813e806a32e Change-Id: I9008552049541eb77c1b4ed0850a487deebd2914 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/424534
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.