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