00001 """autogenerated by genmsg_py from AuctionServiceRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import auction_msgs.msg
00007 import roslib.rostime
00008 import std_msgs.msg
00009
00010 class AuctionServiceRequest(roslib.message.Message):
00011 _md5sum = "71cdc8b8f8b1a628ff5e78f4bb4202a8"
00012 _type = "auction_srvs/AuctionServiceRequest"
00013 _has_header = False
00014 _full_text = """
00015
00016
00017 string role
00018 string auction_type
00019 string sending_node
00020 string nodes_collected
00021 auction_msgs/Auction auction_data
00022
00023
00024 ================================================================================
00025 MSG: auction_msgs/Auction
00026 Header header
00027 string command
00028 string task_type_name
00029 string subject
00030 string metrics
00031 duration length
00032 geometry_msgs/Point task_location
00033
00034 ================================================================================
00035 MSG: std_msgs/Header
00036 # Standard metadata for higher-level stamped data types.
00037 # This is generally used to communicate timestamped data
00038 # in a particular coordinate frame.
00039 #
00040 # sequence ID: consecutively increasing ID
00041 uint32 seq
00042 #Two-integer timestamp that is expressed as:
00043 # * stamp.secs: seconds (stamp_secs) since epoch
00044 # * stamp.nsecs: nanoseconds since stamp_secs
00045 # time-handling sugar is provided by the client library
00046 time stamp
00047 #Frame this data is associated with
00048 # 0: no frame
00049 # 1: global frame
00050 string frame_id
00051
00052 ================================================================================
00053 MSG: geometry_msgs/Point
00054 # This contains the position of a point in free space
00055 float64 x
00056 float64 y
00057 float64 z
00058
00059 """
00060 __slots__ = ['role','auction_type','sending_node','nodes_collected','auction_data']
00061 _slot_types = ['string','string','string','string','auction_msgs/Auction']
00062
00063 def __init__(self, *args, **kwds):
00064 """
00065 Constructor. Any message fields that are implicitly/explicitly
00066 set to None will be assigned a default value. The recommend
00067 use is keyword arguments as this is more robust to future message
00068 changes. You cannot mix in-order arguments and keyword arguments.
00069
00070 The available fields are:
00071 role,auction_type,sending_node,nodes_collected,auction_data
00072
00073 @param args: complete set of field values, in .msg order
00074 @param kwds: use keyword arguments corresponding to message field names
00075 to set specific fields.
00076 """
00077 if args or kwds:
00078 super(AuctionServiceRequest, self).__init__(*args, **kwds)
00079
00080 if self.role is None:
00081 self.role = ''
00082 if self.auction_type is None:
00083 self.auction_type = ''
00084 if self.sending_node is None:
00085 self.sending_node = ''
00086 if self.nodes_collected is None:
00087 self.nodes_collected = ''
00088 if self.auction_data is None:
00089 self.auction_data = auction_msgs.msg.Auction()
00090 else:
00091 self.role = ''
00092 self.auction_type = ''
00093 self.sending_node = ''
00094 self.nodes_collected = ''
00095 self.auction_data = auction_msgs.msg.Auction()
00096
00097 def _get_types(self):
00098 """
00099 internal API method
00100 """
00101 return self._slot_types
00102
00103 def serialize(self, buff):
00104 """
00105 serialize message into buffer
00106 @param buff: buffer
00107 @type buff: StringIO
00108 """
00109 try:
00110 _x = self.role
00111 length = len(_x)
00112 buff.write(struct.pack('<I%ss'%length, length, _x))
00113 _x = self.auction_type
00114 length = len(_x)
00115 buff.write(struct.pack('<I%ss'%length, length, _x))
00116 _x = self.sending_node
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self.nodes_collected
00120 length = len(_x)
00121 buff.write(struct.pack('<I%ss'%length, length, _x))
00122 _x = self
00123 buff.write(_struct_3I.pack(_x.auction_data.header.seq, _x.auction_data.header.stamp.secs, _x.auction_data.header.stamp.nsecs))
00124 _x = self.auction_data.header.frame_id
00125 length = len(_x)
00126 buff.write(struct.pack('<I%ss'%length, length, _x))
00127 _x = self.auction_data.command
00128 length = len(_x)
00129 buff.write(struct.pack('<I%ss'%length, length, _x))
00130 _x = self.auction_data.task_type_name
00131 length = len(_x)
00132 buff.write(struct.pack('<I%ss'%length, length, _x))
00133 _x = self.auction_data.subject
00134 length = len(_x)
00135 buff.write(struct.pack('<I%ss'%length, length, _x))
00136 _x = self.auction_data.metrics
00137 length = len(_x)
00138 buff.write(struct.pack('<I%ss'%length, length, _x))
00139 _x = self
00140 buff.write(_struct_2i3d.pack(_x.auction_data.length.secs, _x.auction_data.length.nsecs, _x.auction_data.task_location.x, _x.auction_data.task_location.y, _x.auction_data.task_location.z))
00141 except struct.error as se: self._check_types(se)
00142 except TypeError as te: self._check_types(te)
00143
00144 def deserialize(self, str):
00145 """
00146 unpack serialized message in str into this message instance
00147 @param str: byte array of serialized message
00148 @type str: str
00149 """
00150 try:
00151 if self.auction_data is None:
00152 self.auction_data = auction_msgs.msg.Auction()
00153 end = 0
00154 start = end
00155 end += 4
00156 (length,) = _struct_I.unpack(str[start:end])
00157 start = end
00158 end += length
00159 self.role = str[start:end]
00160 start = end
00161 end += 4
00162 (length,) = _struct_I.unpack(str[start:end])
00163 start = end
00164 end += length
00165 self.auction_type = str[start:end]
00166 start = end
00167 end += 4
00168 (length,) = _struct_I.unpack(str[start:end])
00169 start = end
00170 end += length
00171 self.sending_node = str[start:end]
00172 start = end
00173 end += 4
00174 (length,) = _struct_I.unpack(str[start:end])
00175 start = end
00176 end += length
00177 self.nodes_collected = str[start:end]
00178 _x = self
00179 start = end
00180 end += 12
00181 (_x.auction_data.header.seq, _x.auction_data.header.stamp.secs, _x.auction_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00182 start = end
00183 end += 4
00184 (length,) = _struct_I.unpack(str[start:end])
00185 start = end
00186 end += length
00187 self.auction_data.header.frame_id = str[start:end]
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 start = end
00192 end += length
00193 self.auction_data.command = str[start:end]
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 start = end
00198 end += length
00199 self.auction_data.task_type_name = str[start:end]
00200 start = end
00201 end += 4
00202 (length,) = _struct_I.unpack(str[start:end])
00203 start = end
00204 end += length
00205 self.auction_data.subject = str[start:end]
00206 start = end
00207 end += 4
00208 (length,) = _struct_I.unpack(str[start:end])
00209 start = end
00210 end += length
00211 self.auction_data.metrics = str[start:end]
00212 _x = self
00213 start = end
00214 end += 32
00215 (_x.auction_data.length.secs, _x.auction_data.length.nsecs, _x.auction_data.task_location.x, _x.auction_data.task_location.y, _x.auction_data.task_location.z,) = _struct_2i3d.unpack(str[start:end])
00216 return self
00217 except struct.error as e:
00218 raise roslib.message.DeserializationError(e)
00219
00220
00221 def serialize_numpy(self, buff, numpy):
00222 """
00223 serialize message with numpy array types into buffer
00224 @param buff: buffer
00225 @type buff: StringIO
00226 @param numpy: numpy python module
00227 @type numpy module
00228 """
00229 try:
00230 _x = self.role
00231 length = len(_x)
00232 buff.write(struct.pack('<I%ss'%length, length, _x))
00233 _x = self.auction_type
00234 length = len(_x)
00235 buff.write(struct.pack('<I%ss'%length, length, _x))
00236 _x = self.sending_node
00237 length = len(_x)
00238 buff.write(struct.pack('<I%ss'%length, length, _x))
00239 _x = self.nodes_collected
00240 length = len(_x)
00241 buff.write(struct.pack('<I%ss'%length, length, _x))
00242 _x = self
00243 buff.write(_struct_3I.pack(_x.auction_data.header.seq, _x.auction_data.header.stamp.secs, _x.auction_data.header.stamp.nsecs))
00244 _x = self.auction_data.header.frame_id
00245 length = len(_x)
00246 buff.write(struct.pack('<I%ss'%length, length, _x))
00247 _x = self.auction_data.command
00248 length = len(_x)
00249 buff.write(struct.pack('<I%ss'%length, length, _x))
00250 _x = self.auction_data.task_type_name
00251 length = len(_x)
00252 buff.write(struct.pack('<I%ss'%length, length, _x))
00253 _x = self.auction_data.subject
00254 length = len(_x)
00255 buff.write(struct.pack('<I%ss'%length, length, _x))
00256 _x = self.auction_data.metrics
00257 length = len(_x)
00258 buff.write(struct.pack('<I%ss'%length, length, _x))
00259 _x = self
00260 buff.write(_struct_2i3d.pack(_x.auction_data.length.secs, _x.auction_data.length.nsecs, _x.auction_data.task_location.x, _x.auction_data.task_location.y, _x.auction_data.task_location.z))
00261 except struct.error as se: self._check_types(se)
00262 except TypeError as te: self._check_types(te)
00263
00264 def deserialize_numpy(self, str, numpy):
00265 """
00266 unpack serialized message in str into this message instance using numpy for array types
00267 @param str: byte array of serialized message
00268 @type str: str
00269 @param numpy: numpy python module
00270 @type numpy: module
00271 """
00272 try:
00273 if self.auction_data is None:
00274 self.auction_data = auction_msgs.msg.Auction()
00275 end = 0
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 start = end
00280 end += length
00281 self.role = str[start:end]
00282 start = end
00283 end += 4
00284 (length,) = _struct_I.unpack(str[start:end])
00285 start = end
00286 end += length
00287 self.auction_type = str[start:end]
00288 start = end
00289 end += 4
00290 (length,) = _struct_I.unpack(str[start:end])
00291 start = end
00292 end += length
00293 self.sending_node = str[start:end]
00294 start = end
00295 end += 4
00296 (length,) = _struct_I.unpack(str[start:end])
00297 start = end
00298 end += length
00299 self.nodes_collected = str[start:end]
00300 _x = self
00301 start = end
00302 end += 12
00303 (_x.auction_data.header.seq, _x.auction_data.header.stamp.secs, _x.auction_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 self.auction_data.header.frame_id = str[start:end]
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 self.auction_data.command = str[start:end]
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 self.auction_data.task_type_name = str[start:end]
00322 start = end
00323 end += 4
00324 (length,) = _struct_I.unpack(str[start:end])
00325 start = end
00326 end += length
00327 self.auction_data.subject = str[start:end]
00328 start = end
00329 end += 4
00330 (length,) = _struct_I.unpack(str[start:end])
00331 start = end
00332 end += length
00333 self.auction_data.metrics = str[start:end]
00334 _x = self
00335 start = end
00336 end += 32
00337 (_x.auction_data.length.secs, _x.auction_data.length.nsecs, _x.auction_data.task_location.x, _x.auction_data.task_location.y, _x.auction_data.task_location.z,) = _struct_2i3d.unpack(str[start:end])
00338 return self
00339 except struct.error as e:
00340 raise roslib.message.DeserializationError(e)
00341
00342 _struct_I = roslib.message.struct_I
00343 _struct_3I = struct.Struct("<3I")
00344 _struct_2i3d = struct.Struct("<2i3d")
00345 """autogenerated by genmsg_py from AuctionServiceResponse.msg. Do not edit."""
00346 import roslib.message
00347 import struct
00348
00349 import auction_msgs.msg
00350 import std_msgs.msg
00351
00352 class AuctionServiceResponse(roslib.message.Message):
00353 _md5sum = "60191484f19ef1e101f27cfcfa9ff2c2"
00354 _type = "auction_srvs/AuctionServiceResponse"
00355 _has_header = False
00356 _full_text = """
00357
00358
00359 string response_info
00360 auction_msgs/Bid bid_data
00361
00362 ================================================================================
00363 MSG: auction_msgs/Bid
00364 Header header
00365 string buyer_id
00366 int64 cost_distance
00367
00368 ================================================================================
00369 MSG: std_msgs/Header
00370 # Standard metadata for higher-level stamped data types.
00371 # This is generally used to communicate timestamped data
00372 # in a particular coordinate frame.
00373 #
00374 # sequence ID: consecutively increasing ID
00375 uint32 seq
00376 #Two-integer timestamp that is expressed as:
00377 # * stamp.secs: seconds (stamp_secs) since epoch
00378 # * stamp.nsecs: nanoseconds since stamp_secs
00379 # time-handling sugar is provided by the client library
00380 time stamp
00381 #Frame this data is associated with
00382 # 0: no frame
00383 # 1: global frame
00384 string frame_id
00385
00386 """
00387 __slots__ = ['response_info','bid_data']
00388 _slot_types = ['string','auction_msgs/Bid']
00389
00390 def __init__(self, *args, **kwds):
00391 """
00392 Constructor. Any message fields that are implicitly/explicitly
00393 set to None will be assigned a default value. The recommend
00394 use is keyword arguments as this is more robust to future message
00395 changes. You cannot mix in-order arguments and keyword arguments.
00396
00397 The available fields are:
00398 response_info,bid_data
00399
00400 @param args: complete set of field values, in .msg order
00401 @param kwds: use keyword arguments corresponding to message field names
00402 to set specific fields.
00403 """
00404 if args or kwds:
00405 super(AuctionServiceResponse, self).__init__(*args, **kwds)
00406
00407 if self.response_info is None:
00408 self.response_info = ''
00409 if self.bid_data is None:
00410 self.bid_data = auction_msgs.msg.Bid()
00411 else:
00412 self.response_info = ''
00413 self.bid_data = auction_msgs.msg.Bid()
00414
00415 def _get_types(self):
00416 """
00417 internal API method
00418 """
00419 return self._slot_types
00420
00421 def serialize(self, buff):
00422 """
00423 serialize message into buffer
00424 @param buff: buffer
00425 @type buff: StringIO
00426 """
00427 try:
00428 _x = self.response_info
00429 length = len(_x)
00430 buff.write(struct.pack('<I%ss'%length, length, _x))
00431 _x = self
00432 buff.write(_struct_3I.pack(_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs))
00433 _x = self.bid_data.header.frame_id
00434 length = len(_x)
00435 buff.write(struct.pack('<I%ss'%length, length, _x))
00436 _x = self.bid_data.buyer_id
00437 length = len(_x)
00438 buff.write(struct.pack('<I%ss'%length, length, _x))
00439 buff.write(_struct_q.pack(self.bid_data.cost_distance))
00440 except struct.error as se: self._check_types(se)
00441 except TypeError as te: self._check_types(te)
00442
00443 def deserialize(self, str):
00444 """
00445 unpack serialized message in str into this message instance
00446 @param str: byte array of serialized message
00447 @type str: str
00448 """
00449 try:
00450 if self.bid_data is None:
00451 self.bid_data = auction_msgs.msg.Bid()
00452 end = 0
00453 start = end
00454 end += 4
00455 (length,) = _struct_I.unpack(str[start:end])
00456 start = end
00457 end += length
00458 self.response_info = str[start:end]
00459 _x = self
00460 start = end
00461 end += 12
00462 (_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00463 start = end
00464 end += 4
00465 (length,) = _struct_I.unpack(str[start:end])
00466 start = end
00467 end += length
00468 self.bid_data.header.frame_id = str[start:end]
00469 start = end
00470 end += 4
00471 (length,) = _struct_I.unpack(str[start:end])
00472 start = end
00473 end += length
00474 self.bid_data.buyer_id = str[start:end]
00475 start = end
00476 end += 8
00477 (self.bid_data.cost_distance,) = _struct_q.unpack(str[start:end])
00478 return self
00479 except struct.error as e:
00480 raise roslib.message.DeserializationError(e)
00481
00482
00483 def serialize_numpy(self, buff, numpy):
00484 """
00485 serialize message with numpy array types into buffer
00486 @param buff: buffer
00487 @type buff: StringIO
00488 @param numpy: numpy python module
00489 @type numpy module
00490 """
00491 try:
00492 _x = self.response_info
00493 length = len(_x)
00494 buff.write(struct.pack('<I%ss'%length, length, _x))
00495 _x = self
00496 buff.write(_struct_3I.pack(_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs))
00497 _x = self.bid_data.header.frame_id
00498 length = len(_x)
00499 buff.write(struct.pack('<I%ss'%length, length, _x))
00500 _x = self.bid_data.buyer_id
00501 length = len(_x)
00502 buff.write(struct.pack('<I%ss'%length, length, _x))
00503 buff.write(_struct_q.pack(self.bid_data.cost_distance))
00504 except struct.error as se: self._check_types(se)
00505 except TypeError as te: self._check_types(te)
00506
00507 def deserialize_numpy(self, str, numpy):
00508 """
00509 unpack serialized message in str into this message instance using numpy for array types
00510 @param str: byte array of serialized message
00511 @type str: str
00512 @param numpy: numpy python module
00513 @type numpy: module
00514 """
00515 try:
00516 if self.bid_data is None:
00517 self.bid_data = auction_msgs.msg.Bid()
00518 end = 0
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 start = end
00523 end += length
00524 self.response_info = str[start:end]
00525 _x = self
00526 start = end
00527 end += 12
00528 (_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00529 start = end
00530 end += 4
00531 (length,) = _struct_I.unpack(str[start:end])
00532 start = end
00533 end += length
00534 self.bid_data.header.frame_id = str[start:end]
00535 start = end
00536 end += 4
00537 (length,) = _struct_I.unpack(str[start:end])
00538 start = end
00539 end += length
00540 self.bid_data.buyer_id = str[start:end]
00541 start = end
00542 end += 8
00543 (self.bid_data.cost_distance,) = _struct_q.unpack(str[start:end])
00544 return self
00545 except struct.error as e:
00546 raise roslib.message.DeserializationError(e)
00547
00548 _struct_I = roslib.message.struct_I
00549 _struct_q = struct.Struct("<q")
00550 _struct_3I = struct.Struct("<3I")
00551 class AuctionService(roslib.message.ServiceDefinition):
00552 _type = 'auction_srvs/AuctionService'
00553 _md5sum = 'd6b81557d076b0cba63ad79512801bd6'
00554 _request_class = AuctionServiceRequest
00555 _response_class = AuctionServiceResponse