|
24 | 24 | FRBCTimerStatus, |
25 | 25 | FRBCUsageForecast, |
26 | 26 | ) |
| 27 | +from s2python.pebc import PEBCPowerConstraints, PEBCEnergyConstraint, PEBCInstruction |
27 | 28 | from s2python.ppbc import PPBCScheduleInstruction |
28 | 29 |
|
29 | 30 | from s2python.message import S2Message |
|
48 | 49 | "FRBC.TimerStatus": FRBCTimerStatus, |
49 | 50 | "FRBC.UsageForecast": FRBCUsageForecast, |
50 | 51 | "PPBC.ScheduleInstruction": PPBCScheduleInstruction, |
| 52 | + "PEBC.PowerConstraints": PEBCPowerConstraints, |
| 53 | + "PEBC.Instruction": PEBCInstruction, |
| 54 | + "PEBC.EnergyConstraint": PEBCEnergyConstraint, |
51 | 55 | "Handshake": Handshake, |
52 | 56 | "HandshakeResponse": HandshakeResponse, |
53 | 57 | "InstructionStatusUpdate": InstructionStatusUpdate, |
@@ -90,7 +94,9 @@ def parse_as_any_message(unparsed_message: Union[dict, str, bytes]) -> S2Message |
90 | 94 | return TYPE_TO_MESSAGE_CLASS[message_type].model_validate(message_json) |
91 | 95 |
|
92 | 96 | @staticmethod |
93 | | - def parse_as_message(unparsed_message: Union[dict, str, bytes], as_message: Type[M]) -> M: |
| 97 | + def parse_as_message( |
| 98 | + unparsed_message: Union[dict, str, bytes], as_message: Type[M] |
| 99 | + ) -> M: |
94 | 100 | """Parse the message to a specific S2 python message. |
95 | 101 |
|
96 | 102 | :param unparsed_message: The message as a JSON-formatted string or as a JSON-parsed dictionary. |
|
0 commit comments