00001 """autogenerated by genmsg_py from HeaderEchoRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006
00007 class HeaderEchoRequest(roslib.message.Message):
00008 _md5sum = "d7be0bb39af8fb9129d5a76e6b63a290"
00009 _type = "test_rosservice/HeaderEchoRequest"
00010 _has_header = True
00011 _full_text = """Header header
00012
00013 ================================================================================
00014 MSG: std_msgs/Header
00015 # Standard metadata for higher-level stamped data types.
00016 # This is generally used to communicate timestamped data
00017 # in a particular coordinate frame.
00018 #
00019 # sequence ID: consecutively increasing ID
00020 uint32 seq
00021 #Two-integer timestamp that is expressed as:
00022 # * stamp.secs: seconds (stamp_secs) since epoch
00023 # * stamp.nsecs: nanoseconds since stamp_secs
00024 # time-handling sugar is provided by the client library
00025 time stamp
00026 #Frame this data is associated with
00027 # 0: no frame
00028 # 1: global frame
00029 string frame_id
00030
00031 """
00032 __slots__ = ['header']
00033 _slot_types = ['Header']
00034
00035 def __init__(self, *args, **kwds):
00036 """
00037 Constructor. Any message fields that are implicitly/explicitly
00038 set to None will be assigned a default value. The recommend
00039 use is keyword arguments as this is more robust to future message
00040 changes. You cannot mix in-order arguments and keyword arguments.
00041
00042 The available fields are:
00043 header
00044
00045 @param args: complete set of field values, in .msg order
00046 @param kwds: use keyword arguments corresponding to message field names
00047 to set specific fields.
00048 """
00049 if args or kwds:
00050 super(HeaderEchoRequest, self).__init__(*args, **kwds)
00051
00052 if self.header is None:
00053 self.header = std_msgs.msg._Header.Header()
00054 else:
00055 self.header = std_msgs.msg._Header.Header()
00056
00057 def _get_types(self):
00058 """
00059 internal API method
00060 """
00061 return self._slot_types
00062
00063 def serialize(self, buff):
00064 """
00065 serialize message into buffer
00066 @param buff: buffer
00067 @type buff: StringIO
00068 """
00069 try:
00070 _x = self
00071 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00072 _x = self.header.frame_id
00073 length = len(_x)
00074 buff.write(struct.pack('<I%ss'%length, length, _x))
00075 except struct.error, se: self._check_types(se)
00076 except TypeError, te: self._check_types(te)
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 @param str: byte array of serialized message
00082 @type str: str
00083 """
00084 try:
00085 if self.header is None:
00086 self.header = std_msgs.msg._Header.Header()
00087 end = 0
00088 _x = self
00089 start = end
00090 end += 12
00091 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00092 start = end
00093 end += 4
00094 (length,) = _struct_I.unpack(str[start:end])
00095 start = end
00096 end += length
00097 self.header.frame_id = str[start:end]
00098 return self
00099 except struct.error, e:
00100 raise roslib.message.DeserializationError(e)
00101
00102
00103 def serialize_numpy(self, buff, numpy):
00104 """
00105 serialize message with numpy array types into buffer
00106 @param buff: buffer
00107 @type buff: StringIO
00108 @param numpy: numpy python module
00109 @type numpy module
00110 """
00111 try:
00112 _x = self
00113 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00114 _x = self.header.frame_id
00115 length = len(_x)
00116 buff.write(struct.pack('<I%ss'%length, length, _x))
00117 except struct.error, se: self._check_types(se)
00118 except TypeError, te: self._check_types(te)
00119
00120 def deserialize_numpy(self, str, numpy):
00121 """
00122 unpack serialized message in str into this message instance using numpy for array types
00123 @param str: byte array of serialized message
00124 @type str: str
00125 @param numpy: numpy python module
00126 @type numpy: module
00127 """
00128 try:
00129 if self.header is None:
00130 self.header = std_msgs.msg._Header.Header()
00131 end = 0
00132 _x = self
00133 start = end
00134 end += 12
00135 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00136 start = end
00137 end += 4
00138 (length,) = _struct_I.unpack(str[start:end])
00139 start = end
00140 end += length
00141 self.header.frame_id = str[start:end]
00142 return self
00143 except struct.error, e:
00144 raise roslib.message.DeserializationError(e)
00145
00146 _struct_I = roslib.message.struct_I
00147 _struct_3I = struct.Struct("<3I")
00148 """autogenerated by genmsg_py from HeaderEchoResponse.msg. Do not edit."""
00149 import roslib.message
00150 import struct
00151
00152 import std_msgs.msg
00153
00154 class HeaderEchoResponse(roslib.message.Message):
00155 _md5sum = "d7be0bb39af8fb9129d5a76e6b63a290"
00156 _type = "test_rosservice/HeaderEchoResponse"
00157 _has_header = True
00158 _full_text = """Header header
00159
00160
00161 ================================================================================
00162 MSG: std_msgs/Header
00163 # Standard metadata for higher-level stamped data types.
00164 # This is generally used to communicate timestamped data
00165 # in a particular coordinate frame.
00166 #
00167 # sequence ID: consecutively increasing ID
00168 uint32 seq
00169 #Two-integer timestamp that is expressed as:
00170 # * stamp.secs: seconds (stamp_secs) since epoch
00171 # * stamp.nsecs: nanoseconds since stamp_secs
00172 # time-handling sugar is provided by the client library
00173 time stamp
00174 #Frame this data is associated with
00175 # 0: no frame
00176 # 1: global frame
00177 string frame_id
00178
00179 """
00180 __slots__ = ['header']
00181 _slot_types = ['Header']
00182
00183 def __init__(self, *args, **kwds):
00184 """
00185 Constructor. Any message fields that are implicitly/explicitly
00186 set to None will be assigned a default value. The recommend
00187 use is keyword arguments as this is more robust to future message
00188 changes. You cannot mix in-order arguments and keyword arguments.
00189
00190 The available fields are:
00191 header
00192
00193 @param args: complete set of field values, in .msg order
00194 @param kwds: use keyword arguments corresponding to message field names
00195 to set specific fields.
00196 """
00197 if args or kwds:
00198 super(HeaderEchoResponse, self).__init__(*args, **kwds)
00199
00200 if self.header is None:
00201 self.header = std_msgs.msg._Header.Header()
00202 else:
00203 self.header = std_msgs.msg._Header.Header()
00204
00205 def _get_types(self):
00206 """
00207 internal API method
00208 """
00209 return self._slot_types
00210
00211 def serialize(self, buff):
00212 """
00213 serialize message into buffer
00214 @param buff: buffer
00215 @type buff: StringIO
00216 """
00217 try:
00218 _x = self
00219 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00220 _x = self.header.frame_id
00221 length = len(_x)
00222 buff.write(struct.pack('<I%ss'%length, length, _x))
00223 except struct.error, se: self._check_types(se)
00224 except TypeError, te: self._check_types(te)
00225
00226 def deserialize(self, str):
00227 """
00228 unpack serialized message in str into this message instance
00229 @param str: byte array of serialized message
00230 @type str: str
00231 """
00232 try:
00233 if self.header is None:
00234 self.header = std_msgs.msg._Header.Header()
00235 end = 0
00236 _x = self
00237 start = end
00238 end += 12
00239 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00240 start = end
00241 end += 4
00242 (length,) = _struct_I.unpack(str[start:end])
00243 start = end
00244 end += length
00245 self.header.frame_id = str[start:end]
00246 return self
00247 except struct.error, e:
00248 raise roslib.message.DeserializationError(e)
00249
00250
00251 def serialize_numpy(self, buff, numpy):
00252 """
00253 serialize message with numpy array types into buffer
00254 @param buff: buffer
00255 @type buff: StringIO
00256 @param numpy: numpy python module
00257 @type numpy module
00258 """
00259 try:
00260 _x = self
00261 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00262 _x = self.header.frame_id
00263 length = len(_x)
00264 buff.write(struct.pack('<I%ss'%length, length, _x))
00265 except struct.error, se: self._check_types(se)
00266 except TypeError, te: self._check_types(te)
00267
00268 def deserialize_numpy(self, str, numpy):
00269 """
00270 unpack serialized message in str into this message instance using numpy for array types
00271 @param str: byte array of serialized message
00272 @type str: str
00273 @param numpy: numpy python module
00274 @type numpy: module
00275 """
00276 try:
00277 if self.header is None:
00278 self.header = std_msgs.msg._Header.Header()
00279 end = 0
00280 _x = self
00281 start = end
00282 end += 12
00283 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 start = end
00288 end += length
00289 self.header.frame_id = str[start:end]
00290 return self
00291 except struct.error, e:
00292 raise roslib.message.DeserializationError(e)
00293
00294 _struct_I = roslib.message.struct_I
00295 _struct_3I = struct.Struct("<3I")
00296 class HeaderEcho(roslib.message.ServiceDefinition):
00297 _type = 'test_rosservice/HeaderEcho'
00298 _md5sum = '3c64cc5ac7e6cbcec5fa7b5ed330b0a6'
00299 _request_class = HeaderEchoRequest
00300 _response_class = HeaderEchoResponse