# 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_gas')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_gas')
    _pyupm_gas = 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_gas', [dirname(__file__)])
        except ImportError:
            import _pyupm_gas
            return _pyupm_gas
        try:
            _mod = imp.load_module('_pyupm_gas', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_gas = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_gas
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_gas.getVersion()
getVersion = _pyupm_gas.getVersion
class uint16Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, uint16Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, uint16Array, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_gas.new_uint16Array(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_uint16Array
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _pyupm_gas.uint16Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_gas.uint16Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_gas.uint16Array_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_gas.uint16Array_frompointer)
    else:
        frompointer = _pyupm_gas.uint16Array_frompointer
uint16Array_swigregister = _pyupm_gas.uint16Array_swigregister
uint16Array_swigregister(uint16Array)

def uint16Array_frompointer(t):
    return _pyupm_gas.uint16Array_frompointer(t)
uint16Array_frompointer = _pyupm_gas.uint16Array_frompointer

class thresholdContext(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, thresholdContext, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, thresholdContext, name)
    __repr__ = _swig_repr
    __swig_setmethods__["averageReading"] = _pyupm_gas.thresholdContext_averageReading_set
    __swig_getmethods__["averageReading"] = _pyupm_gas.thresholdContext_averageReading_get
    if _newclass:
        averageReading = _swig_property(_pyupm_gas.thresholdContext_averageReading_get, _pyupm_gas.thresholdContext_averageReading_set)
    __swig_setmethods__["runningAverage"] = _pyupm_gas.thresholdContext_runningAverage_set
    __swig_getmethods__["runningAverage"] = _pyupm_gas.thresholdContext_runningAverage_get
    if _newclass:
        runningAverage = _swig_property(_pyupm_gas.thresholdContext_runningAverage_get, _pyupm_gas.thresholdContext_runningAverage_set)
    __swig_setmethods__["averagedOver"] = _pyupm_gas.thresholdContext_averagedOver_set
    __swig_getmethods__["averagedOver"] = _pyupm_gas.thresholdContext_averagedOver_get
    if _newclass:
        averagedOver = _swig_property(_pyupm_gas.thresholdContext_averagedOver_get, _pyupm_gas.thresholdContext_averagedOver_set)

    def __init__(self):
        this = _pyupm_gas.new_thresholdContext()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_thresholdContext
    __del__ = lambda self: None
thresholdContext_swigregister = _pyupm_gas.thresholdContext_swigregister
thresholdContext_swigregister(thresholdContext)

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

    def __init__(self, gasPin):
        this = _pyupm_gas.new_Gas(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_Gas
    __del__ = lambda self: None

    def getSampledWindow(self, freqMS, numberOfSamples, buffer):
        return _pyupm_gas.Gas_getSampledWindow(self, freqMS, numberOfSamples, buffer)

    def findThreshold(self, ctx, threshold, buffer, len):
        return _pyupm_gas.Gas_findThreshold(self, ctx, threshold, buffer, len)

    def getSampledData(self, ctx):
        return _pyupm_gas.Gas_getSampledData(self, ctx)

    def getSample(self):
        return _pyupm_gas.Gas_getSample(self)

    def getConcentration(self):
        return _pyupm_gas.Gas_getConcentration(self)

    def printGraph(self, ctx, resolution):
        return _pyupm_gas.Gas_printGraph(self, ctx, resolution)
Gas_swigregister = _pyupm_gas.Gas_swigregister
Gas_swigregister(Gas)

class MQ2(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ2, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ2, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ2(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ2
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ2_name(self)
MQ2_swigregister = _pyupm_gas.MQ2_swigregister
MQ2_swigregister(MQ2)

class MQ3(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ3, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ3, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ3(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ3
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ3_name(self)
MQ3_swigregister = _pyupm_gas.MQ3_swigregister
MQ3_swigregister(MQ3)

class MQ4(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ4, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ4, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ4(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ4
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ4_name(self)
MQ4_swigregister = _pyupm_gas.MQ4_swigregister
MQ4_swigregister(MQ4)

class MQ5(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ5, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ5, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ5(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ5
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ5_name(self)
MQ5_swigregister = _pyupm_gas.MQ5_swigregister
MQ5_swigregister(MQ5)

class MQ6(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ6, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ6, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ6(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ6
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ6_name(self)
MQ6_swigregister = _pyupm_gas.MQ6_swigregister
MQ6_swigregister(MQ6)

class MQ7(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ7, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ7, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ7(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ7
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ7_name(self)
MQ7_swigregister = _pyupm_gas.MQ7_swigregister
MQ7_swigregister(MQ7)

class MQ8(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ8, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ8, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ8(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ8
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ8_name(self)
MQ8_swigregister = _pyupm_gas.MQ8_swigregister
MQ8_swigregister(MQ8)

class MQ9(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MQ9, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MQ9, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_MQ9(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_MQ9
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.MQ9_name(self)
MQ9_swigregister = _pyupm_gas.MQ9_swigregister
MQ9_swigregister(MQ9)

class TP401(Gas):
    __swig_setmethods__ = {}
    for _s in [Gas]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, TP401, name, value)
    __swig_getmethods__ = {}
    for _s in [Gas]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, TP401, name)
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        this = _pyupm_gas.new_TP401(gasPin)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_gas.delete_TP401
    __del__ = lambda self: None

    def name(self):
        return _pyupm_gas.TP401_name(self)

    def getPPM(self):
        return _pyupm_gas.TP401_getPPM(self)
TP401_swigregister = _pyupm_gas.TP401_swigregister
TP401_swigregister(TP401)

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


