_nav_actionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from navp_action/nav_actionResult.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_actionResult(genpy.Message):
00010   _md5sum = "e1093a895d389825abe211cea01772a0"
00011   _type = "navp_action/nav_actionResult"
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 #result definition
00015 std_msgs/Float32 distance
00016 
00017 ================================================================================
00018 MSG: std_msgs/Float32
00019 float32 data
00020 """
00021   __slots__ = ['distance']
00022   _slot_types = ['std_msgs/Float32']
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        distance
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_actionResult, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.distance is None:
00042         self.distance = std_msgs.msg.Float32()
00043     else:
00044       self.distance = std_msgs.msg.Float32()
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_f.pack(self.distance.data))
00059     except struct.error as se: self._check_types(se)
00060     except TypeError as te: self._check_types(te)
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.distance is None:
00069         self.distance = std_msgs.msg.Float32()
00070       end = 0
00071       start = end
00072       end += 4
00073       (self.distance.data,) = _struct_f.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_f.pack(self.distance.data))
00087     except struct.error as se: self._check_types(se)
00088     except TypeError as te: self._check_types(te)
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.distance is None:
00098         self.distance = std_msgs.msg.Float32()
00099       end = 0
00100       start = end
00101       end += 4
00102       (self.distance.data,) = _struct_f.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_f = struct.Struct("<f")


navp_action
Author(s): Ingo Kresse
autogenerated on Thu Jan 2 2014 11:22:19