# 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_t6713', [dirname(__file__)])
except ImportError:
import _pyupm_t6713
return _pyupm_t6713
if fp is not None:
try:
_mod = imp.load_module('_pyupm_t6713', fp, pathname, description)
finally:
fp.close()
return _mod
_pyupm_t6713 = swig_import_helper()
del swig_import_helper
else:
import _pyupm_t6713
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_t6713.getVersion()
getVersion = _pyupm_t6713.getVersion
_pyupm_t6713.T6713_COMMAND_RESET_swigconstant(_pyupm_t6713)
T6713_COMMAND_RESET = _pyupm_t6713.T6713_COMMAND_RESET
_pyupm_t6713.T6713_COMMAND_STATUS_swigconstant(_pyupm_t6713)
T6713_COMMAND_STATUS = _pyupm_t6713.T6713_COMMAND_STATUS
_pyupm_t6713.T6713_COMMAND_GET_FIRMWARE_REVISION_swigconstant(_pyupm_t6713)
T6713_COMMAND_GET_FIRMWARE_REVISION = _pyupm_t6713.T6713_COMMAND_GET_FIRMWARE_REVISION
_pyupm_t6713.T6713_COMMAND_GET_GAS_PPM_swigconstant(_pyupm_t6713)
T6713_COMMAND_GET_GAS_PPM = _pyupm_t6713.T6713_COMMAND_GET_GAS_PPM
_pyupm_t6713.ERROR_CONDITION_swigconstant(_pyupm_t6713)
ERROR_CONDITION = _pyupm_t6713.ERROR_CONDITION
_pyupm_t6713.FLASH_ERROR_swigconstant(_pyupm_t6713)
FLASH_ERROR = _pyupm_t6713.FLASH_ERROR
_pyupm_t6713.CALIBRATION_ERROR_swigconstant(_pyupm_t6713)
CALIBRATION_ERROR = _pyupm_t6713.CALIBRATION_ERROR
_pyupm_t6713.WARMUP_MODE_swigconstant(_pyupm_t6713)
WARMUP_MODE = _pyupm_t6713.WARMUP_MODE
_pyupm_t6713.SINGLE_POINT_CALIBRATION_swigconstant(_pyupm_t6713)
SINGLE_POINT_CALIBRATION = _pyupm_t6713.SINGLE_POINT_CALIBRATION
_pyupm_t6713.RS232_swigconstant(_pyupm_t6713)
RS232 = _pyupm_t6713.RS232
_pyupm_t6713.I2C_swigconstant(_pyupm_t6713)
I2C = _pyupm_t6713.I2C
_pyupm_t6713.RS485_swigconstant(_pyupm_t6713)
RS485 = _pyupm_t6713.RS485
[docs]class COMMAND(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, COMMAND, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, COMMAND, name)
__repr__ = _swig_repr
__swig_setmethods__["function_code"] = _pyupm_t6713.COMMAND_function_code_set
__swig_getmethods__["function_code"] = _pyupm_t6713.COMMAND_function_code_get
if _newclass:
function_code = _swig_property(_pyupm_t6713.COMMAND_function_code_get, _pyupm_t6713.COMMAND_function_code_set)
__swig_setmethods__["register_address_msb"] = _pyupm_t6713.COMMAND_register_address_msb_set
__swig_getmethods__["register_address_msb"] = _pyupm_t6713.COMMAND_register_address_msb_get
if _newclass:
register_address_msb = _swig_property(_pyupm_t6713.COMMAND_register_address_msb_get, _pyupm_t6713.COMMAND_register_address_msb_set)
__swig_setmethods__["register_address_lsb"] = _pyupm_t6713.COMMAND_register_address_lsb_set
__swig_getmethods__["register_address_lsb"] = _pyupm_t6713.COMMAND_register_address_lsb_get
if _newclass:
register_address_lsb = _swig_property(_pyupm_t6713.COMMAND_register_address_lsb_get, _pyupm_t6713.COMMAND_register_address_lsb_set)
__swig_setmethods__["input_registers_to_read_msb"] = _pyupm_t6713.COMMAND_input_registers_to_read_msb_set
__swig_getmethods__["input_registers_to_read_msb"] = _pyupm_t6713.COMMAND_input_registers_to_read_msb_get
if _newclass:
input_registers_to_read_msb = _swig_property(_pyupm_t6713.COMMAND_input_registers_to_read_msb_get, _pyupm_t6713.COMMAND_input_registers_to_read_msb_set)
__swig_setmethods__["input_registers_to_read_lsb"] = _pyupm_t6713.COMMAND_input_registers_to_read_lsb_set
__swig_getmethods__["input_registers_to_read_lsb"] = _pyupm_t6713.COMMAND_input_registers_to_read_lsb_get
if _newclass:
input_registers_to_read_lsb = _swig_property(_pyupm_t6713.COMMAND_input_registers_to_read_lsb_get, _pyupm_t6713.COMMAND_input_registers_to_read_lsb_set)
def __init__(self):
this = _pyupm_t6713.new_COMMAND()
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_t6713.delete_COMMAND
__del__ = lambda self: None
COMMAND_swigregister = _pyupm_t6713.COMMAND_swigregister
COMMAND_swigregister(COMMAND)
[docs]class RESPONSE(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, RESPONSE, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, RESPONSE, name)
__repr__ = _swig_repr
__swig_setmethods__["function_code"] = _pyupm_t6713.RESPONSE_function_code_set
__swig_getmethods__["function_code"] = _pyupm_t6713.RESPONSE_function_code_get
if _newclass:
function_code = _swig_property(_pyupm_t6713.RESPONSE_function_code_get, _pyupm_t6713.RESPONSE_function_code_set)
__swig_setmethods__["byte_count"] = _pyupm_t6713.RESPONSE_byte_count_set
__swig_getmethods__["byte_count"] = _pyupm_t6713.RESPONSE_byte_count_get
if _newclass:
byte_count = _swig_property(_pyupm_t6713.RESPONSE_byte_count_get, _pyupm_t6713.RESPONSE_byte_count_set)
__swig_setmethods__["status_msb"] = _pyupm_t6713.RESPONSE_status_msb_set
__swig_getmethods__["status_msb"] = _pyupm_t6713.RESPONSE_status_msb_get
if _newclass:
status_msb = _swig_property(_pyupm_t6713.RESPONSE_status_msb_get, _pyupm_t6713.RESPONSE_status_msb_set)
__swig_setmethods__["status_lsb"] = _pyupm_t6713.RESPONSE_status_lsb_set
__swig_getmethods__["status_lsb"] = _pyupm_t6713.RESPONSE_status_lsb_get
if _newclass:
status_lsb = _swig_property(_pyupm_t6713.RESPONSE_status_lsb_get, _pyupm_t6713.RESPONSE_status_lsb_set)
def __init__(self):
this = _pyupm_t6713.new_RESPONSE()
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_t6713.delete_RESPONSE
__del__ = lambda self: None
RESPONSE_swigregister = _pyupm_t6713.RESPONSE_swigregister
RESPONSE_swigregister(RESPONSE)
_pyupm_t6713.READ_INPUT_REGISTERS_swigconstant(_pyupm_t6713)
READ_INPUT_REGISTERS = _pyupm_t6713.READ_INPUT_REGISTERS
_pyupm_t6713.WRITE_SINGLE_COIL_swigconstant(_pyupm_t6713)
WRITE_SINGLE_COIL = _pyupm_t6713.WRITE_SINGLE_COIL
_pyupm_t6713.WRITE_SINGLE_HOLDING_REGISTER_swigconstant(_pyupm_t6713)
WRITE_SINGLE_HOLDING_REGISTER = _pyupm_t6713.WRITE_SINGLE_HOLDING_REGISTER
[docs]class T6713(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, T6713, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, T6713, name)
__repr__ = _swig_repr
def __init__(self, bus):
"""
T6713(int bus)
Instantiates a T6713 object
Parameters:
-----------
bus: number of used bus
"""
this = _pyupm_t6713.new_T6713(bus)
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_t6713.delete_T6713
__del__ = lambda self: None
[docs] def getModuleName(self):
"""
virtual const char*
getModuleName()
Returns sensor module name
"""
return _pyupm_t6713.T6713_getModuleName(self)
[docs] def getPpm(self):
"""
uint16_t getPpm()
Get relative humidity measurement.
"""
return _pyupm_t6713.T6713_getPpm(self)
[docs] def getFirmwareRevision(self):
"""
uint16_t
getFirmwareRevision()
Get the firmware version
"""
return _pyupm_t6713.T6713_getFirmwareRevision(self)
T6713_swigregister = _pyupm_t6713.T6713_swigregister
T6713_swigregister(T6713)
# This file is compatible with both classic and new-style classes.