phoebusgen package

Subpackages

Module contents

phoebusgen Module

This module contains a Python class representation of a Phoebus screen and all widgets. With the module, you can create Python scripts to write Phoebus screens to a .bob file. Almost all possible functionality should exist in Phoebusgen that you can do in the Display Builder Editor.

In addition, phoebusgen.colors and phoebusgen.fonts are Enum objects that are available to use to add predefined colors/fonts to widgets.

Example: text_update_widget.predefined_foreground_color(phoebusgen.colors.OK)

A custom site specific color.def or font.def in ~/.phoebusgen/ to force phoebusgen.colors or phoebusgen.fonts to reflect your site’s custom definitions.

phoebusgen.change_phoebus_version(version)
class phoebusgen.colors(value)

Bases: Enum

An enumeration.

ActiveText = {'alpha': '255', 'blue': '0', 'green': '255', 'name': 'ActiveText', 'red': '255'}
Attention = {'alpha': '255', 'blue': '0', 'green': '160', 'name': 'Attention', 'red': '255'}
Background = {'alpha': '255', 'blue': '255', 'green': '255', 'name': 'Background', 'red': '255'}
Button_Background = {'alpha': '255', 'blue': '210', 'green': '210', 'name': 'Button_Background', 'red': '210'}
DISCONNECTED = {'alpha': '200', 'blue': '200', 'green': '0', 'name': 'DISCONNECTED', 'red': '200'}
Header_Background = {'alpha': '255', 'blue': '77', 'green': '77', 'name': 'Header_Background', 'red': '77'}
Header_ForeGround = {'alpha': '255', 'blue': '255', 'green': '255', 'name': 'Header_ForeGround', 'red': '255'}
INVALID = {'alpha': '255', 'blue': '255', 'green': '0', 'name': 'INVALID', 'red': '255'}
MAJOR = {'alpha': '255', 'blue': '0', 'green': '0', 'name': 'MAJOR', 'red': '255'}
MINOR = {'alpha': '255', 'blue': '0', 'green': '128', 'name': 'MINOR', 'red': '255'}
OK = {'alpha': '255', 'blue': '0', 'green': '255', 'name': 'OK', 'red': '0'}
Off = {'alpha': '255', 'blue': '60', 'green': '100', 'name': 'Off', 'red': '60'}
On = {'alpha': '255', 'blue': '0', 'green': '255', 'name': 'OK', 'red': '0'}
Read_Background = {'alpha': '255', 'blue': '240', 'green': '240', 'name': 'Read_Background', 'red': '240'}
STOP = {'alpha': '255', 'blue': '0', 'green': '0', 'name': 'MAJOR', 'red': '255'}
Text = {'alpha': '255', 'blue': '0', 'green': '0', 'name': 'Text', 'red': '0'}
Write_Background = {'alpha': '255', 'blue': '255', 'green': '255', 'name': 'Write_Background', 'red': '128'}
class phoebusgen.fonts(value)

Bases: Enum

An enumeration.

Comment = {'family': 'Liberation Sans', 'name': 'Comment', 'size': '14', 'style': 'ITALIC'}
Default = {'family': 'Liberation Sans', 'name': 'Default', 'size': '14', 'style': 'REGULAR'}
DefaultBold = {'family': 'Liberation Sans', 'name': 'Default Bold', 'size': '14', 'style': 'BOLD'}
FinePrint = {'family': 'Liberation Sans', 'name': 'Fine Print', 'size': '12', 'style': 'REGULAR'}
Header1 = {'family': 'Liberation Sans', 'name': 'Header 1', 'size': '22', 'style': 'BOLD'}
Header2 = {'family': 'Liberation Sans', 'name': 'Header 2', 'size': '18', 'style': 'BOLD'}
Header3 = {'family': 'Liberation Sans', 'name': 'Header 3', 'size': '16', 'style': 'BOLD'}
Oddball = {'family': 'PakTypeNaqsh', 'name': 'Oddball', 'size': '40', 'style': 'REGULAR'}