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