_WMPCompatibleService.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ros_rt_wmp_msgs/WMPCompatibleServiceRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class WMPCompatibleServiceRequest(genpy.Message):
00009   _md5sum = "26f4930e635da54a35b7ee39c4b7fc3a"
00010   _type = "ros_rt_wmp_msgs/WMPCompatibleServiceRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int32 dest
00013 int8  priority
00014 
00015 
00016 
00017 
00018 """
00019   __slots__ = ['dest','priority']
00020   _slot_types = ['int32','int8']
00021 
00022   def __init__(self, *args, **kwds):
00023     """
00024     Constructor. Any message fields that are implicitly/explicitly
00025     set to None will be assigned a default value. The recommend
00026     use is keyword arguments as this is more robust to future message
00027     changes.  You cannot mix in-order arguments and keyword arguments.
00028 
00029     The available fields are:
00030        dest,priority
00031 
00032     :param args: complete set of field values, in .msg order
00033     :param kwds: use keyword arguments corresponding to message field names
00034     to set specific fields.
00035     """
00036     if args or kwds:
00037       super(WMPCompatibleServiceRequest, self).__init__(*args, **kwds)
00038       #message fields cannot be None, assign default values for those that are
00039       if self.dest is None:
00040         self.dest = 0
00041       if self.priority is None:
00042         self.priority = 0
00043     else:
00044       self.dest = 0
00045       self.priority = 0
00046 
00047   def _get_types(self):
00048     """
00049     internal API method
00050     """
00051     return self._slot_types
00052 
00053   def serialize(self, buff):
00054     """
00055     serialize message into buffer
00056     :param buff: buffer, ``StringIO``
00057     """
00058     try:
00059       _x = self
00060       buff.write(_struct_ib.pack(_x.dest, _x.priority))
00061     except struct.error as se: self._check_types(se)
00062     except TypeError as te: self._check_types(te)
00063 
00064   def deserialize(self, str):
00065     """
00066     unpack serialized message in str into this message instance
00067     :param str: byte array of serialized message, ``str``
00068     """
00069     try:
00070       end = 0
00071       _x = self
00072       start = end
00073       end += 5
00074       (_x.dest, _x.priority,) = _struct_ib.unpack(str[start:end])
00075       return self
00076     except struct.error as e:
00077       raise genpy.DeserializationError(e) #most likely buffer underfill
00078 
00079 
00080   def serialize_numpy(self, buff, numpy):
00081     """
00082     serialize message with numpy array types into buffer
00083     :param buff: buffer, ``StringIO``
00084     :param numpy: numpy python module
00085     """
00086     try:
00087       _x = self
00088       buff.write(_struct_ib.pack(_x.dest, _x.priority))
00089     except struct.error as se: self._check_types(se)
00090     except TypeError as te: self._check_types(te)
00091 
00092   def deserialize_numpy(self, str, numpy):
00093     """
00094     unpack serialized message in str into this message instance using numpy for array types
00095     :param str: byte array of serialized message, ``str``
00096     :param numpy: numpy python module
00097     """
00098     try:
00099       end = 0
00100       _x = self
00101       start = end
00102       end += 5
00103       (_x.dest, _x.priority,) = _struct_ib.unpack(str[start:end])
00104       return self
00105     except struct.error as e:
00106       raise genpy.DeserializationError(e) #most likely buffer underfill
00107 
00108 _struct_I = genpy.struct_I
00109 _struct_ib = struct.Struct("<ib")
00110 """autogenerated by genpy from ros_rt_wmp_msgs/WMPCompatibleServiceResponse.msg. Do not edit."""
00111 import sys
00112 python3 = True if sys.hexversion > 0x03000000 else False
00113 import genpy
00114 import struct
00115 
00116 
00117 class WMPCompatibleServiceResponse(genpy.Message):
00118   _md5sum = "034a8e20d6a306665e3a5b340fab3f09"
00119   _type = "ros_rt_wmp_msgs/WMPCompatibleServiceResponse"
00120   _has_header = False #flag to mark the presence of a Header object
00121   _full_text = """int32 result
00122 
00123 
00124 """
00125   __slots__ = ['result']
00126   _slot_types = ['int32']
00127 
00128   def __init__(self, *args, **kwds):
00129     """
00130     Constructor. Any message fields that are implicitly/explicitly
00131     set to None will be assigned a default value. The recommend
00132     use is keyword arguments as this is more robust to future message
00133     changes.  You cannot mix in-order arguments and keyword arguments.
00134 
00135     The available fields are:
00136        result
00137 
00138     :param args: complete set of field values, in .msg order
00139     :param kwds: use keyword arguments corresponding to message field names
00140     to set specific fields.
00141     """
00142     if args or kwds:
00143       super(WMPCompatibleServiceResponse, self).__init__(*args, **kwds)
00144       #message fields cannot be None, assign default values for those that are
00145       if self.result is None:
00146         self.result = 0
00147     else:
00148       self.result = 0
00149 
00150   def _get_types(self):
00151     """
00152     internal API method
00153     """
00154     return self._slot_types
00155 
00156   def serialize(self, buff):
00157     """
00158     serialize message into buffer
00159     :param buff: buffer, ``StringIO``
00160     """
00161     try:
00162       buff.write(_struct_i.pack(self.result))
00163     except struct.error as se: self._check_types(se)
00164     except TypeError as te: self._check_types(te)
00165 
00166   def deserialize(self, str):
00167     """
00168     unpack serialized message in str into this message instance
00169     :param str: byte array of serialized message, ``str``
00170     """
00171     try:
00172       end = 0
00173       start = end
00174       end += 4
00175       (self.result,) = _struct_i.unpack(str[start:end])
00176       return self
00177     except struct.error as e:
00178       raise genpy.DeserializationError(e) #most likely buffer underfill
00179 
00180 
00181   def serialize_numpy(self, buff, numpy):
00182     """
00183     serialize message with numpy array types into buffer
00184     :param buff: buffer, ``StringIO``
00185     :param numpy: numpy python module
00186     """
00187     try:
00188       buff.write(_struct_i.pack(self.result))
00189     except struct.error as se: self._check_types(se)
00190     except TypeError as te: self._check_types(te)
00191 
00192   def deserialize_numpy(self, str, numpy):
00193     """
00194     unpack serialized message in str into this message instance using numpy for array types
00195     :param str: byte array of serialized message, ``str``
00196     :param numpy: numpy python module
00197     """
00198     try:
00199       end = 0
00200       start = end
00201       end += 4
00202       (self.result,) = _struct_i.unpack(str[start:end])
00203       return self
00204     except struct.error as e:
00205       raise genpy.DeserializationError(e) #most likely buffer underfill
00206 
00207 _struct_I = genpy.struct_I
00208 _struct_i = struct.Struct("<i")
00209 class WMPCompatibleService(object):
00210   _type          = 'ros_rt_wmp_msgs/WMPCompatibleService'
00211   _md5sum = '20fb9bf8a54a3977f123cba4efa45da0'
00212   _request_class  = WMPCompatibleServiceRequest
00213   _response_class = WMPCompatibleServiceResponse


ros_rt_wmp_msgs
Author(s): Pablo Urcola
autogenerated on Fri Jan 3 2014 12:07:44