Add comments
This commit is contained in:
@@ -1286,7 +1286,7 @@ def download_history_data_manually(begin_time: str, end_time: str, bucket: str =
|
||||
def query_SCADA_data_by_device_ID_and_time(query_ids_list: List[str], query_time: str, bucket: str="SCADA_data", client: InfluxDBClient=client) -> Dict[str, float]:
|
||||
"""
|
||||
根据SCADA设备的ID和时间查询值
|
||||
:param query_ids_list: SCADA设备ID的列表
|
||||
:param query_ids_list: SCADA设备ID的列表, 是api_query 而不是 普通的Id
|
||||
:param query_time: 输入的北京时间,格式为 '2024-11-24T17:30:00+08:00'。
|
||||
:param bucket: InfluxDB 的 bucket 名称,默认值为 "SCADA_data"。
|
||||
:param client: 已初始化的 InfluxDBClient 实例。
|
||||
@@ -1339,7 +1339,7 @@ def query_SCADA_data_by_device_ID_and_time(query_ids_list: List[str], query_time
|
||||
def query_SCADA_data_by_device_ID_and_time_range(query_ids_list: List[str], start_time: str, end_time: str, bucket: str="SCADA_data", client: InfluxDBClient=client) -> list[dict[str, float]]:
|
||||
"""
|
||||
根据SCADA设备的ID和时间查询值
|
||||
:param query_ids_list: SCADA设备ID的列表
|
||||
:param query_ids_list: SCADA设备ID的列表, 是api_query 而不是 普通的Id
|
||||
:param start_time: 输入的北京时间,格式为 '2024-11-24T17:30:00+08:00'。
|
||||
:param end_time: 输入的北京时间,格式为 '2024-11-24T17:30:00+08:00'。
|
||||
:param bucket: InfluxDB 的 bucket 名称,默认值为 "SCADA_data"。
|
||||
@@ -1441,7 +1441,7 @@ def query_all_SCADA_records_by_date(query_date: str, bucket: str="SCADA_data", c
|
||||
# 获取字段 "_value" 即为 monitored_value
|
||||
monitored_value = record.get_value()
|
||||
rec = {
|
||||
"ID": record['device_ID'],
|
||||
"ID": record['device_ID'], # 是api_query 而不是 普通的Id
|
||||
"time": record.get_time(),
|
||||
record['_measurement']: monitored_value
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ def query_all_SCADA_records_by_date(query_date: str, bucket: str="SCADA_data", c
|
||||
def query_SCADA_data_by_device_ID_and_date(query_ids_list: List[str], query_date: str, bucket: str="SCADA_data", client: InfluxDBClient=client) -> list[dict[str, float]]:
|
||||
"""
|
||||
根据SCADA设备的ID和日期查询值
|
||||
:param query_ids_list: SCADA设备ID的列表
|
||||
:param query_ids_list: SCADA设备ID的列表, 是api_query 而不是 普通的Id
|
||||
:param query_date: 输入的日期,格式为 '2024-11-24', 日期是北京时间的日期
|
||||
:param bucket: InfluxDB 的 bucket 名称,默认值为 "SCADA_data"。
|
||||
:param client: 已初始化的 InfluxDBClient 实例。
|
||||
|
||||
Reference in New Issue
Block a user