1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// Copyright 2026 Tine Zata
// SPDX-License-Identifier: MPL-2.0
//! # 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 `_array` variants)
//! - **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) or [`Server::start_isolated`] (local-only)
//! - **PV creation**: `create_pv_double`, `create_pv_int32`, `create_pv_string`,
//! `create_pv_enum`, and their `_array` variants
//! - **POST**: Publish new values with automatic alarm computation —
//! `post_double`, `post_int32`, `post_string`, `post_enum`, and `_array` variants
//! - **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 builders
//! - [`AlarmSeverity`], [`AlarmStatus`]: alarm state reported in fetched values and monitors
//!
//! ### Other
//! - **Logging**: [`set_logger_level`] — programmatically set PVXS log levels
//! - Thread-safe [`Context`] (implements `Send + Sync`)
//!
use fmt;
pub use ;
/// Configure PVXS logging from environment variable `PVXS_LOG`
///
/// Reads the `PVXS_LOG` environment variable to configure logging levels.
/// Format: "logger_name=LEVEL,another=LEVEL"
///
/// Examples:
/// - `PVXS_LOG="*=DEBUG"` - all loggers at DEBUG level
/// - `PVXS_LOG="pvxs.*=INFO"` - all internal loggers at INFO
/// - `PVXS_LOG="pvxs.tcp.io=CRIT"` - suppress tcp.io errors below CRIT
///
/// Levels: CRIT < ERR < WARN < INFO < DEBUG
///
/// # Example
///
/// ```no_run
/// use pvxs_sys::configure_logging_from_env;
///
/// // Read from PVXS_LOG environment variable
/// configure_logging_from_env().ok();
/// ```
/// Set logging level for a specific PVXS logger
///
/// Programmatically set the log level for a named logger.
///
/// # Arguments
///
/// * `name` - Logger name (e.g., "pvxs.tcp.io", "pvxs.*" for wildcards)
/// * `level` - One of: "CRIT", "ERR", "WARN", "INFO", "DEBUG"
///
/// # Example
///
/// ```no_run
/// use pvxs_sys::set_logger_level;
///
/// // Suppress benign TCP disconnect errors (socket error 10054)
/// set_logger_level("pvxs.tcp.io", "CRIT").ok();
/// ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use Value;
// Re-export for testing callbacks
pub use ;
// Re-export for convenience
pub type Result<T> = Result;
/// Error type for PVXS operations