PowerTelemetry.h File
PMBus rail power telemetry. More...
Included Headers
#include <chrono>
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
Classes Index
| struct | PowerRailConfig |
|
Configuration for one PMBus rail exposed by a paged PMIC. More... | |
| struct | PowerFieldReading |
|
One scalar rail field read from a PMIC. More... | |
| struct | PowerRailReading |
|
Snapshot for one rail. More... | |
| struct | PowerSnapshot |
|
Point-in-time board power snapshot. More... | |
| struct | PowerMonitorOptions |
|
Options for a PowerMonitor. More... | |
| struct | PowerFieldSummary |
|
Summary statistics for one scalar rail field. More... | |
| struct | PowerRailSummary |
|
Summary statistics for one rail. More... | |
| struct | PowerSummary |
|
Aggregated power monitor result. More... | |
| class | PowerMonitor |
|
Background SOM power sampler. More... | |
Description
PMBus rail power telemetry.
File Listing
The file content with the documentation metadata removed is:
14namespace simaai::neat {
20enum class PowerMonitorProfile {
21 Auto,
22 ModalixSom,
23 ModalixDvt,
24 Custom,
35struct PowerRailConfig {
40 int vout_exponent = -8;
41 int iout_exponent = -6;
42 int pout_exponent = -5;
49struct PowerFieldReading {
64struct PowerRailReading {
75struct PowerSnapshot {
78 double total_watts = 0.0;
79 std::uint64_t rails_with_power = 0;
86struct PowerMonitorOptions {
88 int sample_interval_ms = 100;
99struct PowerFieldSummary {
111struct PowerRailSummary {
122struct PowerSummary {
125 double duration_seconds = 0.0;
126 double total_avg_watts = 0.0;
127 double total_min_watts = 0.0;
128 double total_max_watts = 0.0;
129 double energy_joules = 0.0;
137std::vector<PowerRailConfig> default_modalix_som_power_rails();
146std::vector<PowerRailConfig> default_modalix_dvt_power_rails();
158std::string power_monitor_profile_name(PowerMonitorProfile profile);
164std::vector<PowerRailConfig> power_rails_for_profile(PowerMonitorProfile profile);
171board_power_monitor_options(int sample_interval_ms = 100,
172 PowerMonitorProfile profile = PowerMonitorProfile::Auto);
178PowerMonitorOptions modalix_som_power_monitor_options(int sample_interval_ms = 100);
184PowerMonitorOptions modalix_dvt_power_monitor_options(int sample_interval_ms = 100);
190PowerSnapshot read_power_snapshot(const PowerMonitorOptions& options);
196std::string format_power_summary(const PowerSummary& summary);
202std::string power_summary_to_json(const PowerSummary& summary, int indent = 2);
212class PowerMonitor {
214 explicit PowerMonitor(PowerMonitorOptions options = {});
215 ~PowerMonitor();
217 PowerMonitor(const PowerMonitor&) = delete;
218 PowerMonitor& operator=(const PowerMonitor&) = delete;
220 PowerMonitor(PowerMonitor&&) noexcept;
221 PowerMonitor& operator=(PowerMonitor&&) noexcept;
228 void sample_once();
230 PowerSummary summary() const;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.