Taurus was originally conceived as a library for connecting client side applications (CLIs and GUIs) to Tango device servers. Since v4.0 the Taurus core became control-system agnostic, and it supports other control systems (such as EPICS) and data sources.
due to its Tango origin, this documentation will tend to use many Tango-related examples. We intend to gradually introduce more non-Tango examples
Taurus was developed within the Sardana project, but since it has been found useful for other projects not related to Sardana, it has been moved to a separate project (although both projects are kept in sync and share most of their developers).
Taurus uses the Model-View-Controller (MVC) pattern to build interfaces.
taurus.core module uses plugins (known as schemes) to provide TaurusModel
objects that abstract the interactions with specific sources of data and/or
control objects. Some schemes are already implemented for accessing control system
libraries (the “tango” and “epics” schemes) as well as for data-processing via a
Python interpreter (the “evaluation” scheme). See the taurus core tutorial
for more information on the taurus core.
The Taurus view and controller components are typically implemented as PyQt based GUIs, but it may also consist on command line interfaces such as Sardana’s spock.
taurus.qt module provides a set of basic widgets (labels, LEDs, editors,
forms, plots, tables, buttons, synoptics,…) that extend related Qt widgets with
the capability of attaching to Taurus core models in order to display and/or change
their data in pre-defined ways. For example, a TaurusPlot widget will display a curve
for each attribute model to which it is attached if its value is a one-dimensional
numerical array. Similarly, a TaurusForm widget will allow the user to interact with
the data represented by its attached models. The actual association of a view (widget)
with a model is done by providing the model name to the widget.
The following is an example on how to create a widget that allows to interact with four attributes (state, position, velocity, acceleration) of a Tango device (motor/icepap/01):
from taurus.qt.qtgui.panel import TaurusForm
from taurus.qt.qtgui.application import TaurusApplication
app = TaurusApplication(sys.argv, cmd_line_parser=None)
attrs = [ 'state', 'position', 'velocity', 'acceleration' ]
model = [ 'motor/icepap/01/%s' % attr for attr in attrs ]
w = TaurusForm()
w.model = model
The above example can even be achieved even without typing any code:
% cd taurus/qt/qtgui/panel
% taurus form motor/icepap/01/state motor/icepap/01/position motor/icepap/01/velocity
For many more examples, See the Examples page.