Skip to main content

Crate bob

Crate bob 

Source
Expand description

Parser for Phoebus Display Builder .bob files, and for CS-Studio BOY .opi files, which are translated into the same form (see [opi]).

A display is kept close to the XML: each Widget holds its property elements as they were written, and typed accessors read them with the Phoebus defaults. Macros are expanded later, by whoever renders the display, because their values depend on where a widget sits.

Modules§

project
Eclipse project linked folders, as CS-Studio BOY workspaces use them.

Structs§

Color
An RGBA colour, optionally with its Phoebus name.
Display
A parsed .bob (or translated .opi) display.
Element
An owned XML element: enough of the DOM to read .bob properties.
Font
GroupLink
A widget that shows the group a vacuum space’s link field names.
Macros
An ordered set of macro definitions. Later definitions win.
MenuMux
A combo’s menu mux sets.
MuxSet
One target and the value each item writes to it.
Rule
A rule: sets property prop_id from the first expression that holds.
RuleExpr
Widget
One widget: its type, property elements and child widgets.

Enums§

Action
A widget action, e.g. from an action button.
Error
FontStyle
LinkSets
What a widget’s GroupLink points at the group.
Source
A display’s location.

Constants§

MAX_LOAD_BYTES
The most expanded macro text, counting what was expanded as well as what it came to, that a whole load should do, for Macros::with_budget to be given. Each expansion takes the size of its text and result, so this also bounds the lookups, and so the time, of a load.
MAX_MUX_SETS
The most sets a menu mux has, as in BOY (target0…target7); any more in a <menu_mux> are ignored.
MAX_XML_DEPTH
Deepest element nesting accepted. Everything that walks the tree (from_node, split_widgets, Drop) recurses once per level. The deepest real display nests about 8 levels; a small cap also bounds the stack used when displays are embedded in one another.

Functions§

databrowser_pvs
The PVs of a BOY script that opens a Data Browser on them:
expand
Replace $(NAME) and ${NAME} using lookup. $(NAME=default) falls back to the default; unknown names are left as written, like Phoebus does. Text whose expansion would take more than [MAX_WORK] (16 KiB) of output, such as nested $(M) that each name $(M) several times, is returned unexpanded, as written, rather than truncated.
group_device
The group’s device name in the value of a link field: everything before the first : of its first word, so SR03S-VA-GPIRG-01:CTL:SP NPP MS is SR03S-VA-GPIRG-01. A scheme:// before the name is kept with it, so a link to loc://G:STA names the group loc://G.
group_frame
The frame of a strip with top frame top for a group’s status: `status
named_color
Colours from the default Phoebus color.def.
parse_bool
true, yes or 1, and false, no or 0, as Phoebus’s BooleanWidgetProperty.parseExpandedSpecification.
rearm_warning
Let the next expansion that gives up warn again, as at the start of a load.
spend
Take n from left, down to nothing.
strip_tool_pvs
The PVs of a command that starts StripTool, such as strip.py SR04S-VA-GAUGE-01:PLOG SR04S-VA-GAUGE-02:PLOG log_mbar, or None for any other command. The last word, when it has no :, says how to scale the chart (log_mbar) and is not a PV.
warn_spent
Warn, once per load, that the macro budget is spent and text is left as written.
xml_depth
The deepest element nesting in xml, found by a quick scan without recursion, so it can run before the (recursive) XML parser.