Codota Logo
Service
Code IndexAdd Codota to your IDE (free)

How to use
Service
in
edu.wpi.rail.jrosbridge

Best Java code snippets using edu.wpi.rail.jrosbridge.Service (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: streampipes/streampipes-ce

private String getMethodType(Ros ros, String topic) {
  Service addTwoInts = new Service(ros, "/rosapi/topic_type", "rosapi/TopicType");
  ServiceRequest request = new ServiceRequest("{\"topic\": \""+ topic +"\"}");
  ServiceResponse response = addTwoInts.callServiceAndWait(request);
  JSONObject ob = new JSONObject(response.toString());
  return ob.getString("type");
}
origin: de.dfki.cos.basys.common/de.dfki.cos.basys.common.jrosbridge

/**
 * Call the service and wait for a response. This is a blocking call and
 * will only return once rosbridge returns the service response. For an
 * asynchronous version of this call, see the
 * {@link #callService(ServiceRequest request, ServiceCallback cb)
 * callService} method.
 * 
 * @param request
 *            The service request to send.
 * @return The corresponding service response from ROS.
 */
public synchronized ServiceResponse callServiceAndWait(
    ServiceRequest request) {
  // private inner class to use as a callback
  BlockingCallback cb = new BlockingCallback(this);
  // use the asynchronous version and block on the result
  this.callService(request, cb);
  // wait for a response
  while (cb.getResponse() == null) {
    try {
      this.wait();
    } catch (InterruptedException e) {
      // continue on
    }
  }
  return cb.getResponse();
}
origin: rctoris/jrosbridge

/**
 * Call the service and wait for a response. This is a blocking call and
 * will only return once rosbridge returns the service response. For an
 * asynchronous version of this call, see the
 * {@link #callService(ServiceRequest request, ServiceCallback cb)
 * callService} method.
 * 
 * @param request
 *            The service request to send.
 * @return The corresponding service response from ROS.
 */
public synchronized ServiceResponse callServiceAndWait(
    ServiceRequest request) {
  // private inner class to use as a callback
  BlockingCallback cb = new BlockingCallback(this);
  // use the asynchronous version and block on the result
  this.callService(request, cb);
  // wait for a response
  while (cb.getResponse() == null) {
    try {
      this.wait();
    } catch (InterruptedException e) {
      // continue on
    }
  }
  return cb.getResponse();
}
edu.wpi.rail.jrosbridgeService

Javadoc

The Service object is responsible for calling or advertising a service in ROS.

Most used methods

  • callService
    Call this service. The callback function will be called with the associated service response.
  • <init>
    Create a ROS service with the given information.
  • callServiceAndWait
    Call the service and wait for a response. This is a blocking call and will only return once rosbridg

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • onCreateOptionsMenu (Activity)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now