$search
00001 """autogenerated by genmsg_py from CfgANT.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CfgANT(roslib.message.Message): 00007 _md5sum = "9e3add3a4d57d340f23eecf447a5c89e" 00008 _type = "ublox_msgs/CfgANT" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# CFG-ANT (0x06 0x13) 00011 # Antenna Control Settings 00012 # 00013 00014 uint8 CLASS_ID = 6 00015 uint8 MESSAGE_ID = 19 00016 00017 uint16 flags # Antenna Flag Mask 00018 uint16 FLAGS_SVCS = 1 # Enable Antenna Supply Voltage Control Signal 00019 uint16 FLAGS_SCD = 2 # Enable Short Circuit Detection 00020 uint16 FLAGS_OCD = 4 # Enable Open Circuit Detection 00021 uint16 FLAGS_PDWN_ON_SCD = 8 # Power Down Antenna supply if Short Circuit is detected. (only in combination with Bit 1) 00022 uint16 FLAGS_RECOVERY = 16 # Enable automatic recovery from short state 00023 00024 uint16 pins # Antenna Pin Configuration 00025 uint16 PIN_SWITCH_MASK = 31 # PIO-Pin used for switching antenna supply (internal to TIM-LP/TIM-LF) 00026 uint16 PIN_SCD_MASK = 992 # PIO-Pin used for detecting a short in the antenna supply 00027 uint16 PIN_OCD_MASK = 31744 # PIO-Pin used for detecting open/not connected antenna 00028 uint16 PIN_RECONFIG = 16384 # if set to one, and this command is sent to the receiver, the receiver will reconfigure the pins as specified. 00029 00030 """ 00031 # Pseudo-constants 00032 CLASS_ID = 6 00033 MESSAGE_ID = 19 00034 FLAGS_SVCS = 1 00035 FLAGS_SCD = 2 00036 FLAGS_OCD = 4 00037 FLAGS_PDWN_ON_SCD = 8 00038 FLAGS_RECOVERY = 16 00039 PIN_SWITCH_MASK = 31 00040 PIN_SCD_MASK = 992 00041 PIN_OCD_MASK = 31744 00042 PIN_RECONFIG = 16384 00043 00044 __slots__ = ['flags','pins'] 00045 _slot_types = ['uint16','uint16'] 00046 00047 def __init__(self, *args, **kwds): 00048 """ 00049 Constructor. Any message fields that are implicitly/explicitly 00050 set to None will be assigned a default value. The recommend 00051 use is keyword arguments as this is more robust to future message 00052 changes. You cannot mix in-order arguments and keyword arguments. 00053 00054 The available fields are: 00055 flags,pins 00056 00057 @param args: complete set of field values, in .msg order 00058 @param kwds: use keyword arguments corresponding to message field names 00059 to set specific fields. 00060 """ 00061 if args or kwds: 00062 super(CfgANT, self).__init__(*args, **kwds) 00063 #message fields cannot be None, assign default values for those that are 00064 if self.flags is None: 00065 self.flags = 0 00066 if self.pins is None: 00067 self.pins = 0 00068 else: 00069 self.flags = 0 00070 self.pins = 0 00071 00072 def _get_types(self): 00073 """ 00074 internal API method 00075 """ 00076 return self._slot_types 00077 00078 def serialize(self, buff): 00079 """ 00080 serialize message into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 """ 00084 try: 00085 _x = self 00086 buff.write(_struct_2H.pack(_x.flags, _x.pins)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize(self, str): 00091 """ 00092 unpack serialized message in str into this message instance 00093 @param str: byte array of serialized message 00094 @type str: str 00095 """ 00096 try: 00097 end = 0 00098 _x = self 00099 start = end 00100 end += 4 00101 (_x.flags, _x.pins,) = _struct_2H.unpack(str[start:end]) 00102 return self 00103 except struct.error as e: 00104 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00105 00106 00107 def serialize_numpy(self, buff, numpy): 00108 """ 00109 serialize message with numpy array types into buffer 00110 @param buff: buffer 00111 @type buff: StringIO 00112 @param numpy: numpy python module 00113 @type numpy module 00114 """ 00115 try: 00116 _x = self 00117 buff.write(_struct_2H.pack(_x.flags, _x.pins)) 00118 except struct.error as se: self._check_types(se) 00119 except TypeError as te: self._check_types(te) 00120 00121 def deserialize_numpy(self, str, numpy): 00122 """ 00123 unpack serialized message in str into this message instance using numpy for array types 00124 @param str: byte array of serialized message 00125 @type str: str 00126 @param numpy: numpy python module 00127 @type numpy: module 00128 """ 00129 try: 00130 end = 0 00131 _x = self 00132 start = end 00133 end += 4 00134 (_x.flags, _x.pins,) = _struct_2H.unpack(str[start:end]) 00135 return self 00136 except struct.error as e: 00137 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00138 00139 _struct_I = roslib.message.struct_I 00140 _struct_2H = struct.Struct("<2H")