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