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