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