# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pyupm_mag3110
else:
    import _pyupm_mag3110

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import upm.pyupm_interfaces

def getVersion():
    return _pyupm_mag3110.getVersion()
MAG3110_NAME = _pyupm_mag3110.MAG3110_NAME
MAG3110_I2C_ADDRESS = _pyupm_mag3110.MAG3110_I2C_ADDRESS
MAG3110_DEVICE_ID = _pyupm_mag3110.MAG3110_DEVICE_ID
MAG3110_DEVICE_ID_REG = _pyupm_mag3110.MAG3110_DEVICE_ID_REG
MAG3110_DR_STATUS = _pyupm_mag3110.MAG3110_DR_STATUS
MAG3110_OUT_X_MSB = _pyupm_mag3110.MAG3110_OUT_X_MSB
MAG3110_OUT_X_LSB = _pyupm_mag3110.MAG3110_OUT_X_LSB
MAG3110_OUT_Y_MSB = _pyupm_mag3110.MAG3110_OUT_Y_MSB
MAG3110_OUT_Y_LSB = _pyupm_mag3110.MAG3110_OUT_Y_LSB
MAG3110_OUT_Z_MSB = _pyupm_mag3110.MAG3110_OUT_Z_MSB
MAG3110_OUT_Z_LSB = _pyupm_mag3110.MAG3110_OUT_Z_LSB
MAG3110_SYSMOD = _pyupm_mag3110.MAG3110_SYSMOD
MAG3110_OFF_X_MSB = _pyupm_mag3110.MAG3110_OFF_X_MSB
MAG3110_OFF_X_LSB = _pyupm_mag3110.MAG3110_OFF_X_LSB
MAG3110_OFF_Y_MSB = _pyupm_mag3110.MAG3110_OFF_Y_MSB
MAG3110_OFF_Y_LSB = _pyupm_mag3110.MAG3110_OFF_Y_LSB
MAG3110_OFF_Z_MSB = _pyupm_mag3110.MAG3110_OFF_Z_MSB
MAG3110_OFF_Z_LSB = _pyupm_mag3110.MAG3110_OFF_Z_LSB
MAG3110_DIE_TEMP = _pyupm_mag3110.MAG3110_DIE_TEMP
MAG3110_CTRL_REG1 = _pyupm_mag3110.MAG3110_CTRL_REG1
MAG3110_CTRL_REG2 = _pyupm_mag3110.MAG3110_CTRL_REG2
MAG3110_DR_STATUS_ZYXOW = _pyupm_mag3110.MAG3110_DR_STATUS_ZYXOW
MAG3110_DR_STATUS_ZOW = _pyupm_mag3110.MAG3110_DR_STATUS_ZOW
MAG3110_DR_STATUS_YOW = _pyupm_mag3110.MAG3110_DR_STATUS_YOW
MAG3110_DR_STATUS_XOW = _pyupm_mag3110.MAG3110_DR_STATUS_XOW
MAG3110_DR_STATUS_ZYXDR = _pyupm_mag3110.MAG3110_DR_STATUS_ZYXDR
MAG3110_DR_STATUS_ZDR = _pyupm_mag3110.MAG3110_DR_STATUS_ZDR
MAG3110_DR_STATUS_YDR = _pyupm_mag3110.MAG3110_DR_STATUS_YDR
MAG3110_DR_STATUS_XDR = _pyupm_mag3110.MAG3110_DR_STATUS_XDR
MAG3110_SYSMOD_STANDBY = _pyupm_mag3110.MAG3110_SYSMOD_STANDBY
MAG3110_SYSMOD_ACTIVE_RAW = _pyupm_mag3110.MAG3110_SYSMOD_ACTIVE_RAW
MAG3110_SYSMOD_ACTIVE = _pyupm_mag3110.MAG3110_SYSMOD_ACTIVE
MAG3110_CTRL_REG1_DROS_SHIFT = _pyupm_mag3110.MAG3110_CTRL_REG1_DROS_SHIFT
MAG3110_CTRL_REG1_DROS_MASK = _pyupm_mag3110.MAG3110_CTRL_REG1_DROS_MASK
MAG3110_CTRL_REG1_FR = _pyupm_mag3110.MAG3110_CTRL_REG1_FR
MAG3110_CTRL_REG1_TM = _pyupm_mag3110.MAG3110_CTRL_REG1_TM
MAG3110_CTRL_REG1_AC = _pyupm_mag3110.MAG3110_CTRL_REG1_AC
MAG3110_CTRL_REG2_AUTO_MRST_EN = _pyupm_mag3110.MAG3110_CTRL_REG2_AUTO_MRST_EN
MAG3110_CTRL_REG2_RAW = _pyupm_mag3110.MAG3110_CTRL_REG2_RAW
MAG3110_CTRL_REG2_MAG_RST = _pyupm_mag3110.MAG3110_CTRL_REG2_MAG_RST
MAG3110_DROS_8000_16 = _pyupm_mag3110.MAG3110_DROS_8000_16
MAG3110_DROS_4000_32 = _pyupm_mag3110.MAG3110_DROS_4000_32
MAG3110_DROS_2000_64 = _pyupm_mag3110.MAG3110_DROS_2000_64
MAG3110_DROS_1000_128 = _pyupm_mag3110.MAG3110_DROS_1000_128
MAG3110_DROS_4000_16 = _pyupm_mag3110.MAG3110_DROS_4000_16
MAG3110_DROS_2000_32 = _pyupm_mag3110.MAG3110_DROS_2000_32
MAG3110_DROS_1000_64 = _pyupm_mag3110.MAG3110_DROS_1000_64
MAG3110_DROS_0500_128 = _pyupm_mag3110.MAG3110_DROS_0500_128
MAG3110_DROS_2000_16 = _pyupm_mag3110.MAG3110_DROS_2000_16
MAG3110_DROS_1000_32 = _pyupm_mag3110.MAG3110_DROS_1000_32
MAG3110_DROS_0500_64 = _pyupm_mag3110.MAG3110_DROS_0500_64
MAG3110_DROS_0250_128 = _pyupm_mag3110.MAG3110_DROS_0250_128
MAG3110_DROS_1000_16 = _pyupm_mag3110.MAG3110_DROS_1000_16
MAG3110_DROS_0500_32 = _pyupm_mag3110.MAG3110_DROS_0500_32
MAG3110_DROS_0250_64 = _pyupm_mag3110.MAG3110_DROS_0250_64
MAG3110_DROS_0125_128 = _pyupm_mag3110.MAG3110_DROS_0125_128
MAG3110_DROS_0500_16 = _pyupm_mag3110.MAG3110_DROS_0500_16
MAG3110_DROS_0250_32 = _pyupm_mag3110.MAG3110_DROS_0250_32
MAG3110_DROS_0125_64 = _pyupm_mag3110.MAG3110_DROS_0125_64
MAG3110_DROS_0063_128 = _pyupm_mag3110.MAG3110_DROS_0063_128
MAG3110_DROS_0250_16 = _pyupm_mag3110.MAG3110_DROS_0250_16
MAG3110_DROS_0125_32 = _pyupm_mag3110.MAG3110_DROS_0125_32
MAG3110_DROS_0063_64 = _pyupm_mag3110.MAG3110_DROS_0063_64
MAG3110_DROS_0031_128 = _pyupm_mag3110.MAG3110_DROS_0031_128
MAG3110_DROS_0125_16 = _pyupm_mag3110.MAG3110_DROS_0125_16
MAG3110_DROS_0063_32 = _pyupm_mag3110.MAG3110_DROS_0063_32
MAG3110_DROS_0031_64 = _pyupm_mag3110.MAG3110_DROS_0031_64
MAG3110_DROS_0016_128 = _pyupm_mag3110.MAG3110_DROS_0016_128
MAG3110_DROS_0063_16 = _pyupm_mag3110.MAG3110_DROS_0063_16
MAG3110_DROS_0031_32 = _pyupm_mag3110.MAG3110_DROS_0031_32
MAG3110_DROS_0016_64 = _pyupm_mag3110.MAG3110_DROS_0016_64
MAG3110_DROS_0008_128 = _pyupm_mag3110.MAG3110_DROS_0008_128
MAG3110_DROS_DEFAULT = _pyupm_mag3110.MAG3110_DROS_DEFAULT
class mag3110_data_t(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    x = property(_pyupm_mag3110.mag3110_data_t_x_get, _pyupm_mag3110.mag3110_data_t_x_set)
    y = property(_pyupm_mag3110.mag3110_data_t_y_get, _pyupm_mag3110.mag3110_data_t_y_set)
    z = property(_pyupm_mag3110.mag3110_data_t_z_get, _pyupm_mag3110.mag3110_data_t_z_set)
    status = property(_pyupm_mag3110.mag3110_data_t_status_get, _pyupm_mag3110.mag3110_data_t_status_set)
    dtemp = property(_pyupm_mag3110.mag3110_data_t_dtemp_get, _pyupm_mag3110.mag3110_data_t_dtemp_set)

    def __init__(self):
        _pyupm_mag3110.mag3110_data_t_swiginit(self, _pyupm_mag3110.new_mag3110_data_t())
    __swig_destroy__ = _pyupm_mag3110.delete_mag3110_data_t

# Register mag3110_data_t in _pyupm_mag3110:
_pyupm_mag3110.mag3110_data_t_swigregister(mag3110_data_t)

class MAG3110(upm.pyupm_interfaces.iMagnetometer):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, bus, dros=15, devAddr=0x0E):
        _pyupm_mag3110.MAG3110_swiginit(self, _pyupm_mag3110.new_MAG3110(bus, dros, devAddr))

    def checkID(self):
        return _pyupm_mag3110.MAG3110_checkID(self)

    def getMagnetometer(self):
        return _pyupm_mag3110.MAG3110_getMagnetometer(self)

    def setUserOffset(self, x, y, z):
        return _pyupm_mag3110.MAG3110_setUserOffset(self, x, y, z)

    def setActive(self):
        return _pyupm_mag3110.MAG3110_setActive(self)

    def setStandby(self):
        return _pyupm_mag3110.MAG3110_setStandby(self)

    def isReady(self):
        return _pyupm_mag3110.MAG3110_isReady(self)

    def sampleData(self):
        return _pyupm_mag3110.MAG3110_sampleData(self)

    def getX(self, bSampleData=0):
        return _pyupm_mag3110.MAG3110_getX(self, bSampleData)

    def getY(self, bSampleData=0):
        return _pyupm_mag3110.MAG3110_getY(self, bSampleData)

    def getZ(self, bSampleData=0):
        return _pyupm_mag3110.MAG3110_getZ(self, bSampleData)

    def getStatus(self):
        return _pyupm_mag3110.MAG3110_getStatus(self)

    def getDieTemperature(self):
        return _pyupm_mag3110.MAG3110_getDieTemperature(self)

    def getData(self, data, bSampleData=0):
        return _pyupm_mag3110.MAG3110_getData(self, data, bSampleData)
    __swig_destroy__ = _pyupm_mag3110.delete_MAG3110

# Register MAG3110 in _pyupm_mag3110:
_pyupm_mag3110.MAG3110_swigregister(MAG3110)



