_NavDGPS_SV.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/NavDGPS_SV.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 NavDGPS_SV(genpy.Message):
00009   _md5sum = "68b7faf0392ad4a362842f0abbad57cb"
00010   _type = "ublox_msgs/NavDGPS_SV"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# see message NavDGPS
00013 
00014 uint8 svid              # Satellite ID
00015 
00016 uint8 flags             # Bitmask / Channel Number
00017 uint8 CHANNEL1 = 1
00018 uint8 CHANNEL2 = 2
00019 uint8 CHANNEL3 = 3
00020 uint8 CHANNEL4 = 4
00021 uint8 CHANNEL5 = 5
00022 uint8 CHANNEL6 = 6
00023 uint8 CHANNEL7 = 7
00024 uint8 CHANNEL8 = 8
00025 uint8 DGPS = 16
00026 
00027 uint16 ageC             # Age of latest correction data [ms]
00028 float32 prc             # Pseudo Range Correction [m]
00029 float32 prrc            # Pseudo Range Rate Correction [m/s]
00030 
00031 
00032 """
00033   # Pseudo-constants
00034   CHANNEL1 = 1
00035   CHANNEL2 = 2
00036   CHANNEL3 = 3
00037   CHANNEL4 = 4
00038   CHANNEL5 = 5
00039   CHANNEL6 = 6
00040   CHANNEL7 = 7
00041   CHANNEL8 = 8
00042   DGPS = 16
00043 
00044   __slots__ = ['svid','flags','ageC','prc','prrc']
00045   _slot_types = ['uint8','uint8','uint16','float32','float32']
00046 
00047   def __init__(self, *args, **kwds):
00048     """
00049     Constructor. Any message fields that are implicitly/explicitly
00050     set to None will be assigned a default value. The recommend
00051     use is keyword arguments as this is more robust to future message
00052     changes.  You cannot mix in-order arguments and keyword arguments.
00053 
00054     The available fields are:
00055        svid,flags,ageC,prc,prrc
00056 
00057     :param args: complete set of field values, in .msg order
00058     :param kwds: use keyword arguments corresponding to message field names
00059     to set specific fields.
00060     """
00061     if args or kwds:
00062       super(NavDGPS_SV, self).__init__(*args, **kwds)
00063       #message fields cannot be None, assign default values for those that are
00064       if self.svid is None:
00065         self.svid = 0
00066       if self.flags is None:
00067         self.flags = 0
00068       if self.ageC is None:
00069         self.ageC = 0
00070       if self.prc is None:
00071         self.prc = 0.
00072       if self.prrc is None:
00073         self.prrc = 0.
00074     else:
00075       self.svid = 0
00076       self.flags = 0
00077       self.ageC = 0
00078       self.prc = 0.
00079       self.prrc = 0.
00080 
00081   def _get_types(self):
00082     """
00083     internal API method
00084     """
00085     return self._slot_types
00086 
00087   def serialize(self, buff):
00088     """
00089     serialize message into buffer
00090     :param buff: buffer, ``StringIO``
00091     """
00092     try:
00093       _x = self
00094       buff.write(_struct_2BH2f.pack(_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc))
00095     except struct.error as se: self._check_types(se)
00096     except TypeError as te: self._check_types(te)
00097 
00098   def deserialize(self, str):
00099     """
00100     unpack serialized message in str into this message instance
00101     :param str: byte array of serialized message, ``str``
00102     """
00103     try:
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 12
00108       (_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc,) = _struct_2BH2f.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 
00114   def serialize_numpy(self, buff, numpy):
00115     """
00116     serialize message with numpy array types into buffer
00117     :param buff: buffer, ``StringIO``
00118     :param numpy: numpy python module
00119     """
00120     try:
00121       _x = self
00122       buff.write(_struct_2BH2f.pack(_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc))
00123     except struct.error as se: self._check_types(se)
00124     except TypeError as te: self._check_types(te)
00125 
00126   def deserialize_numpy(self, str, numpy):
00127     """
00128     unpack serialized message in str into this message instance using numpy for array types
00129     :param str: byte array of serialized message, ``str``
00130     :param numpy: numpy python module
00131     """
00132     try:
00133       end = 0
00134       _x = self
00135       start = end
00136       end += 12
00137       (_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc,) = _struct_2BH2f.unpack(str[start:end])
00138       return self
00139     except struct.error as e:
00140       raise genpy.DeserializationError(e) #most likely buffer underfill
00141 
00142 _struct_I = genpy.struct_I
00143 _struct_2BH2f = struct.Struct("<2BH2f")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


ublox_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:55:23