00001 """autogenerated by genpy from srs_knowledge/GetWorkspaceForObjectRequest.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 GetWorkspaceForObjectRequest(genpy.Message):
00009 _md5sum = "3920a9769fe52ddfcd49e45976c86668"
00010 _type = "srs_knowledge/GetWorkspaceForObjectRequest"
00011 _has_header = False
00012 _full_text = """string objectType
00013
00014
00015 int32 config
00016
00017
00018 """
00019 __slots__ = ['objectType','config']
00020 _slot_types = ['string','int32']
00021
00022 def __init__(self, *args, **kwds):
00023 """
00024 Constructor. Any message fields that are implicitly/explicitly
00025 set to None will be assigned a default value. The recommend
00026 use is keyword arguments as this is more robust to future message
00027 changes. You cannot mix in-order arguments and keyword arguments.
00028
00029 The available fields are:
00030 objectType,config
00031
00032 :param args: complete set of field values, in .msg order
00033 :param kwds: use keyword arguments corresponding to message field names
00034 to set specific fields.
00035 """
00036 if args or kwds:
00037 super(GetWorkspaceForObjectRequest, self).__init__(*args, **kwds)
00038
00039 if self.objectType is None:
00040 self.objectType = ''
00041 if self.config is None:
00042 self.config = 0
00043 else:
00044 self.objectType = ''
00045 self.config = 0
00046
00047 def _get_types(self):
00048 """
00049 internal API method
00050 """
00051 return self._slot_types
00052
00053 def serialize(self, buff):
00054 """
00055 serialize message into buffer
00056 :param buff: buffer, ``StringIO``
00057 """
00058 try:
00059 _x = self.objectType
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 buff.write(_struct_i.pack(self.config))
00066 except struct.error as se: self._check_types(se)
00067 except TypeError as te: self._check_types(te)
00068
00069 def deserialize(self, str):
00070 """
00071 unpack serialized message in str into this message instance
00072 :param str: byte array of serialized message, ``str``
00073 """
00074 try:
00075 end = 0
00076 start = end
00077 end += 4
00078 (length,) = _struct_I.unpack(str[start:end])
00079 start = end
00080 end += length
00081 if python3:
00082 self.objectType = str[start:end].decode('utf-8')
00083 else:
00084 self.objectType = str[start:end]
00085 start = end
00086 end += 4
00087 (self.config,) = _struct_i.unpack(str[start:end])
00088 return self
00089 except struct.error as e:
00090 raise genpy.DeserializationError(e)
00091
00092
00093 def serialize_numpy(self, buff, numpy):
00094 """
00095 serialize message with numpy array types into buffer
00096 :param buff: buffer, ``StringIO``
00097 :param numpy: numpy python module
00098 """
00099 try:
00100 _x = self.objectType
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 buff.write(_struct_i.pack(self.config))
00107 except struct.error as se: self._check_types(se)
00108 except TypeError as te: self._check_types(te)
00109
00110 def deserialize_numpy(self, str, numpy):
00111 """
00112 unpack serialized message in str into this message instance using numpy for array types
00113 :param str: byte array of serialized message, ``str``
00114 :param numpy: numpy python module
00115 """
00116 try:
00117 end = 0
00118 start = end
00119 end += 4
00120 (length,) = _struct_I.unpack(str[start:end])
00121 start = end
00122 end += length
00123 if python3:
00124 self.objectType = str[start:end].decode('utf-8')
00125 else:
00126 self.objectType = str[start:end]
00127 start = end
00128 end += 4
00129 (self.config,) = _struct_i.unpack(str[start:end])
00130 return self
00131 except struct.error as e:
00132 raise genpy.DeserializationError(e)
00133
00134 _struct_I = genpy.struct_I
00135 _struct_i = struct.Struct("<i")
00136 """autogenerated by genpy from srs_knowledge/GetWorkspaceForObjectResponse.msg. Do not edit."""
00137 import sys
00138 python3 = True if sys.hexversion > 0x03000000 else False
00139 import genpy
00140 import struct
00141
00142
00143 class GetWorkspaceForObjectResponse(genpy.Message):
00144 _md5sum = "8b36c598e23fd962676550874c6879f7"
00145 _type = "srs_knowledge/GetWorkspaceForObjectResponse"
00146 _has_header = False
00147 _full_text = """
00148 string[] workspaces
00149
00150 """
00151 __slots__ = ['workspaces']
00152 _slot_types = ['string[]']
00153
00154 def __init__(self, *args, **kwds):
00155 """
00156 Constructor. Any message fields that are implicitly/explicitly
00157 set to None will be assigned a default value. The recommend
00158 use is keyword arguments as this is more robust to future message
00159 changes. You cannot mix in-order arguments and keyword arguments.
00160
00161 The available fields are:
00162 workspaces
00163
00164 :param args: complete set of field values, in .msg order
00165 :param kwds: use keyword arguments corresponding to message field names
00166 to set specific fields.
00167 """
00168 if args or kwds:
00169 super(GetWorkspaceForObjectResponse, self).__init__(*args, **kwds)
00170
00171 if self.workspaces is None:
00172 self.workspaces = []
00173 else:
00174 self.workspaces = []
00175
00176 def _get_types(self):
00177 """
00178 internal API method
00179 """
00180 return self._slot_types
00181
00182 def serialize(self, buff):
00183 """
00184 serialize message into buffer
00185 :param buff: buffer, ``StringIO``
00186 """
00187 try:
00188 length = len(self.workspaces)
00189 buff.write(_struct_I.pack(length))
00190 for val1 in self.workspaces:
00191 length = len(val1)
00192 if python3 or type(val1) == unicode:
00193 val1 = val1.encode('utf-8')
00194 length = len(val1)
00195 buff.write(struct.pack('<I%ss'%length, length, val1))
00196 except struct.error as se: self._check_types(se)
00197 except TypeError as te: self._check_types(te)
00198
00199 def deserialize(self, str):
00200 """
00201 unpack serialized message in str into this message instance
00202 :param str: byte array of serialized message, ``str``
00203 """
00204 try:
00205 end = 0
00206 start = end
00207 end += 4
00208 (length,) = _struct_I.unpack(str[start:end])
00209 self.workspaces = []
00210 for i in range(0, length):
00211 start = end
00212 end += 4
00213 (length,) = _struct_I.unpack(str[start:end])
00214 start = end
00215 end += length
00216 if python3:
00217 val1 = str[start:end].decode('utf-8')
00218 else:
00219 val1 = str[start:end]
00220 self.workspaces.append(val1)
00221 return self
00222 except struct.error as e:
00223 raise genpy.DeserializationError(e)
00224
00225
00226 def serialize_numpy(self, buff, numpy):
00227 """
00228 serialize message with numpy array types into buffer
00229 :param buff: buffer, ``StringIO``
00230 :param numpy: numpy python module
00231 """
00232 try:
00233 length = len(self.workspaces)
00234 buff.write(_struct_I.pack(length))
00235 for val1 in self.workspaces:
00236 length = len(val1)
00237 if python3 or type(val1) == unicode:
00238 val1 = val1.encode('utf-8')
00239 length = len(val1)
00240 buff.write(struct.pack('<I%ss'%length, length, val1))
00241 except struct.error as se: self._check_types(se)
00242 except TypeError as te: self._check_types(te)
00243
00244 def deserialize_numpy(self, str, numpy):
00245 """
00246 unpack serialized message in str into this message instance using numpy for array types
00247 :param str: byte array of serialized message, ``str``
00248 :param numpy: numpy python module
00249 """
00250 try:
00251 end = 0
00252 start = end
00253 end += 4
00254 (length,) = _struct_I.unpack(str[start:end])
00255 self.workspaces = []
00256 for i in range(0, length):
00257 start = end
00258 end += 4
00259 (length,) = _struct_I.unpack(str[start:end])
00260 start = end
00261 end += length
00262 if python3:
00263 val1 = str[start:end].decode('utf-8')
00264 else:
00265 val1 = str[start:end]
00266 self.workspaces.append(val1)
00267 return self
00268 except struct.error as e:
00269 raise genpy.DeserializationError(e)
00270
00271 _struct_I = genpy.struct_I
00272 class GetWorkspaceForObject(object):
00273 _type = 'srs_knowledge/GetWorkspaceForObject'
00274 _md5sum = '4834e0c330d9158f723e067adedc4e67'
00275 _request_class = GetWorkspaceForObjectRequest
00276 _response_class = GetWorkspaceForObjectResponse