_Position2DInt.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_diff_local_planner/Position2DInt.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 Position2DInt(genpy.Message):
00009   _md5sum = "3b834ede922a0fff22c43585c533b49f"
00010   _type = "iri_diff_local_planner/Position2DInt"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int64 x
00013 int64 y
00014 """
00015   __slots__ = ['x','y']
00016   _slot_types = ['int64','int64']
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        x,y
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(Position2DInt, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.x is None:
00036         self.x = 0
00037       if self.y is None:
00038         self.y = 0
00039     else:
00040       self.x = 0
00041       self.y = 0
00042 
00043   def _get_types(self):
00044     """
00045     internal API method
00046     """
00047     return self._slot_types
00048 
00049   def serialize(self, buff):
00050     """
00051     serialize message into buffer
00052     :param buff: buffer, ``StringIO``
00053     """
00054     try:
00055       _x = self
00056       buff.write(_struct_2q.pack(_x.x, _x.y))
00057     except struct.error as se: self._check_types(se)
00058     except TypeError as te: self._check_types(te)
00059 
00060   def deserialize(self, str):
00061     """
00062     unpack serialized message in str into this message instance
00063     :param str: byte array of serialized message, ``str``
00064     """
00065     try:
00066       end = 0
00067       _x = self
00068       start = end
00069       end += 16
00070       (_x.x, _x.y,) = _struct_2q.unpack(str[start:end])
00071       return self
00072     except struct.error as e:
00073       raise genpy.DeserializationError(e) #most likely buffer underfill
00074 
00075 
00076   def serialize_numpy(self, buff, numpy):
00077     """
00078     serialize message with numpy array types into buffer
00079     :param buff: buffer, ``StringIO``
00080     :param numpy: numpy python module
00081     """
00082     try:
00083       _x = self
00084       buff.write(_struct_2q.pack(_x.x, _x.y))
00085     except struct.error as se: self._check_types(se)
00086     except TypeError as te: self._check_types(te)
00087 
00088   def deserialize_numpy(self, str, numpy):
00089     """
00090     unpack serialized message in str into this message instance using numpy for array types
00091     :param str: byte array of serialized message, ``str``
00092     :param numpy: numpy python module
00093     """
00094     try:
00095       end = 0
00096       _x = self
00097       start = end
00098       end += 16
00099       (_x.x, _x.y,) = _struct_2q.unpack(str[start:end])
00100       return self
00101     except struct.error as e:
00102       raise genpy.DeserializationError(e) #most likely buffer underfill
00103 
00104 _struct_I = genpy.struct_I
00105 _struct_2q = struct.Struct("<2q")


iri_diff_local_planner
Author(s): Iri Lab
autogenerated on Fri Dec 6 2013 20:32:36