Go to the documentation of this file.00001 """autogenerated by genpy from openraveros/robot_setactivemanipulatorRequest.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 robot_setactivemanipulatorRequest(genpy.Message):
00009 _md5sum = "dcd0245fc6bb809e6066d7437b781a1a"
00010 _type = "openraveros/robot_setactivemanipulatorRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014 int32 robotid
00015 string manip
00016
00017 """
00018 __slots__ = ['robotid','manip']
00019 _slot_types = ['int32','string']
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 robotid,manip
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(robot_setactivemanipulatorRequest, self).__init__(*args, **kwds)
00037
00038 if self.robotid is None:
00039 self.robotid = 0
00040 if self.manip is None:
00041 self.manip = ''
00042 else:
00043 self.robotid = 0
00044 self.manip = ''
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 buff.write(_struct_i.pack(self.robotid))
00059 _x = self.manip
00060 length = len(_x)
00061 if python3 or type(_x) == unicode:
00062 _x = _x.encode('utf-8')
00063 length = len(_x)
00064 buff.write(struct.pack('<I%ss'%length, length, _x))
00065 except struct.error as se: self._check_types(se)
00066 except TypeError as te: self._check_types(te)
00067
00068 def deserialize(self, str):
00069 """
00070 unpack serialized message in str into this message instance
00071 :param str: byte array of serialized message, ``str``
00072 """
00073 try:
00074 end = 0
00075 start = end
00076 end += 4
00077 (self.robotid,) = _struct_i.unpack(str[start:end])
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 start = end
00082 end += length
00083 if python3:
00084 self.manip = str[start:end].decode('utf-8')
00085 else:
00086 self.manip = str[start:end]
00087 return self
00088 except struct.error as e:
00089 raise genpy.DeserializationError(e)
00090
00091
00092 def serialize_numpy(self, buff, numpy):
00093 """
00094 serialize message with numpy array types into buffer
00095 :param buff: buffer, ``StringIO``
00096 :param numpy: numpy python module
00097 """
00098 try:
00099 buff.write(_struct_i.pack(self.robotid))
00100 _x = self.manip
00101 length = len(_x)
00102 if python3 or type(_x) == unicode:
00103 _x = _x.encode('utf-8')
00104 length = len(_x)
00105 buff.write(struct.pack('<I%ss'%length, length, _x))
00106 except struct.error as se: self._check_types(se)
00107 except TypeError as te: self._check_types(te)
00108
00109 def deserialize_numpy(self, str, numpy):
00110 """
00111 unpack serialized message in str into this message instance using numpy for array types
00112 :param str: byte array of serialized message, ``str``
00113 :param numpy: numpy python module
00114 """
00115 try:
00116 end = 0
00117 start = end
00118 end += 4
00119 (self.robotid,) = _struct_i.unpack(str[start:end])
00120 start = end
00121 end += 4
00122 (length,) = _struct_I.unpack(str[start:end])
00123 start = end
00124 end += length
00125 if python3:
00126 self.manip = str[start:end].decode('utf-8')
00127 else:
00128 self.manip = str[start:end]
00129 return self
00130 except struct.error as e:
00131 raise genpy.DeserializationError(e)
00132
00133 _struct_I = genpy.struct_I
00134 _struct_i = struct.Struct("<i")
00135 """autogenerated by genpy from openraveros/robot_setactivemanipulatorResponse.msg. Do not edit."""
00136 import sys
00137 python3 = True if sys.hexversion > 0x03000000 else False
00138 import genpy
00139 import struct
00140
00141
00142 class robot_setactivemanipulatorResponse(genpy.Message):
00143 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00144 _type = "openraveros/robot_setactivemanipulatorResponse"
00145 _has_header = False
00146 _full_text = """
00147
00148 """
00149 __slots__ = []
00150 _slot_types = []
00151
00152 def __init__(self, *args, **kwds):
00153 """
00154 Constructor. Any message fields that are implicitly/explicitly
00155 set to None will be assigned a default value. The recommend
00156 use is keyword arguments as this is more robust to future message
00157 changes. You cannot mix in-order arguments and keyword arguments.
00158
00159 The available fields are:
00160
00161
00162 :param args: complete set of field values, in .msg order
00163 :param kwds: use keyword arguments corresponding to message field names
00164 to set specific fields.
00165 """
00166 if args or kwds:
00167 super(robot_setactivemanipulatorResponse, self).__init__(*args, **kwds)
00168
00169 def _get_types(self):
00170 """
00171 internal API method
00172 """
00173 return self._slot_types
00174
00175 def serialize(self, buff):
00176 """
00177 serialize message into buffer
00178 :param buff: buffer, ``StringIO``
00179 """
00180 try:
00181 pass
00182 except struct.error as se: self._check_types(se)
00183 except TypeError as te: self._check_types(te)
00184
00185 def deserialize(self, str):
00186 """
00187 unpack serialized message in str into this message instance
00188 :param str: byte array of serialized message, ``str``
00189 """
00190 try:
00191 end = 0
00192 return self
00193 except struct.error as e:
00194 raise genpy.DeserializationError(e)
00195
00196
00197 def serialize_numpy(self, buff, numpy):
00198 """
00199 serialize message with numpy array types into buffer
00200 :param buff: buffer, ``StringIO``
00201 :param numpy: numpy python module
00202 """
00203 try:
00204 pass
00205 except struct.error as se: self._check_types(se)
00206 except TypeError as te: self._check_types(te)
00207
00208 def deserialize_numpy(self, str, numpy):
00209 """
00210 unpack serialized message in str into this message instance using numpy for array types
00211 :param str: byte array of serialized message, ``str``
00212 :param numpy: numpy python module
00213 """
00214 try:
00215 end = 0
00216 return self
00217 except struct.error as e:
00218 raise genpy.DeserializationError(e)
00219
00220 _struct_I = genpy.struct_I
00221 class robot_setactivemanipulator(object):
00222 _type = 'openraveros/robot_setactivemanipulator'
00223 _md5sum = 'dcd0245fc6bb809e6066d7437b781a1a'
00224 _request_class = robot_setactivemanipulatorRequest
00225 _response_class = robot_setactivemanipulatorResponse