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


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