$search
00001 """autogenerated by genmsg_py from IntervalStamped.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import calibration_msgs.msg 00006 import roslib.rostime 00007 import std_msgs.msg 00008 00009 class IntervalStamped(roslib.message.Message): 00010 _md5sum = "3b9fc1d72815ffa87542f8dc47ef7484" 00011 _type = "calibration_msgs/IntervalStamped" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """Header header 00014 Interval interval 00015 00016 ================================================================================ 00017 MSG: std_msgs/Header 00018 # Standard metadata for higher-level stamped data types. 00019 # This is generally used to communicate timestamped data 00020 # in a particular coordinate frame. 00021 # 00022 # sequence ID: consecutively increasing ID 00023 uint32 seq 00024 #Two-integer timestamp that is expressed as: 00025 # * stamp.secs: seconds (stamp_secs) since epoch 00026 # * stamp.nsecs: nanoseconds since stamp_secs 00027 # time-handling sugar is provided by the client library 00028 time stamp 00029 #Frame this data is associated with 00030 # 0: no frame 00031 # 1: global frame 00032 string frame_id 00033 00034 ================================================================================ 00035 MSG: calibration_msgs/Interval 00036 time start 00037 time end 00038 00039 """ 00040 __slots__ = ['header','interval'] 00041 _slot_types = ['Header','calibration_msgs/Interval'] 00042 00043 def __init__(self, *args, **kwds): 00044 """ 00045 Constructor. Any message fields that are implicitly/explicitly 00046 set to None will be assigned a default value. The recommend 00047 use is keyword arguments as this is more robust to future message 00048 changes. You cannot mix in-order arguments and keyword arguments. 00049 00050 The available fields are: 00051 header,interval 00052 00053 @param args: complete set of field values, in .msg order 00054 @param kwds: use keyword arguments corresponding to message field names 00055 to set specific fields. 00056 """ 00057 if args or kwds: 00058 super(IntervalStamped, self).__init__(*args, **kwds) 00059 #message fields cannot be None, assign default values for those that are 00060 if self.header is None: 00061 self.header = std_msgs.msg._Header.Header() 00062 if self.interval is None: 00063 self.interval = calibration_msgs.msg.Interval() 00064 else: 00065 self.header = std_msgs.msg._Header.Header() 00066 self.interval = calibration_msgs.msg.Interval() 00067 00068 def _get_types(self): 00069 """ 00070 internal API method 00071 """ 00072 return self._slot_types 00073 00074 def serialize(self, buff): 00075 """ 00076 serialize message into buffer 00077 @param buff: buffer 00078 @type buff: StringIO 00079 """ 00080 try: 00081 _x = self 00082 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00083 _x = self.header.frame_id 00084 length = len(_x) 00085 buff.write(struct.pack('<I%ss'%length, length, _x)) 00086 _x = self 00087 buff.write(_struct_4I.pack(_x.interval.start.secs, _x.interval.start.nsecs, _x.interval.end.secs, _x.interval.end.nsecs)) 00088 except struct.error as se: self._check_types(se) 00089 except TypeError as te: self._check_types(te) 00090 00091 def deserialize(self, str): 00092 """ 00093 unpack serialized message in str into this message instance 00094 @param str: byte array of serialized message 00095 @type str: str 00096 """ 00097 try: 00098 if self.header is None: 00099 self.header = std_msgs.msg._Header.Header() 00100 if self.interval is None: 00101 self.interval = calibration_msgs.msg.Interval() 00102 end = 0 00103 _x = self 00104 start = end 00105 end += 12 00106 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00107 start = end 00108 end += 4 00109 (length,) = _struct_I.unpack(str[start:end]) 00110 start = end 00111 end += length 00112 self.header.frame_id = str[start:end] 00113 _x = self 00114 start = end 00115 end += 16 00116 (_x.interval.start.secs, _x.interval.start.nsecs, _x.interval.end.secs, _x.interval.end.nsecs,) = _struct_4I.unpack(str[start:end]) 00117 return self 00118 except struct.error as e: 00119 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00120 00121 00122 def serialize_numpy(self, buff, numpy): 00123 """ 00124 serialize message with numpy array types into buffer 00125 @param buff: buffer 00126 @type buff: StringIO 00127 @param numpy: numpy python module 00128 @type numpy module 00129 """ 00130 try: 00131 _x = self 00132 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00133 _x = self.header.frame_id 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 _x = self 00137 buff.write(_struct_4I.pack(_x.interval.start.secs, _x.interval.start.nsecs, _x.interval.end.secs, _x.interval.end.nsecs)) 00138 except struct.error as se: self._check_types(se) 00139 except TypeError as te: self._check_types(te) 00140 00141 def deserialize_numpy(self, str, numpy): 00142 """ 00143 unpack serialized message in str into this message instance using numpy for array types 00144 @param str: byte array of serialized message 00145 @type str: str 00146 @param numpy: numpy python module 00147 @type numpy: module 00148 """ 00149 try: 00150 if self.header is None: 00151 self.header = std_msgs.msg._Header.Header() 00152 if self.interval is None: 00153 self.interval = calibration_msgs.msg.Interval() 00154 end = 0 00155 _x = self 00156 start = end 00157 end += 12 00158 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00159 start = end 00160 end += 4 00161 (length,) = _struct_I.unpack(str[start:end]) 00162 start = end 00163 end += length 00164 self.header.frame_id = str[start:end] 00165 _x = self 00166 start = end 00167 end += 16 00168 (_x.interval.start.secs, _x.interval.start.nsecs, _x.interval.end.secs, _x.interval.end.nsecs,) = _struct_4I.unpack(str[start:end]) 00169 return self 00170 except struct.error as e: 00171 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00172 00173 _struct_I = roslib.message.struct_I 00174 _struct_3I = struct.Struct("<3I") 00175 _struct_4I = struct.Struct("<4I")