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


launchman
Author(s): Scott Hassan
autogenerated on Wed Apr 23 2014 10:35:46