Versions Compared

Key

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

...

Panel

Class Dgram

Python wrapper for pdsdata/xtc/Dgram class.


Construction

Usage: dg = xtc.Dgram(buffer)

One of the ways to create Dgram objects is from a Python buffer objects.

Arguments:

  • buffer – any object that implements buffer interface

Method env()

Usage: env = dg.env()

Returns the env field as an integer number.


Method seq()

Usage: seq = dg.seq()

Returns the seq field as an object of type xtc.Seq.


Method xtc()

Usage: x = dg.xtc()

Returns top-level Xtc as object of type xtc.Xtc.

...

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.