_nav_actionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from navp_action/nav_actionGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import std_msgs.msg
00008 
00009 class nav_actionGoal(genpy.Message):
00010   _md5sum = "ca1b443adebf0d1bcf1510f73ee9f389"
00011   _type = "navp_action/nav_actionGoal"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 #goal definition
00015 std_msgs/UInt64 target_lo
00016 
00017 ================================================================================
00018 MSG: std_msgs/UInt64
00019 uint64 data
00020 """
00021   __slots__ = ['target_lo']
00022   _slot_types = ['std_msgs/UInt64']
00023 
00024   def __init__(self, *args, **kwds):
00025     """
00026     Constructor. Any message fields that are implicitly/explicitly
00027     set to None will be assigned a default value. The recommend
00028     use is keyword arguments as this is more robust to future message
00029     changes.  You cannot mix in-order arguments and keyword arguments.
00030 
00031     The available fields are:
00032        target_lo
00033 
00034     :param args: complete set of field values, in .msg order
00035     :param kwds: use keyword arguments corresponding to message field names
00036     to set specific fields.
00037     """
00038     if args or kwds:
00039       super(nav_actionGoal, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.target_lo is None:
00042         self.target_lo = std_msgs.msg.UInt64()
00043     else:
00044       self.target_lo = std_msgs.msg.UInt64()
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       buff.write(_struct_Q.pack(self.target_lo.data))
00059     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00060     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00061 
00062   def deserialize(self, str):
00063     """
00064     unpack serialized message in str into this message instance
00065     :param str: byte array of serialized message, ``str``
00066     """
00067     try:
00068       if self.target_lo is None:
00069         self.target_lo = std_msgs.msg.UInt64()
00070       end = 0
00071       start = end
00072       end += 8
00073       (self.target_lo.data,) = _struct_Q.unpack(str[start:end])
00074       return self
00075     except struct.error as e:
00076       raise genpy.DeserializationError(e) #most likely buffer underfill
00077 
00078 
00079   def serialize_numpy(self, buff, numpy):
00080     """
00081     serialize message with numpy array types into buffer
00082     :param buff: buffer, ``StringIO``
00083     :param numpy: numpy python module
00084     """
00085     try:
00086       buff.write(_struct_Q.pack(self.target_lo.data))
00087     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00088     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00089 
00090   def deserialize_numpy(self, str, numpy):
00091     """
00092     unpack serialized message in str into this message instance using numpy for array types
00093     :param str: byte array of serialized message, ``str``
00094     :param numpy: numpy python module
00095     """
00096     try:
00097       if self.target_lo is None:
00098         self.target_lo = std_msgs.msg.UInt64()
00099       end = 0
00100       start = end
00101       end += 8
00102       (self.target_lo.data,) = _struct_Q.unpack(str[start:end])
00103       return self
00104     except struct.error as e:
00105       raise genpy.DeserializationError(e) #most likely buffer underfill
00106 
00107 _struct_I = genpy.struct_I
00108 _struct_Q = struct.Struct("<Q")


navp_action
Author(s): Ingo Kresse
autogenerated on Mon Oct 6 2014 00:50:07