bobview-testioc

A pure-Rust EPICS IOC that serves, over Channel Access and PV Access, a subset of the PVs of the epics-containers example-services BL01T beamline, enough for its opi/demo.bob screen. It has no C dependencies, so it runs natively on an aarch64 phone where the real amd64 IOC containers would need qemu. Built on the epics-rs crates; uses about 15 MB RSS while streaming images.

bobview-testioc [--only ea|motor|cam]...    # default: all three

It needs no shell and keeps running with stdin closed. --only applies to both protocols. Its environment variables are in Environment variables.

PVs

partPVshow
eabl01t:A, bl01t:B, bl01t:SUMbl01t-ea-test-01's ioc.db verbatim, A=2.54, B=2.61
motorBL01T-MO-SIMC-01:M1, :M2real motor record (motor-rs) on a simulated axis
camBL01T-DI-CAM-01:DET:, :ARR:, :PVA:soft records plus a small driver loop

The camera is not a real simDetector: it serves the ADBase / NDPluginBase records the demo screen uses (Acquire, AcquireTime, AcquirePeriod, ArrayCounter, ImageMode, NumImages, DetectorState_RBV, FilePath, ...) and counts frames at the acquire period, honouring Single / Multiple / Continuous. As in its ioc.yaml it starts acquiring continuously at AcquireTime 0.1.

PV Access

Every record is also served over PVA the way QSRV does it: NTScalar for analog and long records (with display, control and alarm metadata), NTEnum for bi / bo / mbbi / mbbo, NTScalarArray for waveforms; gets, puts and monitors all work.

BL01T-DI-CAM-01:PVA:OUTPUT is an NTNDArray like NDPluginPVA's output. The image is simulated: 1024x1024 Int8 (byteValue, pixels 0..255 stored as i8 bit patterns, as an Int8 simDetector produces), uncompressed, with drifting diagonal fringes, three gaussian spots on Lissajous paths and some noise. A frame is posted for every frame counted (10 Hz by default) while DET:ArrayCallbacks and PVA:EnableCallbacks are both on; uniqueId is the frame counter. To look at a frame without a viewer:

cargo run -p bobview-testioc --example frame_png -- /tmp/frame 1 50

Build for the phone

From x86_64:

cargo zigbuild --release --target aarch64-unknown-linux-gnu.2.36 -p bobview-testioc