$search
00001 """autogenerated by genmsg_py from AppUpdate.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import std_msgs.msg 00007 00008 class AppUpdate(roslib.message.Message): 00009 _md5sum = "5798525d2dcbad786f5d5d2c3dfd0cae" 00010 _type = "launchman/AppUpdate" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """Header header 00013 string taskid 00014 string username 00015 string status 00016 time started 00017 00018 ================================================================================ 00019 MSG: std_msgs/Header 00020 # Standard metadata for higher-level stamped data types. 00021 # This is generally used to communicate timestamped data 00022 # in a particular coordinate frame. 00023 # 00024 # sequence ID: consecutively increasing ID 00025 uint32 seq 00026 #Two-integer timestamp that is expressed as: 00027 # * stamp.secs: seconds (stamp_secs) since epoch 00028 # * stamp.nsecs: nanoseconds since stamp_secs 00029 # time-handling sugar is provided by the client library 00030 time stamp 00031 #Frame this data is associated with 00032 # 0: no frame 00033 # 1: global frame 00034 string frame_id 00035 00036 """ 00037 __slots__ = ['header','taskid','username','status','started'] 00038 _slot_types = ['Header','string','string','string','time'] 00039 00040 def __init__(self, *args, **kwds): 00041 """ 00042 Constructor. Any message fields that are implicitly/explicitly 00043 set to None will be assigned a default value. The recommend 00044 use is keyword arguments as this is more robust to future message 00045 changes. You cannot mix in-order arguments and keyword arguments. 00046 00047 The available fields are: 00048 header,taskid,username,status,started 00049 00050 @param args: complete set of field values, in .msg order 00051 @param kwds: use keyword arguments corresponding to message field names 00052 to set specific fields. 00053 """ 00054 if args or kwds: 00055 super(AppUpdate, self).__init__(*args, **kwds) 00056 #message fields cannot be None, assign default values for those that are 00057 if self.header is None: 00058 self.header = std_msgs.msg._Header.Header() 00059 if self.taskid is None: 00060 self.taskid = '' 00061 if self.username is None: 00062 self.username = '' 00063 if self.status is None: 00064 self.status = '' 00065 if self.started is None: 00066 self.started = roslib.rostime.Time() 00067 else: 00068 self.header = std_msgs.msg._Header.Header() 00069 self.taskid = '' 00070 self.username = '' 00071 self.status = '' 00072 self.started = roslib.rostime.Time() 00073 00074 def _get_types(self): 00075 """ 00076 internal API method 00077 """ 00078 return self._slot_types 00079 00080 def serialize(self, buff): 00081 """ 00082 serialize message into buffer 00083 @param buff: buffer 00084 @type buff: StringIO 00085 """ 00086 try: 00087 _x = self 00088 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00089 _x = self.header.frame_id 00090 length = len(_x) 00091 buff.write(struct.pack('<I%ss'%length, length, _x)) 00092 _x = self.taskid 00093 length = len(_x) 00094 buff.write(struct.pack('<I%ss'%length, length, _x)) 00095 _x = self.username 00096 length = len(_x) 00097 buff.write(struct.pack('<I%ss'%length, length, _x)) 00098 _x = self.status 00099 length = len(_x) 00100 buff.write(struct.pack('<I%ss'%length, length, _x)) 00101 _x = self 00102 buff.write(_struct_2I.pack(_x.started.secs, _x.started.nsecs)) 00103 except struct.error as se: self._check_types(se) 00104 except TypeError as te: self._check_types(te) 00105 00106 def deserialize(self, str): 00107 """ 00108 unpack serialized message in str into this message instance 00109 @param str: byte array of serialized message 00110 @type str: str 00111 """ 00112 try: 00113 if self.header is None: 00114 self.header = std_msgs.msg._Header.Header() 00115 if self.started is None: 00116 self.started = roslib.rostime.Time() 00117 end = 0 00118 _x = self 00119 start = end 00120 end += 12 00121 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00122 start = end 00123 end += 4 00124 (length,) = _struct_I.unpack(str[start:end]) 00125 start = end 00126 end += length 00127 self.header.frame_id = str[start:end] 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.taskid = str[start:end] 00134 start = end 00135 end += 4 00136 (length,) = _struct_I.unpack(str[start:end]) 00137 start = end 00138 end += length 00139 self.username = str[start:end] 00140 start = end 00141 end += 4 00142 (length,) = _struct_I.unpack(str[start:end]) 00143 start = end 00144 end += length 00145 self.status = str[start:end] 00146 _x = self 00147 start = end 00148 end += 8 00149 (_x.started.secs, _x.started.nsecs,) = _struct_2I.unpack(str[start:end]) 00150 self.started.canon() 00151 return self 00152 except struct.error as e: 00153 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00154 00155 00156 def serialize_numpy(self, buff, numpy): 00157 """ 00158 serialize message with numpy array types into buffer 00159 @param buff: buffer 00160 @type buff: StringIO 00161 @param numpy: numpy python module 00162 @type numpy module 00163 """ 00164 try: 00165 _x = self 00166 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00167 _x = self.header.frame_id 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 _x = self.taskid 00171 length = len(_x) 00172 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 _x = self.username 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 _x = self.status 00177 length = len(_x) 00178 buff.write(struct.pack('<I%ss'%length, length, _x)) 00179 _x = self 00180 buff.write(_struct_2I.pack(_x.started.secs, _x.started.nsecs)) 00181 except struct.error as se: self._check_types(se) 00182 except TypeError as te: self._check_types(te) 00183 00184 def deserialize_numpy(self, str, numpy): 00185 """ 00186 unpack serialized message in str into this message instance using numpy for array types 00187 @param str: byte array of serialized message 00188 @type str: str 00189 @param numpy: numpy python module 00190 @type numpy: module 00191 """ 00192 try: 00193 if self.header is None: 00194 self.header = std_msgs.msg._Header.Header() 00195 if self.started is None: 00196 self.started = roslib.rostime.Time() 00197 end = 0 00198 _x = self 00199 start = end 00200 end += 12 00201 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 start = end 00206 end += length 00207 self.header.frame_id = str[start:end] 00208 start = end 00209 end += 4 00210 (length,) = _struct_I.unpack(str[start:end]) 00211 start = end 00212 end += length 00213 self.taskid = str[start:end] 00214 start = end 00215 end += 4 00216 (length,) = _struct_I.unpack(str[start:end]) 00217 start = end 00218 end += length 00219 self.username = str[start:end] 00220 start = end 00221 end += 4 00222 (length,) = _struct_I.unpack(str[start:end]) 00223 start = end 00224 end += length 00225 self.status = str[start:end] 00226 _x = self 00227 start = end 00228 end += 8 00229 (_x.started.secs, _x.started.nsecs,) = _struct_2I.unpack(str[start:end]) 00230 self.started.canon() 00231 return self 00232 except struct.error as e: 00233 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00234 00235 _struct_I = roslib.message.struct_I 00236 _struct_3I = struct.Struct("<3I") 00237 _struct_2I = struct.Struct("<2I")