_GetOptionMapping.py
Go to the documentation of this file.
00001 """autogenerated by genpy from telekyb_srvs/GetOptionMappingRequest.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 GetOptionMappingRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "telekyb_srvs/GetOptionMappingRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 """
00054   __slots__ = []
00055   _slot_types = []
00056 
00057   def __init__(self, *args, **kwds):
00058     """
00059     Constructor. Any message fields that are implicitly/explicitly
00060     set to None will be assigned a default value. The recommend
00061     use is keyword arguments as this is more robust to future message
00062     changes.  You cannot mix in-order arguments and keyword arguments.
00063 
00064     The available fields are:
00065        
00066 
00067     :param args: complete set of field values, in .msg order
00068     :param kwds: use keyword arguments corresponding to message field names
00069     to set specific fields.
00070     """
00071     if args or kwds:
00072       super(GetOptionMappingRequest, self).__init__(*args, **kwds)
00073 
00074   def _get_types(self):
00075     """
00076     internal API method
00077     """
00078     return self._slot_types
00079 
00080   def serialize(self, buff):
00081     """
00082     serialize message into buffer
00083     :param buff: buffer, ``StringIO``
00084     """
00085     try:
00086       pass
00087     except struct.error as se: self._check_types(se)
00088     except TypeError as te: self._check_types(te)
00089 
00090   def deserialize(self, str):
00091     """
00092     unpack serialized message in str into this message instance
00093     :param str: byte array of serialized message, ``str``
00094     """
00095     try:
00096       end = 0
00097       return self
00098     except struct.error as e:
00099       raise genpy.DeserializationError(e) #most likely buffer underfill
00100 
00101 
00102   def serialize_numpy(self, buff, numpy):
00103     """
00104     serialize message with numpy array types into buffer
00105     :param buff: buffer, ``StringIO``
00106     :param numpy: numpy python module
00107     """
00108     try:
00109       pass
00110     except struct.error as se: self._check_types(se)
00111     except TypeError as te: self._check_types(te)
00112 
00113   def deserialize_numpy(self, str, numpy):
00114     """
00115     unpack serialized message in str into this message instance using numpy for array types
00116     :param str: byte array of serialized message, ``str``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       end = 0
00121       return self
00122     except struct.error as e:
00123       raise genpy.DeserializationError(e) #most likely buffer underfill
00124 
00125 _struct_I = genpy.struct_I
00126 """autogenerated by genpy from telekyb_srvs/GetOptionMappingResponse.msg. Do not edit."""
00127 import sys
00128 python3 = True if sys.hexversion > 0x03000000 else False
00129 import genpy
00130 import struct
00131 
00132 
00133 class GetOptionMappingResponse(genpy.Message):
00134   _md5sum = "e24d97232292d296762123941f6fd666"
00135   _type = "telekyb_srvs/GetOptionMappingResponse"
00136   _has_header = False #flag to mark the presence of a Header object
00137   _full_text = """uint32[] types
00138 string[] names
00139 
00140 
00141 """
00142   __slots__ = ['types','names']
00143   _slot_types = ['uint32[]','string[]']
00144 
00145   def __init__(self, *args, **kwds):
00146     """
00147     Constructor. Any message fields that are implicitly/explicitly
00148     set to None will be assigned a default value. The recommend
00149     use is keyword arguments as this is more robust to future message
00150     changes.  You cannot mix in-order arguments and keyword arguments.
00151 
00152     The available fields are:
00153        types,names
00154 
00155     :param args: complete set of field values, in .msg order
00156     :param kwds: use keyword arguments corresponding to message field names
00157     to set specific fields.
00158     """
00159     if args or kwds:
00160       super(GetOptionMappingResponse, self).__init__(*args, **kwds)
00161       #message fields cannot be None, assign default values for those that are
00162       if self.types is None:
00163         self.types = []
00164       if self.names is None:
00165         self.names = []
00166     else:
00167       self.types = []
00168       self.names = []
00169 
00170   def _get_types(self):
00171     """
00172     internal API method
00173     """
00174     return self._slot_types
00175 
00176   def serialize(self, buff):
00177     """
00178     serialize message into buffer
00179     :param buff: buffer, ``StringIO``
00180     """
00181     try:
00182       length = len(self.types)
00183       buff.write(_struct_I.pack(length))
00184       pattern = '<%sI'%length
00185       buff.write(struct.pack(pattern, *self.types))
00186       length = len(self.names)
00187       buff.write(_struct_I.pack(length))
00188       for val1 in self.names:
00189         length = len(val1)
00190         if python3 or type(val1) == unicode:
00191           val1 = val1.encode('utf-8')
00192           length = len(val1)
00193         buff.write(struct.pack('<I%ss'%length, length, val1))
00194     except struct.error as se: self._check_types(se)
00195     except TypeError as te: self._check_types(te)
00196 
00197   def deserialize(self, str):
00198     """
00199     unpack serialized message in str into this message instance
00200     :param str: byte array of serialized message, ``str``
00201     """
00202     try:
00203       end = 0
00204       start = end
00205       end += 4
00206       (length,) = _struct_I.unpack(str[start:end])
00207       pattern = '<%sI'%length
00208       start = end
00209       end += struct.calcsize(pattern)
00210       self.types = struct.unpack(pattern, str[start:end])
00211       start = end
00212       end += 4
00213       (length,) = _struct_I.unpack(str[start:end])
00214       self.names = []
00215       for i in range(0, length):
00216         start = end
00217         end += 4
00218         (length,) = _struct_I.unpack(str[start:end])
00219         start = end
00220         end += length
00221         if python3:
00222           val1 = str[start:end].decode('utf-8')
00223         else:
00224           val1 = str[start:end]
00225         self.names.append(val1)
00226       return self
00227     except struct.error as e:
00228       raise genpy.DeserializationError(e) #most likely buffer underfill
00229 
00230 
00231   def serialize_numpy(self, buff, numpy):
00232     """
00233     serialize message with numpy array types into buffer
00234     :param buff: buffer, ``StringIO``
00235     :param numpy: numpy python module
00236     """
00237     try:
00238       length = len(self.types)
00239       buff.write(_struct_I.pack(length))
00240       pattern = '<%sI'%length
00241       buff.write(self.types.tostring())
00242       length = len(self.names)
00243       buff.write(_struct_I.pack(length))
00244       for val1 in self.names:
00245         length = len(val1)
00246         if python3 or type(val1) == unicode:
00247           val1 = val1.encode('utf-8')
00248           length = len(val1)
00249         buff.write(struct.pack('<I%ss'%length, length, val1))
00250     except struct.error as se: self._check_types(se)
00251     except TypeError as te: self._check_types(te)
00252 
00253   def deserialize_numpy(self, str, numpy):
00254     """
00255     unpack serialized message in str into this message instance using numpy for array types
00256     :param str: byte array of serialized message, ``str``
00257     :param numpy: numpy python module
00258     """
00259     try:
00260       end = 0
00261       start = end
00262       end += 4
00263       (length,) = _struct_I.unpack(str[start:end])
00264       pattern = '<%sI'%length
00265       start = end
00266       end += struct.calcsize(pattern)
00267       self.types = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00268       start = end
00269       end += 4
00270       (length,) = _struct_I.unpack(str[start:end])
00271       self.names = []
00272       for i in range(0, length):
00273         start = end
00274         end += 4
00275         (length,) = _struct_I.unpack(str[start:end])
00276         start = end
00277         end += length
00278         if python3:
00279           val1 = str[start:end].decode('utf-8')
00280         else:
00281           val1 = str[start:end]
00282         self.names.append(val1)
00283       return self
00284     except struct.error as e:
00285       raise genpy.DeserializationError(e) #most likely buffer underfill
00286 
00287 _struct_I = genpy.struct_I
00288 class GetOptionMapping(object):
00289   _type          = 'telekyb_srvs/GetOptionMapping'
00290   _md5sum = 'e24d97232292d296762123941f6fd666'
00291   _request_class  = GetOptionMappingRequest
00292   _response_class = GetOptionMappingResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


telekyb_srvs
Author(s): Dr. Antonio Franchi and Martin Riedel
autogenerated on Mon Nov 11 2013 11:12:21