00001 /* Auto-generated by genmsg_cpp for file /opt/ros/diamondback/stacks/ias_common/vision_srvs/srv/cop_call.srv */ 00002 00003 package ros.pkg.vision_srvs.srv; 00004 00005 import java.nio.ByteBuffer; 00006 00007 00008 public class cop_call extends ros.communication.Service<cop_call.Request, cop_call.Response> { 00009 00010 public static java.lang.String __s_getDataType() { return "vision_srvs/cop_call"; } 00011 public static java.lang.String __s_getMD5Sum() { return "df853a883b53431ef52c184e4ff2b0b3"; } 00012 00013 public java.lang.String getDataType() { return cop_call.__s_getDataType(); } 00014 public java.lang.String getMD5Sum() { return cop_call.__s_getMD5Sum(); } 00015 00016 public cop_call.Request createRequest() { 00017 return new cop_call.Request(); 00018 } 00019 00020 public cop_call.Response createResponse() { 00021 return new cop_call.Response(); 00022 } 00023 00024 static public class Request extends ros.communication.Message { 00025 static public final long LOCATE = 0; 00026 static public final long TRACK = 16; 00027 static public final long REFINE = 256; 00028 static public final long STOPTRACK = 2048; 00029 static public final long STARTATTENT = 4096; 00030 static public final long STOPATTENT = 8192; 00031 static public final long LOOKUP = 25600; 00032 static public final long LOOKUPALL = 25601; 00033 00034 public java.lang.String outputtopic = new java.lang.String(); 00035 public java.util.ArrayList<java.lang.String> object_classes = new java.util.ArrayList<java.lang.String>(); 00036 public long[] object_ids = new long[0]; 00037 public long action_type; 00038 public long number_of_objects; 00039 public java.util.ArrayList<ros.pkg.vision_msgs.msg.apriori_position> list_of_poses = new java.util.ArrayList<ros.pkg.vision_msgs.msg.apriori_position>(); 00040 00041 public Request() { 00042 } 00043 00044 public static java.lang.String __s_getDataType() { return "vision_srvs/cop_callRequest"; } 00045 public java.lang.String getDataType() { return __s_getDataType(); } 00046 public static java.lang.String __s_getMD5Sum() { return "8159879f6a0c16d501638a9c44ad2860"; } 00047 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00048 public static java.lang.String __s_getServerMD5Sum() { return "df853a883b53431ef52c184e4ff2b0b3"; } 00049 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); } 00050 public static java.lang.String __s_getMessageDefinition() { return "\n" + 00051 "\n" + 00052 "uint64 LOCATE = 0\n" + 00053 "uint64 TRACK = 16\n" + 00054 "uint64 REFINE = 256\n" + 00055 "uint64 STOPTRACK = 2048\n" + 00056 "uint64 STARTATTENT = 4096\n" + 00057 "uint64 STOPATTENT = 8192\n" + 00058 "uint64 LOOKUP = 25600\n" + 00059 "uint64 LOOKUPALL = 25601\n" + 00060 "\n" + 00061 "string outputtopic\n" + 00062 "string[] object_classes\n" + 00063 "uint64[] object_ids\n" + 00064 "uint64 action_type\n" + 00065 "uint64 number_of_objects\n" + 00066 "vision_msgs/apriori_position[] list_of_poses\n" + 00067 "\n" + 00068 "================================================================================\n" + 00069 "MSG: vision_msgs/apriori_position\n" + 00070 "#Tuple for cop call\n" + 00071 "float64 probability # apriori probability of the position\n" + 00072 "uint64 positionId # lo id of an position\n" + 00073 "\n" + 00074 ""; } 00075 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00076 00077 public Request clone() { 00078 Request c = new Request(); 00079 c.deserialize(serialize(0)); 00080 return c; 00081 } 00082 00083 public void setTo(ros.communication.Message m) { 00084 deserialize(m.serialize(0)); 00085 } 00086 00087 public int serializationLength() { 00088 int __l = 0; 00089 __l += 4 + outputtopic.length(); 00090 __l += 4; 00091 for(java.lang.String val : object_classes) { 00092 __l += 4 + val.length(); 00093 } 00094 __l += 4 + object_ids.length * 8; // object_ids 00095 __l += 8; // action_type 00096 __l += 8; // number_of_objects 00097 __l += 4; 00098 for(ros.pkg.vision_msgs.msg.apriori_position val : list_of_poses) { 00099 __l += val.serializationLength(); 00100 } 00101 return __l; 00102 } 00103 00104 public void serialize(ByteBuffer bb, int seq) { 00105 Serialization.writeString(bb, outputtopic); 00106 bb.putInt(object_classes.size()); 00107 for(java.lang.String val : object_classes) { 00108 Serialization.writeString(bb, val); 00109 } 00110 bb.putInt(object_ids.length); 00111 for(long val : object_ids) { 00112 bb.putLong(val); 00113 } 00114 bb.putLong(action_type); 00115 bb.putLong(number_of_objects); 00116 bb.putInt(list_of_poses.size()); 00117 for(ros.pkg.vision_msgs.msg.apriori_position val : list_of_poses) { 00118 val.serialize(bb, seq); 00119 } 00120 } 00121 00122 public void deserialize(ByteBuffer bb) { 00123 outputtopic = Serialization.readString(bb); 00124 00125 int __object_classes_len = bb.getInt(); 00126 object_classes = new java.util.ArrayList<java.lang.String>(__object_classes_len); 00127 for(int __i=0; __i<__object_classes_len; __i++) { 00128 object_classes.add(Serialization.readString(bb)); 00129 } 00130 00131 int __object_ids_len = bb.getInt(); 00132 object_ids = new long[__object_ids_len]; 00133 for(int __i=0; __i<__object_ids_len; __i++) { 00134 object_ids[__i] = bb.getLong(); 00135 } 00136 action_type = bb.getLong(); 00137 number_of_objects = bb.getLong(); 00138 00139 int __list_of_poses_len = bb.getInt(); 00140 list_of_poses = new java.util.ArrayList<ros.pkg.vision_msgs.msg.apriori_position>(__list_of_poses_len); 00141 for(int __i=0; __i<__list_of_poses_len; __i++) { 00142 ros.pkg.vision_msgs.msg.apriori_position __tmp = new ros.pkg.vision_msgs.msg.apriori_position(); 00143 __tmp.deserialize(bb); 00144 list_of_poses.add(__tmp);; 00145 } 00146 } 00147 00148 @SuppressWarnings("all") 00149 public boolean equals(Object o) { 00150 if(!(o instanceof Request)) 00151 return false; 00152 Request other = (Request) o; 00153 return 00154 outputtopic.equals(other.outputtopic) && 00155 object_classes.equals(other.object_classes) && 00156 java.util.Arrays.equals(object_ids, other.object_ids) && 00157 action_type == other.action_type && 00158 number_of_objects == other.number_of_objects && 00159 list_of_poses.equals(other.list_of_poses) && 00160 true; 00161 } 00162 00163 @SuppressWarnings("all") 00164 public int hashCode() { 00165 final int prime = 31; 00166 int result = 1; 00167 long tmp; 00168 result = prime * result + (this.outputtopic == null ? 0 : this.outputtopic.hashCode()); 00169 result = prime * result + (this.object_classes == null ? 0 : this.object_classes.hashCode()); 00170 result = prime * result + java.util.Arrays.hashCode(this.object_ids); 00171 result = prime * result + (int)(this.action_type ^ (this.action_type >>> 32)); 00172 result = prime * result + (int)(this.number_of_objects ^ (this.number_of_objects >>> 32)); 00173 result = prime * result + (this.list_of_poses == null ? 0 : this.list_of_poses.hashCode()); 00174 return result; 00175 } 00176 } // class Request 00177 00178 static public class Response extends ros.communication.Message { 00179 00180 public long perception_primitive; 00181 00182 public Response() { 00183 } 00184 00185 public static java.lang.String __s_getDataType() { return "vision_srvs/cop_callResponse"; } 00186 public java.lang.String getDataType() { return __s_getDataType(); } 00187 public static java.lang.String __s_getMD5Sum() { return "44338ff3890880904a6cc02046a2df09"; } 00188 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00189 public static java.lang.String __s_getServerMD5Sum() { return "df853a883b53431ef52c184e4ff2b0b3"; } 00190 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); } 00191 public static java.lang.String __s_getMessageDefinition() { return "uint64 perception_primitive\n" + 00192 "\n" + 00193 ""; } 00194 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00195 00196 public Response clone() { 00197 Response c = new Response(); 00198 c.deserialize(serialize(0)); 00199 return c; 00200 } 00201 00202 public void setTo(ros.communication.Message m) { 00203 deserialize(m.serialize(0)); 00204 } 00205 00206 public int serializationLength() { 00207 int __l = 0; 00208 __l += 8; // perception_primitive 00209 return __l; 00210 } 00211 00212 public void serialize(ByteBuffer bb, int seq) { 00213 bb.putLong(perception_primitive); 00214 } 00215 00216 public void deserialize(ByteBuffer bb) { 00217 perception_primitive = bb.getLong(); 00218 } 00219 00220 @SuppressWarnings("all") 00221 public boolean equals(Object o) { 00222 if(!(o instanceof Response)) 00223 return false; 00224 Response other = (Response) o; 00225 return 00226 perception_primitive == other.perception_primitive && 00227 true; 00228 } 00229 00230 @SuppressWarnings("all") 00231 public int hashCode() { 00232 final int prime = 31; 00233 int result = 1; 00234 long tmp; 00235 result = prime * result + (int)(this.perception_primitive ^ (this.perception_primitive >>> 32)); 00236 return result; 00237 } 00238 } // class Response 00239 00240 } //class 00241