Versions Compared

Key

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

...

Panel

Class ClockTime

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

Wiki Markup
Usage: {{clock = xtc.ClockTime(\[_seconds_, \[_nanoseconds_\]\])}}

Creates new instance of type.

Arguments:

  • seconds – seconds since UNIX epoch
  • nanosecods – nanoseconds within second

If any argument is missing it is assumed to be 0.


Method seconds()

Usage: sec = clock.seconds()

Returns the number of seconds as integer number.


Method nanoseconds()

Usage: nsec = clock.nanoseconds()

Returns the number of nanoseconds as integer number.

...

Panel

Class Damage.

Python wrapper for pdsdata/xtc/Damage class.


Enum Value

This enum is an internal type of Damage class. Following enum members are defined currently:

  • Damage.Value.DroppedContribution
  • Damage.Value.OutOfOrder
  • Damage.Value.OutOfSynch
  • Damage.Value.UserDefined
  • Damage.Value.IncompleteContribution
  • Damage.Value.ContainsIncomplete

The values of enum constants define the bit number in the damage mask.


Enum Mask

Note
titlePython Only

This enum does not exist in C++ class, has been added to Python for convenience

This enum is an internal type of Damage class. Following enum members are defined currently:

  • Damage.Mask.DroppedContribution
  • Damage.Mask.OutOfOrder
  • Damage.Mask.OutOfSynch
  • Damage.Mask.UserDefined
  • Damage.Mask.IncompleteContribution
  • Damage.Mask.ContainsIncomplete

The values of enum constants define the bit mask in the damage mask. Mask enum is equivalent to 1<<Value enum.


Construction

Wiki Markup
Usage: {{dmg = xtc.Damage(\[_value_\])}}

Arguments:

  • value – complete damage mask as an integer number, if missing then assumed 0

Method value()

Usage: mask = dmg.value()

Returns complete damage mask as integer number.


Method hasDamage()

Usage: result = dmg.hasDamage(value)

Returns true if the corresponding damage bit is set.

Arguments:

  • value – bit number of the damage mask, one of the Damage.Value enums