Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Search RAPID symbols

Search RAPID symbols

URL

/rw/rapid/symbols

Method

POST

URL Params

action=search-symbol Required

Data Params

At least one data parameter should be provided.

  • view = {block | scope | stack }. For both scope and stack you must use blockurl with task, for stack even program pointer should be set.
  • vartyp = {udef | rw | ro | loop | any}.Variable type to be searched.
  • blockurl = {string}.Relative URL describing the block where the search should start.
  • recursive = {TRUE | FALSE}.True if search should be recursive otherwise false.
  • posl = {position row}.Line position in module.
  • posc = {position col}.Column position in module (if posl and posc are both 0 is the blockurl used instead).
  • stack = {integer}.stackframe to search when searching in stack.
  • onlyused = {TRUE|FALSE}.True if only used symbols should be returned.
  • skipshared = {TRUE|FALSE}.True when shared symbols should be skipped,otherwise False.
  • regexp = {regular expression}
  • symtyp = { atm | rec | ali | rcp | con | var | per | par | lab | for | fun | prc | trp | mod | tsk | any | udef}.Type of Symbol to be searched.
    • atm Atomic type
    • rec Record type
    • ali Alias type
    • rcp Record component
    • con Constant
    • var Variable
    • per Persistent
    • par Parameter
    • lab Label
    • for For statement
    • fun Function
    • prc Procedure
    • trp Trap
    • mod Module
    • tsk Task
    • any any of the above symbol type
  • dattyp = {string}.,Datatype which has to be filtered.

Success Response

HTTP_OK(200), see HTTP Status codes

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>rapid</title>
<base href="http://127.0.0.1/rw/rapid/"/>
</head>
<body>
<div class="state">
<ul>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/reg5">
        <a href="symbol/properties/RAPID/T_ROB1/user/reg5" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/reg5</span>
        <span class="name">reg5</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">num</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/num</span>
    </li>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/reg3">
        <a href="symbol/properties/RAPID/T_ROB1/user/reg3" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/reg3</span>
        <span class="name">reg3</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">num</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/num</span>
    </li>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/reg1">
    <a href="symbol/properties/RAPID/T_ROB1/user/reg1" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/reg1</span>
        <span class="name">reg1</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">num</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/num</span>
    </li>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/reg4">
    <a href="symbol/properties/RAPID/T_ROB1/user/reg4" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/reg4</span>
        <span class="name">reg4</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">num</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/num</span>
    </li>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/reg2">
    <a href="symbol/properties/RAPID/T_ROB1/user/reg2" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/reg2</span>
        <span class="name">reg2</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">num</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/num</span>
    </li>
    <li class="rap-sympropvar-li" title="RAPID/T_ROB1/user/clock1">
    <a href="symbol/properties/RAPID/T_ROB1/user/clock1" rel="self"/>
        <span class="symburl">RAPID/T_ROB1/user/clock1</span>
        <span class="name">clock1</span>
        <span class="symtyp">var</span>
        <span class="named">true</span>
        <span class="dattyp">clock</span>
        <span class="ndim">0</span>
        <span class="dim"/>
        <span class="local">false</span>
        <span class="rdonly">false</span>
        <span class="taskvar">false</span>
        <span class="typurl">RAPID/clock</span>
    </li>
</ul>
</div>
</body>
</html>

Resources

  • rap-sympropvar-li Rapid-Symbol resource
    • symburl the name of the symbol. NULL if not retreived
    • name the name of the symbol. NULL if not retreived
    • symtyp the symbol properties. NULL if not retreived
    • named true if symbol is named. Undefined if the symbol
    • dattyp underlying type
    • ndim number of array dimensions
    • dim array dimensions
    • local FALSE if global module constant
    • rdonly TRUE if variable is readonly
    • taskvar TRUE if var is global within task
    • typurl URL to type symbol

Error Response

BAD REQUEST(400) see HTTP Status codes

Robot controller errors, see Robot controller return codes

Sample Call

curl --digest -u "Default User":robotics -d "view=block&vartyp=any&blockurl=RAPID/T_ROB1&symtyp=var&recursive=true&dattyp=num&skipshared=TRUE&onlyused=TRUE&stack=0&posl=0&posc=0" "http://127.0.0.1/rw/rapid/symbols?action=search-symbols"

Notes

Not supported in bootserver mode