- General Client
- Mission Database
- TM/TC Processing
- Archive
- Link Management
- Object Storage
- File Transfer
- Time Correlation (TCO)
- Timeline
- Examples
Model¶
- class yamcs.client.Acknowledgment(name, time, status, message)¶
Bases:
object
- 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.client.Alarm(proto)¶
Bases:
ABC
- 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()
.
- class yamcs.client.AlarmRangeSet(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)¶
Bases:
object
A set of alarm ranges 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.client.AlarmUpdate(proto)¶
Bases:
object
Object received through callbacks when subscribing to alarm updates.
- class yamcs.client.Calibrator(context: str, type: str, data)¶
Bases:
object
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
orspline
.data – Calibration definition for the selected type.
- POLYNOMIAL = 'polynomial'¶
- SPLINE = 'spline'¶
- class yamcs.client.CommandHistory(proto)¶
Bases:
object
- 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 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.
- is_complete() → bool¶
Returns whether this command is complete. A command can be completed, yet still failed.
- property sequence_number: int¶
The sequence number of this command. This is the sequence number assigned by the issuing client.
- property unprocessed_binary¶
Binary representation before postprocessing.
New in version 1.9.2.
- class yamcs.client.ContainerData(proto)¶
Bases:
object
- property binary¶
Raw binary
- class yamcs.client.EventAlarm(proto)¶
Bases:
Alarm
An alarm triggered by an event.
- class yamcs.client.IssuedCommand(proto)¶
Bases:
object
- property aliases: Dict[str, str]¶
Aliases, keyed by namespace
New in version 1.9.2: Compatible with Yamcs 5.8.4 onwards
- 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 hex¶
Hexadecimal string representation of this command.
- 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
- class yamcs.client.MonitoredCommand(proto)¶
Bases:
IssuedCommand
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.
- 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
andAcknowledge_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()
oris_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 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.client.Packet(proto)¶
Bases:
object
- property earth_reception_time: Optional[datetime]¶
When the signal was received on the ground.
New in version 1.9.1.
- property link: str¶
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.
- class yamcs.client.ParameterAlarm(proto)¶
Bases:
Alarm
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.client.ParameterData(proto, mapping=None)¶
Bases:
object
- 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.client.ParameterValue(proto, id=None)¶
Bases:
object
- 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 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 raw_value¶
The raw (uncalibrated) value.
- class yamcs.client.ValueUpdate(value: Any, generation_time: Optional[datetime] = None, expires_in: Optional[float] = None)¶
Bases:
object
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.client.VerificationConfig¶
Bases:
object
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)