Skip to main content

Module opcda

Module opcda 

Source
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§

DriverSearchStream
A cancellable stream of typed namespace-search events.
OpcDaDriver
The primary Driver for v1: reads, writes, and browses OPC DA tags through an opcda-bridge gateway’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 OpcDaDriver for callers such as the CLI’s opc close command 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-bridge gateway’s own host at bridge_host (e.g. "localhost:7600").
namespace_organization_from_bridge
opc_value_from_write
Maps a TagWrite to the opcda_bridge::Value its Client::write expects.
quality_from_raw
Maps opcda_bridge’s raw OPC quality string to Quality.
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’s TagValue.
write_outcome_from_result
Maps an opcda_bridge::WriteResult (the RPC-level outcome of one write) to WriteOutcome.