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