-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShNodes in layout.lite; updated scada params
- Loading branch information
1 parent
e65ddf3
commit a660509
Showing
8 changed files
with
163 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Type ha1.params, version 000""" | ||
|
||
from typing import Literal | ||
|
||
from pydantic import BaseModel, StrictInt | ||
|
||
|
||
class Ha1Params(BaseModel): | ||
AlphaTimes10: StrictInt | ||
BetaTimes100: StrictInt | ||
GammaEx6: StrictInt | ||
IntermediatePowerKw: float | ||
IntermediateRswtF: StrictInt | ||
DdPowerKw: float | ||
DdRswtF: StrictInt | ||
DdDeltaTF: StrictInt | ||
HpMaxKwTh: float | ||
TypeName: Literal["ha1.params"] = "ha1.params" | ||
Version: Literal["000"] = "000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Tests ha1.params type, version 000""" | ||
|
||
from gwproto.named_types import Ha1Params | ||
|
||
|
||
def test_ha1_params_generated() -> None: | ||
d = { | ||
"AlphaTimes10": 120, | ||
"BetaTimes100": -22, | ||
"GammaEx6": 0, | ||
"IntermediatePowerKw": 1.5, | ||
"IntermediateRswtF": 100, | ||
"DdPowerKw": 12, | ||
"DdRswtF": 160, | ||
"DdDeltaTF": 20, | ||
"HpMaxKwTh": 6, | ||
"TypeName": "ha1.params", | ||
"Version": "000", | ||
} | ||
|
||
d2 = Ha1Params.model_validate(d).model_dump(exclude_none=True) | ||
|
||
assert d2 == d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters