Taurus Documentation Release 4.3.2-Alpha
Total Page:16
File Type:pdf, Size:1020Kb
taurus Documentation Release 4.3.2-alpha taurus team Mar 14, 2018 Contents 1 User’s Guide 3 1.1 Introduction...............................................3 1.2 Getting started..............................................4 1.2.1 Installing............................................4 1.2.1.1 Installing with pip (platform-independent)......................4 1.2.1.2 Installing from sources manually (platform-independent)..............5 1.2.1.3 Linux (Debian-based).................................5 1.2.1.4 Windows........................................5 1.2.2 Working from Git source directly (in develop mode).....................5 1.2.3 Dependencies..........................................6 1.3 User’s Interface..............................................6 1.3.1 Taurus colors..........................................6 1.3.1.1 Taurus Device state colors...............................7 1.3.1.2 Taurus Attribute Value Quality colors.........................7 1.3.1.3 Tango-specific Device state colors..........................7 1.3.2 TaurusForm User’s Interface..................................7 1.3.2.1 TaurusForm as a stand-alone application.......................8 1.3.2.2 The widgets used for different types of attributes and devices............9 1.3.2.3 Changing the contents of a form...........................9 1.3.2.4 Drag and Drop support................................ 10 1.3.2.5 Compact Mode.................................... 10 1.3.2.6 Writing to attributes.................................. 10 1.3.3 TaurusModelChooser User’s Interface............................. 12 1.3.4 TaurusPlot User’s Interface................................... 13 1.3.4.1 TaurusPlot as a Stand-alone application........................ 14 1.3.4.2 Working with two Y scales.............................. 14 1.3.4.3 TaurusPlot context menu............................... 14 1.3.4.4 Zooming and panning................................. 14 1.3.4.5 Plot Configuration dialog............................... 15 1.3.4.6 Choosing what is plotted............................... 15 1.3.4.7 Storing and recovering current configuration..................... 18 1.3.4.8 Obtaining information about the plotted values.................... 18 1.3.4.9 Exporting and printing the data............................ 19 1.3.4.10 Customizing the titles of the curves.......................... 20 1.3.4.11 Date/time support................................... 20 1.3.5 TaurusTrend User’s Interface.................................. 22 i 1.3.5.1 TaurusTrend as a stand-alone application....................... 23 1.3.5.2 Timestamp VS “event number” mode......................... 23 1.3.5.3 The Fixed-range X scale................................ 23 1.3.5.4 Using a spectrum as a collection of scalar values................... 24 1.3.5.5 Accessing archived values............................... 25 1.3.5.6 Polling buffer..................................... 25 1.3.5.7 Forced read of attributes................................ 25 1.3.5.8 Known limitations................................... 25 1.3.6 Spectrograms (2D trends).................................... 26 1.3.7 Image’s interface........................................ 26 1.3.7.1 TaurusImageDialog as a stand-alone application................... 27 1.3.8 Array Editor........................................... 28 1.3.9 Synoptics............................................ 28 1.3.10 Taurus Device Panels User’s Interface............................. 28 1.3.10.1 TaurusDevicePanel as a stand-alone application................... 30 1.3.10.2 TaurusPanel as a stand-alone application....................... 30 1.3.11 TaurusGUI User’s Interface................................... 30 1.3.11.1 Launching TaurusGUI................................. 31 1.3.11.2 General structure of a TaurusGUI application..................... 32 1.3.11.3 Re-arranging panels (moving, resizing, hiding,. ).................. 32 1.3.11.4 Creating custom panels................................ 33 1.3.11.5 Perspectives...................................... 33 1.3.11.6 Synoptic panels.................................... 35 1.3.11.7 External Application Launchers............................ 35 1.3.11.8 Sardana integration (Macroserver & Pool)...................... 36 1.3.11.9 Examples of TaurusGui based applications...................... 37 1.3.11.10 Known Issues..................................... 38 1.3.12 Taurus Demo User’s Interface................................. 38 1.3.12.1 Taurus Demo Application............................... 38 1.3.13 Taurus Remote Log Monitor User’s Interface......................... 38 1.3.14 Taurus Configuration Browser User’s Interface........................ 40 1.3.14.1 Taurus Configuration Browser Application...................... 40 1.4 Screenshots................................................ 40 2 Developer’s Guide 45 2.1 Taurus 3.x to 4.x migration guide.................................... 45 2.2 Taurus development guidelines..................................... 45 2.2.1 Overview............................................ 45 2.2.2 How to contribute to taurus................................... 45 2.2.3 Documentation......................................... 46 2.2.4 Coding conventions....................................... 46 2.2.5 Special notes about Qt programming.............................. 47 2.3 Creating GUIs with the TaurusGUI framework............................. 48 2.3.1 Advanced control over the GUI................................. 49 2.4 Taurus Qt Designer tutorial....................................... 50 2.4.1 Using the .ui file........................................ 50 2.5 Taurus icon guide............................................. 51 2.5.1 Taurus icon catalog....................................... 51 2.6 taurus core tutorial............................................ 53 2.6.1 Model concept......................................... 53 2.6.2 Examples of model names................................... 54 2.6.3 model access.......................................... 55 2.6.4 Advantages of accessing Tango via Taurus over PyTango................... 56 2.7 Taurus custom settings.......................................... 56 ii 2.8 Examples................................................. 57 2.8.1 Setup.............................................. 57 2.8.2 Common............................................ 57 2.8.3 Display attribute value..................................... 58 2.8.4 Display attribute value with label................................ 58 2.8.5 Display attribute value with label and separate units...................... 59 2.8.6 Interactively display attribute.................................. 59 2.8.7 A higher level of abstraction: forms.............................. 60 2.8.8 Customizing forms....................................... 61 2.8.9 Synoptics one-o-one...................................... 62 2.8.10 Let’s go graphical........................................ 62 2.8.10.1 Simple plotting of various spectrum attributes.................... 62 2.8.10.2 Scatter plots (Y vs X plots).............................. 63 2.8.10.3 Plotting data that is not an attribute.......................... 64 2.8.10.4 Plotting Trends.................................... 66 2.8.11 Even higher level: creating a TaurusGui............................ 66 2.9 taurus ................................................. 67 2.9.1 taurus.console ...................................... 67 2.9.1.1 taurus.console.util ............................. 67 2.9.2 taurus.core ......................................... 67 2.9.2.1 taurus.core.epics ............................... 67 2.9.2.2 taurus.core.evaluation ........................... 69 2.9.2.3 taurus.core.resource ............................. 77 2.9.2.4 taurus.core.tango ............................... 90 2.9.2.5 taurus.core.util ................................ 125 2.9.2.6 AttrQuality .................................... 182 2.9.2.7 DoubleRegistration .............................. 183 2.9.2.8 TaurusAttrValue ................................. 183 2.9.2.9 TaurusAttribute ................................. 184 2.9.2.10 TaurusAttributeNameValidator ...................... 186 2.9.2.11 TaurusAuthority ................................. 187 2.9.2.12 TaurusAuthorityNameValidator ...................... 188 2.9.2.13 TaurusConfigValue ............................... 189 2.9.2.14 TaurusConfiguration ............................. 189 2.9.2.15 TaurusConfigurationProxy ......................... 190 2.9.2.16 TaurusDevState ................................. 190 2.9.2.17 TaurusDevice ................................... 191 2.9.2.18 TaurusDeviceNameValidator ......................... 192 2.9.2.19 TaurusException ................................. 193 2.9.2.20 TaurusExceptionListener .......................... 193 2.9.2.21 TaurusFactory .................................. 193 2.9.2.22 TaurusListener ................................. 196 2.9.2.23 TaurusLockInfo ................................. 197 2.9.2.24 TaurusManager .................................. 197 2.9.2.25 TaurusModel .................................... 201 2.9.2.26 TaurusModelValue ................................ 202 2.9.2.27 TaurusOperation ................................. 203 2.9.2.28 TaurusPollingTimer .............................. 204 2.9.2.29 TaurusTimeVal .................................. 205 2.9.2.30 WriteAttrOperation .............................. 206 2.9.3 taurus.qt .......................................... 207 2.9.3.1 taurus.qt.qtcore ...............................