5.5.49 ParameterButtonElement

The ParameterButtonElement is a button which sends a parameter value if pressed. A frequently used application for the parameter button is a RF-OFF button which sends a "tx.on=OFF" to a certain device. Beside this, a parameter button also may be programmed to play a parameter setting macro.

Data Model (extends ScreenElement)

Key Type Value
type String Always "ParameterButtonElement".
xpos Number see ScreenElement
ypos Number see ScreenElement
width Number see ScreenElement
height Number see ScreenElement
id String The message ID this element sends
privilege Number The privilege level required to make a button click send a value
label String A label shown on the button
icon String An icon shown on the button
enableId String The enable ID (may be empty)
enableValue String The value which must be matched to enable the field
font String The font to be used
color String The color used for the label (#RRGGBB)
mustQuery Boolean true = show a query popup before changing the value
queryText String The text to show in the query. If empty, a default query text shall be used.
parameterValue String The parameter value to send
isMacroButton Boolean If true, this button starts a macro instead of sending a parameter
variableBackgroundColor Boolean true = use a variable background color
colorId String The message ID to listen for the background color
colors Array of ColorDefinition objects. Defines how to translate values of the colorId parameter to color values.

The ParameterButtonElement never uses a button label and an icon at the same time. Either icon or label is an empty string.

If no parameterValue is set, the ParameterButtonElement sends the button label or the icon name as the parameter value when clicked

Macro Buttons

The MacroButton is a special version of the ParameterButtonElement. A isMacroButton = true marks a ParameterButtonElement to be a MacroButton. In this case the 'id' field contains the name of the M&C where to play the macro and the macro name in this case, separated by a period. Example VLC0001.myMacro

Instead of calling 'poke' when the button is clicked, a POST /api/v1/playmacro/{mnc-name}/{macro-name} call must be made by the front end (Example POST /api/v1/playmacro/VLC0001/myMacro.