Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Class Level

Python wrapper for pdsdata/xtc/Level class. C++ class does not define any data members or methods, it only defines single enum type. C++ cannot be instantiated in any meaningful way. Python class in addition to defining corresponding enum constants can also be instantiated, the instances are regular integer numbers with additional printing enhancements.


Enum Type

Unlike other enum types which create separate new type inside original Python type, the enums in Level class are defined directly in the class. Known enums:

  • Level.Control
  • Level.Source
  • Level.Segment
  • Level.Event
  • Level.Recorder
  • Level.Observer
  • Level.Reporter
  • Level.NumberOfLevels

Construction

Usage: lvl = xtc.Level(number)

Arguments:

  • number – any of the above enums can be used

Method __str__

Usage: s = str(lvl)

Returns a name of the corresponding enum.


Method __repr__

Usage: s = repr(lvl)

Returns a string in the form "<Level(num):name>" where num and name are the value and the name of the corresponding enum.

...

Panel

Class ProcInfo

Python wrapper for pdsdata/xtc/ProcInfo class. Unlike C++ this class does not inherit from Src class (Src class does not exist in this module) but uses dynamic Python features to implement the same interface as in Src class. In addition to methods described here the class also defines __hash__ and __cmp__ methods based on the content of the object and can be used as a key in the dictionaries.


Construction

Usage: proc = xtc.ProcInfo(level, processId, ipAddr)

Arguments:

  • level – instance of xtc.Level class
  • processId – integer number
  • ipAddr – IP address of the host as integer number

Method level()

Usage: lvl = proc.level()

Returns enum value of type xtc.Level which defines source level.


Method log()

Usage: log = proc.log()

Returns logical address of data source as integer number.


Method phy()

Usage: phy = proc.phy()

Returns physical address of data source as integer number.


Method processId()

Usage: processId = proc.processId()

Returns process ID as integer number.


Method ipAddr()

Usage: ipAddr = proc.ipAddr()

Returns host IP address as an integer number.