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