Skip to content

Releases: physwkim/bsrs

v0.5.7

Choose a tag to compare

@physwkim physwkim released this 22 Sep 02:03
f0c49b0

Added

  • ServerBuilder::environment_hook — an EnvironmentHook the server runs on
    the engine environment_open has just created, before that engine becomes
    the environment. The engine is new on every open, so anything a client
    installed on the last one (the beamline's suspenders, say) is gone, and the
    client is not told the open happened; the hook puts the daemon that owns the
    beamline in charge of preparing each engine. An Err from the hook fails
    the open and leaves the environment closed.

v0.5.6

Choose a tag to compare

@physwkim physwkim released this 21 Sep 07:30
a958ff6

Fixed

  • A queued item keeps the arguments it was submitted with. QueuedItem::plan
    put the whole submitted body into args, so a client reading the queue back
    found the plan's metadata nested one level down and rendered the columns it
    fills -- sample, edge energy, point count -- as blank. args and kwargs
    are now separate fields and plan_args() recombines them for PlanFactory.
  • The running item is reported as the item that was queued. current_item
    replaces current_plan_name in the server state, so queue_get hands back
    the running item beside the pending ones instead of a name; a name is not an
    item, and a client rendering the queue as one table had every column but the
    plan empty on the one row that was actually running.

v0.5.5

Choose a tag to compare

@physwkim physwkim released this 21 Sep 06:52
d1af07f

Changed

  • EPICS backends move to epics-rs 0.30.0 (epics-ca-rs, epics-base-rs,
    epics-pva-rs). No bsrs source change was needed; the mini-beamline
    scan, DCM energy and monitor_during scripts pass against a mini_ioc
    built from that release.

v0.5.4

Choose a tag to compare

@physwkim physwkim released this 17 Sep 07:00
19a625f

Fixed

  • The queue continues past an item that opened no run. A queued plan whose
    whole job is a side effect (a bare mv, a sleep) archives exit_status
    no-run, which execute_queue_loop read as failure and halted on, so a
    batch could not put its sample moves in the queue. item_completed() now
    treats no-run as finished in both the queue loop and
    execute_single_item; plans_failed already excluded it.

v0.5.3

Choose a tag to compare

@physwkim physwkim released this 16 Sep 08:03
3a707a6

Fixed

  • The queue-server archives why a plan item failed. run_plan_item mapped
    the run result to an exit status and dropped RunResult.reason (and the
    error on the Err arm), so history_get told a client fail and nothing
    else while the cause existed only in the daemon's log. The archived result
    now carries reason on every arm, empty for a clean run.

v0.5.2

Choose a tag to compare

@physwkim physwkim released this 16 Sep 02:37
a887cb4

A dependency-refresh release. No bsrs code, API, or behaviour changes.

Changed

  • Based the EPICS CA/PVA backends on epics-rs 0.29.3 (from 0.29.2). The
    release makes a record's monitor state advance on every value-class post
    whether or not the field has a subscriber, so a move that finished with no
    .DMOV monitor no longer swallows the next subscriber's 1→0 transition,
    which is the done-PV wait every ca_motor put relies on. No bsrs source
    change was needed.
  • Cargo.lock moves chacha20, der and spin off their yanked versions
    (0.10.1, 0.8.0, 0.9.8) to the compatible successors; none is a direct
    dependency and no advisory names the old versions.

v0.5.1

Choose a tag to compare

@physwkim physwkim released this 15 Sep 03:37
8a7ca55

A dependency-refresh release. No bsrs code, API, or behaviour changes.

Changed

  • Based the EPICS CA/PVA backends on epics-rs 0.29.2 (from 0.29.1). The
    release moves the SNL program start gate into epics-base-rs
    (spawn_program awaits wait_for_pini at the one spawn site), which is
    what makes the mini-beamline kohzuCtl boot with the right d-spacing; no
    bsrs source change was needed.
  • MSRV is now 1.94 (from a declared 1.80). The old floor had been
    unachievable since 0.24.3: epics-base-rs is edition 2024, so no toolchain
    below 1.85 can build the CA/PVA backends at all. 1.94.0 is the channel
    epics-rs pins for itself, and the workspace is verified to build and test
    on exactly that toolchain.

Fixed

  • The 0.4.2 section's date: the tag and publish landed on 2026-09-04 (KST),
    a day after the date the changelog carried.

v0.5.0 — monitorable devices, object-based declare_stream, epics-rs 0.29.1

Choose a tag to compare

@physwkim physwkim released this 14 Sep 06:32
af68263

Monitorable devices: Msg::Monitor now works end to end over the built-in
devices, from the Rust API and from Lua. Interrupts unwind through the plan
so finalize_wrapper cleanup runs on abort, suspenders are engine-owned and
persist across runs, every descriptor is shaped from its objects, and
declare_stream / collect resolve streams the way bluesky's bundler does.
Public signatures change, hence the minor version.

Changed

  • Based the EPICS CA/PVA backends on epics-rs 0.29.1 (from 0.28.1). No
    bsrs source change was needed for 0.28.2, 0.29.0 or 0.29.1.
  • Breaking: Msg::DeclareStream carries the stream's objects
    (StreamObjs::Readable or StreamObjs::Collectable) instead of raw data
    keys, so its descriptor gets their hints and configuration as bluesky's
    declare_stream(*objs, name=, collect=) does; plans::declare_stream(name, objs) and the Lua msg.declare_stream(name, {devices}, [collect]) follow.
    A collectable must collect into exactly the declared stream.
    StreamObject::from_data_keys is replaced by StreamObject::objectless,
    used only for the interruptions stream.
  • collect resolves its stream through what declare_stream declared for
    the object, as bluesky's _declared_stream_names: a named collect
    requires that name to have been declared for the object, an unnamed one
    takes the single declared stream and skips describe_collect, and an
    undeclared object still describes and declares its nested streams.
  • Breaking: Subscription::new takes a third argument, the data key of
    the readings it streams, exposed as Subscription::key. The engine keys
    every monitor Event by it and fails the run when describe_dyn does not
    declare that key.
  • Breaking: Registry::register_positioner additionally requires
    MonitorableObj and StoppableObj and registers the object under both
    facets.
  • SoftDetector::tick returns the reading it published.
  • Breaking: ContingencySink holds an Option<Thrown> (Thrown::Error
    or Thrown::Interrupt(kind, reason)) instead of an error string, and
    contingency_wrapper's except_plan is an ExceptPlan built from the
    Thrown, as bluesky's except_plan(e) receives the exception.
    run_wrapper closes an interrupted run with the interrupt's exit status
    (abort, fail) rather than dropping it open.
  • Breaking: Suspender::trip is required and the trait gains watch,
    tripped, justification, pre_plan and post_plan; the reference
    suspenders lose install(self, re). Install through
    RunEngine::install_suspender(Arc<dyn Suspender>) -> u64 and remove with
    remove_suspender(id) / clear_suspenders(); installed suspenders persist
    across runs as bluesky's RE._suspenders do. SuspendCallback moved to
    bsrs::core; suspend_until* take &self.
  • Breaking: RunBundler::add_readings / add_configuration are replaced
    by add_read(StreamObject, readings), and declare_stream takes
    Vec<StreamObject> and returns the EventDescriptor it emitted.
  • CaMotor::set_dyn, CaPositioner::set_dyn and CaDetector return a
    pending Status at once and complete it from a task, so a multi-axis mv
    moves its axes together.

Added

  • MonitorableObj for Signal, SoftDetector, SoftMotor, CaDetector,
    CaMotor, CaPositioner, PvaMotor and PvaDetector; motors and
    positioners stream the readback.
  • Registry::register_monitorable and Registry::monitorable. The bsrs
    binary, the qs Lua manager and mini_beamline_qs register soft detectors
    under the facet, and every Lua device factory reports the monitorable
    role.
  • Registry tracks the stoppable, preparable, configurable and pausable
    facets (register_stoppable / register_preparable /
    register_configurable / register_pausable and the matching lookups),
    and the daemon Lua state publishes them, so stop(), msg.prepare,
    msg.configure and RE:register_pausable work on registry devices; a
    --ca-motor in bsrs qs-manager had no stop().
  • CollectableObj::hint_fields (default None); StandardDetector forwards
    its readable hint fields, so collect descriptors carry hints as bluesky's
    maybe_update_hints gives them.
  • examples/mini_beamline/09_monitor_during.lua: bpp.monitor_during over
    a ca_motor, a ca_detector and a pva_detector against the mini-beamline
    IOC.

Fixed

  • Engine: monitor Events are keyed by the device's described data key
    rather than its name, so a detector's <name>_counts Event matches its
    Descriptor; a monitor emits the device's current reading as its first Event
    (a new SignalCache listener starts with the cached reading pending, as
    ophyd's subscribe(run=True) does); Msg::Unmonitor delivers an update
    still pending in the subscription before stopping the pump, where the
    abort could drop every Event of a short monitor_during scan under CPU
    load.
  • Soft backend: SoftDetector counts on every read, so count and
    scan (which read without triggering) no longer report 0 at every point.
    SoftDetector, SignalCache and SoftDetectorControl store into their
    watch channels with send_replace, since watch::Sender::send drops the
    value while no receiver is alive (a reading published before the first
    subscriber, a staged cache with no listener, an arm before
    subscribe_index).
  • Lua: subscribers receive worker-thread documents (monitor Events) in
    emission order. The REPL thread replays a subscriber's buffer before each
    of its own deliveries instead of only after RE:run returns.
  • Engine: stop and abort are thrown into the plan at the message
    they interrupt, so finalize_wrapper, run_wrapper and stage_wrapper
    tails run before the run closes, as bluesky's RequestStop /
    RequestAbort unwind a generator; halt still drops the plan. A pause
    cancels an in-flight Msg::Wait instead of applying after the move
    finished, so stop_on_pause reaches a motor that is still moving.
  • Suspenders: a tripped suspender gates the next run's start, records its
    justification (not "pause") on the suspension, runs its pre/post plans, and
    holds the engine until every tripped suspender has released; a manual
    pause during a suspension is not lifted by the suspender's release.
  • Descriptors: object_keys lists every object's read keys (an unhinted
    object had no entry) and declare_stream descriptors from collect and
    monitor carry their objects, hints and configuration.
  • CA devices: describe_dyn reports the PV's units, precision and limits
    from DBR_CTRL and sources the key as ca://<pv>.
  • Lua: LuaDevice __tostring lists the preparable, configurable,
    collectable and pausable roles, and inspect() resolves through the
    preparable and configurable facets instead of answering type = "Unknown".

See CHANGELOG.md for the full list.

v0.4.2 — epics-rs 0.28.1 dependency refresh

Choose a tag to compare

@physwkim physwkim released this 03 Sep 20:39
75f962c

A dependency-refresh release. No bsrs code, API, or behaviour changes.

Changed

  • Based the EPICS CA/PVA backends on epics-rs 0.28.1 (from 0.24.3). The
    0.26.0 and 0.27.0 API breaks (AcfCell, the PvString record description,
    ClientCreds, the check_write_request rename, 18 removed items) do not
    reach anything bsrs calls. epics-libcom-rs and epics-rtems-boot enter
    Cargo.lock as new transitive dependencies of epics-base-rs.

Fixed

  • Two pva_mon round-trip tests decode through as_chunks rather than
    chunks_exact, which Rust 1.98's clippy::chunks_exact_to_as_chunks fails
    under the -D warnings gate.

See CHANGELOG.md for the full list.

v0.4.1 — epics-rs 0.24.3 backend refresh

Choose a tag to compare

@physwkim physwkim released this 20 Jul 07:17
84b2be1

Dependency-refresh release on top of 0.4.0. Rebases the EPICS CA/PVA backends
on epics-rs 0.24.3 (from 0.24.2). No bsrs code, API, or behaviour changes.

Changed

  • Based the EPICS CA/PVA backends on epics-rs 0.24.3 (from 0.24.2).

Verified against 0.24.3 (default ca+pva): cargo fmt --all --check clean;
cargo clippy --workspace --tests --examples -- -D warnings clean;
cargo test --workspace --no-fail-fast 513 passed / 0 failed / 5 ignored;
cargo build -p bsrs --features frame-source and cargo build --workspace --release clean.