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