class documentation
class Sample(Generic[
A single OPC UA value with its status and timestamps.
| Class Method | from |
Create a sample from an OPC UA data value. |
| Class Variable | server |
Timestamp the server received the value, if provided by the server. |
| Class Variable | source |
Timestamp of the value at its source, if provided by the server. |
| Class Variable | status |
Raw OPC UA status code. Defaults to Good, like a missing status code in OPC UA. |
| Class Variable | value |
Python native value. Is None if there is no value, e.g. for bad samples. |
| Class Variable | variant |
Raw OPC UA value. Is None if there is no value (also for an OPC UA Null variant). |
| Property | quality |
Quality derived from the status code. |
| Property | timestamp |
Source timestamp, falling back to the server timestamp. |
@classmethod
def from_data_value(cls, data_value: ua.DataValue, convert: Callable[ [ ua.Variant], T | None] = _variant_value) -> Sample[ T]:
¶