Developers / Docs / IoX

Programs

Each line of a program is formatted and displayed in different way. Custom formatting entries in the NLS file(s) are used for node conditions and commands, as follows.

Commands

The format and lookup order of the NLS entry for program command entries is:

PGM-CMD-<nodedef.nls>-<cmd.id>-FMT
PGM-CMD-<cmd.id>-FMT

The format is of the form:

/<param.id>/param text if omitted/param text if not omitted/ [.. next parameter, …]

Caution

The format line must all be in ONE LINE!

Example:

PGM-CMD-DON-FMT = /level/${c}/to ${v}/ /ramprate// in ${v}/ /offtimer//, turn off ${v} later/

Basically, a program with tree varibles of level, ramprate, and offtimer. Customers will be choosing the values for these parameter using the UI. The end result is that when this program is run, the device's level will be set to level, at the remprate, and the device will turn off in offtimer seconds later.

/

First character defines what character to use as separator, normally '/' is used

param.id

Id of the parameter (e.g. 'level'). This is blank for an unnamed parameter.

param text if omitted

String to show if the parameter was omitted.

param text if not omitted

String to show if the parameter was specified.

variables

The string for parameter text supports the following variables:

${c}	Name of the command
${v}	Formatted value of the parameter (including UOM)
${vo}	Formatted value of the parameter (without UOM)
${uom}	Formatted UOM without the value
${op}	Operator used (conditions only)

Examples

Assume commands are for node 'MyDevice'

  1. A command with three named parameters, 'num', 'val', 'len'
/num//${c} Parameter ${v}/ /val/ default/ = ${v}/ /len// (${v} bytes)/

The following program action line would be shown for:

${c} = "Config", num=1, val=20, and len=4: [Config Parameter 1][ = 20][ (4 bytes)] --> "Set 'MyDevice' Config Parameter 1 = 20 (4 bytes)"

${c} = "Config", num=5, val=25, and len omitted: [Config Parameter 5][ = 25][] --> "Set 'MyDevice' Config Parameter 5 = 25"

${c} = "Device", num=5, val omitted, and len=2: [Device Parameter 5][ default][ (2 bytes)] --> "Set 'MyDevice' Device Parameter 5 default (2 bytes)"

Another example:

PGM-CMD-DON-FMT = /level/${c}/to ${v}/ /ramprate// in ${v}/ /offtimer//, turn off ${v} later/

level=50%, ramprate=3 seconds, offtimer=5 minutes "[to 50%][ in 3 seconds][, turn off 5 minutes later]" --> "Set 'MyDevice' to 50% in 3 seconds, turn off 5 minutes later"

  1. A command with one unnamed parameter
//default/${v}/

result if unnamed parameter omitted: [default] --> "Set 'MyDevice' default" result if unnamed parameter = 50 percent: [50%] --> "Set 'MyDevice' 50%"

  1. A command with no parameters shows just the command name and does not require a PGM-xxxxx entry
DFON --> "Set 'MyDevice' Fast On"

Status Conditions

The format and lookup order of the NLS entry for status condition format entries is:

PGM-ST-<nodedef.nls>-<st.id>-FMT
PGM-ST-<st.id>-FMT

The value is a single param text string similar to that specified for a command parameter.

Example:

PGM-ST-CLISPH-FMT = ${c} ${op} ${v}
If not specified, then the following is used: ${c} ${op} ${v}

Control Conditions

There are currently no custom entries for control conditions because control conditions do not include any of the command parameters.