s2-python 0.1.0__py3-none-any.whl → 0.1.3__py3-none-any.whl
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.1.0.dist-info → s2_python-0.1.3.dist-info}/METADATA +20 -19
- s2_python-0.1.3.dist-info/RECORD +51 -0
- {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/WHEEL +1 -1
- s2python/common/__init__.py +17 -16
- s2python/common/duration.py +2 -5
- s2python/common/handshake.py +5 -6
- s2python/common/handshake_response.py +5 -6
- s2python/common/instruction_status_update.py +7 -9
- s2python/common/number_range.py +1 -4
- s2python/common/power_forecast.py +5 -7
- s2python/common/power_forecast_element.py +2 -5
- s2python/common/power_forecast_value.py +1 -4
- s2python/common/power_measurement.py +5 -7
- s2python/common/power_range.py +1 -4
- s2python/common/power_value.py +1 -4
- s2python/common/reception_status.py +5 -8
- s2python/common/resource_manager_details.py +8 -8
- s2python/common/revoke_object.py +5 -7
- s2python/common/role.py +1 -4
- s2python/common/select_control_type.py +5 -6
- s2python/common/session_request.py +5 -6
- s2python/common/support.py +1 -1
- s2python/common/timer.py +1 -7
- s2python/common/transition.py +2 -13
- s2python/frbc/__init__.py +7 -7
- s2python/frbc/frbc_actuator_description.py +4 -10
- s2python/frbc/frbc_actuator_status.py +5 -14
- s2python/frbc/frbc_fill_level_target_profile.py +7 -9
- s2python/frbc/frbc_fill_level_target_profile_element.py +1 -5
- s2python/frbc/frbc_instruction.py +5 -9
- s2python/frbc/frbc_leakage_behaviour.py +7 -7
- s2python/frbc/frbc_leakage_behaviour_element.py +1 -4
- s2python/frbc/frbc_operation_mode.py +2 -7
- s2python/frbc/frbc_operation_mode_element.py +2 -5
- s2python/frbc/frbc_storage_description.py +1 -4
- s2python/frbc/frbc_storage_status.py +5 -6
- s2python/frbc/frbc_system_description.py +8 -8
- s2python/frbc/frbc_timer_status.py +5 -8
- s2python/frbc/frbc_usage_forecast.py +6 -8
- s2python/frbc/frbc_usage_forecast_element.py +1 -5
- s2python/generated/gen_s2.py +848 -833
- s2python/message.py +47 -0
- s2python/s2_parser.py +2 -3
- s2python/utils.py +1 -1
- s2python/validate_values_mixin.py +11 -14
- s2_python-0.1.0.dist-info/RECORD +0 -50
- {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/entry_points.txt +0 -0
- {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,6 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.frbc.frbc_fill_level_target_profile_element import (
|
5
6
|
FRBCFillLevelTargetProfileElement,
|
@@ -7,10 +8,7 @@ from s2python.frbc.frbc_fill_level_target_profile_element import (
|
|
7
8
|
from s2python.generated.gen_s2 import (
|
8
9
|
FRBCFillLevelTargetProfile as GenFRBCFillLevelTargetProfile,
|
9
10
|
)
|
10
|
-
from s2python.validate_values_mixin import
|
11
|
-
catch_and_convert_exceptions,
|
12
|
-
S2Message,
|
13
|
-
)
|
11
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
14
12
|
|
15
13
|
|
16
14
|
@catch_and_convert_exceptions
|
@@ -25,6 +23,6 @@ class FRBCFillLevelTargetProfile(
|
|
25
23
|
] = GenFRBCFillLevelTargetProfile.__fields__[
|
26
24
|
"elements"
|
27
25
|
].field_info # type: ignore[assignment]
|
28
|
-
|
29
|
-
"
|
30
|
-
|
26
|
+
message_type: Literal["FRBC.FillLevelTargetProfile"] = Field(
|
27
|
+
default="FRBC.FillLevelTargetProfile"
|
28
|
+
)
|
@@ -1,12 +1,8 @@
|
|
1
1
|
from s2python.common import Duration, NumberRange
|
2
|
-
|
3
2
|
from s2python.generated.gen_s2 import (
|
4
3
|
FRBCFillLevelTargetProfileElement as GenFRBCFillLevelTargetProfileElement,
|
5
4
|
)
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
6
|
|
11
7
|
|
12
8
|
@catch_and_convert_exceptions
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import FRBCInstruction as GenFRBCInstruction
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,7 +11,4 @@ class FRBCInstruction(GenFRBCInstruction, S2Message["FRBCInstruction"]):
|
|
12
11
|
class Config(GenFRBCInstruction.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
16
|
-
id: uuid.UUID = GenFRBCInstruction.__fields__["id"].field_info # type: ignore[assignment]
|
17
|
-
message_id: uuid.UUID = GenFRBCInstruction.__fields__["message_id"].field_info # type: ignore[assignment]
|
18
|
-
operation_mode: uuid.UUID = GenFRBCInstruction.__fields__["operation_mode"].field_info # type: ignore[assignment]
|
14
|
+
message_type: Literal["FRBC.Instruction"] = Field(default="FRBC.Instruction")
|
@@ -1,12 +1,10 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.frbc.frbc_leakage_behaviour_element import FRBCLeakageBehaviourElement
|
5
6
|
from s2python.generated.gen_s2 import FRBCLeakageBehaviour as GenFRBCLeakageBehaviour
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
8
|
|
11
9
|
|
12
10
|
@catch_and_convert_exceptions
|
@@ -17,4 +15,6 @@ class FRBCLeakageBehaviour(GenFRBCLeakageBehaviour, S2Message["FRBCLeakageBehavi
|
|
17
15
|
elements: List[FRBCLeakageBehaviourElement] = GenFRBCLeakageBehaviour.__fields__[
|
18
16
|
"elements"
|
19
17
|
].field_info # type: ignore[assignment]
|
20
|
-
|
18
|
+
message_type: Literal["FRBC.LeakageBehaviour"] = Field(
|
19
|
+
default="FRBC.LeakageBehaviour"
|
20
|
+
)
|
@@ -2,10 +2,7 @@ from s2python.common import NumberRange
|
|
2
2
|
from s2python.generated.gen_s2 import (
|
3
3
|
FRBCLeakageBehaviourElement as GenFRBCLeakageBehaviourElement,
|
4
4
|
)
|
5
|
-
from s2python.validate_values_mixin import
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
6
|
|
10
7
|
|
11
8
|
@catch_and_convert_exceptions
|
@@ -1,17 +1,13 @@
|
|
1
1
|
# from itertools import pairwise
|
2
|
-
import
|
3
|
-
from typing import List, Dict, Any
|
2
|
+
from typing import Any, Dict, List
|
4
3
|
|
5
4
|
from pydantic import root_validator
|
6
5
|
|
7
6
|
from s2python.common import NumberRange
|
8
7
|
from s2python.frbc.frbc_operation_mode_element import FRBCOperationModeElement
|
9
8
|
from s2python.generated.gen_s2 import FRBCOperationMode as GenFRBCOperationMode
|
10
|
-
from s2python.validate_values_mixin import (
|
11
|
-
S2Message,
|
12
|
-
catch_and_convert_exceptions,
|
13
|
-
)
|
14
9
|
from s2python.utils import pairwise
|
10
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
15
11
|
|
16
12
|
|
17
13
|
@catch_and_convert_exceptions
|
@@ -19,7 +15,6 @@ class FRBCOperationMode(GenFRBCOperationMode, S2Message["FRBCOperationMode"]):
|
|
19
15
|
class Config(GenFRBCOperationMode.Config):
|
20
16
|
validate_assignment = True
|
21
17
|
|
22
|
-
id: uuid.UUID = GenFRBCOperationMode.__fields__["id"].field_info # type: ignore[assignment]
|
23
18
|
elements: List[FRBCOperationModeElement] = GenFRBCOperationMode.__fields__[
|
24
19
|
"elements"
|
25
20
|
].field_info # type: ignore[assignment]
|
@@ -1,13 +1,10 @@
|
|
1
|
-
from typing import
|
1
|
+
from typing import List, Optional
|
2
2
|
|
3
3
|
from s2python.common import NumberRange, PowerRange
|
4
4
|
from s2python.generated.gen_s2 import (
|
5
5
|
FRBCOperationModeElement as GenFRBCOperationModeElement,
|
6
6
|
)
|
7
|
-
from s2python.validate_values_mixin import
|
8
|
-
S2Message,
|
9
|
-
catch_and_convert_exceptions,
|
10
|
-
)
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
11
8
|
|
12
9
|
|
13
10
|
@catch_and_convert_exceptions
|
@@ -2,10 +2,7 @@ from s2python.common import NumberRange
|
|
2
2
|
from s2python.generated.gen_s2 import (
|
3
3
|
FRBCStorageDescription as GenFRBCStorageDescription,
|
4
4
|
)
|
5
|
-
from s2python.validate_values_mixin import
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
6
|
|
10
7
|
|
11
8
|
@catch_and_convert_exceptions
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import FRBCStorageStatus as GenFRBCStorageStatus
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,4 +11,4 @@ class FRBCStorageStatus(GenFRBCStorageStatus, S2Message["FRBCStorageStatus"]):
|
|
12
11
|
class Config(GenFRBCStorageStatus.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
14
|
+
message_type: Literal["FRBC.StorageStatus"] = Field(default="FRBC.StorageStatus")
|
@@ -1,13 +1,11 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
|
-
from s2python.generated.gen_s2 import FRBCSystemDescription as GenFRBCSystemDescription
|
5
|
-
from s2python.validate_values_mixin import (
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
9
5
|
from s2python.frbc.frbc_actuator_description import FRBCActuatorDescription
|
10
6
|
from s2python.frbc.frbc_storage_description import FRBCStorageDescription
|
7
|
+
from s2python.generated.gen_s2 import FRBCSystemDescription as GenFRBCSystemDescription
|
8
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
11
9
|
|
12
10
|
|
13
11
|
@catch_and_convert_exceptions
|
@@ -20,7 +18,9 @@ class FRBCSystemDescription(
|
|
20
18
|
actuators: List[FRBCActuatorDescription] = GenFRBCSystemDescription.__fields__[
|
21
19
|
"actuators"
|
22
20
|
].field_info # type: ignore[assignment]
|
23
|
-
message_id: uuid.UUID = GenFRBCSystemDescription.__fields__["message_id"].field_info # type: ignore[assignment]
|
24
21
|
storage: FRBCStorageDescription = GenFRBCSystemDescription.__fields__[
|
25
22
|
"storage"
|
26
23
|
].field_info # type: ignore[assignment]
|
24
|
+
message_type: Literal["FRBC.SystemDescription"] = Field(
|
25
|
+
default="FRBC.SystemDescription"
|
26
|
+
)
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import FRBCTimerStatus as GenFRBCTimerStatus
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,6 +11,4 @@ class FRBCTimerStatus(GenFRBCTimerStatus, S2Message["FRBCTimerStatus"]):
|
|
12
11
|
class Config(GenFRBCTimerStatus.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
16
|
-
message_id: uuid.UUID = GenFRBCTimerStatus.__fields__["message_id"].field_info # type: ignore[assignment]
|
17
|
-
timer_id: uuid.UUID = GenFRBCTimerStatus.__fields__["timer_id"].field_info # type: ignore[assignment]
|
14
|
+
message_type: Literal["FRBC.TimerStatus"] = Field(default="FRBC.TimerStatus")
|
@@ -1,12 +1,10 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
|
-
from s2python.generated.gen_s2 import FRBCUsageForecast as GenFRBCUsageForecast
|
5
|
-
from s2python.validate_values_mixin import (
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
9
5
|
from s2python.frbc.frbc_usage_forecast_element import FRBCUsageForecastElement
|
6
|
+
from s2python.generated.gen_s2 import FRBCUsageForecast as GenFRBCUsageForecast
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
8
|
|
11
9
|
|
12
10
|
@catch_and_convert_exceptions
|
@@ -17,4 +15,4 @@ class FRBCUsageForecast(GenFRBCUsageForecast, S2Message["FRBCUsageForecast"]):
|
|
17
15
|
elements: List[FRBCUsageForecastElement] = GenFRBCUsageForecast.__fields__[
|
18
16
|
"elements"
|
19
17
|
].field_info # type: ignore[assignment]
|
20
|
-
|
18
|
+
message_type: Literal["FRBC.UsageForecast"] = Field(default="FRBC.UsageForecast")
|
@@ -1,12 +1,8 @@
|
|
1
1
|
from s2python.common import Duration
|
2
|
-
|
3
2
|
from s2python.generated.gen_s2 import (
|
4
3
|
FRBCUsageForecastElement as GenFRBCUsageForecastElement,
|
5
4
|
)
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
6
|
|
11
7
|
|
12
8
|
@catch_and_convert_exceptions
|