_RxmSFRB.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/RxmSFRB.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 RxmSFRB(genpy.Message):
00009   _md5sum = "eec72635c768d0528138f40de7442203"
00010   _type = "ublox_msgs/RxmSFRB"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# RXM-SFRB (0x02 0x11)
00013 # Subframe Buffer
00014 #
00015 # The content of one single subframe buffer
00016 # For GPS satellites, the 10 dwrd values contain the parity checked subframe data for 10
00017 # Words. Each dwrd has 24 Bits with valid data (Bits 23 to 0). The remaining 8 bits (31 to 24)
00018 # have an undefined value. The direction within the Word is that the higher order bits are
00019 # received from the SV first. Example: The Preamble can be found in dwrd[0], at bit position
00020 # 23 down to 16. For more details on the data format please refer to the ICD-GPS-200C
00021 # Interface document.
00022 # For SBAS satellites, the 250 Bit message block can be found in dwrd[0] to dwrd[6] for the
00023 # first 224 bits. The remaining 26 bits are in dwrd[7], whereas Bits 25 and 24 are the last two
00024 # data bits, and Bits 23 down to 0 are the parity bits. For more information on SBAS data
00025 # format, please refer to RTCA/DO-229C (MOPS), Appendix A.
00026 #
00027 
00028 uint8 CLASS_ID = 2
00029 uint8 MESSAGE_ID = 17
00030 
00031 uint8 chn               # Channel Number
00032 uint8 svid              # ID of Satellite transmitting Subframe
00033 uint32[10] dwrd         # Words of Data
00034 
00035 """
00036   # Pseudo-constants
00037   CLASS_ID = 2
00038   MESSAGE_ID = 17
00039 
00040   __slots__ = ['chn','svid','dwrd']
00041   _slot_types = ['uint8','uint8','uint32[10]']
00042 
00043   def __init__(self, *args, **kwds):
00044     """
00045     Constructor. Any message fields that are implicitly/explicitly
00046     set to None will be assigned a default value. The recommend
00047     use is keyword arguments as this is more robust to future message
00048     changes.  You cannot mix in-order arguments and keyword arguments.
00049 
00050     The available fields are:
00051        chn,svid,dwrd
00052 
00053     :param args: complete set of field values, in .msg order
00054     :param kwds: use keyword arguments corresponding to message field names
00055     to set specific fields.
00056     """
00057     if args or kwds:
00058       super(RxmSFRB, self).__init__(*args, **kwds)
00059       #message fields cannot be None, assign default values for those that are
00060       if self.chn is None:
00061         self.chn = 0
00062       if self.svid is None:
00063         self.svid = 0
00064       if self.dwrd is None:
00065         self.dwrd = [0,0,0,0,0,0,0,0,0,0]
00066     else:
00067       self.chn = 0
00068       self.svid = 0
00069       self.dwrd = [0,0,0,0,0,0,0,0,0,0]
00070 
00071   def _get_types(self):
00072     """
00073     internal API method
00074     """
00075     return self._slot_types
00076 
00077   def serialize(self, buff):
00078     """
00079     serialize message into buffer
00080     :param buff: buffer, ``StringIO``
00081     """
00082     try:
00083       _x = self
00084       buff.write(_struct_2B.pack(_x.chn, _x.svid))
00085       buff.write(_struct_10I.pack(*self.dwrd))
00086     except struct.error as se: self._check_types(se)
00087     except TypeError as te: self._check_types(te)
00088 
00089   def deserialize(self, str):
00090     """
00091     unpack serialized message in str into this message instance
00092     :param str: byte array of serialized message, ``str``
00093     """
00094     try:
00095       end = 0
00096       _x = self
00097       start = end
00098       end += 2
00099       (_x.chn, _x.svid,) = _struct_2B.unpack(str[start:end])
00100       start = end
00101       end += 40
00102       self.dwrd = _struct_10I.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_2B.pack(_x.chn, _x.svid))
00117       buff.write(self.dwrd.tostring())
00118     except struct.error as se: self._check_types(se)
00119     except TypeError as te: self._check_types(te)
00120 
00121   def deserialize_numpy(self, str, numpy):
00122     """
00123     unpack serialized message in str into this message instance using numpy for array types
00124     :param str: byte array of serialized message, ``str``
00125     :param numpy: numpy python module
00126     """
00127     try:
00128       end = 0
00129       _x = self
00130       start = end
00131       end += 2
00132       (_x.chn, _x.svid,) = _struct_2B.unpack(str[start:end])
00133       start = end
00134       end += 40
00135       self.dwrd = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=10)
00136       return self
00137     except struct.error as e:
00138       raise genpy.DeserializationError(e) #most likely buffer underfill
00139 
00140 _struct_I = genpy.struct_I
00141 _struct_10I = struct.Struct("<10I")
00142 _struct_2B = struct.Struct("<2B")
 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