Go to the documentation of this file.00001 """autogenerated by genpy from pano_ros/StitchResult.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 StitchResult(genpy.Message):
00009 _md5sum = "c34b583b7e4652b9ca26654583ffb4ce"
00010 _type = "pano_ros/StitchResult"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 # Define the result
00014 int32 result_flags
00015 int32 PANO_SUCCESS=1
00016
00017 """
00018
00019 PANO_SUCCESS = 1
00020
00021 __slots__ = ['result_flags']
00022 _slot_types = ['int32']
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 result_flags
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(StitchResult, self).__init__(*args, **kwds)
00040
00041 if self.result_flags is None:
00042 self.result_flags = 0
00043 else:
00044 self.result_flags = 0
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_i.pack(self.result_flags))
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 end = 0
00069 start = end
00070 end += 4
00071 (self.result_flags,) = _struct_i.unpack(str[start:end])
00072 return self
00073 except struct.error as e:
00074 raise genpy.DeserializationError(e)
00075
00076
00077 def serialize_numpy(self, buff, numpy):
00078 """
00079 serialize message with numpy array types into buffer
00080 :param buff: buffer, ``StringIO``
00081 :param numpy: numpy python module
00082 """
00083 try:
00084 buff.write(_struct_i.pack(self.result_flags))
00085 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00086 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 start = end
00097 end += 4
00098 (self.result_flags,) = _struct_i.unpack(str[start:end])
00099 return self
00100 except struct.error as e:
00101 raise genpy.DeserializationError(e)
00102
00103 _struct_I = genpy.struct_I
00104 _struct_i = struct.Struct("<i")