Subscribe on operation mode changes
URL
/subscription
Method
POST
URL Params
None
Data Params
- resources = An identifier Required
- <identifier> = The subscription resource URI (The URI here is: '/rw/panel/opmode') Required
- <identifier>-p = The priority associated with the subscription resource Required
Success Response
CREATED(201)
see HTTP Status codes
Example Response
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Subscription Event</title>
</head>
<body>
<div class="state">
<a href="http://localhost/subscription/1" name="poll"></a>
<a href="http://localhost/subscription/1?action=show" rel="action"></a>
<a href="http://localhost/subscription/1" rel="group"></a>
<ul>
<li class="pnl-opmode-ev" title="opmode">
<a href="/rw/panel/opmode" rel="self"></a>
<span class="opmode">MANR</span>
</li>
</ul>
</div>
</body>
</html>
Resources
- pnl-opmode-ev
- opmode Controller Operation Mode {INIT | AUTO_CH | MANF_CH | MANR | MANF | AUTO | UNDEF}
Error Response
BAD_REQUEST(400)
HTTP Errors, see HTTP Status codes
See Robot controller return codes
Sample Call
Subscribe on controller state changes
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/panel/opmode&1-p=0" -X POST "http://localhost/subscription"
curl --digest -u "Default User":robotics -d "resources=1&1=/rw/panel/opmode&1-p=1" -X POST "http://localhost/subscription"
Notes
Not supported in bootserver mode