Closed GoogleCodeExporter closed 8 years ago
Following is the example of xml, how I am trying to use it.
<VAR name="REFER"
help="Reference variable"
dynamic="true">
<ACTION>
echo -n "REAL${devid}"
</ACTION>
</VAR>
<VAR name="REAL0"
help="Real variable"
dynamic="true">
<ACTION>
echo -n "0"
</ACTION>
</VAR>
<VAR name="REAL1"
help="Real variable"
dynamic="true">
<ACTION>
echo -n "1"
</ACTION>
</VAR>
<VAR name="REAL2"
help="Real variable"
dynamic="true">
<ACTION>
echo -n "2"
</ACTION>
</VAR>
<COMMAND name="add device"
help="add device">
<PARAM name="devid_param"
help="Device ID"
value="devid"
mode="subcommand"
ptype="SUBCOMMAND">
<PARAM name="devid"
help="Options"
ptype="DEVID_NUMBER_TYPE"/> <!--DEVID_NUMBER_TYPE are integers from 0 to 63-->
</PARAM>
<PARAM name="devtype_param"
help="Type of device"
value="devtype"
mode="subcommand"
ptype="SUBCOMMAND">
<PARAM name="devtype"
test='"${!REFER}"="0"'
help="Options"
ptype="DEV_TYPE"/>
<PARAM name="devtype"
test='"${!REFER}"="1"'
help="Options"
ptype="DEV_TYPE1"/>
<PARAM name="devtype"
test='"${!REFER}"="2"'
help="Options"
ptype="DEV_TYPE2"/>
</PARAM>
<ACTION> echo "${devid} ${devtype} REFER - ${REFER} REAL - ${!REFER}" </ACTION>
</COMMAND>
Original comment by panwar.rahul@gmail.com
on 16 Oct 2013 at 6:08
In above example both REFER and !REFER are giving same value REAL<num>.
Original comment by panwar.rahul@gmail.com
on 16 Oct 2013 at 6:14
The klish doesn't support reference/inderect variable access.
Original comment by serj.kalichev@gmail.com
on 16 Oct 2013 at 8:31
Original issue reported on code.google.com by
panwar.rahul@gmail.com
on 16 Oct 2013 at 5:08