Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Subscribe IO Network

Subscribe on IO Network state change

URL

/subscription

Method

POST

URL Params

None

Data Params

  • resources = An identifier Required
  • <identifier> = The subscription resource URI Required
  • <identifier>-p = The priority associated with the subscription resource Required

Success Response

CREATED(201)

see HTTP Status codes

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Event</title>
    <base href="http://localhost/"/>
</head>
<body>
    <div class="state">
    <a href="subscription/2" rel="group"/>
    <a href="ws://localhost/poll/2" rel="self"/>
    <a href="subscription/2?action=show" rel="action"/>
    <ul>
        <li class="ios-networkstate-ev" title="Local">
            <a href="/rw/iosystem/networks/Local;state" rel="self"/>
            <span class="lstate">started</span>
            <span class="pstate">running</span>
        </li>
    </ul>
    </div>
</body>
</html>

Resources

  • ios-networkstate
    • lstate Network logical state
    • pstate Network physical state

Error Response

BAD REQUEST(400)

See Robot controller return codes

Sample Call

Subscribe on IO Network

only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/iosystem/networks/Local;state&1-p=0" -X POST "http://localhost/subscription"

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/iosystem/networks/Local;state&1-p=1" -X POST "http://localhost/subscription"

Notes

Not supported in bootserver mode