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