$search
00001 """autogenerated by genmsg_py from RunApplicationGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class RunApplicationGoal(roslib.message.Message): 00007 _md5sum = "2a3bd45d72e7cbf4661f8bdf19811d55" 00008 _type = "application_msgs/RunApplicationGoal" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 string application_name 00012 bool daemonize 00013 00014 """ 00015 __slots__ = ['application_name','daemonize'] 00016 _slot_types = ['string','bool'] 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 application_name,daemonize 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(RunApplicationGoal, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.application_name is None: 00036 self.application_name = '' 00037 if self.daemonize is None: 00038 self.daemonize = False 00039 else: 00040 self.application_name = '' 00041 self.daemonize = False 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 00053 @type buff: StringIO 00054 """ 00055 try: 00056 _x = self.application_name 00057 length = len(_x) 00058 buff.write(struct.pack('<I%ss'%length, length, _x)) 00059 buff.write(_struct_B.pack(self.daemonize)) 00060 except struct.error as se: self._check_types(se) 00061 except TypeError as te: self._check_types(te) 00062 00063 def deserialize(self, str): 00064 """ 00065 unpack serialized message in str into this message instance 00066 @param str: byte array of serialized message 00067 @type str: str 00068 """ 00069 try: 00070 end = 0 00071 start = end 00072 end += 4 00073 (length,) = _struct_I.unpack(str[start:end]) 00074 start = end 00075 end += length 00076 self.application_name = str[start:end] 00077 start = end 00078 end += 1 00079 (self.daemonize,) = _struct_B.unpack(str[start:end]) 00080 self.daemonize = bool(self.daemonize) 00081 return self 00082 except struct.error as e: 00083 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00084 00085 00086 def serialize_numpy(self, buff, numpy): 00087 """ 00088 serialize message with numpy array types into buffer 00089 @param buff: buffer 00090 @type buff: StringIO 00091 @param numpy: numpy python module 00092 @type numpy module 00093 """ 00094 try: 00095 _x = self.application_name 00096 length = len(_x) 00097 buff.write(struct.pack('<I%ss'%length, length, _x)) 00098 buff.write(_struct_B.pack(self.daemonize)) 00099 except struct.error as se: self._check_types(se) 00100 except TypeError as te: self._check_types(te) 00101 00102 def deserialize_numpy(self, str, numpy): 00103 """ 00104 unpack serialized message in str into this message instance using numpy for array types 00105 @param str: byte array of serialized message 00106 @type str: str 00107 @param numpy: numpy python module 00108 @type numpy: module 00109 """ 00110 try: 00111 end = 0 00112 start = end 00113 end += 4 00114 (length,) = _struct_I.unpack(str[start:end]) 00115 start = end 00116 end += length 00117 self.application_name = str[start:end] 00118 start = end 00119 end += 1 00120 (self.daemonize,) = _struct_B.unpack(str[start:end]) 00121 self.daemonize = bool(self.daemonize) 00122 return self 00123 except struct.error as e: 00124 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00125 00126 _struct_I = roslib.message.struct_I 00127 _struct_B = struct.Struct("<B")