Tab command when scripting

When working with scripts, the tab command enables the desired columns for the subsequent set command.

When you perform the configuration with a command line tool, you generally supplement the set command with the values for the columns of the table.

For example, you set the values for the performance settings of a WLAN interface as follows:

> cd /Setup/Interfaces/WLAN/Performance
> set ?

Possible Entries for columns in Performance:
[1][Ifc]                : WLAN-1 (1)
[5][QoS]                : No (0), Yes (1)
[2][Tx-Bursting]        : 5 Chars from: 1234567890

> set WLAN-1 Yes *

In this example the Performance table has three columns:

With the command set WLAN-1 Yes * you enable the QoS function for WLAN-1, and you leave the value for TX bursting unchanged with the asterisk (*).

Working with the set command in this way is adequate for tables with only a few columns. However, tables with many columns can pose a major challenge. For example, the table under Setup > Interfaces > WLAN > Transmission contains 22 entries:

> cd /Setup/Interfaces/WLAN/Transmission
> set ?

Possible Entries for columns in Transmission:
[1][Ifc]                : WLAN-1 (1), WLAN-1-2 (16), WLAN-1-3 (17), WLAN-1-4 (18), WLAN-1-5 (19), WLAN-1-6 (20), WLAN-1-7 (21), WLAN-1-8 (22)
[2][Packet-Size]        : 5 Chars from: 1234567890
[3][Min-Tx-Rate]        : Auto (0), 1M (1), 2M (2), 5.5M (4), 11M (6), 6M (8), 9M (9), 12M (10), 18M (11), 24M (12), 36M (13), 48M (14), 54M (15)
[9][Max-Tx-Rate]        : Auto (0), 1M (1), 2M (2), 5.5M (4), 11M (6), 6M (8), 9M (9), 12M (10), 18M (11), 24M (12), 36M (13), 48M (14), 54M (15)
[4][Basic-Rate]         : 1M (1), 2M (2), 5.5M (4), 11M (6), 6M (8), 9M (9), 12M (10), 18M (11), 24M (12), 36M (13), 48M (14), 54M (15)
[19][EAPOL-Rate]        : Like-Data (0), 1M (1), 2M (2), 5.5M (4), 11M (6), 6M (8), 9M (9), 12M (10), 18M (11), 24M (12), 36M (13), 48M (14), 54M (15), HT-1-6.5M (28), HT-1-13M (29), HT-1-19.5M (30),
HT-1-26M (31), HT-1-39M (32), HT-1-52M (33), HT-1-58.5M (34), HT-1-65M (35), HT-2-13M (36), HT-2-26M (37), HT-2-39M (38), HT-2-52M (39), HT-2-78M (40), HT-2-104M (41), HT-2-117M (42), HT-2-130M (43)
[12][Hard-Retries]      : 3 Chars from: 1234567890
[11][Soft-Retries]      : 3 Chars from: 1234567890
[7][11b-Preamble]       : Auto (0), Long (1)
[16][Min-HT-MCS]        : Auto (0), MCS-0/8 (1), MCS-1/9 (2), MCS-2/10 (3), MCS-3/11 (4), MCS-4/12 (5), MCS-5/13 (6), MCS-6/14 (7), MCS-7/15 (8)
[17][Max-HT-MCS]        : Auto (0), MCS-0/8 (1), MCS-1/9 (2), MCS-2/10 (3), MCS-3/11 (4), MCS-4/12 (5), MCS-5/13 (6), MCS-6/14 (7), MCS-7/15 (8)
[23][Use-STBC]          : No (0), Yes (1)
[24][Use-LDPC]          : No (0), Yes (1)
[13][Short-Guard-Interval]  : Auto (0), No (1)
[18][Min-Spatial-Streams] : Auto (0), One (1), Two (2), Three (3)
[14][Max-Spatial-Streams] : Auto (0), One (1), Two (2), Three (3)
[15][Send-Aggregates]   : No (0), Yes (1)
[22][Receive-Aggregates]: No (0), Yes (1)
[20][Max-Aggr.-Packet-Count]    : 2 Chars from: 1234567890
[6][RTS-Threshold]      : 5 Chars from: 1234567890
[10][Min-Frag-Len]      : 5 Chars from: 1234567890
[21][ProbeRsp-Retries]  : 3 Chars from: 1234567890

Use the following command to set the short guard interval in the transmission table for the WLAN-1-3 interface to No:

> set WLAN-1-3 * * * * * * * * * * * * No
Note: The asterisks for the values after the column for the short guard interval are unnecessary in this example, as the columns will be ignored when setting the new values.

As an alternative to this rather confusing and error-prone notation, you can use the tab command as the first step to determine which columns are changed with the subsequent set command:

> tab Ifc short guard-Interval
> set WLAN-1-3 No

The tab command also makes it possible to change the order of the columns. The following example for the WLAN-1-3 interface sets the value for the short guard interval to No and the value for Use-LDPC to Yes, although the corresponding columns in the table are displayed in a different order:

> tab Ifc short guard-Interval Use-LDPC
> set WLAN-1-3 No Yes
Note: The tables may only contain only a selection of the columns, depending on the hardware model. The tab command ignores columns which do not exist for that device. This gives you the option to develop unified scripts for different hardware models. The tab instructions in the scripts reference the maximum number of required columns. Depending on the model, the script only performs the set instructions for the existing columns.

You can also abbreviate the tabcommand with curly brackets. Use the following command to set the short guard interval in the transmission table for the WLAN-1-3 interface to No:

> set WLAN-1-3 {short-guard} No

The curly brackets also enable you to change the order of the columns. The following example for the WLAN-1-3 interface sets the value for the short guard interval to No and the value for Use-LDPC to Yes, although the corresponding columns in the table are displayed in a different order:

> set WLAN-1-3 {Short-Guard-Interval} No {Use-LDPC} Yes

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo