_BuyerForwardBidService.py
Go to the documentation of this file.
00001 """autogenerated by genmsg_py from BuyerForwardBidServiceRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004 
00005 import auction_msgs.msg
00006 import std_msgs.msg
00007 
00008 class BuyerForwardBidServiceRequest(roslib.message.Message):
00009   _md5sum = "b4c86983f75792aea5ba04c640173bff"
00010   _type = "auction_srvs/BuyerForwardBidServiceRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 string sending_node
00016 string path
00017 auction_msgs/Bid bid_data
00018 
00019 
00020 ================================================================================
00021 MSG: auction_msgs/Bid
00022 Header header
00023 string buyer_id
00024 int64 cost_distance
00025 
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data 
00030 # in a particular coordinate frame.
00031 # 
00032 # sequence ID: consecutively increasing ID 
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043 
00044 """
00045   __slots__ = ['sending_node','path','bid_data']
00046   _slot_types = ['string','string','auction_msgs/Bid']
00047 
00048   def __init__(self, *args, **kwds):
00049     """
00050     Constructor. Any message fields that are implicitly/explicitly
00051     set to None will be assigned a default value. The recommend
00052     use is keyword arguments as this is more robust to future message
00053     changes.  You cannot mix in-order arguments and keyword arguments.
00054     
00055     The available fields are:
00056        sending_node,path,bid_data
00057     
00058     @param args: complete set of field values, in .msg order
00059     @param kwds: use keyword arguments corresponding to message field names
00060     to set specific fields. 
00061     """
00062     if args or kwds:
00063       super(BuyerForwardBidServiceRequest, self).__init__(*args, **kwds)
00064       #message fields cannot be None, assign default values for those that are
00065       if self.sending_node is None:
00066         self.sending_node = ''
00067       if self.path is None:
00068         self.path = ''
00069       if self.bid_data is None:
00070         self.bid_data = auction_msgs.msg.Bid()
00071     else:
00072       self.sending_node = ''
00073       self.path = ''
00074       self.bid_data = auction_msgs.msg.Bid()
00075 
00076   def _get_types(self):
00077     """
00078     internal API method
00079     """
00080     return self._slot_types
00081 
00082   def serialize(self, buff):
00083     """
00084     serialize message into buffer
00085     @param buff: buffer
00086     @type  buff: StringIO
00087     """
00088     try:
00089       _x = self.sending_node
00090       length = len(_x)
00091       buff.write(struct.pack('<I%ss'%length, length, _x))
00092       _x = self.path
00093       length = len(_x)
00094       buff.write(struct.pack('<I%ss'%length, length, _x))
00095       _x = self
00096       buff.write(_struct_3I.pack(_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs))
00097       _x = self.bid_data.header.frame_id
00098       length = len(_x)
00099       buff.write(struct.pack('<I%ss'%length, length, _x))
00100       _x = self.bid_data.buyer_id
00101       length = len(_x)
00102       buff.write(struct.pack('<I%ss'%length, length, _x))
00103       buff.write(_struct_q.pack(self.bid_data.cost_distance))
00104     except struct.error as se: self._check_types(se)
00105     except TypeError as te: self._check_types(te)
00106 
00107   def deserialize(self, str):
00108     """
00109     unpack serialized message in str into this message instance
00110     @param str: byte array of serialized message
00111     @type  str: str
00112     """
00113     try:
00114       if self.bid_data is None:
00115         self.bid_data = auction_msgs.msg.Bid()
00116       end = 0
00117       start = end
00118       end += 4
00119       (length,) = _struct_I.unpack(str[start:end])
00120       start = end
00121       end += length
00122       self.sending_node = str[start:end]
00123       start = end
00124       end += 4
00125       (length,) = _struct_I.unpack(str[start:end])
00126       start = end
00127       end += length
00128       self.path = str[start:end]
00129       _x = self
00130       start = end
00131       end += 12
00132       (_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00133       start = end
00134       end += 4
00135       (length,) = _struct_I.unpack(str[start:end])
00136       start = end
00137       end += length
00138       self.bid_data.header.frame_id = 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.bid_data.buyer_id = str[start:end]
00145       start = end
00146       end += 8
00147       (self.bid_data.cost_distance,) = _struct_q.unpack(str[start:end])
00148       return self
00149     except struct.error as e:
00150       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00151 
00152 
00153   def serialize_numpy(self, buff, numpy):
00154     """
00155     serialize message with numpy array types into buffer
00156     @param buff: buffer
00157     @type  buff: StringIO
00158     @param numpy: numpy python module
00159     @type  numpy module
00160     """
00161     try:
00162       _x = self.sending_node
00163       length = len(_x)
00164       buff.write(struct.pack('<I%ss'%length, length, _x))
00165       _x = self.path
00166       length = len(_x)
00167       buff.write(struct.pack('<I%ss'%length, length, _x))
00168       _x = self
00169       buff.write(_struct_3I.pack(_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs))
00170       _x = self.bid_data.header.frame_id
00171       length = len(_x)
00172       buff.write(struct.pack('<I%ss'%length, length, _x))
00173       _x = self.bid_data.buyer_id
00174       length = len(_x)
00175       buff.write(struct.pack('<I%ss'%length, length, _x))
00176       buff.write(_struct_q.pack(self.bid_data.cost_distance))
00177     except struct.error as se: self._check_types(se)
00178     except TypeError as te: self._check_types(te)
00179 
00180   def deserialize_numpy(self, str, numpy):
00181     """
00182     unpack serialized message in str into this message instance using numpy for array types
00183     @param str: byte array of serialized message
00184     @type  str: str
00185     @param numpy: numpy python module
00186     @type  numpy: module
00187     """
00188     try:
00189       if self.bid_data is None:
00190         self.bid_data = auction_msgs.msg.Bid()
00191       end = 0
00192       start = end
00193       end += 4
00194       (length,) = _struct_I.unpack(str[start:end])
00195       start = end
00196       end += length
00197       self.sending_node = str[start:end]
00198       start = end
00199       end += 4
00200       (length,) = _struct_I.unpack(str[start:end])
00201       start = end
00202       end += length
00203       self.path = str[start:end]
00204       _x = self
00205       start = end
00206       end += 12
00207       (_x.bid_data.header.seq, _x.bid_data.header.stamp.secs, _x.bid_data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       self.bid_data.header.frame_id = str[start:end]
00214       start = end
00215       end += 4
00216       (length,) = _struct_I.unpack(str[start:end])
00217       start = end
00218       end += length
00219       self.bid_data.buyer_id = str[start:end]
00220       start = end
00221       end += 8
00222       (self.bid_data.cost_distance,) = _struct_q.unpack(str[start:end])
00223       return self
00224     except struct.error as e:
00225       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00226 
00227 _struct_I = roslib.message.struct_I
00228 _struct_q = struct.Struct("<q")
00229 _struct_3I = struct.Struct("<3I")
00230 """autogenerated by genmsg_py from BuyerForwardBidServiceResponse.msg. Do not edit."""
00231 import roslib.message
00232 import struct
00233 
00234 
00235 class BuyerForwardBidServiceResponse(roslib.message.Message):
00236   _md5sum = "3807fca4b87e6d8139990870471dd195"
00237   _type = "auction_srvs/BuyerForwardBidServiceResponse"
00238   _has_header = False #flag to mark the presence of a Header object
00239   _full_text = """
00240 
00241 
00242 string response_info
00243 
00244 """
00245   __slots__ = ['response_info']
00246   _slot_types = ['string']
00247 
00248   def __init__(self, *args, **kwds):
00249     """
00250     Constructor. Any message fields that are implicitly/explicitly
00251     set to None will be assigned a default value. The recommend
00252     use is keyword arguments as this is more robust to future message
00253     changes.  You cannot mix in-order arguments and keyword arguments.
00254     
00255     The available fields are:
00256        response_info
00257     
00258     @param args: complete set of field values, in .msg order
00259     @param kwds: use keyword arguments corresponding to message field names
00260     to set specific fields. 
00261     """
00262     if args or kwds:
00263       super(BuyerForwardBidServiceResponse, self).__init__(*args, **kwds)
00264       #message fields cannot be None, assign default values for those that are
00265       if self.response_info is None:
00266         self.response_info = ''
00267     else:
00268       self.response_info = ''
00269 
00270   def _get_types(self):
00271     """
00272     internal API method
00273     """
00274     return self._slot_types
00275 
00276   def serialize(self, buff):
00277     """
00278     serialize message into buffer
00279     @param buff: buffer
00280     @type  buff: StringIO
00281     """
00282     try:
00283       _x = self.response_info
00284       length = len(_x)
00285       buff.write(struct.pack('<I%ss'%length, length, _x))
00286     except struct.error as se: self._check_types(se)
00287     except TypeError as te: self._check_types(te)
00288 
00289   def deserialize(self, str):
00290     """
00291     unpack serialized message in str into this message instance
00292     @param str: byte array of serialized message
00293     @type  str: str
00294     """
00295     try:
00296       end = 0
00297       start = end
00298       end += 4
00299       (length,) = _struct_I.unpack(str[start:end])
00300       start = end
00301       end += length
00302       self.response_info = str[start:end]
00303       return self
00304     except struct.error as e:
00305       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00306 
00307 
00308   def serialize_numpy(self, buff, numpy):
00309     """
00310     serialize message with numpy array types into buffer
00311     @param buff: buffer
00312     @type  buff: StringIO
00313     @param numpy: numpy python module
00314     @type  numpy module
00315     """
00316     try:
00317       _x = self.response_info
00318       length = len(_x)
00319       buff.write(struct.pack('<I%ss'%length, length, _x))
00320     except struct.error as se: self._check_types(se)
00321     except TypeError as te: self._check_types(te)
00322 
00323   def deserialize_numpy(self, str, numpy):
00324     """
00325     unpack serialized message in str into this message instance using numpy for array types
00326     @param str: byte array of serialized message
00327     @type  str: str
00328     @param numpy: numpy python module
00329     @type  numpy: module
00330     """
00331     try:
00332       end = 0
00333       start = end
00334       end += 4
00335       (length,) = _struct_I.unpack(str[start:end])
00336       start = end
00337       end += length
00338       self.response_info = str[start:end]
00339       return self
00340     except struct.error as e:
00341       raise roslib.message.DeserializationError(e) #most likely buffer underfill
00342 
00343 _struct_I = roslib.message.struct_I
00344 class BuyerForwardBidService(roslib.message.ServiceDefinition):
00345   _type          = 'auction_srvs/BuyerForwardBidService'
00346   _md5sum = 'cbc49abd05aae81cb92ec30f51b288e8'
00347   _request_class  = BuyerForwardBidServiceRequest
00348   _response_class = BuyerForwardBidServiceResponse


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