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


turtlebot_follower
Author(s): Tony Pratkanis
autogenerated on Mon Oct 6 2014 08:05:42