_NavSBAS_SV.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/NavSBAS_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 NavSBAS_SV(genpy.Message):
00009   _md5sum = "45259031fe19a4df2f5a4a667356a0bc"
00010   _type = "ublox_msgs/NavSBAS_SV"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# see message NavSBAS
00013 #
00014 
00015 uint8 svid              # SV Id
00016 uint8 flags             # Flags for this SV
00017 uint8 udre              # Monitoring status
00018 uint8 svSys             # System (WAAS/EGNOS/...), same as SYS
00019 uint8 svService         # Services available, same as SERVICE
00020 uint8 reserved1         # Reserved
00021 int16 prc               # Pseudo Range correction in [cm]
00022 uint16 reserved2        # Reserved
00023 int16 ic                # Ionosphere correction in [cm]
00024 
00025 """
00026   __slots__ = ['svid','flags','udre','svSys','svService','reserved1','prc','reserved2','ic']
00027   _slot_types = ['uint8','uint8','uint8','uint8','uint8','uint8','int16','uint16','int16']
00028 
00029   def __init__(self, *args, **kwds):
00030     """
00031     Constructor. Any message fields that are implicitly/explicitly
00032     set to None will be assigned a default value. The recommend
00033     use is keyword arguments as this is more robust to future message
00034     changes.  You cannot mix in-order arguments and keyword arguments.
00035 
00036     The available fields are:
00037        svid,flags,udre,svSys,svService,reserved1,prc,reserved2,ic
00038 
00039     :param args: complete set of field values, in .msg order
00040     :param kwds: use keyword arguments corresponding to message field names
00041     to set specific fields.
00042     """
00043     if args or kwds:
00044       super(NavSBAS_SV, self).__init__(*args, **kwds)
00045       #message fields cannot be None, assign default values for those that are
00046       if self.svid is None:
00047         self.svid = 0
00048       if self.flags is None:
00049         self.flags = 0
00050       if self.udre is None:
00051         self.udre = 0
00052       if self.svSys is None:
00053         self.svSys = 0
00054       if self.svService is None:
00055         self.svService = 0
00056       if self.reserved1 is None:
00057         self.reserved1 = 0
00058       if self.prc is None:
00059         self.prc = 0
00060       if self.reserved2 is None:
00061         self.reserved2 = 0
00062       if self.ic is None:
00063         self.ic = 0
00064     else:
00065       self.svid = 0
00066       self.flags = 0
00067       self.udre = 0
00068       self.svSys = 0
00069       self.svService = 0
00070       self.reserved1 = 0
00071       self.prc = 0
00072       self.reserved2 = 0
00073       self.ic = 0
00074 
00075   def _get_types(self):
00076     """
00077     internal API method
00078     """
00079     return self._slot_types
00080 
00081   def serialize(self, buff):
00082     """
00083     serialize message into buffer
00084     :param buff: buffer, ``StringIO``
00085     """
00086     try:
00087       _x = self
00088       buff.write(_struct_6BhHh.pack(_x.svid, _x.flags, _x.udre, _x.svSys, _x.svService, _x.reserved1, _x.prc, _x.reserved2, _x.ic))
00089     except struct.error as se: self._check_types(se)
00090     except TypeError as te: self._check_types(te)
00091 
00092   def deserialize(self, str):
00093     """
00094     unpack serialized message in str into this message instance
00095     :param str: byte array of serialized message, ``str``
00096     """
00097     try:
00098       end = 0
00099       _x = self
00100       start = end
00101       end += 12
00102       (_x.svid, _x.flags, _x.udre, _x.svSys, _x.svService, _x.reserved1, _x.prc, _x.reserved2, _x.ic,) = _struct_6BhHh.unpack(str[start:end])
00103       return self
00104     except struct.error as e:
00105       raise genpy.DeserializationError(e) #most likely buffer underfill
00106 
00107 
00108   def serialize_numpy(self, buff, numpy):
00109     """
00110     serialize message with numpy array types into buffer
00111     :param buff: buffer, ``StringIO``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       _x = self
00116       buff.write(_struct_6BhHh.pack(_x.svid, _x.flags, _x.udre, _x.svSys, _x.svService, _x.reserved1, _x.prc, _x.reserved2, _x.ic))
00117     except struct.error as se: self._check_types(se)
00118     except TypeError as te: self._check_types(te)
00119 
00120   def deserialize_numpy(self, str, numpy):
00121     """
00122     unpack serialized message in str into this message instance using numpy for array types
00123     :param str: byte array of serialized message, ``str``
00124     :param numpy: numpy python module
00125     """
00126     try:
00127       end = 0
00128       _x = self
00129       start = end
00130       end += 12
00131       (_x.svid, _x.flags, _x.udre, _x.svSys, _x.svService, _x.reserved1, _x.prc, _x.reserved2, _x.ic,) = _struct_6BhHh.unpack(str[start:end])
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 _struct_I = genpy.struct_I
00137 _struct_6BhHh = struct.Struct("<6BhHh")
 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