VariableWriteCallback¶
Canonical path: o6.server.VariableWriteCallback
VariableWriteCallback
¶
Bases: Protocol
The shape of a Variable value-write implementation.
Registered with o6.write or Server.addVariable. The callback
runs on the server's event loop, so it must not block.
See Variables.
Functions¶
__call__
¶
Accept or reject a write to the Variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node
|
VariableNode
|
The Variable being written. |
required |
value
|
DataValue
|
The requested |
required |
range
|
tuple[slice, ...] | None
|
The requested index range, or |
required |
session
|
Session | None
|
The writing session, or |
required |
Returns:
| Type | Description |
|---|---|
tuple[StatusCode]
|
A one-tuple holding the StatusCode of the write. |