Add status api and test

This commit is contained in:
WQY\qiong
2022-10-22 11:51:48 +08:00
parent 6fa2f77a60
commit c1b99bc7eb
7 changed files with 171 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ from .s5_pipes import *
from .s6_pumps import *
from .s7_valves import *
from .s9_demands import *
from .s10_status import *
def execute_add_command(name: str, cs: ChangeSet) -> ChangeSet:
@@ -46,6 +47,8 @@ def execute_update_command(name: str, cs: ChangeSet) -> ChangeSet:
return set_valve(name, cs)
elif type == 'demand':
return set_demand(name, cs)
elif type == 'status':
return set_status(name, cs)
return ChangeSet()