Add comments for scada
This commit is contained in:
@@ -179,5 +179,19 @@ def get_all_scada_element_ids(name: str) -> list[str]:
|
||||
result.append(str(row['id']))
|
||||
return result
|
||||
|
||||
#
|
||||
# create table scada_element
|
||||
# (
|
||||
# id text primary key
|
||||
# , x float8 not null
|
||||
# , y float8 not null
|
||||
# , device_id text references scada_device(id)
|
||||
# , model_id varchar(32) -- add constraint in API
|
||||
# , model_type scada_model_type
|
||||
# , status scada_element_status not null default 'OFF'
|
||||
# );
|
||||
#
|
||||
# 返回list,list里每个item是dict,内容是 'id':'abc' 这样
|
||||
# scada_model type 是类似pressure,flow之类的,是由Device 决定 的
|
||||
def get_all_scada_elements(name: str) -> list[dict[str, Any]]:
|
||||
return read_all(name, 'select * from scada_element order by id')
|
||||
|
||||
Reference in New Issue
Block a user