00001 """autogenerated by genmsg_py from CalibrationRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class CalibrationRequest(roslib.message.Message):
00007 _md5sum = "1d00cd540af97efeb6b1589112fab63e"
00008 _type = "cyberglove/CalibrationRequest"
00009 _has_header = False
00010 _full_text = """string path
00011
00012 """
00013 __slots__ = ['path']
00014 _slot_types = ['string']
00015
00016 def __init__(self, *args, **kwds):
00017 """
00018 Constructor. Any message fields that are implicitly/explicitly
00019 set to None will be assigned a default value. The recommend
00020 use is keyword arguments as this is more robust to future message
00021 changes. You cannot mix in-order arguments and keyword arguments.
00022
00023 The available fields are:
00024 path
00025
00026 @param args: complete set of field values, in .msg order
00027 @param kwds: use keyword arguments corresponding to message field names
00028 to set specific fields.
00029 """
00030 if args or kwds:
00031 super(CalibrationRequest, self).__init__(*args, **kwds)
00032
00033 if self.path is None:
00034 self.path = ''
00035 else:
00036 self.path = ''
00037
00038 def _get_types(self):
00039 """
00040 internal API method
00041 """
00042 return self._slot_types
00043
00044 def serialize(self, buff):
00045 """
00046 serialize message into buffer
00047 @param buff: buffer
00048 @type buff: StringIO
00049 """
00050 try:
00051 _x = self.path
00052 length = len(_x)
00053 buff.write(struct.pack('<I%ss'%length, length, _x))
00054 except struct.error, se: self._check_types(se)
00055 except TypeError, te: self._check_types(te)
00056
00057 def deserialize(self, str):
00058 """
00059 unpack serialized message in str into this message instance
00060 @param str: byte array of serialized message
00061 @type str: str
00062 """
00063 try:
00064 end = 0
00065 start = end
00066 end += 4
00067 (length,) = _struct_I.unpack(str[start:end])
00068 start = end
00069 end += length
00070 self.path = str[start:end]
00071 return self
00072 except struct.error, e:
00073 raise roslib.message.DeserializationError(e)
00074
00075
00076 def serialize_numpy(self, buff, numpy):
00077 """
00078 serialize message with numpy array types into buffer
00079 @param buff: buffer
00080 @type buff: StringIO
00081 @param numpy: numpy python module
00082 @type numpy module
00083 """
00084 try:
00085 _x = self.path
00086 length = len(_x)
00087 buff.write(struct.pack('<I%ss'%length, length, _x))
00088 except struct.error, se: self._check_types(se)
00089 except TypeError, te: self._check_types(te)
00090
00091 def deserialize_numpy(self, str, numpy):
00092 """
00093 unpack serialized message in str into this message instance using numpy for array types
00094 @param str: byte array of serialized message
00095 @type str: str
00096 @param numpy: numpy python module
00097 @type numpy: module
00098 """
00099 try:
00100 end = 0
00101 start = end
00102 end += 4
00103 (length,) = _struct_I.unpack(str[start:end])
00104 start = end
00105 end += length
00106 self.path = str[start:end]
00107 return self
00108 except struct.error, e:
00109 raise roslib.message.DeserializationError(e)
00110
00111 _struct_I = roslib.message.struct_I
00112 """autogenerated by genmsg_py from CalibrationResponse.msg. Do not edit."""
00113 import roslib.message
00114 import struct
00115
00116
00117 class CalibrationResponse(roslib.message.Message):
00118 _md5sum = "001fde3cab9e313a150416ff09c08ee4"
00119 _type = "cyberglove/CalibrationResponse"
00120 _has_header = False
00121 _full_text = """bool state
00122
00123
00124 """
00125 __slots__ = ['state']
00126 _slot_types = ['bool']
00127
00128 def __init__(self, *args, **kwds):
00129 """
00130 Constructor. Any message fields that are implicitly/explicitly
00131 set to None will be assigned a default value. The recommend
00132 use is keyword arguments as this is more robust to future message
00133 changes. You cannot mix in-order arguments and keyword arguments.
00134
00135 The available fields are:
00136 state
00137
00138 @param args: complete set of field values, in .msg order
00139 @param kwds: use keyword arguments corresponding to message field names
00140 to set specific fields.
00141 """
00142 if args or kwds:
00143 super(CalibrationResponse, self).__init__(*args, **kwds)
00144
00145 if self.state is None:
00146 self.state = False
00147 else:
00148 self.state = False
00149
00150 def _get_types(self):
00151 """
00152 internal API method
00153 """
00154 return self._slot_types
00155
00156 def serialize(self, buff):
00157 """
00158 serialize message into buffer
00159 @param buff: buffer
00160 @type buff: StringIO
00161 """
00162 try:
00163 buff.write(_struct_B.pack(self.state))
00164 except struct.error, se: self._check_types(se)
00165 except TypeError, te: self._check_types(te)
00166
00167 def deserialize(self, str):
00168 """
00169 unpack serialized message in str into this message instance
00170 @param str: byte array of serialized message
00171 @type str: str
00172 """
00173 try:
00174 end = 0
00175 start = end
00176 end += 1
00177 (self.state,) = _struct_B.unpack(str[start:end])
00178 self.state = bool(self.state)
00179 return self
00180 except struct.error, e:
00181 raise roslib.message.DeserializationError(e)
00182
00183
00184 def serialize_numpy(self, buff, numpy):
00185 """
00186 serialize message with numpy array types into buffer
00187 @param buff: buffer
00188 @type buff: StringIO
00189 @param numpy: numpy python module
00190 @type numpy module
00191 """
00192 try:
00193 buff.write(_struct_B.pack(self.state))
00194 except struct.error, se: self._check_types(se)
00195 except TypeError, te: self._check_types(te)
00196
00197 def deserialize_numpy(self, str, numpy):
00198 """
00199 unpack serialized message in str into this message instance using numpy for array types
00200 @param str: byte array of serialized message
00201 @type str: str
00202 @param numpy: numpy python module
00203 @type numpy: module
00204 """
00205 try:
00206 end = 0
00207 start = end
00208 end += 1
00209 (self.state,) = _struct_B.unpack(str[start:end])
00210 self.state = bool(self.state)
00211 return self
00212 except struct.error, e:
00213 raise roslib.message.DeserializationError(e)
00214
00215 _struct_I = roslib.message.struct_I
00216 _struct_B = struct.Struct("<B")
00217 class Calibration(roslib.message.ServiceDefinition):
00218 _type = 'cyberglove/Calibration'
00219 _md5sum = '511f6c2530f3a6205ada1f7624754c20'
00220 _request_class = CalibrationRequest
00221 _response_class = CalibrationResponse