Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ This is a workspace of three crates released together: **rsplot** (the plotting
library), **rsdm** (a PyDM-style EPICS display layer built on rsplot), and
**adl2rsdm** (a MEDM `.adl` → RsDM-Rust-source converter).

## [Unreleased]

### Changed

- **Bumped the EPICS backends `epics-ca-rs` / `epics-base-rs` / `epics-pva-rs`
to 0.24.0** (from 0.22.x), affecting `rsdm`'s `ca`/`pva`/`calc` features
only. Three breaking API changes were adapted:
- `ConnectionEvent::Unresponsive` was removed — 0.24 folds the echo-timeout
into `Disconnected` (an unresponsive circuit disconnects every consumer; the
distinction now survives only inside the client's `ChannelState`). rsdm
already handled both identically.
- The pvAccess RPC reply became `RpcReply` (an enum) instead of a
`(descriptor, value)` tuple; its `Empty` variant is pvxs's no-value
`ExecOp::reply()`. `rsdm` reads the value through `RpcReply::into_value`,
treating `Empty` as the existing "connected, no scalar sample" case.
- `EnumInfo` became `#[non_exhaustive]` (it gained a `string_form`); a test
constructs it via `EnumInfo::new` instead of a struct literal.

## [0.5.4] - 2026-07-16

A documentation-only patch release. No code, API, or behaviour changes.
Expand Down
12 changes: 6 additions & 6 deletions rsdm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ image = { version = "0.25", default-features = false, features = [
"tiff",
] }

# EPICS Channel Access backend (feature `ca`). crates.io 0.22.x — an explicit
# EPICS Channel Access backend (feature `ca`). crates.io 0.24.x — an explicit
# deviation from rsplot's no-new-dependency rule, scoped to this crate.
epics-ca-rs = { version = "0.22", optional = true }
epics-ca-rs = { version = "0.24", optional = true }
# `Snapshot`/`AlarmInfo`/`DisplayInfo`/`ControlInfo`/`EnumInfo`/`DbrClass`/
# `EpicsValue` returned by the CA client live here and are not re-exported by
# epics-ca-rs, so this is a direct dependency. Unified to the same 0.22.x that
# epics-ca-rs, so this is a direct dependency. Unified to the same 0.24.x that
# epics-ca-rs pins, so there is one copy in the tree.
epics-base-rs = { version = "0.22", optional = true }
# pvAccess backend (feature `pva`). crates.io 0.22.x, same explicit deviation
epics-base-rs = { version = "0.24", optional = true }
# pvAccess backend (feature `pva`). crates.io 0.24.x, same explicit deviation
# from rsplot's no-new-dependency rule, scoped to this crate. The NT
# value/structure types (`PvField`/`PvStructure`/`ScalarValue`/`NTScalar`) are
# re-exported by this crate, so no extra epics-base-rs surface is pulled in for
# `pva` alone.
epics-pva-rs = { version = "0.22", optional = true }
epics-pva-rs = { version = "0.24", optional = true }
# NTNDArray codec decompression (feature `pva`, `pva_codec.rs`): raw-LZ4-block
# and blosc/bitshuffle LZ4 sub-streams decode with lz4_flex — the same pure-Rust
# block codec rust-hdf5's `lz4` feature uses (rust-hdf5's public filter API
Expand Down
13 changes: 9 additions & 4 deletions rsdm/src/data_plugins/epics_plugins/ca_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ async fn run_channel(
.await;
}
}
Ok(ConnectionEvent::Disconnected | ConnectionEvent::Unresponsive) => {
// epics-ca-rs 0.24 folded the echo-timeout `Unresponsive` event
// into `Disconnected` (an unresponsive circuit disconnects every
// consumer; the distinction now survives only inside the client's
// ChannelState). Both arms already did the same thing here.
Ok(ConnectionEvent::Disconnected) => {
connected_now = false;
// Forget the value cache so the first value after a
// reconnect always emits (PyDM clear_cache parity).
Expand Down Expand Up @@ -808,9 +812,10 @@ mod tests {
#[test]
fn metadata_snapshot_caches_enum_strings_and_resolves_label() {
let mut snap = Snapshot::new(EpicsValue::Enum(1), 0, 0, ts());
snap.enums = Some(EnumInfo {
strings: vec!["OFF".into(), "ON".into()],
});
// epics-base-rs 0.24 made `EnumInfo` non-exhaustive (it gained a
// `string_form`); `new` fills both slots from one label list, the
// labels-are-the-state-table case this two-state enum is.
snap.enums = Some(EnumInfo::new(vec!["OFF".into(), "ON".into()]));

let strings: Option<Arc<[String]>> =
snap.enums.as_ref().map(|e| latin1_strings(&e.strings));
Expand Down
12 changes: 9 additions & 3 deletions rsdm/src/data_plugins/epics_plugins/pva_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,19 @@ async fn run_rpc(
r = tokio::time::timeout(period, client.pvrpc(&fn_name, &desc, &value)) => r,
};
match result {
Ok(Ok((_, response))) => {
Ok(Ok(reply)) => {
// Result → connected + emit; only int/float/bool/str results
// are emitted (emit_for_type, p4p_plugin_component.py:80-89,
// called at :112-114). A result without a scalar `value`
// still marks the channel connected (PyDM would crash on
// `result.value` there; we stay connected without a sample).
match field(&response, "value").and_then(value_to_pv) {
// `result.value` there; we stay connected without a sample) —
// including epics-pva-rs 0.24's `RpcReply::Empty`, the pvxs
// `ExecOp::reply()` no-value reply, which `into_value` maps to
// `None`.
let scalar = reply
.into_value()
.and_then(|(_, response)| field(&response, "value").and_then(value_to_pv));
match scalar {
Some(
v @ (PvValue::Int(_)
| PvValue::Float(_)
Expand Down
Loading