00001 """autogenerated by genmsg_py from RecentScanTimeRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006
00007 class RecentScanTimeRequest(roslib.message.Message):
00008 _md5sum = "636acdcf9cff2656f32f60d631b1e915"
00009 _type = "laser_slam/RecentScanTimeRequest"
00010 _has_header = False
00011 _full_text = """time t1
00012 time t2
00013
00014 """
00015 __slots__ = ['t1','t2']
00016 _slot_types = ['time','time']
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 t1,t2
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(RecentScanTimeRequest, self).__init__(*args, **kwds)
00034
00035 if self.t1 is None:
00036 self.t1 = roslib.rostime.Time()
00037 if self.t2 is None:
00038 self.t2 = roslib.rostime.Time()
00039 else:
00040 self.t1 = roslib.rostime.Time()
00041 self.t2 = roslib.rostime.Time()
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
00053 @type buff: StringIO
00054 """
00055 try:
00056 _x = self
00057 buff.write(_struct_4I.pack(_x.t1.secs, _x.t1.nsecs, _x.t2.secs, _x.t2.nsecs))
00058 except struct.error, se: self._check_types(se)
00059 except TypeError, 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
00065 @type str: str
00066 """
00067 try:
00068 if self.t1 is None:
00069 self.t1 = roslib.rostime.Time()
00070 if self.t2 is None:
00071 self.t2 = roslib.rostime.Time()
00072 end = 0
00073 _x = self
00074 start = end
00075 end += 16
00076 (_x.t1.secs, _x.t1.nsecs, _x.t2.secs, _x.t2.nsecs,) = _struct_4I.unpack(str[start:end])
00077 self.t1.canon()
00078 self.t2.canon()
00079 return self
00080 except struct.error, e:
00081 raise roslib.message.DeserializationError(e)
00082
00083
00084 def serialize_numpy(self, buff, numpy):
00085 """
00086 serialize message with numpy array types into buffer
00087 @param buff: buffer
00088 @type buff: StringIO
00089 @param numpy: numpy python module
00090 @type numpy module
00091 """
00092 try:
00093 _x = self
00094 buff.write(_struct_4I.pack(_x.t1.secs, _x.t1.nsecs, _x.t2.secs, _x.t2.nsecs))
00095 except struct.error, se: self._check_types(se)
00096 except TypeError, 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
00102 @type str: str
00103 @param numpy: numpy python module
00104 @type numpy: module
00105 """
00106 try:
00107 if self.t1 is None:
00108 self.t1 = roslib.rostime.Time()
00109 if self.t2 is None:
00110 self.t2 = roslib.rostime.Time()
00111 end = 0
00112 _x = self
00113 start = end
00114 end += 16
00115 (_x.t1.secs, _x.t1.nsecs, _x.t2.secs, _x.t2.nsecs,) = _struct_4I.unpack(str[start:end])
00116 self.t1.canon()
00117 self.t2.canon()
00118 return self
00119 except struct.error, e:
00120 raise roslib.message.DeserializationError(e)
00121
00122 _struct_I = roslib.message.struct_I
00123 _struct_4I = struct.Struct("<4I")
00124 """autogenerated by genmsg_py from RecentScanTimeResponse.msg. Do not edit."""
00125 import roslib.message
00126 import struct
00127
00128 import roslib.rostime
00129
00130 class RecentScanTimeResponse(roslib.message.Message):
00131 _md5sum = "a0cf51c4871882ea146d55ce23ae4273"
00132 _type = "laser_slam/RecentScanTimeResponse"
00133 _has_header = False
00134 _full_text = """bool found
00135 time t
00136
00137 """
00138 __slots__ = ['found','t']
00139 _slot_types = ['bool','time']
00140
00141 def __init__(self, *args, **kwds):
00142 """
00143 Constructor. Any message fields that are implicitly/explicitly
00144 set to None will be assigned a default value. The recommend
00145 use is keyword arguments as this is more robust to future message
00146 changes. You cannot mix in-order arguments and keyword arguments.
00147
00148 The available fields are:
00149 found,t
00150
00151 @param args: complete set of field values, in .msg order
00152 @param kwds: use keyword arguments corresponding to message field names
00153 to set specific fields.
00154 """
00155 if args or kwds:
00156 super(RecentScanTimeResponse, self).__init__(*args, **kwds)
00157
00158 if self.found is None:
00159 self.found = False
00160 if self.t is None:
00161 self.t = roslib.rostime.Time()
00162 else:
00163 self.found = False
00164 self.t = roslib.rostime.Time()
00165
00166 def _get_types(self):
00167 """
00168 internal API method
00169 """
00170 return self._slot_types
00171
00172 def serialize(self, buff):
00173 """
00174 serialize message into buffer
00175 @param buff: buffer
00176 @type buff: StringIO
00177 """
00178 try:
00179 _x = self
00180 buff.write(_struct_B2I.pack(_x.found, _x.t.secs, _x.t.nsecs))
00181 except struct.error, se: self._check_types(se)
00182 except TypeError, te: self._check_types(te)
00183
00184 def deserialize(self, str):
00185 """
00186 unpack serialized message in str into this message instance
00187 @param str: byte array of serialized message
00188 @type str: str
00189 """
00190 try:
00191 if self.t is None:
00192 self.t = roslib.rostime.Time()
00193 end = 0
00194 _x = self
00195 start = end
00196 end += 9
00197 (_x.found, _x.t.secs, _x.t.nsecs,) = _struct_B2I.unpack(str[start:end])
00198 self.found = bool(self.found)
00199 self.t.canon()
00200 return self
00201 except struct.error, e:
00202 raise roslib.message.DeserializationError(e)
00203
00204
00205 def serialize_numpy(self, buff, numpy):
00206 """
00207 serialize message with numpy array types into buffer
00208 @param buff: buffer
00209 @type buff: StringIO
00210 @param numpy: numpy python module
00211 @type numpy module
00212 """
00213 try:
00214 _x = self
00215 buff.write(_struct_B2I.pack(_x.found, _x.t.secs, _x.t.nsecs))
00216 except struct.error, se: self._check_types(se)
00217 except TypeError, te: self._check_types(te)
00218
00219 def deserialize_numpy(self, str, numpy):
00220 """
00221 unpack serialized message in str into this message instance using numpy for array types
00222 @param str: byte array of serialized message
00223 @type str: str
00224 @param numpy: numpy python module
00225 @type numpy: module
00226 """
00227 try:
00228 if self.t is None:
00229 self.t = roslib.rostime.Time()
00230 end = 0
00231 _x = self
00232 start = end
00233 end += 9
00234 (_x.found, _x.t.secs, _x.t.nsecs,) = _struct_B2I.unpack(str[start:end])
00235 self.found = bool(self.found)
00236 self.t.canon()
00237 return self
00238 except struct.error, e:
00239 raise roslib.message.DeserializationError(e)
00240
00241 _struct_I = roslib.message.struct_I
00242 _struct_B2I = struct.Struct("<B2I")
00243 class RecentScanTime(roslib.message.ServiceDefinition):
00244 _type = 'laser_slam/RecentScanTime'
00245 _md5sum = 'cdd594f6cb6fa1a1b9db91fa9de1847b'
00246 _request_class = RecentScanTimeRequest
00247 _response_class = RecentScanTimeResponse