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