/  Yamcs Studio User Guide  /  Widgets  /  Array

Array

Widget for reading or writing an array of other widgets of the same type.

Array

When dropping a new widget onto an array widget, that widget will be duplicated by the length of that array. Each singular contained widget is matched to one element of the array.

While editing in Yamcs Studio, changes to any widget element are applied to all other widgets within that array.

If the array widget is backed by an array PV, the Array Length as well as Data Type are automatically determined from the PV.

An array widget can support large array sizes by showing a scrollbar, and a spinner that allows to jump to a specific array index.

Basic Properties

Name (name)

Human-readable name of this widget. Shown in the Outline view.

PV Name (pv_name)

The name of the main PV for this widget. If set, the widget’s value follows value updates of the corresponding PV.

It is not a requirement to use a PV. You may also control the widget value directly through scripting.

Widget Type (widget_type)

Readonly property describing the type of this widget.

Behavior Properties

Actions (actions)

Executable Actions attached to this widget.

Array Length (array_length)

Number of array elements.

This property is not available when the array is backed by a PV.

Data Type (data_type)

Type of the array. This is the type of the value returned by widget.getValue() inside a script.

This property is not available when the array is backed by a PV.

Code

Value

0

double[]

1

String[]

2

int[]

3

byte[]

4

long[]

5

short[]

6

float[]

7

Object[]

Enabled (enabled)

Unset to make contained control widgets unusable.

Rules (rules)

Rules attached to this widget.

Scripts (scripts)

Scripts attached to this widget.

Visible (visible)

Manage the visibility of this widget.

Border Properties

Alarm Sensitive (border_alarm_sensitive)

If the PV is in alarm state, the widget border and style change to alarm mode.

Border Color (border_color)

The color of the widget border.

Has no meaning with certain types of border styles (for example, raised borders have a fixed style).

Border Style (border_style)

The type of border. Some border styles also colorize the background of the widget’s bounding box.

Border Width (border_width)

The thickness of the widget border.

Has no meaning with certain types of border styles (for example, raised borders have a fixed style).

Display Properties

Alarm Pulsing (alarm_pulsing)

If enabled, the PV is in alarm state, and the properties BackColor Alarm Sensitive and/or ForeColor Alarm Sensitive are used, then the corresponding colors will fade in and out to draw operator’s attention.

BackColor Alarm Sensitive (backcolor_alarm_sensitive)

If the PV is in alarm state, then Background Color matches the corresponding alarm color.

Background Color (background_color)

The color of the background of the widget’s bounding box. Only visible when the widget uses a border style that fills up the widget area.

Font (font)

The font of the label.

ForeColor Alarm Sensitive (forecolor_alarm_sensitive)

If the PV is in alarm state, then Foreground Color matches the corresponding alarm color.

Foreground Color (foreground_color)

The color of the label.

Horizontal (horizontal)

If yes, the array elements are arranged in horizontal direction. Otherwise vertical.

Show Scrollbar (show_scrollbar)

Make a scrollbar visible.

Show Spinner (show_spinner)

Make a spinner widget for jumping to a specific index within the array.

Spinner Width (spinner_width)

The width in pixels of the spinner widget.

Tooltip (tooltip)

Tooltip when mouse hovers this widget.

Position Properties

Height (height)

Height of the widget area in pixels.

Scale Options (scale_options)

If autoscaling is enabled on the Display, then this property allows controlling whether and how this widget participates.

Width (width)

Width of the widget area in pixels

X (x)

X-coordinate in pixels of the top-left corner of the widget area.

Y (y)

Y-coordinate in pixels of the top-left corner of the widget area.

Additional API

Array widgets expose the following additional Widget API for use in scripting:

getIndex( child )

Get the index of a child widget. If the given widget is not a child this method returns -1.