/  Python Yamcs Client  /  TM/TC Processing  /  Model

Model

class yamcs.tmtc.model.Acknowledgment(name, time, status, message)
is_terminated()
message

Message of this acknowledgment.

name

Name of this acknowledgment.

status

Status of this acknowlegment.

time

Last update time of this acknowledgment.

class yamcs.tmtc.model.Alarm(proto)
property acknowledge_message: Optional[str]

Comment provided when acknowledging the alarm.

property acknowledge_time: Optional[datetime]

Processor time when the alarm was acknowledged.

property acknowledged_by: Optional[str]

Username of the acknowledger.

property count: int

Total number of samples while this alarm is active.

property is_acknowledged: bool

True if this alarm has been acknowledged.

property is_latched: bool

True if this alarm is currently latched.

property is_latching: bool

True if this is a latching alarm. A latching alarm returns to normal only when the operator resets it

property is_ok: bool

True if this alarm is currently ‘inactive’.

For a non-latching alarm this is identical to is_process_ok(). A latching alarm is only OK if it has returned to normal and was acknowledged.

property is_process_ok: bool

True if the process that caused this alarm is OK. For example: parameter back within limits.

For a non-latching alarm this is identical to is_ok().

property is_shelved: bool

True if this alarm has been shelved.

property name: str

Fully-qualified name of the source of this alarm.

property sequence_number: int

Sequence number for this specific alarm instance. This allows ensuring that operations (such as acknowledgment) are done on the expected alarm instance.

property severity: str
property trigger_time: datetime

Processor time when the alarm was triggered.

property update_time: datetime

Processor time when the alarm was last updated.

property violation_count: int

Number of violating samples while this alarm is active.

class yamcs.tmtc.model.AlarmUpdate(proto)

Object received through callbacks when subscribing to alarm updates.

property alarm: Alarm

Latest alarm state.

property update_type: str

Type of update.

class yamcs.tmtc.model.Calibrator(context: str, type: str, data)

A calibrator that may be applied to a numeric raw value.

Two types of calibrators can be applied:

  • Polynomial calibrators apply a polynomial expression of the form:

    y = a + bx + cx^2 + ….

    The data argument must be an array of floats [a, b, c, ...].

  • Spline calibrators interpolate the raw value between a set of points

    which represent a linear curve.

    The data argument must be an array of [x, y] points.

Parameters:
  • context – Condition under which this calibrator may be applied. The value None indicates the default calibrator which is only applied if no contextual calibrators match.

  • type – One of polynomial or spline.

  • data – Calibration definition for the selected type.

POLYNOMIAL = 'polynomial'
SPLINE = 'spline'
class yamcs.tmtc.model.CommandHistory(proto)
property acknowledgments: Dict[str, Acknowledgment]

All acknowledgments by name.

Returns:

Acknowledgments keyed by name.

property aliases: Dict[str, str]

Aliases, keyed by namespace

New in version 1.9.2: Compatible with Yamcs 5.8.4 onwards

property all_assignments: Dict[str, Any]

Argument assignments by name.

New in version 1.9.2.

property assignments: Dict[str, Any]

Argument assignments by name.

This returns only explicit assignments set by the command issuer. To return all assignments, including ones that use their default values, use all_assignments instead.

New in version 1.9.2.

property binary

Binary representation of the command.

property comment: Optional[str]

Optional user comment attached when issuing the command.

property error: Optional[str]

Error message in case the command failed.

generation_time: datetime

The generation time as set by Yamcs

property id: str

A unique identifier for this command.

is_complete() bool

Returns whether this command is complete. A command can be completed, yet still failed.

is_failure() bool

Returns True if the command has completed, but failed.

is_success() bool

Returns True if the command has completed successfully.

property name: str

Name of the command.

property origin: Optional[str]

The origin of this command. Usually the IP address of the issuer.

property sequence_number: int

The sequence number of this command. This is the sequence number assigned by the issuing client.

property source: str

String representation of the command.

property unprocessed_binary

Binary representation before postprocessing.

New in version 1.9.2.

property username: Optional[str]

Username of the issuer.

class yamcs.tmtc.model.ContainerData(proto)
property binary

Raw binary

property generation_time: datetime

The time when this container’s packet was generated (packet time).

property name: str

The name of the container.

property reception_time: datetime

The time when this container’s packet was received by Yamcs.

class yamcs.tmtc.model.EventAlarm(proto)

An alarm triggered by an event.

property current_event: Event

Latest event for this alarm

property most_severe_event: Event

First event that invoked the highest severity level of this alarm

property trigger_event: Event

Event that originally triggered the alarm

class yamcs.tmtc.model.IssuedCommand(proto)
property aliases: Dict[str, str]

Aliases, keyed by namespace

New in version 1.9.2: Compatible with Yamcs 5.8.4 onwards

property all_assignments: Dict[str, Any]

Argument assignments by name.

New in version 1.9.2.

property assignments: Dict[str, Any]

Argument assignments by name.

This returns only explicit assignments set by the command issuer. To return all assignments, including ones that use their default values, use all_assignments instead.

New in version 1.9.2.

property binary

Binary representation of this command.

property generation_time: datetime

The generation time as set by Yamcs.

property hex

Hexadecimal string representation of this command.

property id: str

A unique identifier for this command.

property name: str

The fully-qualified name of this command.

property origin: Optional[str]

The origin of this command. Usually the IP address of the issuer.

property queue: Optional[str]

The name of the queue that this command was assigned to.

property sequence_number

The sequence number of this command. This is the sequence number assigned by the issuing client.

property source

String representation of this command.

property unprocessed_binary

Binary representation before postprocessing.

New in version 1.8.4: Compatible with Yamcs 5.7.0 onwards

property username: str

The username of the issuer.

class yamcs.tmtc.model.MonitoredCommand(proto)

Represent an instance of an issued command that is updated throughout the acknowledgment process.

Objects of this class are owned by a CommandConnection instance.

property acknowledgments: Dict[str, Acknowledgment]

All acknowledgments by name.

Returns:

Acknowledgments keyed by name.

property attributes: Dict[str, Any]
await_acknowledgment(name: str, timeout: Optional[float] = None) Acknowledgment

Waits for the result of a specific acknowledgment.

Parameters:
  • name – The name of the acknowledgment. Standard names are Acknowledge_Queued, Acknowledge_Released and Acknowledge_Sent. Others depend on specific link types.

  • timeout – The amount of seconds to wait.

await_complete(timeout: Optional[float] = None)

Wait for the command to be completed. Afterwards use is_success() or is_failure() to determine whether the command was successful or not.

Note

Yamcs cannot determine completion unless the command has an appropriate verifier configured in the Yamcs MDB.

When no such verifier is present, this method will never return (or timeout).

Parameters:

timeout – The amount of seconds to wait.

property comment: Optional[str]

Optional user comment attached when issuing the command.

property error: Optional[str]

Error message in case the command failed.

This information is only available when the command has failed to complete. (is_failure() returns True).

is_complete() bool

Returns whether this command is complete. A command can be completed, yet still failed.

Use await_complete() to wait until this information is available.

is_failure() bool

Returns True if the command has completed, but failed.

Use await_complete() to wait until this information is available.

New in version 1.8.6.

is_success() bool

Returns True if this command was completed successfully.

Use await_complete() to wait until this information is available.

class yamcs.tmtc.model.Packet(proto)
property binary: bytes

Raw binary of this packet

property earth_reception_time: Optional[datetime]

When the signal was received on the ground.

New in version 1.9.1.

property generation_time: datetime

The time when the packet was generated (packet time).

Name of the Yamcs link where this packet was received from.

New in version 1.9.1.

property name: str

The name of the packet. When using XTCE extraction this is the fully-qualified name of the first container in the hierarchy that this packet maps to.

property reception_time: datetime

The time when the packet was received by Yamcs.

property sequence_number: int

The sequence number of the packet. This is usually decoded from the packet.

property size: int

Size in bytes of this packet

class yamcs.tmtc.model.ParameterAlarm(proto)

An alarm triggered by a parameter that went out of limits.

property current_value: ParameterValue

Latest parameter value for this alarm.

property most_severe_value: ParameterValue

First parameter value that invoked the highest severity level of this alarm.

property trigger_value: ParameterValue

Parameter value that originally triggered the alarm

class yamcs.tmtc.model.ParameterData(proto, mapping=None)
get_value(parameter: str) Optional[ParameterValue]

Returns the value of a specific parameter. Or None if the parameter is not included in this update.

Parameters:

parameter – Parameter name.

property parameters: List[ParameterValue]
class yamcs.tmtc.model.ParameterValue(proto, id=None)
property eng_value

The engineering (calibrated) value.

property generation_time: datetime

The time when the parameter was generated. If the parameter was extracted from a packet, this usually returns the packet time.

property monitoring_result: str
property name: str

An identifying name for the parameter value. Typically this is the fully-qualified XTCE name, but it may also be an alias depending on how the parameter update was requested.

property processing_status: bool
property range_condition: Optional[str]

If the value is out of limits, this indicates LOW or HIGH.

property raw_value

The raw (uncalibrated) value.

property reception_time: Optional[datetime]

The time when the parameter value was received by Yamcs.

property validity_duration: Optional[timedelta]

How long this parameter value is valid.

property validity_status: str
class yamcs.tmtc.model.RangeSet(context: str, watch: Optional[Tuple[Optional[float], Optional[float]]] = None, warning: Optional[Tuple[Optional[float], Optional[float]]] = None, distress: Optional[Tuple[Optional[float], Optional[float]]] = None, critical: Optional[Tuple[Optional[float], Optional[float]]] = None, severe: Optional[Tuple[Optional[float], Optional[float]]] = None, min_violations: int = 1)

A set of alarm range that apply in a specific context.

Parameters:
  • context – Condition under which this range set is applicable. The value None indicates the default range set which is only applicable if no contextual sets match.

  • watch – Range expressed as a tuple (lo, hi) where lo and hi are assumed exclusive.

  • warning – Range expressed as a tuple (lo, hi) where lo and hi are assumed exclusive.

  • distress – Range expressed as a tuple (lo, hi) where lo and hi are assumed exclusive.

  • critical – Range expressed as a tuple (lo, hi) where lo and hi are assumed exclusive.

  • severe – Range expressed as a tuple (lo, hi) where lo and hi are assumed exclusive.

  • min_violations – Minimum violations before an alarm is generated.

class yamcs.tmtc.model.ValueUpdate(value: Any, generation_time: Optional[datetime] = None, expires_in: Optional[float] = None)

Data holder for passing a value along with its generation time when updating a software parameter.

Parameters:
  • value – The value to set

  • generation_time – Generation time of the value. If unset, Yamcs will assign the generation time.

  • expires_in

    How long before this value expires (in fractional seconds). If unset, the value does not expire.

    New in version 1.9.1: Compatible with Yamcs 5.8.8 onwards

class yamcs.tmtc.model.VerificationConfig

Contains overrides to the default verification handling of Yamcs.

disable(verifier: Optional[str] = None)

Disable verification.

Parameters:

verifier – Name of a specific verifier to disable. If unspecified all verifiers are disabled.

modify_check_window(verifier: str, start: Optional[float] = None, stop: Optional[float] = None)

Set or override the check window.

Depending on the Mission Database configuration, the time may be relative to either the command release or a preceding verifier.

Parameters:
  • verifier – Name of the verifier

  • start – Window start time (relative, in seconds)

  • stop – Window stop time (relative, in seconds)