# 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_gas
else:
    import _pyupm_gas

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_gas.getVersion()
class uint16Array(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_gas.uint16Array_swiginit(self, _pyupm_gas.new_uint16Array(nelements))
    __swig_destroy__ = _pyupm_gas.delete_uint16Array

    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)

    @staticmethod
    def frompointer(t):
        return _pyupm_gas.uint16Array_frompointer(t)

# Register uint16Array in _pyupm_gas:
_pyupm_gas.uint16Array_swigregister(uint16Array)

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

class thresholdContext(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    averageReading = property(_pyupm_gas.thresholdContext_averageReading_get, _pyupm_gas.thresholdContext_averageReading_set)
    runningAverage = property(_pyupm_gas.thresholdContext_runningAverage_get, _pyupm_gas.thresholdContext_runningAverage_set)
    averagedOver = property(_pyupm_gas.thresholdContext_averagedOver_get, _pyupm_gas.thresholdContext_averagedOver_set)

    def __init__(self):
        _pyupm_gas.thresholdContext_swiginit(self, _pyupm_gas.new_thresholdContext())
    __swig_destroy__ = _pyupm_gas.delete_thresholdContext

# Register thresholdContext in _pyupm_gas:
_pyupm_gas.thresholdContext_swigregister(thresholdContext)

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

    def __init__(self, gasPin):
        _pyupm_gas.Gas_swiginit(self, _pyupm_gas.new_Gas(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_Gas

    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)

# Register Gas in _pyupm_gas:
_pyupm_gas.Gas_swigregister(Gas)

class MQ2(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ2_swiginit(self, _pyupm_gas.new_MQ2(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ2

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

# Register MQ2 in _pyupm_gas:
_pyupm_gas.MQ2_swigregister(MQ2)

class MQ3(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ3_swiginit(self, _pyupm_gas.new_MQ3(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ3

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

# Register MQ3 in _pyupm_gas:
_pyupm_gas.MQ3_swigregister(MQ3)

class MQ4(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ4_swiginit(self, _pyupm_gas.new_MQ4(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ4

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

# Register MQ4 in _pyupm_gas:
_pyupm_gas.MQ4_swigregister(MQ4)

class MQ5(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ5_swiginit(self, _pyupm_gas.new_MQ5(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ5

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

# Register MQ5 in _pyupm_gas:
_pyupm_gas.MQ5_swigregister(MQ5)

class MQ6(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ6_swiginit(self, _pyupm_gas.new_MQ6(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ6

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

# Register MQ6 in _pyupm_gas:
_pyupm_gas.MQ6_swigregister(MQ6)

class MQ7(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ7_swiginit(self, _pyupm_gas.new_MQ7(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ7

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

# Register MQ7 in _pyupm_gas:
_pyupm_gas.MQ7_swigregister(MQ7)

class MQ8(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ8_swiginit(self, _pyupm_gas.new_MQ8(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ8

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

# Register MQ8 in _pyupm_gas:
_pyupm_gas.MQ8_swigregister(MQ8)

class MQ9(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.MQ9_swiginit(self, _pyupm_gas.new_MQ9(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_MQ9

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

# Register MQ9 in _pyupm_gas:
_pyupm_gas.MQ9_swigregister(MQ9)

class TP401(Gas):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, gasPin):
        _pyupm_gas.TP401_swiginit(self, _pyupm_gas.new_TP401(gasPin))
    __swig_destroy__ = _pyupm_gas.delete_TP401

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

    def getPPM(self):
        return _pyupm_gas.TP401_getPPM(self)

# Register TP401 in _pyupm_gas:
_pyupm_gas.TP401_swigregister(TP401)



