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