_BehaviorInput.py
Go to the documentation of this file.
00001 """autogenerated by genpy from telekyb_srvs/BehaviorInputRequest.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 BehaviorInputRequest(genpy.Message):
00009   _md5sum = "465316e819d0d5fe468c63be4735be1a"
00010   _type = "telekyb_srvs/BehaviorInputRequest"
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(BehaviorInputRequest, 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/BehaviorInputResponse.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 BehaviorInputResponse(genpy.Message):
00142   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00143   _type = "telekyb_srvs/BehaviorInputResponse"
00144   _has_header = False #flag to mark the presence of a Header object
00145   _full_text = """
00146 
00147 """
00148   __slots__ = []
00149   _slot_types = []
00150 
00151   def __init__(self, *args, **kwds):
00152     """
00153     Constructor. Any message fields that are implicitly/explicitly
00154     set to None will be assigned a default value. The recommend
00155     use is keyword arguments as this is more robust to future message
00156     changes.  You cannot mix in-order arguments and keyword arguments.
00157 
00158     The available fields are:
00159        
00160 
00161     :param args: complete set of field values, in .msg order
00162     :param kwds: use keyword arguments corresponding to message field names
00163     to set specific fields.
00164     """
00165     if args or kwds:
00166       super(BehaviorInputResponse, self).__init__(*args, **kwds)
00167 
00168   def _get_types(self):
00169     """
00170     internal API method
00171     """
00172     return self._slot_types
00173 
00174   def serialize(self, buff):
00175     """
00176     serialize message into buffer
00177     :param buff: buffer, ``StringIO``
00178     """
00179     try:
00180       pass
00181     except struct.error as se: self._check_types(se)
00182     except TypeError as te: self._check_types(te)
00183 
00184   def deserialize(self, str):
00185     """
00186     unpack serialized message in str into this message instance
00187     :param str: byte array of serialized message, ``str``
00188     """
00189     try:
00190       end = 0
00191       return self
00192     except struct.error as e:
00193       raise genpy.DeserializationError(e) #most likely buffer underfill
00194 
00195 
00196   def serialize_numpy(self, buff, numpy):
00197     """
00198     serialize message with numpy array types into buffer
00199     :param buff: buffer, ``StringIO``
00200     :param numpy: numpy python module
00201     """
00202     try:
00203       pass
00204     except struct.error as se: self._check_types(se)
00205     except TypeError as te: self._check_types(te)
00206 
00207   def deserialize_numpy(self, str, numpy):
00208     """
00209     unpack serialized message in str into this message instance using numpy for array types
00210     :param str: byte array of serialized message, ``str``
00211     :param numpy: numpy python module
00212     """
00213     try:
00214       end = 0
00215       return self
00216     except struct.error as e:
00217       raise genpy.DeserializationError(e) #most likely buffer underfill
00218 
00219 _struct_I = genpy.struct_I
00220 class BehaviorInput(object):
00221   _type          = 'telekyb_srvs/BehaviorInput'
00222   _md5sum = '465316e819d0d5fe468c63be4735be1a'
00223   _request_class  = BehaviorInputRequest
00224   _response_class = BehaviorInputResponse
 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