# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_itg3200')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_itg3200')
    _pyupm_itg3200 = swig_import_helper()
    del swig_import_helper
elif _swig_python_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_itg3200', [dirname(__file__)])
        except ImportError:
            import _pyupm_itg3200
            return _pyupm_itg3200
        try:
            _mod = imp.load_module('_pyupm_itg3200', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_itg3200 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_itg3200
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

import upm.pyupm_interfaces

def getVersion():
    return _pyupm_itg3200.getVersion()
getVersion = _pyupm_itg3200.getVersion
class int16Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, int16Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, int16Array, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_itg3200.new_int16Array(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_itg3200.delete_int16Array
    __del__ = lambda self: None

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

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

    def cast(self):
        return _pyupm_itg3200.int16Array_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_itg3200.int16Array_frompointer)
    else:
        frompointer = _pyupm_itg3200.int16Array_frompointer
int16Array_swigregister = _pyupm_itg3200.int16Array_swigregister
int16Array_swigregister(int16Array)

def int16Array_frompointer(t):
    return _pyupm_itg3200.int16Array_frompointer(t)
int16Array_frompointer = _pyupm_itg3200.int16Array_frompointer

class floatArray(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, floatArray, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, floatArray, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_itg3200.new_floatArray(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_itg3200.delete_floatArray
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _pyupm_itg3200.floatArray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_itg3200.floatArray___setitem__(self, index, value)

    def cast(self):
        return _pyupm_itg3200.floatArray_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_itg3200.floatArray_frompointer)
    else:
        frompointer = _pyupm_itg3200.floatArray_frompointer
floatArray_swigregister = _pyupm_itg3200.floatArray_swigregister
floatArray_swigregister(floatArray)

def floatArray_frompointer(t):
    return _pyupm_itg3200.floatArray_frompointer(t)
floatArray_frompointer = _pyupm_itg3200.floatArray_frompointer

READ_BUFFER_LENGTH = _pyupm_itg3200.READ_BUFFER_LENGTH
class Itg3200(upm.pyupm_interfaces.iGyroscope):
    __swig_setmethods__ = {}
    for _s in [upm.pyupm_interfaces.iGyroscope]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Itg3200, name, value)
    __swig_getmethods__ = {}
    for _s in [upm.pyupm_interfaces.iGyroscope]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Itg3200, name)
    __repr__ = _swig_repr

    def __init__(self, bus):
        this = _pyupm_itg3200.new_Itg3200(bus)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def calibrate(self):
        return _pyupm_itg3200.Itg3200_calibrate(self)

    def getTemperature(self):
        return _pyupm_itg3200.Itg3200_getTemperature(self)

    def getRotation(self):
        return _pyupm_itg3200.Itg3200_getRotation(self)

    def getGyroscope(self):
        return _pyupm_itg3200.Itg3200_getGyroscope(self)

    def getRawValues(self):
        return _pyupm_itg3200.Itg3200_getRawValues(self)

    def getRawTemp(self):
        return _pyupm_itg3200.Itg3200_getRawTemp(self)

    def update(self):
        return _pyupm_itg3200.Itg3200_update(self)
    __swig_destroy__ = _pyupm_itg3200.delete_Itg3200
    __del__ = lambda self: None
Itg3200_swigregister = _pyupm_itg3200.Itg3200_swigregister
Itg3200_swigregister(Itg3200)

# This file is compatible with both classic and new-style classes.


