1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: (GPL-2.0-or-later OR Apache-2.0)
// Copyright (c) Viacheslav Bocharov <v@baodeep.com> and JetHome (r)
//! Measurement result types.
/// A full snapshot of the 3-phase measurements from a single
/// [`Atm90e32::read_all_phases`] call.
///
/// All values are **raw register values** — lossless, no floating-point
/// conversion. Use the [`proto`](crate::proto) helpers to convert to
/// engineering units when needed:
///
/// | Field | Raw unit | Converter |
/// |-------|----------|-----------|
/// | `voltage` | hundredths of a volt (u16) | [`voltage_raw_to_volts`](crate::proto::voltage_raw_to_volts) |
/// | `current` | thousandths of an amp (u16) | [`current_raw_to_amps`](crate::proto::current_raw_to_amps) |
/// | `power` | signed 32-bit combined word (i32) | [`power_combined_to_watts`](crate::proto::power_combined_to_watts) |
/// | `reactive` | signed 32-bit combined word (i32) | [`power_combined_to_watts`](crate::proto::power_combined_to_watts) |
/// | `pf` | signed thousandths (i16) | [`power_factor_raw_to_unitless`](crate::proto::power_factor_raw_to_unitless) |
/// | `frequency` | hundredths of a hertz (u16) | [`frequency_raw_to_hz`](crate::proto::frequency_raw_to_hz) |
/// | `phase_angle` | tenths of a degree (u16) | [`phase_angle_raw_to_degrees`](crate::proto::phase_angle_raw_to_degrees) |
///
/// Each three-element array is indexed in phase order A, B, C.
///
/// [`Atm90e32::read_all_phases`]: crate::Atm90e32::read_all_phases