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