00001 /* Auto-generated by genmsg_cpp for file /tmp/buildd/ros-diamondback-knowrob-0.2.0/debian/ros-diamondback-knowrob/opt/ros/diamondback/stacks/knowrob/json_prolog/srv/PrologQuery.srv */ 00002 00003 package ros.pkg.json_prolog.srv; 00004 00005 import java.nio.ByteBuffer; 00006 00007 00008 public class PrologQuery extends ros.communication.Service<PrologQuery.Request, PrologQuery.Response> { 00009 00010 public static java.lang.String __s_getDataType() { return "json_prolog/PrologQuery"; } 00011 public static java.lang.String __s_getMD5Sum() { return "b98fb21a498cfd5b16c55f4b1f1cfa7d"; } 00012 00013 public java.lang.String getDataType() { return PrologQuery.__s_getDataType(); } 00014 public java.lang.String getMD5Sum() { return PrologQuery.__s_getMD5Sum(); } 00015 00016 public PrologQuery.Request createRequest() { 00017 return new PrologQuery.Request(); 00018 } 00019 00020 public PrologQuery.Response createResponse() { 00021 return new PrologQuery.Response(); 00022 } 00023 00024 static public class Request extends ros.communication.Message { 00025 static public final short ALL_SOLUTIONS = 0; 00026 static public final short INCREMENTAL = 1; 00027 00028 public short mode; 00029 public java.lang.String id = new java.lang.String(); 00030 public java.lang.String query = new java.lang.String(); 00031 00032 public Request() { 00033 } 00034 00035 public static java.lang.String __s_getDataType() { return "json_prolog/PrologQueryRequest"; } 00036 public java.lang.String getDataType() { return __s_getDataType(); } 00037 public static java.lang.String __s_getMD5Sum() { return "ae1d940ff32be0f4c9af16fc85baab7a"; } 00038 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00039 public static java.lang.String __s_getServerMD5Sum() { return "b98fb21a498cfd5b16c55f4b1f1cfa7d"; } 00040 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); } 00041 public static java.lang.String __s_getMessageDefinition() { return "\n" + 00042 "\n" + 00043 "\n" + 00044 "\n" + 00045 "\n" + 00046 "\n" + 00047 "\n" + 00048 "byte ALL_SOLUTIONS=0\n" + 00049 "byte INCREMENTAL=1\n" + 00050 "\n" + 00051 "byte mode\n" + 00052 "string id\n" + 00053 "string query\n" + 00054 "\n" + 00055 ""; } 00056 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00057 00058 public Request clone() { 00059 Request c = new Request(); 00060 c.deserialize(serialize(0)); 00061 return c; 00062 } 00063 00064 public void setTo(ros.communication.Message m) { 00065 deserialize(m.serialize(0)); 00066 } 00067 00068 public int serializationLength() { 00069 int __l = 0; 00070 __l += 1; // mode 00071 __l += 4 + id.length(); 00072 __l += 4 + query.length(); 00073 return __l; 00074 } 00075 00076 public void serialize(ByteBuffer bb, int seq) { 00077 bb.put((byte)mode); 00078 Serialization.writeString(bb, id); 00079 Serialization.writeString(bb, query); 00080 } 00081 00082 public void deserialize(ByteBuffer bb) { 00083 mode = (short)(bb.get() & 0xff); 00084 id = Serialization.readString(bb); 00085 query = Serialization.readString(bb); 00086 } 00087 00088 @SuppressWarnings("all") 00089 public boolean equals(Object o) { 00090 if(!(o instanceof Request)) 00091 return false; 00092 Request other = (Request) o; 00093 return 00094 mode == other.mode && 00095 id.equals(other.id) && 00096 query.equals(other.query) && 00097 true; 00098 } 00099 00100 @SuppressWarnings("all") 00101 public int hashCode() { 00102 final int prime = 31; 00103 int result = 1; 00104 long tmp; 00105 result = prime * result + this.mode; 00106 result = prime * result + (this.id == null ? 0 : this.id.hashCode()); 00107 result = prime * result + (this.query == null ? 0 : this.query.hashCode()); 00108 return result; 00109 } 00110 } // class Request 00111 00112 static public class Response extends ros.communication.Message { 00113 00114 public boolean ok; 00115 public java.lang.String message = new java.lang.String(); 00116 00117 public Response() { 00118 } 00119 00120 public static java.lang.String __s_getDataType() { return "json_prolog/PrologQueryResponse"; } 00121 public java.lang.String getDataType() { return __s_getDataType(); } 00122 public static java.lang.String __s_getMD5Sum() { return "f6fcb3b1ed8c7743c7fb7d5bcca28513"; } 00123 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00124 public static java.lang.String __s_getServerMD5Sum() { return "b98fb21a498cfd5b16c55f4b1f1cfa7d"; } 00125 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); } 00126 public static java.lang.String __s_getMessageDefinition() { return "bool ok\n" + 00127 "string message\n" + 00128 "\n" + 00129 "\n" + 00130 ""; } 00131 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00132 00133 public Response clone() { 00134 Response c = new Response(); 00135 c.deserialize(serialize(0)); 00136 return c; 00137 } 00138 00139 public void setTo(ros.communication.Message m) { 00140 deserialize(m.serialize(0)); 00141 } 00142 00143 public int serializationLength() { 00144 int __l = 0; 00145 __l += 1; // ok 00146 __l += 4 + message.length(); 00147 return __l; 00148 } 00149 00150 public void serialize(ByteBuffer bb, int seq) { 00151 bb.put((byte)(ok ? 1 : 0)); 00152 Serialization.writeString(bb, message); 00153 } 00154 00155 public void deserialize(ByteBuffer bb) { 00156 ok = bb.get() != 0 ? true : false; 00157 message = Serialization.readString(bb); 00158 } 00159 00160 @SuppressWarnings("all") 00161 public boolean equals(Object o) { 00162 if(!(o instanceof Response)) 00163 return false; 00164 Response other = (Response) o; 00165 return 00166 ok == other.ok && 00167 message.equals(other.message) && 00168 true; 00169 } 00170 00171 @SuppressWarnings("all") 00172 public int hashCode() { 00173 final int prime = 31; 00174 int result = 1; 00175 long tmp; 00176 result = prime * result + (this.ok ? 1231 : 1237); 00177 result = prime * result + (this.message == null ? 0 : this.message.hashCode()); 00178 return result; 00179 } 00180 } // class Response 00181 00182 } //class 00183