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