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


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