$search
00001 """autogenerated by genmsg_py from NavCLOCK.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavCLOCK(roslib.message.Message): 00007 _md5sum = "a9acfdf2e7ac2bf086926ae4e6a182a0" 00008 _type = "ublox_msgs/NavCLOCK" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-CLOCK (0x01 0x22) 00011 # Clock Solution 00012 # 00013 00014 uint8 CLASS_ID = 1 00015 uint8 MESSAGE_ID = 34 00016 00017 uint32 iTOW # GPS Millisecond Time of week [ms] 00018 00019 int32 clkB # Clock bias in nanoseconds [ns] 00020 int32 clkD # Clock drift in nanoseconds per second [ns/s] 00021 uint32 tAcc # Time Accuracy Estimate [ns] 00022 uint32 fAcc # Frequency Accuracy Estimate [ps/s] 00023 00024 """ 00025 # Pseudo-constants 00026 CLASS_ID = 1 00027 MESSAGE_ID = 34 00028 00029 __slots__ = ['iTOW','clkB','clkD','tAcc','fAcc'] 00030 _slot_types = ['uint32','int32','int32','uint32','uint32'] 00031 00032 def __init__(self, *args, **kwds): 00033 """ 00034 Constructor. Any message fields that are implicitly/explicitly 00035 set to None will be assigned a default value. The recommend 00036 use is keyword arguments as this is more robust to future message 00037 changes. You cannot mix in-order arguments and keyword arguments. 00038 00039 The available fields are: 00040 iTOW,clkB,clkD,tAcc,fAcc 00041 00042 @param args: complete set of field values, in .msg order 00043 @param kwds: use keyword arguments corresponding to message field names 00044 to set specific fields. 00045 """ 00046 if args or kwds: 00047 super(NavCLOCK, self).__init__(*args, **kwds) 00048 #message fields cannot be None, assign default values for those that are 00049 if self.iTOW is None: 00050 self.iTOW = 0 00051 if self.clkB is None: 00052 self.clkB = 0 00053 if self.clkD is None: 00054 self.clkD = 0 00055 if self.tAcc is None: 00056 self.tAcc = 0 00057 if self.fAcc is None: 00058 self.fAcc = 0 00059 else: 00060 self.iTOW = 0 00061 self.clkB = 0 00062 self.clkD = 0 00063 self.tAcc = 0 00064 self.fAcc = 0 00065 00066 def _get_types(self): 00067 """ 00068 internal API method 00069 """ 00070 return self._slot_types 00071 00072 def serialize(self, buff): 00073 """ 00074 serialize message into buffer 00075 @param buff: buffer 00076 @type buff: StringIO 00077 """ 00078 try: 00079 _x = self 00080 buff.write(_struct_I2i2I.pack(_x.iTOW, _x.clkB, _x.clkD, _x.tAcc, _x.fAcc)) 00081 except struct.error as se: self._check_types(se) 00082 except TypeError as te: self._check_types(te) 00083 00084 def deserialize(self, str): 00085 """ 00086 unpack serialized message in str into this message instance 00087 @param str: byte array of serialized message 00088 @type str: str 00089 """ 00090 try: 00091 end = 0 00092 _x = self 00093 start = end 00094 end += 20 00095 (_x.iTOW, _x.clkB, _x.clkD, _x.tAcc, _x.fAcc,) = _struct_I2i2I.unpack(str[start:end]) 00096 return self 00097 except struct.error as e: 00098 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00099 00100 00101 def serialize_numpy(self, buff, numpy): 00102 """ 00103 serialize message with numpy array types into buffer 00104 @param buff: buffer 00105 @type buff: StringIO 00106 @param numpy: numpy python module 00107 @type numpy module 00108 """ 00109 try: 00110 _x = self 00111 buff.write(_struct_I2i2I.pack(_x.iTOW, _x.clkB, _x.clkD, _x.tAcc, _x.fAcc)) 00112 except struct.error as se: self._check_types(se) 00113 except TypeError as te: self._check_types(te) 00114 00115 def deserialize_numpy(self, str, numpy): 00116 """ 00117 unpack serialized message in str into this message instance using numpy for array types 00118 @param str: byte array of serialized message 00119 @type str: str 00120 @param numpy: numpy python module 00121 @type numpy: module 00122 """ 00123 try: 00124 end = 0 00125 _x = self 00126 start = end 00127 end += 20 00128 (_x.iTOW, _x.clkB, _x.clkD, _x.tAcc, _x.fAcc,) = _struct_I2i2I.unpack(str[start:end]) 00129 return self 00130 except struct.error as e: 00131 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00132 00133 _struct_I = roslib.message.struct_I 00134 _struct_I2i2I = struct.Struct("<I2i2I")