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