s2-python 0.3.1__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {s2_python-0.3.1 → s2_python-0.4.1}/PKG-INFO +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/setup.cfg +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/PKG-INFO +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/SOURCES.txt +1 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/requires.txt +1 -1
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/duration.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/handshake.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/handshake_response.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/instruction_status_update.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/number_range.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_forecast.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_forecast_element.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_forecast_value.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_measurement.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_range.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/power_value.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/reception_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/resource_manager_details.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/revoke_object.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/role.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/select_control_type.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/session_request.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/timer.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/transition.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_actuator_description.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_actuator_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_fill_level_target_profile.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_fill_level_target_profile_element.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_instruction.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_leakage_behaviour.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_leakage_behaviour_element.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_operation_mode.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_operation_mode_element.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_storage_description.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_storage_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_system_description.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_timer_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_usage_forecast.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_usage_forecast_element.py +2 -2
- s2_python-0.4.1/src/s2python/message.py +50 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_end_interruption_instruction.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_profile_definition.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_profile_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_sequence.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_sequence_container.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_sequence_container_status.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_sequence_element.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_schedule_instruction.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_start_interruption_instruction.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/s2_connection.py +7 -7
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/s2_control_type.py +1 -1
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/s2_parser.py +3 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/validate_values_mixin.py +2 -2
- {s2_python-0.3.1 → s2_python-0.4.1}/README.rst +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/pyproject.toml +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/setup.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/dependency_links.txt +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/entry_points.txt +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/not-zip-safe +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2_python.egg-info/top_level.txt +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/__init__.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/__init__.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/common/support.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/__init__.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/rm.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/generated/__init__.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/generated/gen_s2.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/__init__.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/py.typed +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/reception_status_awaiter.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/s2_validation_error.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/utils.py +0 -0
- {s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.1
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
16
16
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
17
|
-
Requires-Dist: pydantic
|
17
|
+
Requires-Dist: pydantic>=2.8.2
|
18
18
|
Requires-Dist: pytz
|
19
19
|
Requires-Dist: click
|
20
20
|
Requires-Dist: websockets~=13.1
|
@@ -8,7 +8,7 @@ license_files = LICENSE.txt
|
|
8
8
|
long_description = file: README.rst
|
9
9
|
long_description_content_type = text/x-rst; charset=UTF-8
|
10
10
|
url = https://github.com/flexiblepower/s2-ws-json-python
|
11
|
-
version = 0.
|
11
|
+
version = 0.4.1
|
12
12
|
platforms = Linux
|
13
13
|
classifiers =
|
14
14
|
Development Status :: 4 - Beta
|
@@ -26,7 +26,7 @@ package_dir =
|
|
26
26
|
=src
|
27
27
|
python_requires > = 3.8, <= 3.12
|
28
28
|
install_requires =
|
29
|
-
pydantic
|
29
|
+
pydantic>=2.8.2
|
30
30
|
pytz
|
31
31
|
click
|
32
32
|
websockets~=13.1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.1
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
16
16
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
17
|
-
Requires-Dist: pydantic
|
17
|
+
Requires-Dist: pydantic>=2.8.2
|
18
18
|
Requires-Dist: pytz
|
19
19
|
Requires-Dist: click
|
20
20
|
Requires-Dist: websockets~=13.1
|
@@ -10,6 +10,7 @@ src/s2_python.egg-info/not-zip-safe
|
|
10
10
|
src/s2_python.egg-info/requires.txt
|
11
11
|
src/s2_python.egg-info/top_level.txt
|
12
12
|
src/s2python/__init__.py
|
13
|
+
src/s2python/message.py
|
13
14
|
src/s2python/py.typed
|
14
15
|
src/s2python/reception_status_awaiter.py
|
15
16
|
src/s2python/s2_connection.py
|
@@ -4,12 +4,12 @@ import math
|
|
4
4
|
from s2python.generated.gen_s2 import Duration as GenDuration
|
5
5
|
from s2python.validate_values_mixin import (
|
6
6
|
catch_and_convert_exceptions,
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
)
|
9
9
|
|
10
10
|
|
11
11
|
@catch_and_convert_exceptions
|
12
|
-
class Duration(GenDuration,
|
12
|
+
class Duration(GenDuration, S2MessageComponent["Duration"]):
|
13
13
|
def to_timedelta(self) -> timedelta:
|
14
14
|
return timedelta(milliseconds=self.root)
|
15
15
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import Handshake as GenHandshake
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class Handshake(GenHandshake,
|
11
|
+
class Handshake(GenHandshake, S2MessageComponent["Handshake"]):
|
12
12
|
model_config = GenHandshake.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import HandshakeResponse as GenHandshakeResponse
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class HandshakeResponse(GenHandshakeResponse,
|
11
|
+
class HandshakeResponse(GenHandshakeResponse, S2MessageComponent["HandshakeResponse"]):
|
12
12
|
model_config = GenHandshakeResponse.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -5,12 +5,12 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class InstructionStatusUpdate(GenInstructionStatusUpdate,
|
13
|
+
class InstructionStatusUpdate(GenInstructionStatusUpdate, S2MessageComponent["InstructionStatusUpdate"]):
|
14
14
|
model_config = GenInstructionStatusUpdate.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from typing import Any
|
2
2
|
|
3
|
-
from s2python.validate_values_mixin import
|
3
|
+
from s2python.validate_values_mixin import S2MessageComponent, catch_and_convert_exceptions
|
4
4
|
from s2python.generated.gen_s2 import NumberRange as GenNumberRange
|
5
5
|
|
6
6
|
|
7
7
|
@catch_and_convert_exceptions
|
8
|
-
class NumberRange(GenNumberRange,
|
8
|
+
class NumberRange(GenNumberRange, S2MessageComponent["NumberRange"]):
|
9
9
|
model_config = GenNumberRange.model_config
|
10
10
|
model_config["validate_assignment"] = True
|
11
11
|
|
@@ -5,12 +5,12 @@ from s2python.common.power_forecast_element import PowerForecastElement
|
|
5
5
|
from s2python.generated.gen_s2 import PowerForecast as GenPowerForecast
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class PowerForecast(GenPowerForecast,
|
13
|
+
class PowerForecast(GenPowerForecast, S2MessageComponent["PowerForecast"]):
|
14
14
|
model_config = GenPowerForecast.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -3,14 +3,14 @@ from typing import List
|
|
3
3
|
from s2python.generated.gen_s2 import PowerForecastElement as GenPowerForecastElement
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
from s2python.common.duration import Duration
|
9
9
|
from s2python.common.power_forecast_value import PowerForecastValue
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class PowerForecastElement(GenPowerForecastElement,
|
13
|
+
class PowerForecastElement(GenPowerForecastElement, S2MessageComponent["PowerForecastElement"]):
|
14
14
|
model_config = GenPowerForecastElement.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from s2python.generated.gen_s2 import PowerForecastValue as GenPowerForecastValue
|
2
2
|
from s2python.validate_values_mixin import (
|
3
3
|
catch_and_convert_exceptions,
|
4
|
-
|
4
|
+
S2MessageComponent,
|
5
5
|
)
|
6
6
|
|
7
7
|
|
8
8
|
@catch_and_convert_exceptions
|
9
|
-
class PowerForecastValue(GenPowerForecastValue,
|
9
|
+
class PowerForecastValue(GenPowerForecastValue, S2MessageComponent["PowerForecastValue"]):
|
10
10
|
model_config = GenPowerForecastValue.model_config
|
11
11
|
model_config["validate_assignment"] = True
|
@@ -5,12 +5,12 @@ from s2python.common.power_value import PowerValue
|
|
5
5
|
from s2python.generated.gen_s2 import PowerMeasurement as GenPowerMeasurement
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class PowerMeasurement(GenPowerMeasurement,
|
13
|
+
class PowerMeasurement(GenPowerMeasurement, S2MessageComponent["PowerMeasurement"]):
|
14
14
|
model_config = GenPowerMeasurement.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -4,13 +4,13 @@ from pydantic import model_validator
|
|
4
4
|
|
5
5
|
from s2python.generated.gen_s2 import PowerRange as GenPowerRange
|
6
6
|
from s2python.validate_values_mixin import (
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
catch_and_convert_exceptions,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class PowerRange(GenPowerRange,
|
13
|
+
class PowerRange(GenPowerRange, S2MessageComponent["PowerRange"]):
|
14
14
|
model_config = GenPowerRange.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from s2python.generated.gen_s2 import PowerValue as GenPowerValue
|
2
2
|
from s2python.validate_values_mixin import (
|
3
3
|
catch_and_convert_exceptions,
|
4
|
-
|
4
|
+
S2MessageComponent,
|
5
5
|
)
|
6
6
|
|
7
7
|
|
8
8
|
@catch_and_convert_exceptions
|
9
|
-
class PowerValue(GenPowerValue,
|
9
|
+
class PowerValue(GenPowerValue, S2MessageComponent["PowerValue"]):
|
10
10
|
model_config = GenPowerValue.model_config
|
11
11
|
model_config["validate_assignment"] = True
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import ReceptionStatus as GenReceptionStatus
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class ReceptionStatus(GenReceptionStatus,
|
11
|
+
class ReceptionStatus(GenReceptionStatus, S2MessageComponent["ReceptionStatus"]):
|
12
12
|
model_config = GenReceptionStatus.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -8,12 +8,12 @@ from s2python.generated.gen_s2 import (
|
|
8
8
|
)
|
9
9
|
from s2python.validate_values_mixin import (
|
10
10
|
catch_and_convert_exceptions,
|
11
|
-
|
11
|
+
S2MessageComponent,
|
12
12
|
)
|
13
13
|
|
14
14
|
|
15
15
|
@catch_and_convert_exceptions
|
16
|
-
class ResourceManagerDetails(GenResourceManagerDetails,
|
16
|
+
class ResourceManagerDetails(GenResourceManagerDetails, S2MessageComponent["ResourceManagerDetails"]):
|
17
17
|
model_config = GenResourceManagerDetails.model_config
|
18
18
|
model_config["validate_assignment"] = True
|
19
19
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import RevokeObject as GenRevokeObject
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class RevokeObject(GenRevokeObject,
|
11
|
+
class RevokeObject(GenRevokeObject, S2MessageComponent["RevokeObject"]):
|
12
12
|
model_config = GenRevokeObject.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from s2python.generated.gen_s2 import Role as GenRole
|
2
2
|
from s2python.validate_values_mixin import (
|
3
|
-
|
3
|
+
S2MessageComponent,
|
4
4
|
catch_and_convert_exceptions,
|
5
5
|
)
|
6
6
|
|
7
7
|
|
8
8
|
@catch_and_convert_exceptions
|
9
|
-
class Role(GenRole,
|
9
|
+
class Role(GenRole, S2MessageComponent["Role"]):
|
10
10
|
model_config = GenRole.model_config
|
11
11
|
model_config["validate_assignment"] = True
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import SelectControlType as GenSelectControlType
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class SelectControlType(GenSelectControlType,
|
11
|
+
class SelectControlType(GenSelectControlType, S2MessageComponent["SelectControlType"]):
|
12
12
|
model_config = GenSelectControlType.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import SessionRequest as GenSessionRequest
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class SessionRequest(GenSessionRequest,
|
11
|
+
class SessionRequest(GenSessionRequest, S2MessageComponent["SessionRequest"]):
|
12
12
|
model_config = GenSessionRequest.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -3,13 +3,13 @@ import uuid
|
|
3
3
|
from s2python.common.duration import Duration
|
4
4
|
from s2python.generated.gen_s2 import Timer as GenTimer
|
5
5
|
from s2python.validate_values_mixin import (
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
catch_and_convert_exceptions,
|
8
8
|
)
|
9
9
|
|
10
10
|
|
11
11
|
@catch_and_convert_exceptions
|
12
|
-
class Timer(GenTimer,
|
12
|
+
class Timer(GenTimer, S2MessageComponent["Timer"]):
|
13
13
|
model_config = GenTimer.model_config
|
14
14
|
model_config["validate_assignment"] = True
|
15
15
|
|
@@ -4,13 +4,13 @@ from typing import Optional, List
|
|
4
4
|
from s2python.common.duration import Duration
|
5
5
|
from s2python.generated.gen_s2 import Transition as GenTransition
|
6
6
|
from s2python.validate_values_mixin import (
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
catch_and_convert_exceptions,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class Transition(GenTransition,
|
13
|
+
class Transition(GenTransition, S2MessageComponent["Transition"]):
|
14
14
|
model_config = GenTransition.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -12,13 +12,13 @@ from s2python.generated.gen_s2 import (
|
|
12
12
|
FRBCActuatorDescription as GenFRBCActuatorDescription,
|
13
13
|
)
|
14
14
|
from s2python.validate_values_mixin import (
|
15
|
-
|
15
|
+
S2MessageComponent,
|
16
16
|
catch_and_convert_exceptions,
|
17
17
|
)
|
18
18
|
|
19
19
|
|
20
20
|
@catch_and_convert_exceptions
|
21
|
-
class FRBCActuatorDescription(GenFRBCActuatorDescription,
|
21
|
+
class FRBCActuatorDescription(GenFRBCActuatorDescription, S2MessageComponent["FRBCActuatorDescription"]):
|
22
22
|
model_config = GenFRBCActuatorDescription.model_config
|
23
23
|
model_config["validate_assignment"] = True
|
24
24
|
|
@@ -4,12 +4,12 @@ import uuid
|
|
4
4
|
from s2python.generated.gen_s2 import FRBCActuatorStatus as GenFRBCActuatorStatus
|
5
5
|
from s2python.validate_values_mixin import (
|
6
6
|
catch_and_convert_exceptions,
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
)
|
9
9
|
|
10
10
|
|
11
11
|
@catch_and_convert_exceptions
|
12
|
-
class FRBCActuatorStatus(GenFRBCActuatorStatus,
|
12
|
+
class FRBCActuatorStatus(GenFRBCActuatorStatus, S2MessageComponent["FRBCActuatorStatus"]):
|
13
13
|
model_config = GenFRBCActuatorStatus.model_config
|
14
14
|
model_config["validate_assignment"] = True
|
15
15
|
|
@@ -9,12 +9,12 @@ from s2python.generated.gen_s2 import (
|
|
9
9
|
)
|
10
10
|
from s2python.validate_values_mixin import (
|
11
11
|
catch_and_convert_exceptions,
|
12
|
-
|
12
|
+
S2MessageComponent,
|
13
13
|
)
|
14
14
|
|
15
15
|
|
16
16
|
@catch_and_convert_exceptions
|
17
|
-
class FRBCFillLevelTargetProfile(GenFRBCFillLevelTargetProfile,
|
17
|
+
class FRBCFillLevelTargetProfile(GenFRBCFillLevelTargetProfile, S2MessageComponent["FRBCFillLevelTargetProfile"]):
|
18
18
|
model_config = GenFRBCFillLevelTargetProfile.model_config
|
19
19
|
model_config["validate_assignment"] = True
|
20
20
|
|
{s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/frbc/frbc_fill_level_target_profile_element.py
RENAMED
@@ -8,12 +8,12 @@ from s2python.common import Duration, NumberRange
|
|
8
8
|
from s2python.generated.gen_s2 import (
|
9
9
|
FRBCFillLevelTargetProfileElement as GenFRBCFillLevelTargetProfileElement,
|
10
10
|
)
|
11
|
-
from s2python.validate_values_mixin import catch_and_convert_exceptions,
|
11
|
+
from s2python.validate_values_mixin import catch_and_convert_exceptions, S2MessageComponent
|
12
12
|
|
13
13
|
|
14
14
|
@catch_and_convert_exceptions
|
15
15
|
class FRBCFillLevelTargetProfileElement(
|
16
|
-
GenFRBCFillLevelTargetProfileElement,
|
16
|
+
GenFRBCFillLevelTargetProfileElement, S2MessageComponent["FRBCFillLevelTargetProfileElement"]
|
17
17
|
):
|
18
18
|
model_config = GenFRBCFillLevelTargetProfileElement.model_config
|
19
19
|
model_config["validate_assignment"] = True
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import FRBCInstruction as GenFRBCInstruction
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class FRBCInstruction(GenFRBCInstruction,
|
11
|
+
class FRBCInstruction(GenFRBCInstruction, S2MessageComponent["FRBCInstruction"]):
|
12
12
|
model_config = GenFRBCInstruction.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -5,12 +5,12 @@ from s2python.frbc.frbc_leakage_behaviour_element import FRBCLeakageBehaviourEle
|
|
5
5
|
from s2python.generated.gen_s2 import FRBCLeakageBehaviour as GenFRBCLeakageBehaviour
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class FRBCLeakageBehaviour(GenFRBCLeakageBehaviour,
|
13
|
+
class FRBCLeakageBehaviour(GenFRBCLeakageBehaviour, S2MessageComponent["FRBCLeakageBehaviour"]):
|
14
14
|
model_config = GenFRBCLeakageBehaviour.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -5,12 +5,12 @@ from typing_extensions import Self
|
|
5
5
|
|
6
6
|
from s2python.common import NumberRange
|
7
7
|
from s2python.generated.gen_s2 import FRBCLeakageBehaviourElement as GenFRBCLeakageBehaviourElement
|
8
|
-
from s2python.validate_values_mixin import catch_and_convert_exceptions,
|
8
|
+
from s2python.validate_values_mixin import catch_and_convert_exceptions, S2MessageComponent
|
9
9
|
|
10
10
|
|
11
11
|
@catch_and_convert_exceptions
|
12
12
|
class FRBCLeakageBehaviourElement(
|
13
|
-
GenFRBCLeakageBehaviourElement,
|
13
|
+
GenFRBCLeakageBehaviourElement, S2MessageComponent["FRBCLeakageBehaviourElement"]
|
14
14
|
):
|
15
15
|
model_config = GenFRBCLeakageBehaviourElement.model_config
|
16
16
|
model_config["validate_assignment"] = True
|
@@ -9,14 +9,14 @@ from s2python.common import NumberRange
|
|
9
9
|
from s2python.frbc.frbc_operation_mode_element import FRBCOperationModeElement
|
10
10
|
from s2python.generated.gen_s2 import FRBCOperationMode as GenFRBCOperationMode
|
11
11
|
from s2python.validate_values_mixin import (
|
12
|
-
|
12
|
+
S2MessageComponent,
|
13
13
|
catch_and_convert_exceptions,
|
14
14
|
)
|
15
15
|
from s2python.utils import pairwise
|
16
16
|
|
17
17
|
|
18
18
|
@catch_and_convert_exceptions
|
19
|
-
class FRBCOperationMode(GenFRBCOperationMode,
|
19
|
+
class FRBCOperationMode(GenFRBCOperationMode, S2MessageComponent["FRBCOperationMode"]):
|
20
20
|
model_config = GenFRBCOperationMode.model_config
|
21
21
|
model_config["validate_assignment"] = True
|
22
22
|
|
@@ -5,13 +5,13 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
FRBCOperationModeElement as GenFRBCOperationModeElement,
|
6
6
|
)
|
7
7
|
from s2python.validate_values_mixin import (
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
catch_and_convert_exceptions,
|
10
10
|
)
|
11
11
|
|
12
12
|
|
13
13
|
@catch_and_convert_exceptions
|
14
|
-
class FRBCOperationModeElement(GenFRBCOperationModeElement,
|
14
|
+
class FRBCOperationModeElement(GenFRBCOperationModeElement, S2MessageComponent["FRBCOperationModeElement"]):
|
15
15
|
model_config = GenFRBCOperationModeElement.model_config
|
16
16
|
model_config["validate_assignment"] = True
|
17
17
|
|
@@ -4,12 +4,12 @@ from s2python.generated.gen_s2 import (
|
|
4
4
|
)
|
5
5
|
from s2python.validate_values_mixin import (
|
6
6
|
catch_and_convert_exceptions,
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
)
|
9
9
|
|
10
10
|
|
11
11
|
@catch_and_convert_exceptions
|
12
|
-
class FRBCStorageDescription(GenFRBCStorageDescription,
|
12
|
+
class FRBCStorageDescription(GenFRBCStorageDescription, S2MessageComponent["FRBCStorageDescription"]):
|
13
13
|
model_config = GenFRBCStorageDescription.model_config
|
14
14
|
model_config["validate_assignment"] = True
|
15
15
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import FRBCStorageStatus as GenFRBCStorageStatus
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class FRBCStorageStatus(GenFRBCStorageStatus,
|
11
|
+
class FRBCStorageStatus(GenFRBCStorageStatus, S2MessageComponent["FRBCStorageStatus"]):
|
12
12
|
model_config = GenFRBCStorageStatus.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -4,14 +4,14 @@ import uuid
|
|
4
4
|
from s2python.generated.gen_s2 import FRBCSystemDescription as GenFRBCSystemDescription
|
5
5
|
from s2python.validate_values_mixin import (
|
6
6
|
catch_and_convert_exceptions,
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
)
|
9
9
|
from s2python.frbc.frbc_actuator_description import FRBCActuatorDescription
|
10
10
|
from s2python.frbc.frbc_storage_description import FRBCStorageDescription
|
11
11
|
|
12
12
|
|
13
13
|
@catch_and_convert_exceptions
|
14
|
-
class FRBCSystemDescription(GenFRBCSystemDescription,
|
14
|
+
class FRBCSystemDescription(GenFRBCSystemDescription, S2MessageComponent["FRBCSystemDescription"]):
|
15
15
|
model_config = GenFRBCSystemDescription.model_config
|
16
16
|
model_config["validate_assignment"] = True
|
17
17
|
|
@@ -3,12 +3,12 @@ import uuid
|
|
3
3
|
from s2python.generated.gen_s2 import FRBCTimerStatus as GenFRBCTimerStatus
|
4
4
|
from s2python.validate_values_mixin import (
|
5
5
|
catch_and_convert_exceptions,
|
6
|
-
|
6
|
+
S2MessageComponent,
|
7
7
|
)
|
8
8
|
|
9
9
|
|
10
10
|
@catch_and_convert_exceptions
|
11
|
-
class FRBCTimerStatus(GenFRBCTimerStatus,
|
11
|
+
class FRBCTimerStatus(GenFRBCTimerStatus, S2MessageComponent["FRBCTimerStatus"]):
|
12
12
|
model_config = GenFRBCTimerStatus.model_config
|
13
13
|
model_config["validate_assignment"] = True
|
14
14
|
|
@@ -4,13 +4,13 @@ import uuid
|
|
4
4
|
from s2python.generated.gen_s2 import FRBCUsageForecast as GenFRBCUsageForecast
|
5
5
|
from s2python.validate_values_mixin import (
|
6
6
|
catch_and_convert_exceptions,
|
7
|
-
|
7
|
+
S2MessageComponent,
|
8
8
|
)
|
9
9
|
from s2python.frbc.frbc_usage_forecast_element import FRBCUsageForecastElement
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class FRBCUsageForecast(GenFRBCUsageForecast,
|
13
|
+
class FRBCUsageForecast(GenFRBCUsageForecast, S2MessageComponent["FRBCUsageForecast"]):
|
14
14
|
model_config = GenFRBCUsageForecast.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -5,12 +5,12 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
|
-
class FRBCUsageForecastElement(GenFRBCUsageForecastElement,
|
13
|
+
class FRBCUsageForecastElement(GenFRBCUsageForecastElement, S2MessageComponent["FRBCUsageForecastElement"]):
|
14
14
|
model_config = GenFRBCUsageForecastElement.model_config
|
15
15
|
model_config["validate_assignment"] = True
|
16
16
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
from typing import Union
|
2
|
+
|
3
|
+
from s2python.frbc import (
|
4
|
+
FRBCActuatorStatus,
|
5
|
+
FRBCFillLevelTargetProfile,
|
6
|
+
FRBCInstruction,
|
7
|
+
FRBCLeakageBehaviour,
|
8
|
+
FRBCStorageStatus,
|
9
|
+
FRBCSystemDescription,
|
10
|
+
FRBCTimerStatus,
|
11
|
+
FRBCUsageForecast
|
12
|
+
)
|
13
|
+
from s2python.ppbc import (
|
14
|
+
PPBCScheduleInstruction,
|
15
|
+
)
|
16
|
+
|
17
|
+
from s2python.common import (
|
18
|
+
Handshake,
|
19
|
+
HandshakeResponse,
|
20
|
+
InstructionStatusUpdate,
|
21
|
+
PowerForecast,
|
22
|
+
PowerMeasurement,
|
23
|
+
ReceptionStatus,
|
24
|
+
ResourceManagerDetails,
|
25
|
+
RevokeObject,
|
26
|
+
SelectControlType,
|
27
|
+
SessionRequest
|
28
|
+
)
|
29
|
+
|
30
|
+
S2Message = Union[
|
31
|
+
FRBCActuatorStatus,
|
32
|
+
FRBCFillLevelTargetProfile,
|
33
|
+
FRBCInstruction,
|
34
|
+
FRBCLeakageBehaviour,
|
35
|
+
FRBCStorageStatus,
|
36
|
+
FRBCSystemDescription,
|
37
|
+
FRBCTimerStatus,
|
38
|
+
FRBCUsageForecast,
|
39
|
+
PPBCScheduleInstruction,
|
40
|
+
Handshake,
|
41
|
+
HandshakeResponse,
|
42
|
+
InstructionStatusUpdate,
|
43
|
+
PowerForecast,
|
44
|
+
PowerMeasurement,
|
45
|
+
ReceptionStatus,
|
46
|
+
ResourceManagerDetails,
|
47
|
+
RevokeObject,
|
48
|
+
SelectControlType,
|
49
|
+
SessionRequest,
|
50
|
+
]
|
@@ -5,14 +5,14 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
|
7
7
|
from s2python.validate_values_mixin import (
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
catch_and_convert_exceptions,
|
10
10
|
)
|
11
11
|
|
12
12
|
|
13
13
|
@catch_and_convert_exceptions
|
14
14
|
class PPBCEndInterruptionInstruction(
|
15
|
-
GenPPBCEndInterruptionInstruction,
|
15
|
+
GenPPBCEndInterruptionInstruction, S2MessageComponent["PPBCEndInterruptionInstruction"]
|
16
16
|
):
|
17
17
|
model_config = GenPPBCEndInterruptionInstruction.model_config
|
18
18
|
model_config["validate_assignment"] = True
|
@@ -6,7 +6,7 @@ from s2python.generated.gen_s2 import (
|
|
6
6
|
)
|
7
7
|
|
8
8
|
from s2python.validate_values_mixin import (
|
9
|
-
|
9
|
+
S2MessageComponent,
|
10
10
|
catch_and_convert_exceptions,
|
11
11
|
)
|
12
12
|
|
@@ -15,7 +15,7 @@ from s2python.ppbc.ppbc_power_sequence_container import PPBCPowerSequenceContain
|
|
15
15
|
|
16
16
|
@catch_and_convert_exceptions
|
17
17
|
class PPBCPowerProfileDefinition(
|
18
|
-
GenPPBCPowerProfileDefinition,
|
18
|
+
GenPPBCPowerProfileDefinition, S2MessageComponent["PPBCPowerProfileDefinition"]
|
19
19
|
):
|
20
20
|
model_config = GenPPBCPowerProfileDefinition.model_config
|
21
21
|
model_config["validate_assignment"] = True
|
@@ -5,7 +5,7 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
|
7
7
|
from s2python.validate_values_mixin import (
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
catch_and_convert_exceptions,
|
10
10
|
)
|
11
11
|
|
@@ -16,7 +16,7 @@ from s2python.ppbc.ppbc_power_sequence_container_status import (
|
|
16
16
|
|
17
17
|
@catch_and_convert_exceptions
|
18
18
|
class PPBCPowerProfileStatus(
|
19
|
-
GenPPBCPowerProfileStatus,
|
19
|
+
GenPPBCPowerProfileStatus, S2MessageComponent["PPBCPowerProfileStatus"]
|
20
20
|
):
|
21
21
|
model_config = GenPPBCPowerProfileStatus.model_config
|
22
22
|
model_config["validate_assignment"] = True
|
@@ -6,7 +6,7 @@ from s2python.generated.gen_s2 import (
|
|
6
6
|
)
|
7
7
|
|
8
8
|
from s2python.validate_values_mixin import (
|
9
|
-
|
9
|
+
S2MessageComponent,
|
10
10
|
catch_and_convert_exceptions,
|
11
11
|
)
|
12
12
|
|
@@ -15,7 +15,7 @@ from s2python.common import Duration
|
|
15
15
|
|
16
16
|
|
17
17
|
@catch_and_convert_exceptions
|
18
|
-
class PPBCPowerSequence(GenPPBCPowerSequence,
|
18
|
+
class PPBCPowerSequence(GenPPBCPowerSequence, S2MessageComponent["PPBCPowerSequence"]):
|
19
19
|
model_config = GenPPBCPowerSequence.model_config
|
20
20
|
model_config["validate_assignment"] = True
|
21
21
|
|
@@ -7,7 +7,7 @@ from s2python.generated.gen_s2 import (
|
|
7
7
|
)
|
8
8
|
|
9
9
|
from s2python.validate_values_mixin import (
|
10
|
-
|
10
|
+
S2MessageComponent,
|
11
11
|
catch_and_convert_exceptions,
|
12
12
|
)
|
13
13
|
|
@@ -16,7 +16,7 @@ from s2python.ppbc.ppbc_power_sequence import PPBCPowerSequence
|
|
16
16
|
|
17
17
|
@catch_and_convert_exceptions
|
18
18
|
class PPBCPowerSequenceContainer(
|
19
|
-
GenPPBCPowerSequenceContainer,
|
19
|
+
GenPPBCPowerSequenceContainer, S2MessageComponent["PPBCPowerSequenceContainer"]
|
20
20
|
):
|
21
21
|
model_config = GenPPBCPowerSequenceContainer.model_config
|
22
22
|
model_config["validate_assignment"] = True
|
{s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_power_sequence_container_status.py
RENAMED
@@ -6,14 +6,14 @@ from s2python.generated.gen_s2 import (
|
|
6
6
|
)
|
7
7
|
|
8
8
|
from s2python.validate_values_mixin import (
|
9
|
-
|
9
|
+
S2MessageComponent,
|
10
10
|
catch_and_convert_exceptions,
|
11
11
|
)
|
12
12
|
|
13
13
|
|
14
14
|
@catch_and_convert_exceptions
|
15
15
|
class PPBCPowerSequenceContainerStatus(
|
16
|
-
GenPPBCPowerSequenceContainerStatus,
|
16
|
+
GenPPBCPowerSequenceContainerStatus, S2MessageComponent["PPBCPowerSequenceContainerStatus"]
|
17
17
|
):
|
18
18
|
model_config = GenPPBCPowerSequenceContainerStatus.model_config
|
19
19
|
model_config["validate_assignment"] = True
|
@@ -5,7 +5,7 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
|
7
7
|
from s2python.validate_values_mixin import (
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
catch_and_convert_exceptions,
|
10
10
|
)
|
11
11
|
|
@@ -14,7 +14,7 @@ from s2python.common import Duration, PowerForecastValue
|
|
14
14
|
|
15
15
|
@catch_and_convert_exceptions
|
16
16
|
class PPBCPowerSequenceElement(
|
17
|
-
GenPPBCPowerSequenceElement,
|
17
|
+
GenPPBCPowerSequenceElement, S2MessageComponent["PPBCPowerSequenceElement"]
|
18
18
|
):
|
19
19
|
model_config = GenPPBCPowerSequenceElement.model_config
|
20
20
|
model_config["validate_assignment"] = True
|
@@ -5,13 +5,13 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
from s2python.validate_values_mixin import (
|
7
7
|
catch_and_convert_exceptions,
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
)
|
10
10
|
|
11
11
|
|
12
12
|
@catch_and_convert_exceptions
|
13
13
|
class PPBCScheduleInstruction(
|
14
|
-
GenPPBCScheduleInstruction,
|
14
|
+
GenPPBCScheduleInstruction, S2MessageComponent["PPBCScheduleInstruction"]
|
15
15
|
):
|
16
16
|
model_config = GenPPBCScheduleInstruction.model_config
|
17
17
|
model_config["validate_assignment"] = True
|
{s2_python-0.3.1 → s2_python-0.4.1}/src/s2python/ppbc/ppbc_start_interruption_instruction.py
RENAMED
@@ -5,14 +5,14 @@ from s2python.generated.gen_s2 import (
|
|
5
5
|
)
|
6
6
|
|
7
7
|
from s2python.validate_values_mixin import (
|
8
|
-
|
8
|
+
S2MessageComponent,
|
9
9
|
catch_and_convert_exceptions,
|
10
10
|
)
|
11
11
|
|
12
12
|
|
13
13
|
@catch_and_convert_exceptions
|
14
14
|
class PPBCStartInterruptionInstruction(
|
15
|
-
GenPPBCStartInterruptionInstruction,
|
15
|
+
GenPPBCStartInterruptionInstruction, S2MessageComponent["PPBCStartInterruptionInstruction"]
|
16
16
|
):
|
17
17
|
model_config = GenPPBCStartInterruptionInstruction.model_config
|
18
18
|
model_config["validate_assignment"] = True
|
@@ -27,7 +27,7 @@ from s2python.reception_status_awaiter import ReceptionStatusAwaiter
|
|
27
27
|
from s2python.s2_control_type import S2ControlType
|
28
28
|
from s2python.s2_parser import S2Parser
|
29
29
|
from s2python.s2_validation_error import S2ValidationError
|
30
|
-
from s2python.
|
30
|
+
from s2python.message import S2Message
|
31
31
|
from s2python.version import S2_VERSION
|
32
32
|
|
33
33
|
logger = logging.getLogger("s2python")
|
@@ -141,7 +141,7 @@ class MessageHandlers:
|
|
141
141
|
"""
|
142
142
|
handler = self.handlers.get(type(msg))
|
143
143
|
if handler is not None:
|
144
|
-
send_okay = SendOkay(connection, msg.message_id) # type: ignore[attr-defined]
|
144
|
+
send_okay = SendOkay(connection, msg.message_id) # type: ignore[attr-defined, union-attr]
|
145
145
|
|
146
146
|
try:
|
147
147
|
if asyncio.iscoroutinefunction(handler):
|
@@ -158,9 +158,9 @@ class MessageHandlers:
|
|
158
158
|
except Exception:
|
159
159
|
if not send_okay.status_is_send.is_set():
|
160
160
|
await connection.respond_with_reception_status(
|
161
|
-
subject_message_id=str(msg.message_id), # type: ignore[attr-defined]
|
161
|
+
subject_message_id=str(msg.message_id), # type: ignore[attr-defined, union-attr]
|
162
162
|
status=ReceptionStatusValues.PERMANENT_ERROR,
|
163
|
-
diagnostic_label=f"While processing message {msg.message_id} " # type: ignore[attr-defined]
|
163
|
+
diagnostic_label=f"While processing message {msg.message_id} " # type: ignore[attr-defined, union-attr] # pylint: disable=line-too-long
|
164
164
|
f"an unrecoverable error occurred.",
|
165
165
|
)
|
166
166
|
raise
|
@@ -490,17 +490,17 @@ class S2Connection: # pylint: disable=too-many-instance-attributes
|
|
490
490
|
await self._send_and_forget(s2_msg)
|
491
491
|
logger.debug(
|
492
492
|
"Waiting for ReceptionStatus for %s %s seconds",
|
493
|
-
s2_msg.message_id, # type: ignore[attr-defined]
|
493
|
+
s2_msg.message_id, # type: ignore[attr-defined, union-attr]
|
494
494
|
timeout_reception_status,
|
495
495
|
)
|
496
496
|
try:
|
497
497
|
reception_status = await self.reception_status_awaiter.wait_for_reception_status(
|
498
|
-
s2_msg.message_id, timeout_reception_status # type: ignore[attr-defined]
|
498
|
+
s2_msg.message_id, timeout_reception_status # type: ignore[attr-defined, union-attr]
|
499
499
|
)
|
500
500
|
except TimeoutError:
|
501
501
|
logger.error(
|
502
502
|
"Did not receive a reception status on time for %s",
|
503
|
-
s2_msg.message_id, # type: ignore[attr-defined]
|
503
|
+
s2_msg.message_id, # type: ignore[attr-defined, union-attr]
|
504
504
|
)
|
505
505
|
self._stop_event.set()
|
506
506
|
raise
|
@@ -4,7 +4,7 @@ import typing
|
|
4
4
|
from s2python.common import ControlType as ProtocolControlType
|
5
5
|
from s2python.frbc import FRBCInstruction
|
6
6
|
from s2python.ppbc import PPBCScheduleInstruction
|
7
|
-
from s2python.
|
7
|
+
from s2python.message import S2Message
|
8
8
|
|
9
9
|
if typing.TYPE_CHECKING:
|
10
10
|
from s2python.s2_connection import S2Connection, MessageHandlers
|
@@ -26,14 +26,15 @@ from s2python.frbc import (
|
|
26
26
|
)
|
27
27
|
from s2python.ppbc import PPBCScheduleInstruction
|
28
28
|
|
29
|
-
from s2python.
|
29
|
+
from s2python.message import S2Message
|
30
|
+
from s2python.validate_values_mixin import S2MessageComponent
|
30
31
|
from s2python.s2_validation_error import S2ValidationError
|
31
32
|
|
32
33
|
|
33
34
|
LOGGER = logging.getLogger(__name__)
|
34
35
|
S2MessageType = str
|
35
36
|
|
36
|
-
M = TypeVar("M", bound=
|
37
|
+
M = TypeVar("M", bound=S2MessageComponent)
|
37
38
|
|
38
39
|
|
39
40
|
# May be generated with development_utilities/generate_s2_message_type_to_class.py
|
@@ -15,7 +15,7 @@ MappingIntStrAny = Mapping[IntStr, Any]
|
|
15
15
|
C = TypeVar("C", bound="BaseModel")
|
16
16
|
|
17
17
|
|
18
|
-
class
|
18
|
+
class S2MessageComponent(BaseModel, Generic[C]):
|
19
19
|
def to_json(self: C) -> str:
|
20
20
|
try:
|
21
21
|
return self.model_dump_json(by_alias=True, exclude_none=True)
|
@@ -59,7 +59,7 @@ def convert_to_s2exception(f: Callable) -> Callable:
|
|
59
59
|
return inner
|
60
60
|
|
61
61
|
|
62
|
-
def catch_and_convert_exceptions(input_class: Type[
|
62
|
+
def catch_and_convert_exceptions(input_class: Type[S2MessageComponent[B_co]]) -> Type[S2MessageComponent[B_co]]:
|
63
63
|
input_class.__init__ = convert_to_s2exception(input_class.__init__) # type: ignore[method-assign]
|
64
64
|
input_class.__setattr__ = convert_to_s2exception(input_class.__setattr__) # type: ignore[method-assign]
|
65
65
|
input_class.model_validate_json = convert_to_s2exception( # type: ignore[method-assign]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|