Expand description
OpcDaDriver: the primary Driver implementation, talking to a DCS/PLC’s OPC DA
server through the opcda-bridge gateway’s gRPC API.
This module intentionally splits into two halves: a thin async shell (OpcDaDriver
itself) that only locks the client and calls into opcda_bridge, and small mapping
functions that translate the bridge’s typed pages, nodes, capabilities, and search events
into the driver crate’s protocol-neutral types. The mapping functions carry the real risk
of a subtle bug and are unit-testable with no I/O; the shell is exercised end-to-end by
mock-gateway smoke tests rather than re-testing the bridge’s own gRPC matrix.
Structs§
- Driver
Search Stream - A cancellable stream of typed namespace-search events.
- OpcDa
Driver - The primary
Driverfor v1: reads, writes, and browses OPC DA tags through anopcda-bridgegateway’s gRPC API.
Constants§
- DEFAULT_
INDEX_ SEARCH_ MAX_ RESULTS - Default maximum number of matches requested from the persistent namespace index.
- DEFAULT_
PAGE_ SIZE - Default number of children requested for one browse page. The bridge enforces its own maximum; this value keeps the browser responsive and matches the bridge library default.
- DEFAULT_
SEARCH_ MAX_ RESULTS - Default maximum number of search matches requested by the CLI and browser.
Functions§
- browse_
node_ from_ bridge - browse_
page_ from_ bridge - browse_
source_ from_ bridge - capabilities_
from_ bridge - Maps the bridge’s capabilities into the protocol-neutral driver model.
- close_
opcda_ browse_ session - Explicitly releases one gateway-side browse session without requiring an OPC server
ProgID. The session ID is the only value the bridge close RPC needs, so this is separate
from
OpcDaDriverfor callers such as the CLI’sopc closecommand that may no longer have the server name handy. - indexed_
search_ match_ from_ bridge - indexed_
search_ progress_ from_ bridge - list_
opcda_ servers - Lists the OPC DA servers registered on the
opcda-bridgegateway’s own host atbridge_host(e.g."localhost:7600"). - namespace_
organization_ from_ bridge - opc_
value_ from_ write - Maps a
TagWriteto theopcda_bridge::ValueitsClient::writeexpects. - quality_
from_ raw - Maps
opcda_bridge’s raw OPC quality string toQuality. - search_
event_ from_ bridge - search_
index_ response_ from_ bridge - search_
index_ state_ from_ bridge - search_
index_ status_ from_ bridge - tag_
value_ from_ raw - Maps one
opcda_bridge::TagValue(a single tag’s raw read result) to this crate’sTagValue. - write_
outcome_ from_ result - Maps an
opcda_bridge::WriteResult(the RPC-level outcome of one write) toWriteOutcome.