avatar  

Log out

Recently viewed tickets

SiteManager GUI - Appendix D

Specification of Appliance Name Format strings

In a format string, most ordinary characters stand for themselves, with the following exceptions:

  • % (percent) together with the following character denotes a field substitution , and
  • { (left curly brace) starts a grouping, choice, or conditional block .

Inside a block the following charachters also have a special meaning:

  • | (vertical bar) separates choices in a choice list, and
  • } (right curly brace) denotes the end of the block started by the most recent { character.

A block enclosed in a pair of curly braces { ... } is discarded from the resulting string if all field substitutions in the block (and all nested blocks) result in empty strings.
For example, if %p may expand to a port number or the empty string, the format {:%p} will only add the colon to the resulting string if %p expands to a non-empty port number.

Likewise, each of the choices in a choice list { ... | ... | ... } are expanded (left to right), and only the first choice that results in a non-empty field subsitution is added to the resulting string.
For example if "%A" expands to the empty string, while "%B" expands to "xyz", the format {<%A>|[%B]} expands to "[xyz]".

The following characters have a special meaning only if they immediately follow a { character:

  • ? (question mark) and ! (exclamation mark) both start a conditional block, and
  • | (vertical bar) starts an optional block.

A conditional block does not itself contribute to the resulting string, but may be used in a choice list to have one field substition depend on the value of another field substition. The ? conditional test is true if any of the field substitions in the block produce a non-empty string, whereas the ! condition is true only when all of the field substitions in the block produce empty strings.
For example, if "%A" and "%B" are as above, and "%C" expands to "123", the choice list {{?%A}%B|%C} expands to "123", while {{!%A}%B|%C} expands to "xyz".

An optional block is expanded as usual, but is discarded from the result if the surrounding blocks only produce empty field substitions.
For example, the result of {{%A{|%B}}|%C} is "123", since "%A" expands to the empty string in the block {%A{|%B}} . In contrast, {%A|{%C{|%B}}} expands to "123xyz".

To insert one of the special characters, prefix it with the % character, e.g. %% adds a single % to the resulting string.

The following field substitution codes are available in all format strings:

  • %N - the GateManager Appliance Name string from GateManager > General.
  • %d - the GateManager Domain Token string from GateManager > General.
  • %S - the master SiteManager's serial number .
  • %U - the master SiteManager's serial number with all colons removed.
  • %D - the Device Name string from System > General.
  • %C - the SysAdmin contact (email address) from System > General.
  • %L - the Location string from System > General.
  • %O - the Organization string from System > General.
  • %V - the version of the SiteManager's firmware.
  • %m - A short-hand for the format string {%N|%D|%S} .
  • %H - the hosting Windows System's host id (or host name), if applicable.
  • %W - The SMS Wakeup number and code (if defined).

The following field substitution codes are available in the Agent Name Format string:

  • %M - The result of expanding the Master Name Format string.
  • %n - The agent's Agent Name .
  • %s - The agent's Serial Number .
  • %u - The agent's serial number without the #xx part.
  • %# - The #xx part of the agent's serial number.
  • %a - The agent's Type
  • %t - The target address of device controlled by the agent; this is the first IP address in the agent's Parameters field.
  • %v - The version of the agent firmware.

The following field substitution codes are available in the Relay Name Format string:

  • %M - The result of expanding the Master Name Format string.
  • %n - The relay's configured Relay Name .
  • %s - The relay's serial number.
  • %u - The relay's serial number without the #xx part.
  • %# - The #xx part of the relay's serial number.
  • %a - The relay's protocol type.
  • %t - The relay's target address , i.e. local device address for a Device Relay, and remote server address for a Server Relay.
  • %f - The relay's from address , i.e. the remote virtual address for a Device Relay, and local virtual address for a Server Relay.
  • %r - The relay's remote address .
  • %l - The relay's local address .
  • %p - The optional port number component of the last target/from/remote/local address expanded.
  • %> - Expands to the ">" character for a Device Relay, and nothing for a Server Relay.
  • %< - Expands to the "<" character for a Server Relay, and nothing for a Device Relay.
Creation date: 11/12/2019 13:17 (skr@secomea.com)      Updated: 11/12/2019 13:17 ()