beautypg.com

Var: modify or query system variables – Sierra Video Sequoia Family User Manual

Page 56

background image

SIERRA VIDEO SYSTEMS


50

Some “G” commands may initiate an action or report the occurrence of an event, instead of
querying or changing a router parameter.

Commas are used to separate arguments in the “G” command.

Space characters should not appear within the “G” command arguments, except when they
appear within strings. Also, a single space character is allowed after the “G” character itself.
When a “G” command is sent by the router, it will always include this space, but the space is
optional when sending a “G” command to the router.

Character string arguments are delimited on both sides by a tilde (‘~’) character. Generally
character strings may contain any printable ASCII character except tilde, asterisk, and
exclamation.

Every “G” command must be terminated with a tilde (‘~’) character. This allows a command
parser to ignore any received “G” command that has a command_name that it doesn’t know
about.

The “G” commands available for any given router may vary, depending on the router model. The
“G SUPPORTED” command allows controllers to find out whether particular “G” commands are
supported by a given router or not.

A router may be sent “G” commands that it doesn’t understand. It will simply ignore them and
generate an ERROR response.

VAR: Modify or query system variables

Action

From Syntax

Modify

Host

G

VAR,,[,…]~

Query

Host G

VAR,~

Query Response

Router (same as Modify)


Modify is Protected:

Yes

Report Changes:

No

The “G VAR“ command is used to change or query system variables that control specific features
of the router. The variable being affected is specified using its name, and only one variable at a
time can be targeted by this command. The features being controlled are typically system
options that allow the user to control special hardware or software enhancements to the router
code.

The Modify command has two or more arguments, the name of the variable to be changed and
the new value of that variable. Most variables have only a single value associated with them, but
it is possible for a variable to be multi-valued, in which case the number of arguments
may be two or more.

The Query command has the variable name whose value is to be queried as the only argument.

The Query Response command has the same argument structure as the Modify command.

Each different router may support different variables. The supported variables may grow over
time, as enhancements are added to this protocol, so command parsers should generally ignore
unknown variable names. The routers themselves will ignore any command that is received with
an unknown variable name or an invalid variable value. Use the “G VARQRY” command to find