_ConfigGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from monocam_settler/ConfigGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import genpy
00008 
00009 class ConfigGoal(genpy.Message):
00010   _md5sum = "f2b47726560448f0dada94e01ba65594"
00011   _type = "monocam_settler/ConfigGoal"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """float64 tolerance      # Tolerance on each of the features
00014 uint8 ignore_failures  # True if we discard
00015 duration max_step      # The maximum timestep between two elements in an interval
00016 uint32 cache_size      # The size of our cache when searching for an interval
00017 
00018 """
00019   __slots__ = ['tolerance','ignore_failures','max_step','cache_size']
00020   _slot_types = ['float64','uint8','duration','uint32']
00021 
00022   def __init__(self, *args, **kwds):
00023     """
00024     Constructor. Any message fields that are implicitly/explicitly
00025     set to None will be assigned a default value. The recommend
00026     use is keyword arguments as this is more robust to future message
00027     changes.  You cannot mix in-order arguments and keyword arguments.
00028 
00029     The available fields are:
00030        tolerance,ignore_failures,max_step,cache_size
00031 
00032     :param args: complete set of field values, in .msg order
00033     :param kwds: use keyword arguments corresponding to message field names
00034     to set specific fields.
00035     """
00036     if args or kwds:
00037       super(ConfigGoal, self).__init__(*args, **kwds)
00038       #message fields cannot be None, assign default values for those that are
00039       if self.tolerance is None:
00040         self.tolerance = 0.
00041       if self.ignore_failures is None:
00042         self.ignore_failures = 0
00043       if self.max_step is None:
00044         self.max_step = genpy.Duration()
00045       if self.cache_size is None:
00046         self.cache_size = 0
00047     else:
00048       self.tolerance = 0.
00049       self.ignore_failures = 0
00050       self.max_step = genpy.Duration()
00051       self.cache_size = 0
00052 
00053   def _get_types(self):
00054     """
00055     internal API method
00056     """
00057     return self._slot_types
00058 
00059   def serialize(self, buff):
00060     """
00061     serialize message into buffer
00062     :param buff: buffer, ``StringIO``
00063     """
00064     try:
00065       _x = self
00066       buff.write(_struct_dB2iI.pack(_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size))
00067     except struct.error as se: self._check_types(se)
00068     except TypeError as te: self._check_types(te)
00069 
00070   def deserialize(self, str):
00071     """
00072     unpack serialized message in str into this message instance
00073     :param str: byte array of serialized message, ``str``
00074     """
00075     try:
00076       if self.max_step is None:
00077         self.max_step = genpy.Duration()
00078       end = 0
00079       _x = self
00080       start = end
00081       end += 21
00082       (_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size,) = _struct_dB2iI.unpack(str[start:end])
00083       self.max_step.canon()
00084       return self
00085     except struct.error as e:
00086       raise genpy.DeserializationError(e) #most likely buffer underfill
00087 
00088 
00089   def serialize_numpy(self, buff, numpy):
00090     """
00091     serialize message with numpy array types into buffer
00092     :param buff: buffer, ``StringIO``
00093     :param numpy: numpy python module
00094     """
00095     try:
00096       _x = self
00097       buff.write(_struct_dB2iI.pack(_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size))
00098     except struct.error as se: self._check_types(se)
00099     except TypeError as te: self._check_types(te)
00100 
00101   def deserialize_numpy(self, str, numpy):
00102     """
00103     unpack serialized message in str into this message instance using numpy for array types
00104     :param str: byte array of serialized message, ``str``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       if self.max_step is None:
00109         self.max_step = genpy.Duration()
00110       end = 0
00111       _x = self
00112       start = end
00113       end += 21
00114       (_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size,) = _struct_dB2iI.unpack(str[start:end])
00115       self.max_step.canon()
00116       return self
00117     except struct.error as e:
00118       raise genpy.DeserializationError(e) #most likely buffer underfill
00119 
00120 _struct_I = genpy.struct_I
00121 _struct_dB2iI = struct.Struct("<dB2iI")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


monocam_settler
Author(s): Vijay Pradeep
autogenerated on Thu Aug 15 2013 10:15:50