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

Subscription server see Subscription Service

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/1" rel="group"/>
       <a href="ws://localhost/poll/1" rel="self"/>
       <a href="subscription/1?action=show" rel="action"/>
        <ul> 
            <li class="ios-signalstate-ev" title="Local/DRV_1/DRV1K1">
                <a href="/rw/iosystem/signals/Local/DRV_1/DRV1K1;state" rel="self"/>
                <span class="lvalue">0</span>
                <span class="lstate">simulated</span>
            </li>  
        </ul> 
    </div> 
</body>
</html>

Resources

  • ios-signalstate-ev
    • lvalue Signal value
    • lstate Signals state {simulated | not simulated}

Error Response

BAD REQUEST(400)

See Robot controller return codes

Sample Call

Subscribe on IO-Signal, it is possible to subscribe with any subscription priority (i.e High,Medium,Low priority) on IO-Signals.

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

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

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

Notes

Not supported in bootserver mode