Go to the documentation of this file.00001 """autogenerated by genpy from application_msgs/RunApplicationGoal.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 RunApplicationGoal(genpy.Message):
00009 _md5sum = "2a3bd45d72e7cbf4661f8bdf19811d55"
00010 _type = "application_msgs/RunApplicationGoal"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 string application_name
00014 bool daemonize
00015
00016 """
00017 __slots__ = ['application_name','daemonize']
00018 _slot_types = ['string','bool']
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 application_name,daemonize
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(RunApplicationGoal, self).__init__(*args, **kwds)
00036
00037 if self.application_name is None:
00038 self.application_name = ''
00039 if self.daemonize is None:
00040 self.daemonize = False
00041 else:
00042 self.application_name = ''
00043 self.daemonize = False
00044
00045 def _get_types(self):
00046 """
00047 internal API method
00048 """
00049 return self._slot_types
00050
00051 def serialize(self, buff):
00052 """
00053 serialize message into buffer
00054 :param buff: buffer, ``StringIO``
00055 """
00056 try:
00057 _x = self.application_name
00058 length = len(_x)
00059 if python3 or type(_x) == unicode:
00060 _x = _x.encode('utf-8')
00061 length = len(_x)
00062 buff.write(struct.pack('<I%ss'%length, length, _x))
00063 buff.write(_struct_B.pack(self.daemonize))
00064 except struct.error as se: self._check_types(se)
00065 except TypeError as te: self._check_types(te)
00066
00067 def deserialize(self, str):
00068 """
00069 unpack serialized message in str into this message instance
00070 :param str: byte array of serialized message, ``str``
00071 """
00072 try:
00073 end = 0
00074 start = end
00075 end += 4
00076 (length,) = _struct_I.unpack(str[start:end])
00077 start = end
00078 end += length
00079 if python3:
00080 self.application_name = str[start:end].decode('utf-8')
00081 else:
00082 self.application_name = str[start:end]
00083 start = end
00084 end += 1
00085 (self.daemonize,) = _struct_B.unpack(str[start:end])
00086 self.daemonize = bool(self.daemonize)
00087 return self
00088 except struct.error as e:
00089 raise genpy.DeserializationError(e)
00090
00091
00092 def serialize_numpy(self, buff, numpy):
00093 """
00094 serialize message with numpy array types into buffer
00095 :param buff: buffer, ``StringIO``
00096 :param numpy: numpy python module
00097 """
00098 try:
00099 _x = self.application_name
00100 length = len(_x)
00101 if python3 or type(_x) == unicode:
00102 _x = _x.encode('utf-8')
00103 length = len(_x)
00104 buff.write(struct.pack('<I%ss'%length, length, _x))
00105 buff.write(_struct_B.pack(self.daemonize))
00106 except struct.error as se: self._check_types(se)
00107 except TypeError as te: self._check_types(te)
00108
00109 def deserialize_numpy(self, str, numpy):
00110 """
00111 unpack serialized message in str into this message instance using numpy for array types
00112 :param str: byte array of serialized message, ``str``
00113 :param numpy: numpy python module
00114 """
00115 try:
00116 end = 0
00117 start = end
00118 end += 4
00119 (length,) = _struct_I.unpack(str[start:end])
00120 start = end
00121 end += length
00122 if python3:
00123 self.application_name = str[start:end].decode('utf-8')
00124 else:
00125 self.application_name = str[start:end]
00126 start = end
00127 end += 1
00128 (self.daemonize,) = _struct_B.unpack(str[start:end])
00129 self.daemonize = bool(self.daemonize)
00130 return self
00131 except struct.error as e:
00132 raise genpy.DeserializationError(e)
00133
00134 _struct_I = genpy.struct_I
00135 _struct_B = struct.Struct("<B")