| |
- __builtin__.object
-
- Panels
- epicsAlh
- epicsTemplate
class Panels(__builtin__.object) |
|
Manage store and print of a group of panels. This class creates
panel.substitutions information to be expanded to a panel with the
CreatePanel.pl script
(see https://bii-scripts.sourceforge.io/scripts/CreatePanel.html)
It supports to create several panel files and groups of widgets within a panel
Spreadsheet collumns
--------------------
* EPICS Panel Name Prefix (Col. W): The Panel Name, without the ending .edl
* EPICS Panel Group (Col. X): The Group within a panel. Omit this will put
all signals to a default group.
Each group will be shown with a hedline by a widget with the same name or
text.edl, also with GRID definition!
* EPICS Panel Sort/Grid (Col. Y):
- Nothing: Sort all signals by device- and signal name
- Unique number: Sort within a group by number.To get the order as defined
in the spreadsheet just put an incrementet number here
- (GRID="x,y") or (GRID="x,y",SPAN="n"or (XY="n,m"): Just pass the parameter
to the panel.substitutions file to be interpreted by CreatePanel.pl
ATTENTION: the Groupname will get the Y position of Ymin-1, so there has to
be a free gap of 1 line in grid-Y numbering!
- SORT=n|otherParameters|...: Sort by number, but pass other arguments to the panel |
|
Methods defined here:
- __init__(self, prePath, widgetPath)
- addItem(self, panelName, panelGroup, devNamedata, substitutionData, panelWidgetName, panelSort=None)
- printAll(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- PanelFile = <class 'epicsUtils.PanelFile'>
- Store all informations to hold a panel group
- PanelWidget = <class 'epicsUtils.PanelWidget'>
- Subclass to manage one widget
|
class epicsAlh(__builtin__.object) |
|
This class hold all data to write an alarm handler file.
- Each object holds the data to describe one alarmhandler item (see __init__() )
- The alarm group structure is defined as a path for each item and stored in a
static tree structure.
- The defaults for the mask of an item is: ---T- |
|
Methods defined here:
- __init__(self, devname, signal, nodePath, tagPar, sort=None)
- Definition of the alarm objects:
devname: The CHANNEL ChannelName is the EPICS PV: "devname:signal"
signal:
nodePath: '|' separated list. First element is the filename behind it defines
the path in the alh-tree.
flags: Optional dictionary with the format items according to the alh docu.
SPECIAL: the Alarm Channel Mask: is defined as flags['MASK'] but after
__init__ removed from the dictionary!
sort: Optional sort number: The sort order for the signals within a group. Default
as found.
Example:
epicsUtils.epicsAlh("MYDEV","readback","alhFile|device|in|booster",{'ALARMCOUNTFILTER':"2 1",'COMMAND':"run_edm -x huhu.edl",'MASK':"CD"},1)
EPICS alh docu:
http://www.aps.anl.gov/epics/EpicsDocumentation/ExtensionsManuals/AlarmHandler/ALHUserGuide/ALHUserGuide.html
- __repr__(self)
- __str__(self)
- putToNode(self, pathList, depth, nodeDict)
Static methods defined here:
- printAllSubst(root=None, groupNull=None)
- printFiles(prePath, groupNull=None)
- setMask(flags)
- compile string with alh mask characters [C D A T L] to a alh mask.
Raise ValueError for illegal characters
E.g. 'MASK':"T" -> "---T-"
- toGroupString(grStr)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- nodeDict = {}
|
class epicsTemplate(__builtin__.object) |
|
This class stores and print an EPICS database data for .db or .template files.
* Object Data:
- rtyp template name or record type
- devn devicename as dictionary of name tag and name {'DEVN':devName}
- field <dict> dictionary of name/value pairs
- _init__(self,rtyp,name,fieldDict,filename=None,infoDict=None) )
- __str__() # EPICS substitutions format
- __repr__() # python format: tupel of (rtyp,name,{fieldDict})
- getType(): return type name
- getName(): return devicename
- getFields(): return field dictionary
- prAsSubst(): print one line for this template without header 'file ...template {'
- prAsRec(): treat this data as EPICS record and print one line
'record(rtyp,"NAME:SNAME")
ATTENTION the record needs the devicename as defined in 'devn' AND the
field 'SNAME' for a PV name
* Static data
- typeDict={} Dictionary of rtyp s that contain a list of objects with this rtype
- deviceList=[] List of objects to preserve the creation order and for search
functions
- getFileNames(): return a list of File names to be crated or None for default file
only
- printAllSubst(filename='default'): print all stored templates in
EPICS.substitution format
- printAllRecords(filename='default'): treat all data as EPICS-records and print all
stored templates in EPICS.db format
- getDevice(devName): return a list of records with this devicename or None
- findObject(devName, parDict) Get records/template instances that matches
the device name and the parameters - may be empty for not found |
|
Methods defined here:
- __init__(self, rtyp, nameDict, fieldDict={}, filename=None, infoDict=None)
- __repr__(self)
- __str__(self)
- getDevn(self)
- getDevnTag(self)
- getFields(self)
- getType(self)
- prAsRec(self)
- prAsSubst(self)
- processInfo(self)
Static methods defined here:
- findObject(devName, parDict, filename=None)
- Get records/template instances that matches the device name and the parameters.
Return empty list for not found.
- getDevice(devName, filename=None)
- Get list of records and template instances that have this device name - may be
empty for not found. 'filename=None' means search in all filenames.
- getFilenames()
- Get list of filenames - at least one element called 'default'
- getPV(devName, signalName, signalField='SNAME', filename=None)
- Search object list for devName AND field SNAME=signalName (signalField tag may
be set as third parameter)
Return list of matching objects - empty list means not found
- printAllRecords(filename=None)
- Treat all objects as EPICS records and print in EPICS.db format
- printAllSubst(filename=None)
- Treat all objects (EPICS records also) as EPICS substitutions and print in
EPICS.substitutions format
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- files = {}
| |