plant.py 375 B

12345678910111213141516171819
  1. from dataclasses import dataclass, field
  2. from .common import BaseMeasurement
  3. @dataclass(frozen=True)
  4. class CompactLogixState(BaseMeasurement):
  5. field1: int
  6. field2: bool
  7. series: str = field(default="plant")
  8. @dataclass(frozen=True)
  9. class S7State(BaseMeasurement):
  10. cpu_running: bool
  11. field1: int
  12. field2: bool
  13. series: str = field(default="plant", init=False)