/** * Create a clone of this ServiceRequest. */ @Override public ServiceRequest clone() { return new ServiceRequest(this.toJsonObject(), this.serviceRequestType); } }
/** * Create a clone of this ServiceRequest. */ @Override public ServiceRequest clone() { return new ServiceRequest(this.toJsonObject(), this.serviceRequestType); } }
/** * Create a new Empty ServiceRequest based on the given JSON string. Any * missing values will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A Empty ServiceRequest based on the given JSON string. */ public static Request fromJsonString(String jsonString) { // convert to a ServiceRequest return Empty.Request.fromServiceRequest(new ServiceRequest( jsonString)); }
/** * Create a new Empty ServiceRequest based on the given JSON string. Any * missing values will be set to their defaults. * * @param jsonString * The JSON string to parse. * @return A Empty ServiceRequest based on the given JSON string. */ public static Request fromJsonString(String jsonString) { // convert to a ServiceRequest return Empty.Request.fromServiceRequest(new ServiceRequest( jsonString)); }
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"); }
ServiceRequest request = new ServiceRequest(args); request.setId(id); cb.handleServiceCall(request);
ServiceRequest request = new ServiceRequest(args); request.setId(id); cb.handleServiceCall(request);