Robot Web Services
3HAC050973-001 Revision:M, Application Manual - Robot Web Services
Mastership Domain Subscribe

Subscribe on a single Masterhip resource i.e. either CFG, Motion or RAPID

URL

/subscription

Method

POST

URL Params

None

Data Params

  • resources = An identifier Required
  • <identifier> = The subscription resource URI (The URI here is: '/rw/mastership') 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>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 class="list">
                <li class="msh-resource-value" title="cfg">  
                    <span class="holdmastership">TRUE</span>                    
                    <span class="uid">65</span> 
                    <span class="location"></span>  
                    <span class="alias"></span> 
                    <span class="application">RobotStudio</span>    
                    <span class="mastership">remote</span>
                </li>                           
            </ul>
        </div>
    </body>
</html>

Resources

  • msh-resource-value The mastership information
  • holdmastership = {1 | 0}, indicates if mastership is being held.
    • 1 indicates TRUE
    • 0 indicates FALSE
  • uid = unique user id
  • location = location where the user holding the mastership is present.
  • alias = alternate name
  • application = name of the application holding the mastership.
  • mastership = Used to specify current master of a resource.
    • values of mastership are listed belows
      • nomaster - Mastership is not held.
      • remote - Mastership is held by a remote user.
      • local - Mastership is held by a local user, e.g., the GTPU.
      • internal - Mastership is held by an internal user (e.g., master of resource Jog is held during execution).

Error Response

BAD_REQUEST(400)

HTTP Errors, see HTTP Status codes

Robot controller errors, see Robot controller return codes

Sample Call

Subscribe on cfg domain for 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/mastership/cfg&1-p=0" -X POST "http://localhost/subscription"

curl --digest -u "Default User":robotics -d "resources=1&1=/rw/mastership/cfg&1-p=1" -X POST "http://localhost/subscription"

Notes

Not supported in bootserver mode