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