From OpenSCADAWiki
Jump to: navigation, search

Table 4. Actions over the list.

Operation Action
Interrogation

Request: command "get": <get path="/fld_teg" user="user"/>
Result: confirmation with the result in the tag's text or an error message. The result is formed in the form:

<get path="/fld_teg" user="user" rez="0">
<el id="0">./MODULES/arh_base.o</el>
<el id="1">./MODULES/cntr_sys.o</el>
</get>
String's addition

Request: command "add": <add path="/fld_teg" user="user" id="tst">Test</add>

To add the string with ID "tst" and value "Test". If the list is not indexed, then the id attribute is absent.

Result: confirmation or an error message.

Insert the string

Request: command "ins": <ins path="/fld_teg" user="user" pos="3" p_id="tst1" id="tst">Test</ins>

To insert the string with the ID "tst" and value "Test" in position 3 with the string "tst1". In the case of the index list p_id attribute contains the identifier, else — the text of the string. If the list is not indexed, then the ID attribute is absent.

Result: confirmation or an error message.

Deleting of the string

Request: command "del": <del path="/fld_teg" user="user" pos="3" id="tst">Test</del>

To delete the string with ID "tst" and value "Test" from the position 3. If the list is not indexed, then the ID attribute is absent.

Result: confirmation or an error message.

Edit of the string

Request:: command "edit": <edit path="/fld_teg" user="user" pos="3" p_id="tst1" id="tst" >Test</edit>

To replace the string at position 3 with the identifier "tst1" with the another string with the identifier "tst" and value "Test". In the case of the index list p_id attribute contains the identifier, else — the text of the string. If the list is not indexed, then the ID attribute is absent.

Result: confirmation or an error message.

Mooving of the string

Request: command "move": <move path="/fld_teg" user="user" pos="3" to="5"/>

To move the string from position 3 to position 5.

Result: confirmation or an error message.