Versions Compared

Key

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

...

Panel

Class TransitionId

Python wrapper for pdsdata/xtc/TransitionId 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 Value

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

  • TransitionId.
  • TransitionId.Unknown
  • TransitionId.Reset
  • TransitionId.Map
  • TransitionId.Unmap
  • TransitionId.Configure
  • TransitionId.Unconfigure
  • TransitionId.BeginRun
  • TransitionId.EndRun
  • TransitionId.BeginCalibCycle
  • TransitionId.EndCalibCycle
  • TransitionId.Enable
  • TransitionId.Disable
  • TransitionId.L1Accept
  • TransitionId.NumberOf

Construction

Usage: transId = xtc.TransitionId(number)

Arguments:

  • number – any of the above enums can be used

Method __str__

Usage: s = str(transId)

Returns a name of the corresponding enum.


Method __repr__

Usage: s = repr(transId)

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

...

Panel

Class TypeId

Python wrapper for pdsdata/xtc/TypeId 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.


Enum Type

This enum is an embedded type of TypeId class. Following enum members are defined currently:

  • TypeId.Type.Any
  • TypeId.Type.Id_Xtc
  • TypeId.Type.Id_Frame
  • TypeId.Type.Id_AcqWaveform
  • TypeId.Type.Id_AcqConfig
  • TypeId.Type.Id_TwoDGaussian
  • TypeId.Type.Id_Opal1kConfig
  • TypeId.Type.Id_FrameFexConfig
  • TypeId.Type.Id_EvrConfig
  • TypeId.Type.Id_TM6740Config
  • TypeId.Type.Id_ControlConfig
  • TypeId.Type.Id_pnCCDframe
  • TypeId.Type.Id_pnCCDconfig
  • TypeId.Type.Id_Epics
  • TypeId.Type.Id_FEEGasDetEnergy
  • TypeId.Type.Id_EBeam
  • TypeId.Type.Id_PhaseCavity
  • TypeId.Type.NumberOf

Construction

Wiki Markup
Usage: {{typeId = xtc.TypeId(\[_type_, \[_version_\]\])}}

Arguments:

  • type – one of the ebove enum values, if missing then Any assumed
  • version – version number, if missing then assumed to be 0

Method value()

Usage: val = typeId.value()

Returns the whole type ID number including version as integer number.


Method id()

Usage: id = typeId.id()

Returns the type ID number without version as enum object of TypeId.Type type.


Method version()

Usage: vers = typeId.version()

Returns the type ID version number as integer number.

...

Panel

Class Xtc

Python wrapper for pdsdata/xtc/Xtc class. In addition to methods described below this class implements Python iterator interface. Instance can be used as iterator only when its contains type is TypeId.Type.Id_Xtc.


Construction

This class cannot be instantiated directly, methods of other classes return instances of this type.


Property damage

Usage: dmg = xtcObj.damage

Returns damage bitmask as an object of xtc.Damage type.


Property src

Usage: src = xtcObj.src

Returns data source object. Depending on the source level the type of the returned object will be one of xtc.BldInfo, xtc.DetInfo, or xtc.ProcInfo.


Property contains

Usage: typeId = xtcObj.contains

Returns the type of the object contained in XTC as object od xtc.TypeId type.


Property extent

Usage: size = xtcObj.extent

Returns the extent (total size) of the XTC.


Method sizeofPayload()

Usage: size = xtcObj.sizeofPayload()

Returns the size of payload object.


Method payload()

Usage: obj = xtcObj.payload()

Returns data object. If contains is TypeId.Type.Any it returns None. If contains is TypeId.Type.Id_Xtc it returns xtc.XtcIterator object. For other values it returns one of the specific types such as acqiris.ConfigV1.