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