Rust API

The workspace's crates are documented with rustdoc, built into this book under api/.

Libraries:

  • bob: the display model, .bob and .opi reading, macros and project links
  • pv: PV connections over CA, PVA, PVWS and local sources
  • testioc: the test IOC

Programs, documented with their private items, since that is all they have:

The crates are on crates.io (see Install from crates.io), but their API is not stable; it is documented for contributors.

In a local build the links work when the book is built with scripts/build-docs.sh (see Build from source), not with a plain mdbook serve.

Source map

The main source files, for finding your way in. See Architecture for how they fit together.

filewhat
crates/bob/src/
lib.rsDisplay and Widget: a display kept close to its XML, parsed from a file or text
opi.rstranslates a BOY .opi, element by element, into the .bob form
macros.rs$(X) and ${X} expansion
source.rswhere a display comes from (file or URL), and finding the files it names
project.rsEclipse project linked folders and DLS launcher paths
group_link.rs, menu_mux.rs, opi_file_script.rs, trend.rsBOY scripts and launchers recognised and done natively
crates/pv/src/
lib.rsPvManager, Pv and PvState: subscriptions, writes and the per-window repaint tags
ca.rs, pva.rsChannel Access and PV Access backends over epics-rs
pvws.rs, pvws_msg.rsthe browser backend over a PV Web Socket
local.rs, sim.rs, formula.rsloc://, sim:// and formula PVs
name.rs, value.rsPV names and their prefixes; values and their conversions
crates/bobview/src/
main.rsthe command line, and starting the native or browser app
app.rsBobApp: the windows, layouts, requests and repaints (see Threads, windows and repaints)
view.rsone window's display, its loading and its Back and Forward
fetch.rsreading displays from files or over http(s), and caching them
screen.rsthe screen builder: widgets with positions, macros, PVs and rules
rules.rsthe rule expression language
widgets.rspainting and interaction for each widget type, and Request
image.rs, symbol.rs, svg.rsthe image widget; symbol and picture widgets, loaded on worker threads; safe SVG parsing
plot.rs, meter.rs, stripchart.rs, axis.rsXY plots, meters, the strip chart and their shared scales
trend.rstrend windows: an archiveview Plot each
format.rsvalues as text and back, as Phoebus formats them
tree.rsthe navigator
pvmenu.rsthe PV context menu and details window
layout.rssaved window layouts
launch.rsrunning DLS launcher scripts for .opi command actions
snapshot.rsheadless rendering to PNG
crates/bobview-server/src/
main.rs, files.rs, pvws.rsthe server, its file serving, and its PVWS onto pv