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