_GNSSSetup.py
Go to the documentation of this file.
00001 """autogenerated by genpy from applanix_msgs/GNSSSetup.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 GNSSSetup(genpy.Message):
00009   _md5sum = "02ec55e95fd85f13541cf9fc7cb12f4e"
00010   _type = "applanix_msgs/GNSSSetup"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# Msg 30, 31
00013 uint16 transaction
00014 
00015 uint8 AUTOCONFIG_ENABLE=1
00016 uint8 AUTOCONFIG_DISABLE=0
00017 uint8 autoconfig
00018 
00019 # Valid values = 1, 5, 10 (Hz)
00020 uint8 rate
00021 
00022 uint8 reserved1
00023 uint32 reserved2
00024 uint8 reserved3
00025 
00026 """
00027   # Pseudo-constants
00028   AUTOCONFIG_ENABLE = 1
00029   AUTOCONFIG_DISABLE = 0
00030 
00031   __slots__ = ['transaction','autoconfig','rate','reserved1','reserved2','reserved3']
00032   _slot_types = ['uint16','uint8','uint8','uint8','uint32','uint8']
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        transaction,autoconfig,rate,reserved1,reserved2,reserved3
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(GNSSSetup, self).__init__(*args, **kwds)
00050       #message fields cannot be None, assign default values for those that are
00051       if self.transaction is None:
00052         self.transaction = 0
00053       if self.autoconfig is None:
00054         self.autoconfig = 0
00055       if self.rate is None:
00056         self.rate = 0
00057       if self.reserved1 is None:
00058         self.reserved1 = 0
00059       if self.reserved2 is None:
00060         self.reserved2 = 0
00061       if self.reserved3 is None:
00062         self.reserved3 = 0
00063     else:
00064       self.transaction = 0
00065       self.autoconfig = 0
00066       self.rate = 0
00067       self.reserved1 = 0
00068       self.reserved2 = 0
00069       self.reserved3 = 0
00070 
00071   def _get_types(self):
00072     """
00073     internal API method
00074     """
00075     return self._slot_types
00076 
00077   def serialize(self, buff):
00078     """
00079     serialize message into buffer
00080     :param buff: buffer, ``StringIO``
00081     """
00082     try:
00083       _x = self
00084       buff.write(_struct_H3BIB.pack(_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3))
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, ``str``
00092     """
00093     try:
00094       end = 0
00095       _x = self
00096       start = end
00097       end += 10
00098       (_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3,) = _struct_H3BIB.unpack(str[start:end])
00099       return self
00100     except struct.error as e:
00101       raise genpy.DeserializationError(e) #most likely buffer underfill
00102 
00103 
00104   def serialize_numpy(self, buff, numpy):
00105     """
00106     serialize message with numpy array types into buffer
00107     :param buff: buffer, ``StringIO``
00108     :param numpy: numpy python module
00109     """
00110     try:
00111       _x = self
00112       buff.write(_struct_H3BIB.pack(_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3))
00113     except struct.error as se: self._check_types(se)
00114     except TypeError as te: self._check_types(te)
00115 
00116   def deserialize_numpy(self, str, numpy):
00117     """
00118     unpack serialized message in str into this message instance using numpy for array types
00119     :param str: byte array of serialized message, ``str``
00120     :param numpy: numpy python module
00121     """
00122     try:
00123       end = 0
00124       _x = self
00125       start = end
00126       end += 10
00127       (_x.transaction, _x.autoconfig, _x.rate, _x.reserved1, _x.reserved2, _x.reserved3,) = _struct_H3BIB.unpack(str[start:end])
00128       return self
00129     except struct.error as e:
00130       raise genpy.DeserializationError(e) #most likely buffer underfill
00131 
00132 _struct_I = genpy.struct_I
00133 _struct_H3BIB = struct.Struct("<H3BIB")


applanix_msgs
Author(s): Mike Purvis
autogenerated on Thu Jan 2 2014 11:04:51