/  PyMDB  /  Containers

Containers

Container

class yamcs.pymdb.Container

Bases: object

A collection of entries where each entry may be another container or a parameter.

__init__(system: System, name: str, entries: Sequence[ParameterEntry | ContainerEntry] | None = None, *, base: Container | str | None = None, abstract: bool = False, condition: Expression | None = None, aliases: Mapping[str, str] | None = None, short_description: str | None = None, long_description: str | None = None, extra: Mapping[str, str] | None = None, bits: int | None = None, rate: float | None = None, hint_partition: bool = False)
aliases: dict[str, str]

Alternative names, keyed by namespace

bits: int | None

Explicit fixed size in bits. Usually unnecessary, because Yamcs can derive a lot from the entries.

If provided, Yamcs can use this information to speed up parameter extraction, especially when this container is used as an entry into another container.

If this container extends base container(s), their size should be included.

condition: Expression | None

Restriction criteria for this container.

extra: dict[str, str]

Arbitrary information, keyed by name

fit_entries()

Automatically set a fixed size to this container based on the known entries.

hint_partition: bool

Hint that this container’s name should be used for partitioning when stored to Yamcs.

long_description: str | None

Multiline description

name: str

Short name of this parameter

property qualified_name: str

Absolute path of this item covering the full system tree. For example, an item C in a subystem B of a top-level system A is represented as /A/B/C

rate: float | None

Expected rate in seconds.

For example, a rate of 2 means: “one update every 2 seconds” (not “2 updates every second”).

This is used by Yamcs to determine parameter expiration. A parameter’s realtime value is considered expired when 1.9 * rate has passed without a new update (where 1.9 is a configurable tolerance multiplier).

If None, the contained parameters are not checked for expiration.

short_description: str | None

Oneline description

system: System

System this container belongs to

ParameterEntry

class yamcs.pymdb.ParameterEntry

Bases: object

__init__(parameter: Parameter, bitpos: int | None = None, *, offset: int = 0, short_description: str | None = None, condition: Expression | None = None) None
bitpos: int | None

Absolute position within the container, in bits.

If unspecified, this entry is positioned relative to the preceding entry.

condition: Expression | None

If set, this entry is only present when the condition is met

offset: int

Distance in bits to the preceding entry.

While not expected, if both bitpos and offset are specified, the two are added together for establishing the real absolute bit position.

short_description: str | None

Oneline description

ContainerEntry

class yamcs.pymdb.ContainerEntry

Bases: object

__init__(container: Container, short_description: str | None = None, bitpos: int | None = None, offset: int = 0, condition: Expression | None = None) None
bitpos: int | None

Absolute position within the container, in bits.

If unspecified, this entry is positioned relative to the preceding entry.

condition: Expression | None

If set, this entry is only present when the condition is met

offset: int

Distance in bits to the preceding entry.

While not expected, if both bitpos and offset are specified, the two are added together for establishing the real absolute bit position.

short_description: str | None

Oneline description