$search
00001 """autogenerated by genmsg_py from TranslateRecognitionIdRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class TranslateRecognitionIdRequest(roslib.message.Message): 00007 _md5sum = "4d95610f63ed69a670a8f8aaa3c6aa36" 00008 _type = "household_objects_database_msgs/TranslateRecognitionIdRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string recognition_id 00011 00012 """ 00013 __slots__ = ['recognition_id'] 00014 _slot_types = ['string'] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 recognition_id 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(TranslateRecognitionIdRequest, self).__init__(*args, **kwds) 00032 #message fields cannot be None, assign default values for those that are 00033 if self.recognition_id is None: 00034 self.recognition_id = '' 00035 else: 00036 self.recognition_id = '' 00037 00038 def _get_types(self): 00039 """ 00040 internal API method 00041 """ 00042 return self._slot_types 00043 00044 def serialize(self, buff): 00045 """ 00046 serialize message into buffer 00047 @param buff: buffer 00048 @type buff: StringIO 00049 """ 00050 try: 00051 _x = self.recognition_id 00052 length = len(_x) 00053 buff.write(struct.pack('<I%ss'%length, length, _x)) 00054 except struct.error as se: self._check_types(se) 00055 except TypeError as te: self._check_types(te) 00056 00057 def deserialize(self, str): 00058 """ 00059 unpack serialized message in str into this message instance 00060 @param str: byte array of serialized message 00061 @type str: str 00062 """ 00063 try: 00064 end = 0 00065 start = end 00066 end += 4 00067 (length,) = _struct_I.unpack(str[start:end]) 00068 start = end 00069 end += length 00070 self.recognition_id = str[start:end] 00071 return self 00072 except struct.error as e: 00073 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00074 00075 00076 def serialize_numpy(self, buff, numpy): 00077 """ 00078 serialize message with numpy array types into buffer 00079 @param buff: buffer 00080 @type buff: StringIO 00081 @param numpy: numpy python module 00082 @type numpy module 00083 """ 00084 try: 00085 _x = self.recognition_id 00086 length = len(_x) 00087 buff.write(struct.pack('<I%ss'%length, length, _x)) 00088 except struct.error as se: self._check_types(se) 00089 except TypeError as te: self._check_types(te) 00090 00091 def deserialize_numpy(self, str, numpy): 00092 """ 00093 unpack serialized message in str into this message instance using numpy for array types 00094 @param str: byte array of serialized message 00095 @type str: str 00096 @param numpy: numpy python module 00097 @type numpy: module 00098 """ 00099 try: 00100 end = 0 00101 start = end 00102 end += 4 00103 (length,) = _struct_I.unpack(str[start:end]) 00104 start = end 00105 end += length 00106 self.recognition_id = str[start:end] 00107 return self 00108 except struct.error as e: 00109 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00110 00111 _struct_I = roslib.message.struct_I 00112 """autogenerated by genmsg_py from TranslateRecognitionIdResponse.msg. Do not edit.""" 00113 import roslib.message 00114 import struct 00115 00116 00117 class TranslateRecognitionIdResponse(roslib.message.Message): 00118 _md5sum = "b4afd505fbee150bf06acaffa82e84cf" 00119 _type = "household_objects_database_msgs/TranslateRecognitionIdResponse" 00120 _has_header = False #flag to mark the presence of a Header object 00121 _full_text = """int32 household_objects_id 00122 00123 int32 SUCCESS=0 00124 int32 ID_NOT_FOUND 00125 int32 DATABASE_ERROR 00126 int32 OTHER_ERROR 00127 int32 result 00128 00129 00130 """ 00131 # Pseudo-constants 00132 SUCCESS = 0 00133 00134 __slots__ = ['household_objects_id','ID_NOT_FOUND','DATABASE_ERROR','OTHER_ERROR','result'] 00135 _slot_types = ['int32','int32','int32','int32','int32'] 00136 00137 def __init__(self, *args, **kwds): 00138 """ 00139 Constructor. Any message fields that are implicitly/explicitly 00140 set to None will be assigned a default value. The recommend 00141 use is keyword arguments as this is more robust to future message 00142 changes. You cannot mix in-order arguments and keyword arguments. 00143 00144 The available fields are: 00145 household_objects_id,ID_NOT_FOUND,DATABASE_ERROR,OTHER_ERROR,result 00146 00147 @param args: complete set of field values, in .msg order 00148 @param kwds: use keyword arguments corresponding to message field names 00149 to set specific fields. 00150 """ 00151 if args or kwds: 00152 super(TranslateRecognitionIdResponse, self).__init__(*args, **kwds) 00153 #message fields cannot be None, assign default values for those that are 00154 if self.household_objects_id is None: 00155 self.household_objects_id = 0 00156 if self.ID_NOT_FOUND is None: 00157 self.ID_NOT_FOUND = 0 00158 if self.DATABASE_ERROR is None: 00159 self.DATABASE_ERROR = 0 00160 if self.OTHER_ERROR is None: 00161 self.OTHER_ERROR = 0 00162 if self.result is None: 00163 self.result = 0 00164 else: 00165 self.household_objects_id = 0 00166 self.ID_NOT_FOUND = 0 00167 self.DATABASE_ERROR = 0 00168 self.OTHER_ERROR = 0 00169 self.result = 0 00170 00171 def _get_types(self): 00172 """ 00173 internal API method 00174 """ 00175 return self._slot_types 00176 00177 def serialize(self, buff): 00178 """ 00179 serialize message into buffer 00180 @param buff: buffer 00181 @type buff: StringIO 00182 """ 00183 try: 00184 _x = self 00185 buff.write(_struct_5i.pack(_x.household_objects_id, _x.ID_NOT_FOUND, _x.DATABASE_ERROR, _x.OTHER_ERROR, _x.result)) 00186 except struct.error as se: self._check_types(se) 00187 except TypeError as te: self._check_types(te) 00188 00189 def deserialize(self, str): 00190 """ 00191 unpack serialized message in str into this message instance 00192 @param str: byte array of serialized message 00193 @type str: str 00194 """ 00195 try: 00196 end = 0 00197 _x = self 00198 start = end 00199 end += 20 00200 (_x.household_objects_id, _x.ID_NOT_FOUND, _x.DATABASE_ERROR, _x.OTHER_ERROR, _x.result,) = _struct_5i.unpack(str[start:end]) 00201 return self 00202 except struct.error as e: 00203 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00204 00205 00206 def serialize_numpy(self, buff, numpy): 00207 """ 00208 serialize message with numpy array types into buffer 00209 @param buff: buffer 00210 @type buff: StringIO 00211 @param numpy: numpy python module 00212 @type numpy module 00213 """ 00214 try: 00215 _x = self 00216 buff.write(_struct_5i.pack(_x.household_objects_id, _x.ID_NOT_FOUND, _x.DATABASE_ERROR, _x.OTHER_ERROR, _x.result)) 00217 except struct.error as se: self._check_types(se) 00218 except TypeError as te: self._check_types(te) 00219 00220 def deserialize_numpy(self, str, numpy): 00221 """ 00222 unpack serialized message in str into this message instance using numpy for array types 00223 @param str: byte array of serialized message 00224 @type str: str 00225 @param numpy: numpy python module 00226 @type numpy: module 00227 """ 00228 try: 00229 end = 0 00230 _x = self 00231 start = end 00232 end += 20 00233 (_x.household_objects_id, _x.ID_NOT_FOUND, _x.DATABASE_ERROR, _x.OTHER_ERROR, _x.result,) = _struct_5i.unpack(str[start:end]) 00234 return self 00235 except struct.error as e: 00236 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00237 00238 _struct_I = roslib.message.struct_I 00239 _struct_5i = struct.Struct("<5i") 00240 class TranslateRecognitionId(roslib.message.ServiceDefinition): 00241 _type = 'household_objects_database_msgs/TranslateRecognitionId' 00242 _md5sum = '4c59c4be3a6f662f70d4287dcaff730f' 00243 _request_class = TranslateRecognitionIdRequest 00244 _response_class = TranslateRecognitionIdResponse