00001 """autogenerated by genmsg_py from ListCollectionsRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ListCollectionsRequest(roslib.message.Message):
00007 _md5sum = "44f07d812d03f1115371671aefc84215"
00008 _type = "warehouse/ListCollectionsRequest"
00009 _has_header = False
00010 _full_text = """string db_name
00011
00012 """
00013 __slots__ = ['db_name']
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 db_name
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(ListCollectionsRequest, self).__init__(*args, **kwds)
00032
00033 if self.db_name is None:
00034 self.db_name = ''
00035 else:
00036 self.db_name = ''
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.db_name
00052 length = len(_x)
00053 buff.write(struct.pack('<I%ss'%length, length, _x))
00054 except struct.error, se: self._check_types(se)
00055 except TypeError, 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.db_name = str[start:end]
00071 return self
00072 except struct.error, e:
00073 raise roslib.message.DeserializationError(e)
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.db_name
00086 length = len(_x)
00087 buff.write(struct.pack('<I%ss'%length, length, _x))
00088 except struct.error, se: self._check_types(se)
00089 except TypeError, 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.db_name = str[start:end]
00107 return self
00108 except struct.error, e:
00109 raise roslib.message.DeserializationError(e)
00110
00111 _struct_I = roslib.message.struct_I
00112 """autogenerated by genmsg_py from ListCollectionsResponse.msg. Do not edit."""
00113 import roslib.message
00114 import struct
00115
00116
00117 class ListCollectionsResponse(roslib.message.Message):
00118 _md5sum = "95ee24386c692082eeabf00aeb27a8d1"
00119 _type = "warehouse/ListCollectionsResponse"
00120 _has_header = False
00121 _full_text = """bool db_exists
00122 string[] collections
00123
00124
00125 """
00126 __slots__ = ['db_exists','collections']
00127 _slot_types = ['bool','string[]']
00128
00129 def __init__(self, *args, **kwds):
00130 """
00131 Constructor. Any message fields that are implicitly/explicitly
00132 set to None will be assigned a default value. The recommend
00133 use is keyword arguments as this is more robust to future message
00134 changes. You cannot mix in-order arguments and keyword arguments.
00135
00136 The available fields are:
00137 db_exists,collections
00138
00139 @param args: complete set of field values, in .msg order
00140 @param kwds: use keyword arguments corresponding to message field names
00141 to set specific fields.
00142 """
00143 if args or kwds:
00144 super(ListCollectionsResponse, self).__init__(*args, **kwds)
00145
00146 if self.db_exists is None:
00147 self.db_exists = False
00148 if self.collections is None:
00149 self.collections = []
00150 else:
00151 self.db_exists = False
00152 self.collections = []
00153
00154 def _get_types(self):
00155 """
00156 internal API method
00157 """
00158 return self._slot_types
00159
00160 def serialize(self, buff):
00161 """
00162 serialize message into buffer
00163 @param buff: buffer
00164 @type buff: StringIO
00165 """
00166 try:
00167 buff.write(_struct_B.pack(self.db_exists))
00168 length = len(self.collections)
00169 buff.write(_struct_I.pack(length))
00170 for val1 in self.collections:
00171 length = len(val1)
00172 buff.write(struct.pack('<I%ss'%length, length, val1))
00173 except struct.error, se: self._check_types(se)
00174 except TypeError, te: self._check_types(te)
00175
00176 def deserialize(self, str):
00177 """
00178 unpack serialized message in str into this message instance
00179 @param str: byte array of serialized message
00180 @type str: str
00181 """
00182 try:
00183 end = 0
00184 start = end
00185 end += 1
00186 (self.db_exists,) = _struct_B.unpack(str[start:end])
00187 self.db_exists = bool(self.db_exists)
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 self.collections = []
00192 for i in xrange(0, length):
00193 start = end
00194 end += 4
00195 (length,) = _struct_I.unpack(str[start:end])
00196 start = end
00197 end += length
00198 val1 = str[start:end]
00199 self.collections.append(val1)
00200 return self
00201 except struct.error, e:
00202 raise roslib.message.DeserializationError(e)
00203
00204
00205 def serialize_numpy(self, buff, numpy):
00206 """
00207 serialize message with numpy array types into buffer
00208 @param buff: buffer
00209 @type buff: StringIO
00210 @param numpy: numpy python module
00211 @type numpy module
00212 """
00213 try:
00214 buff.write(_struct_B.pack(self.db_exists))
00215 length = len(self.collections)
00216 buff.write(_struct_I.pack(length))
00217 for val1 in self.collections:
00218 length = len(val1)
00219 buff.write(struct.pack('<I%ss'%length, length, val1))
00220 except struct.error, se: self._check_types(se)
00221 except TypeError, te: self._check_types(te)
00222
00223 def deserialize_numpy(self, str, numpy):
00224 """
00225 unpack serialized message in str into this message instance using numpy for array types
00226 @param str: byte array of serialized message
00227 @type str: str
00228 @param numpy: numpy python module
00229 @type numpy: module
00230 """
00231 try:
00232 end = 0
00233 start = end
00234 end += 1
00235 (self.db_exists,) = _struct_B.unpack(str[start:end])
00236 self.db_exists = bool(self.db_exists)
00237 start = end
00238 end += 4
00239 (length,) = _struct_I.unpack(str[start:end])
00240 self.collections = []
00241 for i in xrange(0, length):
00242 start = end
00243 end += 4
00244 (length,) = _struct_I.unpack(str[start:end])
00245 start = end
00246 end += length
00247 val1 = str[start:end]
00248 self.collections.append(val1)
00249 return self
00250 except struct.error, e:
00251 raise roslib.message.DeserializationError(e)
00252
00253 _struct_I = roslib.message.struct_I
00254 _struct_B = struct.Struct("<B")
00255 class ListCollections(roslib.message.ServiceDefinition):
00256 _type = 'warehouse/ListCollections'
00257 _md5sum = 'ff488a0c7b8202d280e8841c2b4d4248'
00258 _request_class = ListCollectionsRequest
00259 _response_class = ListCollectionsResponse