/  PyMDB  /  Commands

Commands

Command

class yamcs.pymdb.Command

Bases: object

__init__(system: System, name: str, *, aliases: Mapping[str, str] | None = None, short_description: str | None = None, long_description: str | None = None, extra: Mapping[str, str] | None = None, abstract: bool = False, base: Command | str | None = None, assignments: Mapping[str, Any] | None = None, arguments: Sequence[Argument] | None = None, entries: Sequence[CommandEntry] | None = None, level: CommandLevel = CommandLevel.NORMAL, warning_message: str | None = None, constraint: Union[TransmissionConstraint, Sequence[TransmissionConstraint]] | None = None)
aliases: dict[str, str]

Alternative names, keyed by namespace

constraints

Constraints to check before sending the command.

A command is sent only when all constraints are satisfied. Constraints are evaluated in order. Afterwards, also constraints from base are checked.

property entries: list[ArgumentEntry | ParameterEntry | FixedValueEntry]

The order and placement of entries in the encoded command.

If unset, the default behaviour is to have a consecutive entry for each argument that has an encoding defined, in the same order as the arguments.

extra: dict[str, str]

Arbitrary information, keyed by name

get_argument(name: str, visit_parents=True)

Return the argument for the given name

Parameters:

visit_parents – Search upwards in parent commands

level: CommandLevel

The importance of this telecommand in terms of the nature and significance of its on-board effect.

long_description: str | None

Multiline description

name: str

Short name of this command

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

short_description: str | None

Oneline description

system: System

System this command belongs to

property verifiers: list[Verifier]
warning_message: str | None

Message explaining the importance of this telecommand

CommandLevel

class yamcs.pymdb.CommandLevel

Bases: Enum

The importance of a telecommand in terms of the nature and significance of its on-board effect.

These levels are adopted from ISO 14950:2004

NORMAL = 1

Level D

VITAL = 2

Level C: Telecommands that are not critical, but essential to the success of the mission and, if sent at the wrong time, could cause momentary loss of the mission.

CRITICAL = 3

Level B: Telecommands that, if executed at the wrong time or in the wrong configuration, could cause irreversible loss or damage for the mission (i.e. endanger the achievement of the primary mission objectives)

FORBIDDEN = 4

Level A: Telecommands that are not expected to be used for nominal or foreseeable contingency operations, that are included for unforeseen contingency operations, and that could cause irreversible damage if executed at the wrong time or inthe wrong configuration.

Argument

class yamcs.pymdb.Argument

Bases: DataType

__init__(name: str, *, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

AbsoluteTimeArgument

class yamcs.pymdb.AbsoluteTimeArgument

Bases: Argument, AbsoluteTimeDataType

__init__(name: str, reference: Epoch, *, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Union[FloatTimeEncoding, IntegerTimeEncoding]] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

AggregateArgument

class yamcs.pymdb.AggregateArgument

Bases: Argument, AggregateDataType

__init__(name: str, members: Sequence[Member], *, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

find_member(name: str) Member
long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

ArrayArgument

class yamcs.pymdb.ArrayArgument

Bases: Argument, ArrayDataType

__init__(name: str, data_type: DataType, length: int, *, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

BinartyArgument

class yamcs.pymdb.BinaryArgument

Bases: Argument, BinaryDataType

__init__(name: str, *, min_length: Optional[int] = None, max_length: Optional[int] = None, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

max_length: int | None

Maximum length in bytes

min_length: int | None

Minimum length in bytes

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

BooleanArgument

class yamcs.pymdb.BooleanArgument

Bases: Argument, BooleanDataType

__init__(name: str, *, zero_string_value: str = 'False', one_string_value: str = 'True', default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

EnumeratedArgument

class yamcs.pymdb.EnumeratedArgument

Bases: Argument, EnumeratedDataType

__init__(name: str, choices: Sequence[tuple[int, str] | tuple[int, str, str]] | type[Enum], *, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

label_for(value: int)
long_description: str | None

Multiline description

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

FloatArgument

class yamcs.pymdb.FloatArgument

Bases: Argument, FloatDataType

__init__(name: str, bits: Literal[32, 64] = 32, *, minimum: float | None = None, minimum_inclusive: bool = True, maximum: float | None = None, maximum_inclusive: bool = True, default: Any = None, short_description: str | None = None, long_description: str | None = None, extra: Mapping[str, str] | None = None, units: str | None = None, encoding: Encoding | None = None, calibrator: Calibrator | None = None) None
calibrator: Calibrator | None

Describes how a raw value is transformed to an engineering value

default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

maximum: float | None

Maximum valid engineering value (inclusive)

maximum_inclusive: bool

Whether the maximum value itself is valid

minimum: float | None

Minimum valid engineering value

minimum_inclusive: bool

Whether the minimum value itself is valid

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

IntegerArgument

class yamcs.pymdb.IntegerArgument

Bases: Argument, IntegerDataType

__init__(name: str, *, signed: bool = True, bits: int = 32, minimum: int | None = None, maximum: int | None = None, default: Any = None, short_description: str | None = None, long_description: str | None = None, extra: Mapping[str, str] | None = None, units: str | None = None, encoding: Encoding | None = None, calibrator: Calibrator | None = None) None
calibrator: Calibrator | None

Describes how a raw value is transformed to an engineering value

default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

maximum: int | None

Maximum valid engineering value (inclusive)

minimum: int | None

Minimum valid engineering value (inclusive)

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

StringArgument

class yamcs.pymdb.StringArgument

Bases: Argument, StringDataType

__init__(name: str, *, min_length: Optional[int] = None, max_length: Optional[int] = None, default: Optional[Any] = None, short_description: Optional[str] = None, long_description: Optional[str] = None, extra: Optional[Mapping[str, str]] = None, units: Optional[str] = None, encoding: Optional[Encoding] = None) None
default: Any

Default value

encoding: Encoding | None

How this data is sent or received from some non-native, off-platform device. (e.g. a spacecraft)

extra: dict[str, str]

Arbitrary information, keyed by name

long_description: str | None

Multiline description

max_length: int | None

Maximum length in characters

min_length: int | None

Minimum length in characters

name: str

Short name of this argument

short_description: str | None

Oneline description

units: str | None

Engineering units

ArgumentEntry

class yamcs.pymdb.ArgumentEntry

Bases: object

__init__(argument: Argument, *, short_description: Optional[str] = None, bitpos: Optional[int] = None, offset: int = 0, condition: Optional[Expression] = None) None
bitpos: int | None

Absolute position within the container, in bits.

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

condition: yamcs.pymdb.expressions.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

FixedValueEntry

class yamcs.pymdb.FixedValueEntry

Bases: object

__init__(binary: bytes | str, name: Optional[str] = None, *, short_description: Optional[str] = None, bitpos: Optional[int] = None, offset: int = 0, condition: Optional[Expression] = None, bits: Optional[int] = None) None
binary: bytes

The fixed value to be encoded.

The value may be provided in any of these ways:

  • Bytes: bxDExADxBExEF

  • Hex string: "DEADBEEF"

bitpos: int | None

Absolute position within the container, in bits.

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

bits: int | None

If unspecified, its value is derived from the provided binary value.

If less than the bit size of the binary attribute, the value is left-padded with zeros.

If larger than the bit size of the binary attribute, the most-significant bits are dropped.

condition: yamcs.pymdb.expressions.Expression | None

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

name: str | None

Optional name

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

TransmissionConstraint

class yamcs.pymdb.TransmissionConstraint

Bases: object

__init__(expression: Expression, *, timeout: float = 0)
expression: Expression

Expression that must be satisfied

timeout: float

How long to wait for the constraint to be satisfied (in seconds)