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