_GetType.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_srvs/GetTypeRequest.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 GetTypeRequest(genpy.Message):
00009   _md5sum = "c4ecff52046eaecf0190e650b1958286"
00010   _type = "corobot_srvs/GetTypeRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 int8 index
00021 
00022 
00023 """
00024   __slots__ = ['index']
00025   _slot_types = ['int8']
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        index
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(GetTypeRequest, self).__init__(*args, **kwds)
00043       #message fields cannot be None, assign default values for those that are
00044       if self.index is None:
00045         self.index = 0
00046     else:
00047       self.index = 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.index))
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       start = end
00073       end += 1
00074       (self.index,) = _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.index))
00088     except struct.error as se: self._check_types(se)
00089     except TypeError as te: self._check_types(te)
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.index,) = _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 corobot_srvs/GetTypeResponse.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 GetTypeResponse(genpy.Message):
00116   _md5sum = "e3ab5b4c6da3cf583c5328078958d9fe"
00117   _type = "corobot_srvs/GetTypeResponse"
00118   _has_header = False #flag to mark the presence of a Header object
00119   _full_text = """
00120 
00121 
00122 int8 type
00123 
00124 
00125 """
00126   __slots__ = ['type']
00127   _slot_types = ['int8']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        type
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(GetTypeResponse, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.type is None:
00147         self.type = 0
00148     else:
00149       self.type = 0
00150 
00151   def _get_types(self):
00152     """
00153     internal API method
00154     """
00155     return self._slot_types
00156 
00157   def serialize(self, buff):
00158     """
00159     serialize message into buffer
00160     :param buff: buffer, ``StringIO``
00161     """
00162     try:
00163       buff.write(_struct_b.pack(self.type))
00164     except struct.error as se: self._check_types(se)
00165     except TypeError as te: self._check_types(te)
00166 
00167   def deserialize(self, str):
00168     """
00169     unpack serialized message in str into this message instance
00170     :param str: byte array of serialized message, ``str``
00171     """
00172     try:
00173       end = 0
00174       start = end
00175       end += 1
00176       (self.type,) = _struct_b.unpack(str[start:end])
00177       return self
00178     except struct.error as e:
00179       raise genpy.DeserializationError(e) #most likely buffer underfill
00180 
00181 
00182   def serialize_numpy(self, buff, numpy):
00183     """
00184     serialize message with numpy array types into buffer
00185     :param buff: buffer, ``StringIO``
00186     :param numpy: numpy python module
00187     """
00188     try:
00189       buff.write(_struct_b.pack(self.type))
00190     except struct.error as se: self._check_types(se)
00191     except TypeError as te: self._check_types(te)
00192 
00193   def deserialize_numpy(self, str, numpy):
00194     """
00195     unpack serialized message in str into this message instance using numpy for array types
00196     :param str: byte array of serialized message, ``str``
00197     :param numpy: numpy python module
00198     """
00199     try:
00200       end = 0
00201       start = end
00202       end += 1
00203       (self.type,) = _struct_b.unpack(str[start:end])
00204       return self
00205     except struct.error as e:
00206       raise genpy.DeserializationError(e) #most likely buffer underfill
00207 
00208 _struct_I = genpy.struct_I
00209 _struct_b = struct.Struct("<b")
00210 class GetType(object):
00211   _type          = 'corobot_srvs/GetType'
00212   _md5sum = 'db2b8ac45e492b754198d0efae3193f6'
00213   _request_class  = GetTypeRequest
00214   _response_class = GetTypeResponse


corobot_srvs
Author(s): Morgan Cormier/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:38:11