Class ROSOperation

java.lang.Object
org.hypermedea.op.BaseOperation
org.hypermedea.ros.ROSOperation
All Implemented Interfaces:
org.hypermedea.op.Operation
Direct Known Subclasses:
ROSCancelOperation, ROSGetStatusOperation, ROSPublishOperation, ROSSendGoalOperation, ROSSubscribeOperation

public abstract class ROSOperation extends org.hypermedea.op.BaseOperation
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected final edu.wpi.rail.jrosbridge.Topic
     

    Fields inherited from class org.hypermedea.op.BaseOperation

    DEFAULT_TIMEOUT, form, operationStarted, payload, target

    Fields inherited from interface org.hypermedea.op.Operation

    DELETE, GET, METHOD_NAME_FIELD, PATCH, POST, PUT, WATCH
  • Constructor Summary

    Constructors
    Constructor
    Description
    ROSOperation(String targetURI, Map<String,Object> formFields)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javax.json.JsonStructure
     
    protected String
    Return the operation-specific default message type.
    protected abstract String
    Map the path element of the operation's target URI to a ROS topic.
    protected Object
    parseJson(javax.json.JsonStructure json)
     
    protected Number
    parseJsonNumber(javax.json.JsonNumber nb)
     
    protected void
     

    Methods inherited from class org.hypermedea.op.BaseOperation

    end, getForm, getMethod, getPayload, getResponse, getTargetURI, isAsync, isIdempotent, isSafe, onError, onResponse, registerResponseCallback, sendRequest, setPayload, setPayload, setTimeout, toString, unregisterResponseCallback

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_MESSAGE_TYPE

      public static final String DEFAULT_MESSAGE_TYPE
      See Also:
    • topic

      protected final edu.wpi.rail.jrosbridge.Topic topic
  • Constructor Details

  • Method Details

    • sendSingleRequest

      protected void sendSingleRequest() throws IOException
      Specified by:
      sendSingleRequest in class org.hypermedea.op.BaseOperation
      Throws:
      IOException
    • getTopicName

      protected abstract String getTopicName(String path)
      Map the path element of the operation's target URI to a ROS topic.
      Parameters:
      path - path of the target URI declared in the input form
      Returns:
      a full topic name for the operation
    • getDefaultMessageType

      protected String getDefaultMessageType()
      Return the operation-specific default message type.
      Returns:
      a message type, e.g. "std_msgs/String"
    • parseJson

      protected Object parseJson(javax.json.JsonStructure json)
    • parseJsonNumber

      protected Number parseJsonNumber(javax.json.JsonNumber nb)
    • buildJson

      protected javax.json.JsonStructure buildJson(Object ref)