User Tools

Site Tools


commands:command_syntax
Command Structure

Wintermute accepts commands from Qlab over UDP on port 53000; the general format of this commands is:

(condition) command: parameter1 | parameter2 | parameter3…

The number of parameters depends on the command; some are optional. If optional parameters are not used, the separating pipe - | - should also be removed.

Zone Conditionals

The condition prefix is also optional; if it is present, the command will only be executed if the condition is true. Conditions are expressed as one or more string value statements, for example:

(zone1=ready, zone2=ready) command:

The command will only execute if both zone1 and zone2 have the status “ready”.

FYI

To maintain compatibility with older versions of Wintermute, in the case of the conditional prefix, the conditions can also be separated with pipes:

(zone1=ready | zone2=ready) command:

Zones, variables, categories, and statuses have no intrinsic meaning – they are just a structure for storing data about the state of a show.

The negation operator (!) can also be used:

(zone3=!running) command:

The command will only execute if zone3 does not have the status “running”. Note that “!=” can also be used.

If a zone’s status is set with the “log” flag set, this is put into a stack of historical statuses for this zone, this can be tested against as follows:

IMPORTANT

Older versions of Wintermute use square brackets for this - i.e. zone4[2]

(zone4.2=blue) command:

This will only execute if zone4 was set to “blue” two logged statuses ago – i.e. the zone status was set to “blue” with the “log” tag and has been set twice since with the “log” tag. Correspondingly, if the “log” tag is always used, zone4 and zone4.0 are equivalent.

Note that this syntax works differently with zone group variables - see below.

The symbol “^” is used as a “contains” operator, in the following context:

(zone5^thing) command:

This will only execute if the value of the status contains “thing” - so “thisthing” will execute. Again, the negation operator can be used (“!^”) for “does not contain”. Note that this operator works differently with zone group variables - see below.

Zone Variable Conditionals

Zone variables can also be used in tests as follows:

(zone5.variable=true) command:

Zone variables can also be used as part of compound conditions (i.e. more than one condition to be met), and with the negation operator. They do not have the “log” functionality.

Numerical Variables

If a variable or zone status can be parsed as a Float, comparators can be used, eg:

(pump1.pressure > 300) command:

Querying Show Flow

All Zones have as a default a “group” variable (not displayed in the variable tree); in an equality operation, this will return the colour of the last group in the zone (i.e. the one that will move out of the zone on the next advance), “Empty” if that group slot is empty, and “Not In Show” if the zone is not part of the show flow. For example:

(zone6.group!=red) command:

This will only execute if the colour of the group1) in zone6 is not red.

A “contains” query works differently with this variable - it will inspect the tags of this group, e.g.:

(zone7.group^thatTag) command:

This will only execute if the last group in zone7 has the tag “thatTag” set. See more about special zone variables here.

Multiple Commands

Multiple commands can be sent if separated by a new line (hex 0x0A, written as “/n” in Qlab). If your system also transmits 0x0D as well for new lines, this is fine – whitespaces surrounding commands are ignored.

And another thing…

For more guidance on how text is used in Wintermute, particularly the naming of things that will be of variable references and references to dynamic objects, please see the page on parsing.
1)
the last/furthest forward group if the zone has a depth of more than 1. To refer to groups further back in a zone, use the syntax <zone>.group.<position>
commands/command_syntax.txt · Last modified: 2024/09/20 07:47 by 127.0.0.1