Add source api and test
This commit is contained in:
25
tjnetwork.py
25
tjnetwork.py
@@ -52,6 +52,11 @@ CURVE_TYPE_EFFICIENCY = api.CURVE_TYPE_EFFICIENCY
|
||||
CURVE_TYPE_VOLUME = api.CURVE_TYPE_VOLUME
|
||||
CURVE_TYPE_HEADLOSS = api.CURVE_TYPE_HEADLOSS
|
||||
|
||||
SOURCE_TYPE_CONCEN = api.SOURCE_TYPE_CONCEN
|
||||
SOURCE_TYPE_MASS = api.SOURCE_TYPE_MASS
|
||||
SOURCE_TYPE_FLOWPACED = api.SOURCE_TYPE_FLOWPACED
|
||||
SOURCE_TYPE_SETPOINT = api.SOURCE_TYPE_SETPOINT
|
||||
|
||||
TIME_STATISTIC_NONE = api.TIME_STATISTIC_NONE
|
||||
TIME_STATISTIC_AVERAGED = api.TIME_STATISTIC_AVERAGED
|
||||
TIME_STATISTIC_MINIMUM = api.TIME_STATISTIC_MINIMUM
|
||||
@@ -517,6 +522,26 @@ def set_quality(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return api.set_quality(name, cs)
|
||||
|
||||
|
||||
############################################################
|
||||
# source 18.[SOURCES]
|
||||
############################################################
|
||||
|
||||
def get_source_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||
return api.get_source_schema(name)
|
||||
|
||||
def get_source(name: str, node: str) -> dict[str, Any]:
|
||||
return api.get_source(name, node)
|
||||
|
||||
def set_source(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return api.set_source(name, cs)
|
||||
|
||||
def add_source(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return api.add_source(name, cs)
|
||||
|
||||
def delete_source(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return api.delete_source(name, cs)
|
||||
|
||||
|
||||
############################################################
|
||||
# time 21.[TIMES]
|
||||
############################################################
|
||||
|
||||
Reference in New Issue
Block a user