Expand description
PVAccess client library — search, connect, get, put, monitor.
This crate provides both a high-level API (PvaClient) and the
lower-level protocol functions used to build it.
§High-level API
ⓘ
use spvirit_client::PvaClient;
use std::ops::ControlFlow;
let client = PvaClient::builder().build();
// GET
let result = client.pvget("MY:PV").await?;
// PUT
client.pvput("MY:PV", 42.0).await?;
// MONITOR
client.pvmonitor("MY:PV", |val| {
println!("{val:?}");
ControlFlow::Continue(())
}).await?;
// INFO (introspection)
let desc = client.pvinfo("MY:PV").await?;§Key types
PvaClient— high-level client withpvget,pvput,pvmonitor,pvinfoPvOptions— configuration for PV operations (ports, timeout, auth)PvGetResult— decoded GET result with introspectionChannelConn— low-level established TCP channelSearchTarget— UDP/TCP search target address
Re-exports§
pub use pva_client::PvaClient;pub use pva_client::PvaClientBuilder;pub use pva_client::PvaChannel;pub use pva_client::pvput;pub use pva_client::pvmonitor;pub use pva_client::pvinfo;pub use pva_client::client_from_opts;pub use pvlist::PvListSource;pub use client::build_client_validation;pub use client::establish_channel;pub use client::pvget;pub use client::ChannelConn;pub use search::build_auto_broadcast_targets;pub use search::search_pv;pub use search::resolve_pv_server;pub use search::SearchTarget;pub use transport::read_packet;pub use types::PvGetError;pub use types::PvGetOptions;pub use types::PvGetResult;pub use types::PvMonitorEvent;pub use types::PvOptions;pub use format::format_output;pub use format::OutputFormat;pub use format::RenderOptions;
Modules§
- auth
- client
- format
- put_
encode - pva_
client - High-level PVAccess client — one-liner get, put, monitor, info.
- pvlist
- PV listing — discover available PV names from a PVA server.
- search
- transport
- types