Expand description
Reusable, presentation-free async client for the opcda-bridge gateway’s gRPC API.
This crate is the typed connect/read/write/browse/list-servers surface
extracted from opcda-bridge-client’s commands.rs: no clap, no
tabled, no serde_json/toml — just Client, the parameters its
methods take, and the plain result types they return (BrowseNode,
TagValue, WriteResult, Value). opcda-bridge-client depends
on this crate and adds only CLI parsing and table/JSON rendering on top
of it; any other async Rust program that needs typed OPC DA
reads/writes/browses without shelling out to the CLI binary and parsing
its output can depend on this crate directly instead.
let mut client = opcda_bridge::Client::connect("localhost:7600").await?;
let servers = client.list_servers().await?;
let values = client
.read(servers[0].clone(), vec!["Some.Tag".into()])
.await?;Structs§
- Browse
Node - A single node returned by
crate::Client::browse: one tag or branch in the OPC DA server’s tag tree. - Client
- A connected client for an opcda-bridge gateway’s gRPC API.
- TagValue
- A single tag’s value returned by
crate::Client::read. - Write
Result - The result of a single
crate::Client::writecall.
Enums§
- Error
- Errors that can occur while talking to an opcda-bridge gateway.
- Value
- A tag value to write, parsed from a raw string via
parse_value.
Constants§
- DEFAULT_
BRIDGE_ PORT - Default TCP port used by the gateway and clients.
Functions§
- parse_
value - Parse a raw string into the most specific
Valuevariant it matches:bool, theni32, thenf64, falling back toString.