Source code for pyupm_adis16448

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# 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
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pyupm_adis16448', [dirname(__file__)])
        except ImportError:
            import _pyupm_adis16448
            return _pyupm_adis16448
        if fp is not None:
            try:
                _mod = imp.load_module('_pyupm_adis16448', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _pyupm_adis16448 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_adis16448
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0



def getVersion():
    return _pyupm_adis16448.getVersion()
getVersion = _pyupm_adis16448.getVersion

_pyupm_adis16448.FLASH_CNT_swigconstant(_pyupm_adis16448)
FLASH_CNT = _pyupm_adis16448.FLASH_CNT

_pyupm_adis16448.XGYRO_OUT_swigconstant(_pyupm_adis16448)
XGYRO_OUT = _pyupm_adis16448.XGYRO_OUT

_pyupm_adis16448.YGYRO_OUT_swigconstant(_pyupm_adis16448)
YGYRO_OUT = _pyupm_adis16448.YGYRO_OUT

_pyupm_adis16448.ZGYRO_OUT_swigconstant(_pyupm_adis16448)
ZGYRO_OUT = _pyupm_adis16448.ZGYRO_OUT

_pyupm_adis16448.XACCL_OUT_swigconstant(_pyupm_adis16448)
XACCL_OUT = _pyupm_adis16448.XACCL_OUT

_pyupm_adis16448.YACCL_OUT_swigconstant(_pyupm_adis16448)
YACCL_OUT = _pyupm_adis16448.YACCL_OUT

_pyupm_adis16448.ZACCL_OUT_swigconstant(_pyupm_adis16448)
ZACCL_OUT = _pyupm_adis16448.ZACCL_OUT

_pyupm_adis16448.XMAGN_OUT_swigconstant(_pyupm_adis16448)
XMAGN_OUT = _pyupm_adis16448.XMAGN_OUT

_pyupm_adis16448.YMAGN_OUT_swigconstant(_pyupm_adis16448)
YMAGN_OUT = _pyupm_adis16448.YMAGN_OUT

_pyupm_adis16448.ZMAGN_OUT_swigconstant(_pyupm_adis16448)
ZMAGN_OUT = _pyupm_adis16448.ZMAGN_OUT

_pyupm_adis16448.BARO_OUT_swigconstant(_pyupm_adis16448)
BARO_OUT = _pyupm_adis16448.BARO_OUT

_pyupm_adis16448.TEMP_OUT_swigconstant(_pyupm_adis16448)
TEMP_OUT = _pyupm_adis16448.TEMP_OUT

_pyupm_adis16448.XGYRO_OFF_swigconstant(_pyupm_adis16448)
XGYRO_OFF = _pyupm_adis16448.XGYRO_OFF

_pyupm_adis16448.YGYRO_OFF_swigconstant(_pyupm_adis16448)
YGYRO_OFF = _pyupm_adis16448.YGYRO_OFF

_pyupm_adis16448.ZGYRO_OFF_swigconstant(_pyupm_adis16448)
ZGYRO_OFF = _pyupm_adis16448.ZGYRO_OFF

_pyupm_adis16448.XACCL_OFF_swigconstant(_pyupm_adis16448)
XACCL_OFF = _pyupm_adis16448.XACCL_OFF

_pyupm_adis16448.YACCL_OFF_swigconstant(_pyupm_adis16448)
YACCL_OFF = _pyupm_adis16448.YACCL_OFF

_pyupm_adis16448.ZACCL_OFF_swigconstant(_pyupm_adis16448)
ZACCL_OFF = _pyupm_adis16448.ZACCL_OFF

_pyupm_adis16448.XMAGN_HIC_swigconstant(_pyupm_adis16448)
XMAGN_HIC = _pyupm_adis16448.XMAGN_HIC

_pyupm_adis16448.YMAGN_HIC_swigconstant(_pyupm_adis16448)
YMAGN_HIC = _pyupm_adis16448.YMAGN_HIC

_pyupm_adis16448.ZMAGN_HIC_swigconstant(_pyupm_adis16448)
ZMAGN_HIC = _pyupm_adis16448.ZMAGN_HIC

_pyupm_adis16448.XMAGN_SIC_swigconstant(_pyupm_adis16448)
XMAGN_SIC = _pyupm_adis16448.XMAGN_SIC

_pyupm_adis16448.YMAGN_SIC_swigconstant(_pyupm_adis16448)
YMAGN_SIC = _pyupm_adis16448.YMAGN_SIC

_pyupm_adis16448.ZMAGN_SIC_swigconstant(_pyupm_adis16448)
ZMAGN_SIC = _pyupm_adis16448.ZMAGN_SIC

_pyupm_adis16448.GPIO_CTRL_swigconstant(_pyupm_adis16448)
GPIO_CTRL = _pyupm_adis16448.GPIO_CTRL

_pyupm_adis16448.MSC_CTRL_swigconstant(_pyupm_adis16448)
MSC_CTRL = _pyupm_adis16448.MSC_CTRL

_pyupm_adis16448.SMPL_PRD_swigconstant(_pyupm_adis16448)
SMPL_PRD = _pyupm_adis16448.SMPL_PRD

_pyupm_adis16448.SENS_AVG_swigconstant(_pyupm_adis16448)
SENS_AVG = _pyupm_adis16448.SENS_AVG

_pyupm_adis16448.SEQ_CNT_swigconstant(_pyupm_adis16448)
SEQ_CNT = _pyupm_adis16448.SEQ_CNT

_pyupm_adis16448.DIAG_STAT_swigconstant(_pyupm_adis16448)
DIAG_STAT = _pyupm_adis16448.DIAG_STAT

_pyupm_adis16448.GLOB_CMD_swigconstant(_pyupm_adis16448)
GLOB_CMD = _pyupm_adis16448.GLOB_CMD

_pyupm_adis16448.ALM_MAG1_swigconstant(_pyupm_adis16448)
ALM_MAG1 = _pyupm_adis16448.ALM_MAG1

_pyupm_adis16448.ALM_MAG2_swigconstant(_pyupm_adis16448)
ALM_MAG2 = _pyupm_adis16448.ALM_MAG2

_pyupm_adis16448.ALM_SMPL1_swigconstant(_pyupm_adis16448)
ALM_SMPL1 = _pyupm_adis16448.ALM_SMPL1

_pyupm_adis16448.ALM_SMPL2_swigconstant(_pyupm_adis16448)
ALM_SMPL2 = _pyupm_adis16448.ALM_SMPL2

_pyupm_adis16448.ALM_CTRL_swigconstant(_pyupm_adis16448)
ALM_CTRL = _pyupm_adis16448.ALM_CTRL

_pyupm_adis16448.LOT_ID1_swigconstant(_pyupm_adis16448)
LOT_ID1 = _pyupm_adis16448.LOT_ID1

_pyupm_adis16448.LOT_ID2_swigconstant(_pyupm_adis16448)
LOT_ID2 = _pyupm_adis16448.LOT_ID2

_pyupm_adis16448.PROD_ID_swigconstant(_pyupm_adis16448)
PROD_ID = _pyupm_adis16448.PROD_ID

_pyupm_adis16448.SERIAL_NUM_swigconstant(_pyupm_adis16448)
SERIAL_NUM = _pyupm_adis16448.SERIAL_NUM
[docs]class ADIS16448(_object): """ API for the Analog Devices ADIS16448 Accelerometer. ID: adis16448 Name: Industrial Grade Ten Degrees of Freedom Inertial Sensor Category: accelerometer Manufacturer: generic Link:http://www.analog.com/en/products/sensors/isensor-mems-inertial- measurement-units/adis16448.html Connection: spi This is an industrial-grade accelerometer by Analog Devices. C++ includes: adis16448.hpp """ __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ADIS16448, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ADIS16448, name) __repr__ = _swig_repr def __init__(self, bus, rst): """ ADIS16448(int bus, int rst) Constructor with configurable HW Reset """ this = _pyupm_adis16448.new_ADIS16448(bus, rst) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _pyupm_adis16448.delete_ADIS16448 __del__ = lambda self: None
[docs] def resetDUT(self): """ void resetDUT() Performs hardware reset by sending the specified pin low for 2 seconds """ return _pyupm_adis16448.ADIS16448_resetDUT(self)
[docs] def configSPI(self): """ void configSPI() Sets SPI frequency, mode, and bits/word """ return _pyupm_adis16448.ADIS16448_configSPI(self)
[docs] def regRead(self, regAddr): """ int16_t regRead(uint8_t regAddr) Reads a specified register and returns data """ return _pyupm_adis16448.ADIS16448_regRead(self, regAddr)
[docs] def regWrite(self, regAddr, regData): """ void regWrite(uint8_t regAddr, uint16_t regData) Writes to a specified register """ return _pyupm_adis16448.ADIS16448_regWrite(self, regAddr, regData)
[docs] def accelScale(self, sensorData): """ float accelScale(int16_t sensorData) Scales accelerometer data """ return _pyupm_adis16448.ADIS16448_accelScale(self, sensorData)
[docs] def gyroScale(self, sensorData): """ float gyroScale(int16_t sensorData) Scales gyro data """ return _pyupm_adis16448.ADIS16448_gyroScale(self, sensorData)
[docs] def tempScale(self, sensorData): """ float tempScale(int16_t sensorData) Scales temperature data """ return _pyupm_adis16448.ADIS16448_tempScale(self, sensorData)
[docs] def pressureScale(self, sensorData): """ float pressureScale(int16_t sensorData) Scales pressure data """ return _pyupm_adis16448.ADIS16448_pressureScale(self, sensorData)
[docs] def magnetometerScale(self, sensorData): """ float magnetometerScale(int16_t sensorData) Scales magnetometer data """ return _pyupm_adis16448.ADIS16448_magnetometerScale(self, sensorData)
ADIS16448_swigregister = _pyupm_adis16448.ADIS16448_swigregister ADIS16448_swigregister(ADIS16448) # This file is compatible with both classic and new-style classes.