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


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