CobraNet
TM
EV-2
Page 37
Appendix E: EV-2 Command Line Interface.
The EV-2 supports a simple command line interface (CLI). This interface allows the user to evaluate the
CobraNet module (CM) and monitor and control Management Interface (MI) variables. A list and descrip-
tion of commands follow. Please reference the CobraNet Programmer’s Manual for more information
about the MI variables. Please note that there is a significant difference between the CM-1 and CM-2 MI
variable format, i.e. how the raw data is stored in the CM’s memory. Refer to the CobraNet Programmer’s
Manual regarding the MI variable formats.
Command line Syntax
The CLI is case insensitive, either upper or lower case in any combination may be used. Parameters
enclosed within < > are mandatory with a few exceptions. At least one white space is required between
command and parameters. Leading, lagging and multiple white spaces are ignored. A “ctrl-C” or “esc” will
abort a command. With exceptions where noted all numeric values are to be entered or will be displayed in
hexadecimal format with a leading “0x”.
This command line interface allows the user to write scripts (i.e Python scripts) that monitor and control
MI variables. Two commands are supported that allow the user to perform these tasks:
Peek
<target> [offset]
This command will return the value at the given address location or the value of the MI variable.
<target> – a valid host address. The format of <target> is a hexadecimal number with a “0x” pre-
fix.
Example:
peek 0xAB12C5
<target> – the user may use an MI variable.
Example:
peek
sysdescr
In this example the CLI will return the system description in its entirety.
[offset] – optionally used with MI array variables only. Offset into the MI array. If not present on
an MI array variable, the peek will return a value for the first location in the array.
Example:
peek
txBundle
0x1000
The above example will peek location 0x51100 or transmitter #1.
Example:
peek
rxSubMap
0x2005
This example will peek location 0x42005 or receiver #2, channel #5.
Poke
<target> <value> [offset]
This command will set the value of the given location in CobraNet memory space to <value>.
<target>– same as peek above.
<value> – a hexadecimal with a “0x” prefix.
Example:
poke 0x40104 0x1011
[offset] – optionally used with MI array variables only. Offset into the MI array. If not present on
an MI array variable the poke will poke the <value> into the first location of the array.
Example:
poke
txBundle
0x111 0x2000