Vst

Value, Status, Time

Module: thinkiq.history.vst

Logic and structures for time-series points: Value, Status (Code), Timestamp (VQT / VST)

Vst

class thinkiq.history.vst.Vst(value, status, timestamp)

Create a Vst object representing one time series data point.

Parameters:
  • value (bool, int, float, str, datetime, or None) – The actual recorded value at a given timestamp. Can represent numbers, boolean states, string messages, or timestamps. None represents invalid/missing data.

  • status (int) – OPC-compliant integer status code representing the quality or validity of the value. Typically, 0 = good, other values indicate errors, stale data, or device issues.

  • timestamp (datetime) – The time at which the value was recorded or observed.

Represents a single point in time-series data that contains: - value: the actual data (numeric, boolean, string, etc.) - status: OPC status code (quality of the value) - timestamp: the exact time the value was observed

Properties:

value: bool, int, float, str, datetime.datetime, None

The recorded value.

status: int

OPC status code indicating data quality (0 = good).

timestamp: datetime.datetime

The time the value was captured or logged.

Methods:

__init__(value, status, timestamp)
__repr__()

Human-readable representation of Vst.

Return type:

str

to_dataframe()

Create a single row pandas.DataFrame from the vst object.

This is useful for quick inspection, testing, or integration into larger time-series data structures.

Returns:

A DataFrame with one row and the columns: ‘value’, ‘status’, and ‘timestamp’. The ‘timestamp’ column is used as the index.

Return type:

pandas.DataFrame