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


roboframenet_msgs
Author(s): Brian Thomas
autogenerated on Fri Dec 6 2013 20:32:43