User’s Manual
35
E.2 Variables Commands
The RabbitLink serial console has the ability to handle SSI (Server Side Includes) variables. These
variables are stored in an xmem buffer. This means that the memory will lose the variables when
power is cycled, although the references to the variables will still exist. Remember that any HTML
file that includes SSI tags must have the file extension
.shtml
.
createv <varname> <vartype> <format> <value> [strlen]
This command creates a variable and stores it in the flash file system on the RabbitLink. The
variable can be referenced in HTML files using SSI; e.g. <!--#echo var="var1"-->).
varname
The name of the variable.
vartype
Type of the variable (
int8
,
int16
,
int32
,
float32
, or
string
)
format
The
printf
-style format specifier (such as
%d
) for outputting the
variable
value
The value to assign to the variable
strlen
Maximum length of the string for variables of type
string
.
EXAMPLES
createv var1 float32 "%.2f" 3.14
createv var2 string "%s" "This is a test." 50
getv <varname>
This command gets the value of the specified variable. The value is printed using the format
specifier given in the
createv
command.
varname
The variable whose value is requested.
putv <varname> <value>
This command assigns the specified value to the specified variable.
varname
The variable whose value is being changed.
value
The new value for the variable.
list variables
This command lists all the variables by name and type that are stored in the flash file system
on the RabbitLink.
Содержание EG2110
Страница 22: ...User s Manual 18 ...
Страница 26: ...22 RabbitLink EG2110 ...
Страница 36: ...32 RabbitLink EG2110 ...
Страница 46: ...42 RabbitLink EG2110 ...
Страница 48: ...44 RabbitLink EG2110 ...
Страница 50: ......