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


auction_srvs
Author(s): Joao Manuel Leitao Quintas
autogenerated on Mon Jan 6 2014 11:25:32