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