Go to the documentation of this file.00001 """autogenerated by genpy from ublox_msgs/CfgCFG.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 CfgCFG(genpy.Message):
00009 _md5sum = "13fb5dc245f45e15f71ae45386c6e5b8"
00010 _type = "ublox_msgs/CfgCFG"
00011 _has_header = False
00012 _full_text = """# CFG-CFG (0x06 0x09)
00013 # Antenna Control Settings
00014 #
00015
00016 uint8 CLASS_ID = 6
00017 uint8 MESSAGE_ID = 9
00018
00019 uint32 clearMask # Mask with configuration sub-sections to Clear
00020 # (=Load Default Configurations to Permanent
00021 # Configurations in non-volatile memory)
00022 uint32 saveMask # Mask with configuration sub-section to Save
00023 # (=Save Current Configuration to Non-volatile
00024 # Memory)
00025 uint32 loadMask # Mask with configuration sub-sections to Load
00026 # (=Load Permanent Configurations from
00027 # Non-volatile Memory to Current Configurations)
00028
00029 uint32 MASK_IO_PORT = 1 # Port Settings
00030 uint32 MASK_MSG_CONF = 2 # Message Configuration
00031 uint32 MASK_INF_MSG = 4 # INF Message Configuration
00032 uint32 MASK_NAV_CONF = 8 # Navigation Configuration
00033 uint32 MASK_RXM_CONF = 16 # Receiver Manager Configuration
00034 uint32 MASK_RINV_CONF = 512 # Remote Inventory Configuration
00035 uint32 MASK_ANT_CONF = 1024 # Antenna Configuration
00036
00037 uint8 deviceMask # Mask which selects the devices for this command
00038 uint8 DEV_BBR = 1 # device battery backed RAM
00039 uint8 DEV_FLASH = 2 # device Flash
00040 uint8 DEV_EEPROM = 4 # device EEPROM
00041 uint8 DEV_SPI_FLASH = 16 # device SPI Flash
00042
00043 """
00044
00045 CLASS_ID = 6
00046 MESSAGE_ID = 9
00047 MASK_IO_PORT = 1
00048 MASK_MSG_CONF = 2
00049 MASK_INF_MSG = 4
00050 MASK_NAV_CONF = 8
00051 MASK_RXM_CONF = 16
00052 MASK_RINV_CONF = 512
00053 MASK_ANT_CONF = 1024
00054 DEV_BBR = 1
00055 DEV_FLASH = 2
00056 DEV_EEPROM = 4
00057 DEV_SPI_FLASH = 16
00058
00059 __slots__ = ['clearMask','saveMask','loadMask','deviceMask']
00060 _slot_types = ['uint32','uint32','uint32','uint8']
00061
00062 def __init__(self, *args, **kwds):
00063 """
00064 Constructor. Any message fields that are implicitly/explicitly
00065 set to None will be assigned a default value. The recommend
00066 use is keyword arguments as this is more robust to future message
00067 changes. You cannot mix in-order arguments and keyword arguments.
00068
00069 The available fields are:
00070 clearMask,saveMask,loadMask,deviceMask
00071
00072 :param args: complete set of field values, in .msg order
00073 :param kwds: use keyword arguments corresponding to message field names
00074 to set specific fields.
00075 """
00076 if args or kwds:
00077 super(CfgCFG, self).__init__(*args, **kwds)
00078
00079 if self.clearMask is None:
00080 self.clearMask = 0
00081 if self.saveMask is None:
00082 self.saveMask = 0
00083 if self.loadMask is None:
00084 self.loadMask = 0
00085 if self.deviceMask is None:
00086 self.deviceMask = 0
00087 else:
00088 self.clearMask = 0
00089 self.saveMask = 0
00090 self.loadMask = 0
00091 self.deviceMask = 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, ``StringIO``
00103 """
00104 try:
00105 _x = self
00106 buff.write(_struct_3IB.pack(_x.clearMask, _x.saveMask, _x.loadMask, _x.deviceMask))
00107 except struct.error as se: self._check_types(se)
00108 except TypeError as te: self._check_types(te)
00109
00110 def deserialize(self, str):
00111 """
00112 unpack serialized message in str into this message instance
00113 :param str: byte array of serialized message, ``str``
00114 """
00115 try:
00116 end = 0
00117 _x = self
00118 start = end
00119 end += 13
00120 (_x.clearMask, _x.saveMask, _x.loadMask, _x.deviceMask,) = _struct_3IB.unpack(str[start:end])
00121 return self
00122 except struct.error as e:
00123 raise genpy.DeserializationError(e)
00124
00125
00126 def serialize_numpy(self, buff, numpy):
00127 """
00128 serialize message with numpy array types into buffer
00129 :param buff: buffer, ``StringIO``
00130 :param numpy: numpy python module
00131 """
00132 try:
00133 _x = self
00134 buff.write(_struct_3IB.pack(_x.clearMask, _x.saveMask, _x.loadMask, _x.deviceMask))
00135 except struct.error as se: self._check_types(se)
00136 except TypeError as te: self._check_types(te)
00137
00138 def deserialize_numpy(self, str, numpy):
00139 """
00140 unpack serialized message in str into this message instance using numpy for array types
00141 :param str: byte array of serialized message, ``str``
00142 :param numpy: numpy python module
00143 """
00144 try:
00145 end = 0
00146 _x = self
00147 start = end
00148 end += 13
00149 (_x.clearMask, _x.saveMask, _x.loadMask, _x.deviceMask,) = _struct_3IB.unpack(str[start:end])
00150 return self
00151 except struct.error as e:
00152 raise genpy.DeserializationError(e)
00153
00154 _struct_I = genpy.struct_I
00155 _struct_3IB = struct.Struct("<3IB")