Expand description
§EPICS PVXS Rust Bindings
Safe Rust bindings for the EPICS PVXS (PVAccess) library.
§Overview
This crate provides idiomatic Rust bindings to the EPICS PVXS C++ library, which implements the PVAccess network protocol used in EPICS (Experimental Physics and Industrial Control System).
§Features
§Client
- GET: Read scalar and array PV values (
Context::get) - PUT: Write double, int32, string, and enum scalars or arrays
(
Context::put_double,Context::put_int32,Context::put_string,Context::put_enum, and their_arrayvariants) - Monitor: Subscribe to real-time value changes via
Context::monitor_builder→MonitorBuilder::connect_exception/MonitorBuilder::disconnect_exception/MonitorBuilder::event/MonitorBuilder::exec→Monitor::pop
§Server
- Start:
Server::start_from_env(network) orServer::start_isolated(local-only) - PV creation:
create_pv_double,create_pv_int32,create_pv_string,create_pv_enum, and their_arrayvariants - POST: Publish new values with automatic alarm computation —
post_double,post_int32,post_string,post_enum, and_arrayvariants - Fetch: Read the current server-side value with alarm info —
fetch_double,fetch_int32,fetch_string,fetch_enum - Stop:
Server::stop_drop— consumes the server and frees all resources - Handle:
ServerHandle— clone-able, thread-safe handle for use across threads
§Metadata & Alarms
NTScalarMetadataBuilder/NTEnumMetadataBuilder: configure PV metadata at creation time (display limits, units, precision, control limits, value alarm thresholds)ControlMetadata,AlarmMetadata: structs passed to the buildersAlarmSeverity,AlarmStatus: alarm state reported in fetched values and monitors
§Other
- Logging:
set_logger_level— programmatically set PVXS log levels - Thread-safe
Context(implementsSend + Sync)
Re-exports§
pub use bridge::ContextWrapper;pub use bridge::MonitorBuilderWrapper;pub use bridge::MonitorWrapper;pub use bridge::RpcWrapper;pub use bridge::ServerWrapper;pub use bridge::StaticSourceWrapper;pub use bridge::ValueWrapper;
Modules§
Structs§
- Alarm
Config - Alarm
Metadata - Alarm metadata for NTScalar
- Alarm
Result - Context
- A PVXS client context for performing PVAccess operations
- Control
Metadata - Control metadata for NTScalar
- Display
Metadata - Display metadata for NTScalar
- Fetched
Double - Fetched double value with alarm information
- Fetched
Double Array - Fetched double array value with alarm information
- Fetched
Enum - Fetched enum value with alarm information
- Fetched
Int32 - Fetched int32 value with alarm information
- Fetched
Int32 Array - Fetched int32 array value with alarm information
- Fetched
String - Fetched string value with alarm information
- Fetched
String Array - Fetched string array value with alarm information
- Monitor
- RPC (Remote Procedure Call) builder for EPICS servers
- Monitor
Builder - MonitorBuilder provides a builder pattern for creating monitors with advanced configuration
- NTEnum
Metadata Builder - Builder for creating NTEnum metadata
- NTScalar
Metadata Builder - Builder for creating NTScalar metadata with optional fields
- Pvxs
Error - Error type for PVXS operations
- Rpc
- Server
- A PVXS server for hosting process variables with automatic alarm management
- Server
Handle - Handle to a running PVXS server
- SharedPV
- A shared process variable that can be hosted by a server
- Static
Source - A static source for organising collections of PVs
- Value
- A PVAccess value container
Enums§
- Alarm
Severity - Alarm
Status - Monitor
Event - Monitor event types that can be returned by pop()
- Ordering
- Atomic memory orderings
Functions§
- compute_
alarm_ for_ scalar - configure_
logging_ from_ env - Configure PVXS logging from environment variable
PVXS_LOG - set_
logger_ level - Set logging level for a specific PVXS logger
Type Aliases§
- Atomic
Usize - An integer type which can be safely shared between threads.
- Result