Public Member Functions | |
def | __init__ (self, path="history.db") |
def | new_historized_event (self, source_id, evtypes, period, count=0) |
def | new_historized_node (self, node_id, period, count=0) |
def | read_event_history (self, source_id, start, end, nb_values, evfilter) |
def | read_node_history (self, node_id, start, end, nb_values) |
def | save_event (self, event) |
def | save_node_value (self, node_id, datavalue) |
def | stop (self) |
Public Member Functions inherited from opcua.server.history.HistoryStorageInterface | |
def | new_historized_event (self, source_id, evtypes, period, count=0) |
def | new_historized_node (self, node_id, period, count=0) |
def | read_event_history (self, source_id, start, end, nb_values, evfilter) |
def | read_node_history (self, node_id, start, end, nb_values) |
def | save_event (self, event) |
def | save_node_value (self, node_id, datavalue) |
def | stop (self) |
Public Attributes | |
logger | |
Private Member Functions | |
def | _format_event (self, event) |
def | _get_event_columns (self, ev_fields) |
def | _get_event_fields (self, evtypes) |
def | _get_select_clauses (self, source_id, evfilter) |
def | _get_table_name (self, node_id) |
Static Private Member Functions | |
def | _get_bounds (start, end, nb_values) |
def | _list_to_sql_str (ls, quotes=True) |
Private Attributes | |
_conn | |
_datachanges_period | |
_db_file | |
_event_fields | |
_lock | |
history backend which stores data values and object events in a SQLite database this backend is intended to only be accessed via OPC UA, therefore all UA Variants saved in the history database are in binary format (SQLite BLOBs) note that PARSE_DECLTYPES is active so certain data types (such as datetime) will not be BLOBs
Definition at line 13 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.__init__ | ( | self, | |
path = "history.db" |
|||
) |
Definition at line 21 of file history_sql.py.
|
private |
Convert an event object triggered by the subscription into ordered lists for the SQL insert string Args: event: The event returned by the subscription Returns: List of event fields (SQL column names), List of '?' placeholders, Tuple of variant binaries
Definition at line 283 of file history_sql.py.
|
staticprivate |
Definition at line 258 of file history_sql.py.
|
private |
Definition at line 309 of file history_sql.py.
|
private |
Get all fields from the event types that are to be historized Args: evtypes: List of event type nodes Returns: List of fields for all event types
Definition at line 238 of file history_sql.py.
|
private |
Definition at line 315 of file history_sql.py.
|
private |
Definition at line 235 of file history_sql.py.
|
staticprivate |
Definition at line 333 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.new_historized_event | ( | self, | |
source_id, | |||
evtypes, | |||
period, | |||
count = 0 |
|||
) |
Definition at line 135 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.new_historized_node | ( | self, | |
node_id, | |||
period, | |||
count = 0 |
|||
) |
Definition at line 30 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.read_event_history | ( | self, | |
source_id, | |||
start, | |||
end, | |||
nb_values, | |||
evfilter | |||
) |
Definition at line 196 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.read_node_history | ( | self, | |
node_id, | |||
start, | |||
end, | |||
nb_values | |||
) |
Definition at line 100 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.save_event | ( | self, | |
event | |||
) |
Definition at line 161 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.save_node_value | ( | self, | |
node_id, | |||
datavalue | |||
) |
Definition at line 54 of file history_sql.py.
def opcua.server.history_sql.HistorySQLite.stop | ( | self | ) |
Definition at line 342 of file history_sql.py.
|
private |
Definition at line 28 of file history_sql.py.
|
private |
Definition at line 23 of file history_sql.py.
|
private |
Definition at line 24 of file history_sql.py.
|
private |
Definition at line 26 of file history_sql.py.
|
private |
Definition at line 25 of file history_sql.py.
opcua.server.history_sql.HistorySQLite.logger |
Definition at line 22 of file history_sql.py.