pyP2Monitor
1.0.0
Monitor a P2 furnace activity reading data on serial port
|
Store functions and object handling P2's data processing. More...
Data Structures | |
class | P2Query |
Class used to store a range of data in tuples like (time, value) More... | |
class | P2Datas |
Used to get datas from queries. More... |
Functions | |
def | data2List |
Take data and return a well formated integer array. | |
def | colNames |
Return an array with data column's name. | |
def | datas2Json |
Return a json string from datas (OBSOLETE) | |
def | csvDump |
Dump the database in csv format. | |
def | csvLastDataDump |
Print the last data on stdout formated in csv. | |
def | csvOutputData |
Output data in csv format. |
Variables | |
tuple | logger = utils.getLogger() |
Use to log. |
Store functions and object handling P2's data processing.
Stores functions used to format raw data from the furnace
def p2data.colNames | ( | ) |
Return an array with data column's name.
Return an array with P2 furnace data's column's name.
Definition at line 514 of file p2data.py.
Referenced by csvDump(), csvLastDataDump(), datas2Json(), and P2Datas.getPlotCommand().
def p2data.csvDump | ( | dbname, | |
filename = '-' , |
|||
header = True , |
|||
sep = "; " |
|||
) |
Dump the database in csv format.
filename | The filename to write csv in. If - output to stdout |
headers | If true put a header with colnames |
Definition at line 566 of file p2data.py.
References colNames(), and csvOutputData().
def p2data.csvLastDataDump | ( | lfname, | |
sep = ";" |
|||
) |
Print the last data on stdout formated in csv.
lfname | The name of the file storing the latest data |
sep | The csv field separator |
Definition at line 595 of file p2data.py.
References colNames(), and csvOutputData().
def p2data.csvOutputData | ( | fdout, | |
timestamp, | |||
data, | |||
sep | |||
) |
Output data in csv format.
fdout | The file where we will write the data |
data | The datas |
sep | The csv separator |
Definition at line 619 of file p2data.py.
References data2List(), and P2Msg.hex2list().
Referenced by csvDump(), and csvLastDataDump().
def p2data.data2List | ( | timestamp, | |
data, | |||
dateFormat = "%Y/%m/%d_%H:%M:%S" |
|||
) |
Take data and return a well formated integer array.
Take a string representing a huge hexadecimal number (the data field of a data frame from the furnace) and format it as an integer array applying number correction on some fields
timestamp | The timestamp to associate with this datas |
data | The datas |
dateFormat | The date's display format |
Definition at line 478 of file p2data.py.
Referenced by csvOutputData(), datas2Json(), and P2Datas.fillQuery().