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


ethzasl_icp_mapper
Author(s): François Pomerleau and Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:16:21