VariableReadCallback¶
Canonical path: o6.server.VariableReadCallback
VariableReadCallback
¶
Bases: Protocol
The shape of a Variable value-read implementation.
Registered with o6.read or Server.addVariable. The callback
runs on the server's event loop, so it must not block.
See Variables.
Functions¶
__call__
¶
Produce the value of the Variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node
|
VariableNode
|
The Variable being read. |
required |
range
|
tuple[slice, ...] | None
|
The requested index range, or |
required |
session
|
Session | None
|
The reading session, or |
required |
includeSourceTimestamp
|
bool
|
Whether the caller wants a SourceTimestamp. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Any, ...]
|
A tuple of the StatusCode and the value. |