00001 """autogenerated by genmsg_py from ConfigGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006
00007 class ConfigGoal(roslib.message.Message):
00008 _md5sum = "f2b47726560448f0dada94e01ba65594"
00009 _type = "monocam_settler/ConfigGoal"
00010 _has_header = False
00011 _full_text = """float64 tolerance # Tolerance on each of the features
00012 uint8 ignore_failures # True if we discard
00013 duration max_step # The maximum timestep between two elements in an interval
00014 uint32 cache_size # The size of our cache when searching for an interval
00015
00016 """
00017 __slots__ = ['tolerance','ignore_failures','max_step','cache_size']
00018 _slot_types = ['float64','uint8','duration','uint32']
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 tolerance,ignore_failures,max_step,cache_size
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(ConfigGoal, self).__init__(*args, **kwds)
00036
00037 if self.tolerance is None:
00038 self.tolerance = 0.
00039 if self.ignore_failures is None:
00040 self.ignore_failures = 0
00041 if self.max_step is None:
00042 self.max_step = roslib.rostime.Duration()
00043 if self.cache_size is None:
00044 self.cache_size = 0
00045 else:
00046 self.tolerance = 0.
00047 self.ignore_failures = 0
00048 self.max_step = roslib.rostime.Duration()
00049 self.cache_size = 0
00050
00051 def _get_types(self):
00052 """
00053 internal API method
00054 """
00055 return self._slot_types
00056
00057 def serialize(self, buff):
00058 """
00059 serialize message into buffer
00060 @param buff: buffer
00061 @type buff: StringIO
00062 """
00063 try:
00064 _x = self
00065 buff.write(_struct_dB2iI.pack(_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size))
00066 except struct.error, se: self._check_types(se)
00067 except TypeError, te: self._check_types(te)
00068
00069 def deserialize(self, str):
00070 """
00071 unpack serialized message in str into this message instance
00072 @param str: byte array of serialized message
00073 @type str: str
00074 """
00075 try:
00076 if self.max_step is None:
00077 self.max_step = roslib.rostime.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, e:
00086 raise roslib.message.DeserializationError(e)
00087
00088
00089 def serialize_numpy(self, buff, numpy):
00090 """
00091 serialize message with numpy array types into buffer
00092 @param buff: buffer
00093 @type buff: StringIO
00094 @param numpy: numpy python module
00095 @type numpy module
00096 """
00097 try:
00098 _x = self
00099 buff.write(_struct_dB2iI.pack(_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size))
00100 except struct.error, se: self._check_types(se)
00101 except TypeError, te: self._check_types(te)
00102
00103 def deserialize_numpy(self, str, numpy):
00104 """
00105 unpack serialized message in str into this message instance using numpy for array types
00106 @param str: byte array of serialized message
00107 @type str: str
00108 @param numpy: numpy python module
00109 @type numpy: module
00110 """
00111 try:
00112 if self.max_step is None:
00113 self.max_step = roslib.rostime.Duration()
00114 end = 0
00115 _x = self
00116 start = end
00117 end += 21
00118 (_x.tolerance, _x.ignore_failures, _x.max_step.secs, _x.max_step.nsecs, _x.cache_size,) = _struct_dB2iI.unpack(str[start:end])
00119 self.max_step.canon()
00120 return self
00121 except struct.error, e:
00122 raise roslib.message.DeserializationError(e)
00123
00124 _struct_I = roslib.message.struct_I
00125 _struct_dB2iI = struct.Struct("<dB2iI")