File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
src/frequenz/sdk/timeseries Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 88[`Sample`][frequenz.sdk.timeseries.Sample]s.
99"""
1010
11- from ._base_types import Sample
11+ from ._base_types import Sample , Sample3Phase
1212
13- __all__ = [
14- "Sample" ,
15- ]
13+ __all__ = ["Sample" , "Sample3Phase" ]
Original file line number Diff line number Diff line change @@ -26,3 +26,25 @@ class Sample:
2626
2727 value : Optional [float ] = field (compare = False , default = None )
2828 """The value of this sample."""
29+
30+
31+ @dataclass (frozen = True )
32+ class Sample3Phase :
33+ """A 3-phase measurement made at a particular point in time.
34+
35+ Each of the `value` fields could be `None` if a component is malfunctioning
36+ or data is lacking for another reason, but a sample still needs to be sent
37+ to have a coherent view on a group of component metrics for a particular
38+ timestamp.
39+ """
40+
41+ timestamp : datetime
42+ """The time when this sample was generated."""
43+ value_p1 : Optional [float ]
44+ """The value of the 1st phase in this sample."""
45+
46+ value_p2 : Optional [float ]
47+ """The value of the 2nd phase in this sample."""
48+
49+ value_p3 : Optional [float ]
50+ """The value of the 3rd phase in this sample."""
You can’t perform that action at this time.
0 commit comments