$search
00001 """autogenerated by genmsg_py from NavTIMEUTC.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavTIMEUTC(roslib.message.Message): 00007 _md5sum = "0ea9fbec0e54f3dbba61f743936c206a" 00008 _type = "ublox_msgs/NavTIMEUTC" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-TIMEUTC (0x01 0x21) 00011 # UTC Time Solution 00012 # 00013 00014 uint8 CLASS_ID = 1 00015 uint8 MESSAGE_ID = 33 00016 00017 uint32 iTOW # GPS Millisecond time of week [ms] 00018 00019 uint32 tAcc # Time Accuracy Estimate [ns] 00020 int32 nano # Nanoseconds of second, range -1e9 .. 1e9 (UTC) [ns] 00021 uint16 year # Year, range 1999..2099 (UTC) [y] 00022 uint8 month # Month, range 1..12 (UTC) [month] 00023 uint8 day # Day of Month, range 1..31 (UTC) [d] 00024 uint8 hour # Hour of Day, range 0..23 (UTC) [h] 00025 uint8 min # Minute of Hour, range 0..59 (UTC) [min] 00026 uint8 sec # Seconds of Minute, range 0..59 (UTC) [s] 00027 00028 uint8 valid # Validity Flags 00029 uint8 VALID_TOW = 1 # Valid Time of Week 00030 uint8 VALID_WKN = 2 # Valid Week Number 00031 uint8 VALID_UTC = 4 # Valid Leap Seconds, i.e. Leap Seconds already known 00032 00033 """ 00034 # Pseudo-constants 00035 CLASS_ID = 1 00036 MESSAGE_ID = 33 00037 VALID_TOW = 1 00038 VALID_WKN = 2 00039 VALID_UTC = 4 00040 00041 __slots__ = ['iTOW','tAcc','nano','year','month','day','hour','min','sec','valid'] 00042 _slot_types = ['uint32','uint32','int32','uint16','uint8','uint8','uint8','uint8','uint8','uint8'] 00043 00044 def __init__(self, *args, **kwds): 00045 """ 00046 Constructor. Any message fields that are implicitly/explicitly 00047 set to None will be assigned a default value. The recommend 00048 use is keyword arguments as this is more robust to future message 00049 changes. You cannot mix in-order arguments and keyword arguments. 00050 00051 The available fields are: 00052 iTOW,tAcc,nano,year,month,day,hour,min,sec,valid 00053 00054 @param args: complete set of field values, in .msg order 00055 @param kwds: use keyword arguments corresponding to message field names 00056 to set specific fields. 00057 """ 00058 if args or kwds: 00059 super(NavTIMEUTC, self).__init__(*args, **kwds) 00060 #message fields cannot be None, assign default values for those that are 00061 if self.iTOW is None: 00062 self.iTOW = 0 00063 if self.tAcc is None: 00064 self.tAcc = 0 00065 if self.nano is None: 00066 self.nano = 0 00067 if self.year is None: 00068 self.year = 0 00069 if self.month is None: 00070 self.month = 0 00071 if self.day is None: 00072 self.day = 0 00073 if self.hour is None: 00074 self.hour = 0 00075 if self.min is None: 00076 self.min = 0 00077 if self.sec is None: 00078 self.sec = 0 00079 if self.valid is None: 00080 self.valid = 0 00081 else: 00082 self.iTOW = 0 00083 self.tAcc = 0 00084 self.nano = 0 00085 self.year = 0 00086 self.month = 0 00087 self.day = 0 00088 self.hour = 0 00089 self.min = 0 00090 self.sec = 0 00091 self.valid = 0 00092 00093 def _get_types(self): 00094 """ 00095 internal API method 00096 """ 00097 return self._slot_types 00098 00099 def serialize(self, buff): 00100 """ 00101 serialize message into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 """ 00105 try: 00106 _x = self 00107 buff.write(_struct_2IiH6B.pack(_x.iTOW, _x.tAcc, _x.nano, _x.year, _x.month, _x.day, _x.hour, _x.min, _x.sec, _x.valid)) 00108 except struct.error as se: self._check_types(se) 00109 except TypeError as te: self._check_types(te) 00110 00111 def deserialize(self, str): 00112 """ 00113 unpack serialized message in str into this message instance 00114 @param str: byte array of serialized message 00115 @type str: str 00116 """ 00117 try: 00118 end = 0 00119 _x = self 00120 start = end 00121 end += 20 00122 (_x.iTOW, _x.tAcc, _x.nano, _x.year, _x.month, _x.day, _x.hour, _x.min, _x.sec, _x.valid,) = _struct_2IiH6B.unpack(str[start:end]) 00123 return self 00124 except struct.error as e: 00125 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00126 00127 00128 def serialize_numpy(self, buff, numpy): 00129 """ 00130 serialize message with numpy array types into buffer 00131 @param buff: buffer 00132 @type buff: StringIO 00133 @param numpy: numpy python module 00134 @type numpy module 00135 """ 00136 try: 00137 _x = self 00138 buff.write(_struct_2IiH6B.pack(_x.iTOW, _x.tAcc, _x.nano, _x.year, _x.month, _x.day, _x.hour, _x.min, _x.sec, _x.valid)) 00139 except struct.error as se: self._check_types(se) 00140 except TypeError as te: self._check_types(te) 00141 00142 def deserialize_numpy(self, str, numpy): 00143 """ 00144 unpack serialized message in str into this message instance using numpy for array types 00145 @param str: byte array of serialized message 00146 @type str: str 00147 @param numpy: numpy python module 00148 @type numpy: module 00149 """ 00150 try: 00151 end = 0 00152 _x = self 00153 start = end 00154 end += 20 00155 (_x.iTOW, _x.tAcc, _x.nano, _x.year, _x.month, _x.day, _x.hour, _x.min, _x.sec, _x.valid,) = _struct_2IiH6B.unpack(str[start:end]) 00156 return self 00157 except struct.error as e: 00158 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00159 00160 _struct_I = roslib.message.struct_I 00161 _struct_2IiH6B = struct.Struct("<2IiH6B")