_PanoCaptureFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pano_ros/PanoCaptureFeedback.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 PanoCaptureFeedback(genpy.Message):
00009   _md5sum = "22ff7abf8b5e4a280047b5a08afb8cf1"
00010   _type = "pano_ros/PanoCaptureFeedback"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 # Define a feedback message
00014 float32 n_captures
00015 
00016 
00017 """
00018   __slots__ = ['n_captures']
00019   _slot_types = ['float32']
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        n_captures
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(PanoCaptureFeedback, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.n_captures is None:
00039         self.n_captures = 0.
00040     else:
00041       self.n_captures = 0.
00042 
00043   def _get_types(self):
00044     """
00045     internal API method
00046     """
00047     return self._slot_types
00048 
00049   def serialize(self, buff):
00050     """
00051     serialize message into buffer
00052     :param buff: buffer, ``StringIO``
00053     """
00054     try:
00055       buff.write(_struct_f.pack(self.n_captures))
00056     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00057     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00058 
00059   def deserialize(self, str):
00060     """
00061     unpack serialized message in str into this message instance
00062     :param str: byte array of serialized message, ``str``
00063     """
00064     try:
00065       end = 0
00066       start = end
00067       end += 4
00068       (self.n_captures,) = _struct_f.unpack(str[start:end])
00069       return self
00070     except struct.error as e:
00071       raise genpy.DeserializationError(e) #most likely buffer underfill
00072 
00073 
00074   def serialize_numpy(self, buff, numpy):
00075     """
00076     serialize message with numpy array types into buffer
00077     :param buff: buffer, ``StringIO``
00078     :param numpy: numpy python module
00079     """
00080     try:
00081       buff.write(_struct_f.pack(self.n_captures))
00082     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00083     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00084 
00085   def deserialize_numpy(self, str, numpy):
00086     """
00087     unpack serialized message in str into this message instance using numpy for array types
00088     :param str: byte array of serialized message, ``str``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       end = 0
00093       start = end
00094       end += 4
00095       (self.n_captures,) = _struct_f.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 _struct_I = genpy.struct_I
00101 _struct_f = struct.Struct("<f")


pano_ros
Author(s): Ethan Rublee, Ken Conley
autogenerated on Mon Oct 6 2014 08:06:11