From f76bba6bf83d902d8b1cc0d6a5bf5fb4f5d0325c Mon Sep 17 00:00:00 2001 From: LKuemmel <76958050+LKuemmel@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:09:12 +0200 Subject: [PATCH] update device samples (#1944) --- docs/samples/sample_modbus/bat.py | 3 ++- docs/samples/sample_modbus/counter.py | 3 ++- docs/samples/sample_modbus/inverter.py | 3 ++- docs/samples/sample_request_by_component/bat.py | 3 ++- docs/samples/sample_request_by_component/counter.py | 3 ++- docs/samples/sample_request_by_component/inverter.py | 3 ++- docs/samples/sample_request_by_device/bat.py | 3 ++- docs/samples/sample_request_by_device/counter.py | 3 ++- docs/samples/sample_request_by_device/inverter.py | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/samples/sample_modbus/bat.py b/docs/samples/sample_modbus/bat.py index 2052102b9d..e28d497e55 100644 --- a/docs/samples/sample_modbus/bat.py +++ b/docs/samples/sample_modbus/bat.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractBat from modules.common.component_state import BatState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_modbus.config import SampleBatSetup -class SampleBat: +class SampleBat(AbstractBat): def __init__(self, device_id: int, component_config: SampleBatSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleBatSetup, component_config) diff --git a/docs/samples/sample_modbus/counter.py b/docs/samples/sample_modbus/counter.py index 443366e317..1b878663c6 100644 --- a/docs/samples/sample_modbus/counter.py +++ b/docs/samples/sample_modbus/counter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractCounter from modules.common.component_state import CounterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_modbus.config import SampleCounterSetup -class SampleCounter: +class SampleCounter(AbstractCounter): def __init__(self, device_id: int, component_config: SampleCounterSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleCounterSetup, component_config) diff --git a/docs/samples/sample_modbus/inverter.py b/docs/samples/sample_modbus/inverter.py index 8a1761bbf1..28011f5fd4 100644 --- a/docs/samples/sample_modbus/inverter.py +++ b/docs/samples/sample_modbus/inverter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractInverter from modules.common.component_state import InverterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_modbus.config import SampleInverterSetup -class SampleInverter: +class SampleInverter(AbstractInverter): def __init__(self, device_id: int, component_config: SampleInverterSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleInverterSetup, component_config) diff --git a/docs/samples/sample_request_by_component/bat.py b/docs/samples/sample_request_by_component/bat.py index 02f9bcd27f..0623ba06c7 100644 --- a/docs/samples/sample_request_by_component/bat.py +++ b/docs/samples/sample_request_by_component/bat.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict from modules.common import req +from modules.common.abstract_device import AbstractBat from modules.common.component_state import BatState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_request_by_component.config import SampleBatSetup, SampleConfiguration -class SampleBat: +class SampleBat(AbstractBat): def __init__(self, device_id: int, component_config: SampleBatSetup, ip_address: str) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleBatSetup, component_config) diff --git a/docs/samples/sample_request_by_component/counter.py b/docs/samples/sample_request_by_component/counter.py index 4e384fc376..3dff0611ee 100644 --- a/docs/samples/sample_request_by_component/counter.py +++ b/docs/samples/sample_request_by_component/counter.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict from modules.common import req +from modules.common.abstract_device import AbstractCounter from modules.common.component_state import CounterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_request_by_component.config import SampleCounterSetup, SampleConfiguration -class SampleCounter: +class SampleCounter(AbstractCounter): def __init__(self, device_id: int, component_config: SampleCounterSetup, ip_address: str) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleCounterSetup, component_config) diff --git a/docs/samples/sample_request_by_component/inverter.py b/docs/samples/sample_request_by_component/inverter.py index 94a9f6e5b7..963e5e77bc 100644 --- a/docs/samples/sample_request_by_component/inverter.py +++ b/docs/samples/sample_request_by_component/inverter.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict from modules.common import req +from modules.common.abstract_device import AbstractInverter from modules.common.component_state import InverterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -9,7 +10,7 @@ from modules.devices.sample_request_by_component.config import SampleInverterSetup, SampleConfiguration -class SampleInverter: +class SampleInverter(AbstractInverter): def __init__(self, device_id: int, component_config: SampleInverterSetup, ip_address: str) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleInverterSetup, component_config) diff --git a/docs/samples/sample_request_by_device/bat.py b/docs/samples/sample_request_by_device/bat.py index 323599b2f4..8c84673029 100644 --- a/docs/samples/sample_request_by_device/bat.py +++ b/docs/samples/sample_request_by_device/bat.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractBat from modules.common.component_state import BatState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -8,7 +9,7 @@ from modules.devices.sample_request_by_device.config import SampleBatSetup -class SampleBat: +class SampleBat(AbstractBat): def __init__(self, device_id: int, component_config: SampleBatSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleBatSetup, component_config) diff --git a/docs/samples/sample_request_by_device/counter.py b/docs/samples/sample_request_by_device/counter.py index 0f086b10bf..fbb409b3dd 100644 --- a/docs/samples/sample_request_by_device/counter.py +++ b/docs/samples/sample_request_by_device/counter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractCounter from modules.common.component_state import CounterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -8,7 +9,7 @@ from modules.devices.sample_request_by_device.config import SampleCounterSetup -class SampleCounter: +class SampleCounter(AbstractCounter): def __init__(self, device_id: int, component_config: SampleCounterSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleCounterSetup, component_config) diff --git a/docs/samples/sample_request_by_device/inverter.py b/docs/samples/sample_request_by_device/inverter.py index e7bfe93996..3ee036e764 100644 --- a/docs/samples/sample_request_by_device/inverter.py +++ b/docs/samples/sample_request_by_device/inverter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from dataclass_utils import dataclass_from_dict +from modules.common.abstract_device import AbstractInverter from modules.common.component_state import InverterState from modules.common.component_type import ComponentDescriptor from modules.common.fault_state import ComponentInfo, FaultState @@ -8,7 +9,7 @@ from modules.devices.sample_request_by_device.config import SampleInverterSetup -class SampleInverter: +class SampleInverter(AbstractInverter): def __init__(self, device_id: int, component_config: SampleInverterSetup) -> None: self.__device_id = device_id self.component_config = dataclass_from_dict(SampleInverterSetup, component_config)