/  Python Yamcs Client  /  Timeline  /  Model

Model

class yamcs.client.Band(proto)

Bases: ABC

Superclass for bands. Implementations:

property band_type: str

Type of band.

property description: str

Description of this band.

property extra: Dict[str, str]
property id: str

Band identifier.

property name: str

Name of this band.

class yamcs.client.CommandBand(proto=None)

Bases: Band

Display issued commands.

class yamcs.client.ItemBand(proto=None)

Bases: Band

Show a selection of timeline items.

property frozen: bool

Fix this line to the top of the view. Frozen bands are always rendered above other bands.

property item_background_color: str

CSS color string.

property item_border_color: str

CSS color string.

property item_border_width: int
property item_corner_radius: int
property item_height: int
property item_margin_left: int
property item_text_color: str

CSS color string.

property item_text_overflow: str

One of show, clip, or hide.

property item_text_size: int
property margin_bottom: int
property margin_top: int
property multiline: bool

Draw items on multiple lines if otherwise there would be collisions.

property space_between_items: int

In case of multilining, this indicates the minimum horizontal space between items. If an item does not meet this treshold, it gets rendered on a different line.

property space_between_lines: int

In case of multilining, this indicates the vertical space between lines.

property tags: List[str]

Item tags that this band filters on.

class yamcs.client.OnCompletion(item: TimelineItem | str)

Bases: object

The item starts only if the predecessor has completed (either through success or failure).

item: TimelineItem | str

Predecessor item (or its identifier)

property item_id: str

Item identifier of the predecessor

class yamcs.client.OnFailure(item: TimelineItem | str)

Bases: object

The item starts only if the predecessor has failed.

item: TimelineItem | str

Predecessor item (or its identifier)

property item_id: str

Item identifier of the predecessor

class yamcs.client.OnStart(item: TimelineItem | str)

Bases: object

The item starts as soon as the predecessor has started.

item: TimelineItem | str

Predecessor item (or its identifier)

property item_id: str

Item identifier of the predecessor

class yamcs.client.OnSuccess(item: TimelineItem | str)

Bases: object

The item starts only if the predecessor has completed successfully.

item: TimelineItem | str

Predecessor item (or its identifier)

property item_id: str

Item identifier of the predecessor

class yamcs.client.ParameterPlot(proto=None)

Bases: Band

Plot the values of a numeric parameter.

Added in version 1.11.2: Compatible with Yamcs 5.11.2 onwards

property frozen: bool

Fix this line to the top of the view. Frozen bands are always rendered above other bands.

property height: int

Band height

property maximum: float | None

Maximum value to show on Y-axis. Set to None for fitting actual data

property maximum_fraction_digits: int

Maximum fraction digits

property minimum: float | None

Minimum value to show on Y-axis. Set to None for fitting actual data

property minimum_fraction_digits: int

Minimum fraction digits

traces: List[Trace]

Plot lines.

property zero_line_color: str

Color of the zero line

property zero_line_width: int

Thickness of the zero line. 0 is invisible

class yamcs.client.ParameterStateBand(proto=None)

Bases: Band

Show state transitions of a parameter

Added in version 1.11.2: Compatible with Yamcs 5.11.2 onwards

property frozen: bool

Fix this line to the top of the view. Frozen bands are always rendered above other bands.

property height: int

Band height

mappings: List[ValueMapping | RangeMapping]

Map engineering values to a label and/or color. Mappings are applied in order.

property parameter: str

Qualified parameter name

class yamcs.client.RangeMapping(start: float, end: float, label: str | None = None, color: str | None = None)

Bases: object

Maps a value to a label and/or color.

color: str | None = None

If specified, show states of this value (or mapped label) in this color

end: float

Match engineering value lesser or equal than the provided end value

label: str | None = None

If specified, map the provided value to this label

start: float

Match engineering value greater or equal than the provided start value

class yamcs.client.Spacer(proto=None)

Bases: Band

Insert empty vertical space.

property height: int

Spacer height

class yamcs.client.TimelineItem(*, name: str | None, start: datetime | OnSuccess | OnFailure | OnCompletion | OnStart | List[OnSuccess | OnFailure | OnCompletion | OnStart], duration: timedelta | None, id: str | None, tags: List[str] | None, auto_start: bool, extra: Dict[str, str] | None)

Bases: ABC

Parameters:
  • name – Name of this item

  • start – Item start condition

  • duration – Item duration

  • id – Item identifier. If empty, the client will automatically determine a random identifier.

  • tags – Item tags. Used by bands to filter what is visible.

  • auto_start – Whether the activity starts automatically. Else it would require a separate API call to start it.

  • extra – Project-specific properties (ignored by Yamcs)

auto_start: bool

Whether the item starts automatically. Else it would require a separate API call to start it.

duration: timedelta

Item duration

extra: Dict[str, str]

Project-specific properties (ignored by Yamcs)

id: str

Item identifier

name: str

Name of this item

property predecessors: List[Predecessor]

Readonly property

Returns the predecessors for this item, derived from the item’s start conditions.

start: datetime | OnSuccess | OnFailure | OnCompletion | OnStart | List[OnSuccess | OnFailure | OnCompletion | OnStart]

Item start condition

property start_time: datetime

Readonly property

Returns the start time of this item.

This may be a time derived by the server based on the item’s start conditions.

tags: List[str]

Item tags. Used by bands to filter what is visible.

class yamcs.client.TimelineActivity(name: str, *, start: datetime | OnSuccess | OnFailure | OnCompletion | OnStart | List[OnSuccess | OnFailure | OnCompletion | OnStart], duration: timedelta | None = None, id: str | None = None, tags: List[str] | None = None, auto_start: bool = True, activity: Activity, extra: Dict[str, str] | None = None)

Bases: TimelineItem

An activity on the timeline. Activities can be scheduled at a fixed time, or they can be scheduled relative to predecessor items.

Activities can be assigned an expected duration, which helps following ongoing tasks in the Yamcs Web UI.

Activities can be anything ranging from issuing a single command, to running a lengthy script.

Parameters:
  • name – Name of this activity

  • start – Activity start condition

  • duration – Expected activity duration

  • id – Activity identifier. If empty, the client will automatically determine a random identifier.

  • tags – Activity tags. Used by bands to filter what is visible.

  • auto_start – Whether the activity starts automatically. Else it would require a separate API call to start it.

  • activity – Activity definition

  • extra – Project-specific properties (ignored by Yamcs)

activity

Activity definition

class yamcs.client.TimelineEvent(name: str | None = None, *, start: datetime, id: str | None = None, duration: timedelta | None = None, tags: List[str] | None = None, background_color: str | None = None, border_color: str | None = None, border_width: int | None = None, corner_radius: int | None = None, margin_left: int | None = None, text_color: str | None = None, text_size: int | None = None, extra: Dict[str, str] | None = None)

Bases: TimelineItem

An event on the timeline. This has a fixed start time, and an optional duration.

Events are used to show any kind of information on the timeline, and can serve as an anchor point for depending activities.

Parameters:
  • name – Event title

  • start – Event start

  • duration – Event duration. If empty, the event is considered to be a milestone.

  • id – Item identifier. If empty, the client will automatically determine a random identifier.

  • tags – Item tags. Used by bands to filter what is visible.

  • background_color – Box background color (CSS color string)

  • border_color – Box border color (CSS color string)

  • border_width – Thickness of box border

  • corner_radius – Radius of box corners

  • margin_left – Distance between box start and label

  • text_color – Text color (CSS color string)

  • text_size – Text size

  • extra – Project-specific properties (ignored by Yamcs)

background_color: str | None

Box background color (CSS color string)

border_color: str | None

Box border color (CSS color string)

border_width: int | None

Thickness of box border

corner_radius: int | None

Radius of box corners

margin_left: int | None

Distance between box start and label

text_color: str | None

Text color (CSS color string)

text_size: int | None

Text size

class yamcs.client.TimelineTask(name: str, *, start: datetime | OnSuccess | OnFailure | OnCompletion | OnStart | List[OnSuccess | OnFailure | OnCompletion | OnStart], duration: timedelta | None = None, id: str | None = None, tags: List[str] | None = None, auto_start: bool = False, extra: Dict[str, str] | None = None)

Bases: TimelineItem

A task on the timeline. Tasks are actions to be performed by the user. Tasks can be scheduled at a fixed time, or they can be scheduled relative to predecessor items.

Tasks can be assigned an expected duration, which helps following ongoing tasks in the Yamcs Web UI.

Parameters:
  • name – Name of this task

  • start – Task start condition

  • duration – Expected task duration

  • id – Task identifier. If empty, the client will automatically determine a random identifier.

  • tags – Task tags. Used by bands to filter what is visible.

  • auto_start

    Whether the task starts automatically. Else it would require a separate API call to start it.

    Tasks have auto_start disabled by default, so that the user must indicate both when the task has started, and when it has completed.

  • extra – Project-specific properties (ignored by Yamcs)

class yamcs.client.TimeRuler(proto=None)

Bases: Band

Displays absolute time, formatted in a timezone of choice.

property timezone: str

IANA timezone name.

Corresponds with the third column of the following table: https://data.iana.org/time-zones/data/zone1970.tab

In addition, the name UTC is supported.

class yamcs.client.Trace(parameter: str, line_color: str, visible: bool = True, line_width: int = 1, fill: bool = False, fill_color: str = '#dddddd', min_max: bool = False, min_max_opacity: float = 0.17)

Bases: object

A trace on a ParameterPlot.

fill: bool = False
fill_color: str = '#dddddd'
line_color: str
line_width: int = 1
min_max: bool = False
min_max_opacity: float = 0.17
parameter: str
visible: bool = True
class yamcs.client.ValueMapping(value: Any, label: str | None = None, color: str | None = None)

Bases: object

Maps a value to a label and/or color

color: str | None = None

If specified, show states of this value (or mapped label) in this color

label: str | None = None

If specified, map the provided value to this label

value: Any

Engineering value to match

class yamcs.client.View(proto=None)

Bases: object

property bands: List[Band]

Bands included in this view.

property description: str

Description of this view.

property id: str

View identifier.

property name: str

Name of this view.