# 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_lsm303dlh
else:
    import _pyupm_lsm303dlh

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__)



def getVersion():
    return _pyupm_lsm303dlh.getVersion()
class int16Array(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, nelements):
        _pyupm_lsm303dlh.int16Array_swiginit(self, _pyupm_lsm303dlh.new_int16Array(nelements))
    __swig_destroy__ = _pyupm_lsm303dlh.delete_int16Array

    def __getitem__(self, index):
        return _pyupm_lsm303dlh.int16Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_lsm303dlh.int16Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_lsm303dlh.int16Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_lsm303dlh.int16Array_frompointer(t)

# Register int16Array in _pyupm_lsm303dlh:
_pyupm_lsm303dlh.int16Array_swigregister(int16Array)

def int16Array_frompointer(t):
    return _pyupm_lsm303dlh.int16Array_frompointer(t)

LSM303DLH_MAG = _pyupm_lsm303dlh.LSM303DLH_MAG
LSM303DLH_ACC = _pyupm_lsm303dlh.LSM303DLH_ACC
CTRL_REG1_A = _pyupm_lsm303dlh.CTRL_REG1_A
CTRL_REG2_A = _pyupm_lsm303dlh.CTRL_REG2_A
CTRL_REG3_A = _pyupm_lsm303dlh.CTRL_REG3_A
CTRL_REG4_A = _pyupm_lsm303dlh.CTRL_REG4_A
CTRL_REG5_A = _pyupm_lsm303dlh.CTRL_REG5_A
CRA_REG_M = _pyupm_lsm303dlh.CRA_REG_M
CRB_REG_M = _pyupm_lsm303dlh.CRB_REG_M
MR_REG_M = _pyupm_lsm303dlh.MR_REG_M
OUT_X_H_M = _pyupm_lsm303dlh.OUT_X_H_M
OUT_X_L_A = _pyupm_lsm303dlh.OUT_X_L_A
OUT_X_H_A = _pyupm_lsm303dlh.OUT_X_H_A
OUT_Y_L_A = _pyupm_lsm303dlh.OUT_Y_L_A
OUT_Y_H_A = _pyupm_lsm303dlh.OUT_Y_H_A
OUT_Z_L_A = _pyupm_lsm303dlh.OUT_Z_L_A
OUT_Z_H_A = _pyupm_lsm303dlh.OUT_Z_H_A
X = _pyupm_lsm303dlh.X
Y = _pyupm_lsm303dlh.Y
Z = _pyupm_lsm303dlh.Z
class LSM303DLH(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    LSM303DLH_MAG_T = _pyupm_lsm303dlh.LSM303DLH_LSM303DLH_MAG_T
    LSM303DLH_ACC_T = _pyupm_lsm303dlh.LSM303DLH_LSM303DLH_ACC_T

    def __init__(self, bus, addrMag=0x1E, addrAcc=0x19, accScale=8):
        _pyupm_lsm303dlh.LSM303DLH_swiginit(self, _pyupm_lsm303dlh.new_LSM303DLH(bus, addrMag, addrAcc, accScale))

    def getHeading(self):
        return _pyupm_lsm303dlh.LSM303DLH_getHeading(self)

    def getCoordinates(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoordinates(self)

    def getAcceleration(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAcceleration(self)

    def getRawCoorData(self):
        return _pyupm_lsm303dlh.LSM303DLH_getRawCoorData(self)

    def getCoorX(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorX(self)

    def getCoorY(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorY(self)

    def getCoorZ(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorZ(self)

    def getRawAccelData(self):
        return _pyupm_lsm303dlh.LSM303DLH_getRawAccelData(self)

    def getAccelX(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelX(self)

    def getAccelY(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelY(self)

    def getAccelZ(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelZ(self)
    __swig_destroy__ = _pyupm_lsm303dlh.delete_LSM303DLH

# Register LSM303DLH in _pyupm_lsm303dlh:
_pyupm_lsm303dlh.LSM303DLH_swigregister(LSM303DLH)



