| |
- builtins.object
-
- DBManager
class DBManager(builtins.object) |
|
DBManager(host='', port='', auth='', db='', username='', password='')
# import http.client
# http.client.HTTPConnection._http_vsn = 10
# http.client.HTTPConnection._http_vsn_str = 'HTTP/1.1' |
|
Methods defined here:
- __enter__(self)
- __exit__(self)
- __init__(self, host='', port='', auth='', db='', username='', password='')
- Initialize self. See help(type(self)) for accurate signature.
- close(self)
- connect(self)
- get_data(self, url='http://172.16.126.13/store/load?dataType={}&limit=0&sn={}', sn='', start_time='', end_time='', data_groups=['bms', 'gps'])
- 获取指定 sn 和起止日期的bms和gps数据.
添加了重试机制。
--------------输入参数------------
url:数据获取url, 可采用默认值
sn: str, 电池sn号
start_time: str, 开始时间
end_time: str, 结束时间
data_groups: 选择需要获取的数据组,可填入多个字符串(默认只获取bms和gps数据)
bms: bms数据
gps:gps数据
system:system数据
accum:accum数据
--------------输出参数------------
df_data: {'bms':dataframe, 'gps':dataframe, 'system':dataframe, ;accum':dataframe}
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |