Commit 8e396a36 authored by Pavel Vainerman's avatar Pavel Vainerman

fix ping test, upgrade python wrapper

parent 44975e25
......@@ -50,7 +50,7 @@ namespace uniset
* \note Вызывается через system()! Это может быть опасно с точки зрения безопасности..
* \todo Возможно стоит написать свою реализацию ping
*/
static bool ping( const std::string& _ip, timeout_t tout = 1000, const std::string& ping_argc = "-c 1 -w 0.1 -q -n" ) noexcept;
static bool ping( const std::string& _ip, timeout_t tout = 1100, const std::string& ping_argc = "-c 1 -w 1 -q -n" ) noexcept;
};
// -------------------------------------------------------------------------
} // end of uniset namespace
......
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
# 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
if version_info >= (2, 6, 0):
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_parts = __name__.rpartition('.')
pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUConnector')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUConnector')
_pyUConnector = 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
......@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError:
import _pyUConnector
return _pyUConnector
if fp is not None:
try:
_mod = imp.load_module('_pyUConnector', fp, pathname, description)
finally:
try:
_mod = imp.load_module('_pyUConnector', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
return _mod
_pyUConnector = swig_import_helper()
del swig_import_helper
else:
import _pyUConnector
del version_info
raise RuntimeError('Python 2.6 or later required')
del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
......@@ -51,25 +64,19 @@ 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):
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)
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)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -85,7 +92,7 @@ class Params:
this = _pyUConnector.new_Params()
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
def add(self, s):
......@@ -97,7 +104,7 @@ class Params:
__swig_getmethods__["argc"] = _pyUConnector.Params_argc_get
__swig_setmethods__["argv"] = _pyUConnector.Params_argv_set
__swig_getmethods__["argv"] = _pyUConnector.Params_argv_get
__swig_getmethods__["inst"] = lambda x: _pyUConnector.Params_inst
inst = _pyUConnector.Params_inst
__swig_destroy__ = _pyUConnector.delete_Params
__del__ = lambda self: None
Params_swigregister = _pyUConnector.Params_swigregister
......@@ -131,7 +138,7 @@ class ShortIOInfo:
this = _pyUConnector.new_ShortIOInfo()
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUConnector.delete_ShortIOInfo
__del__ = lambda self: None
......@@ -149,7 +156,7 @@ class UConnector:
this = _pyUConnector.new_UConnector(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUConnector.delete_UConnector
__del__ = lambda self: None
......@@ -198,6 +205,5 @@ class UConnector:
UConnector_swigregister = _pyUConnector.UConnector_swigregister
UConnector_swigregister(UConnector)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
# 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
if version_info >= (2, 6, 0):
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_parts = __name__.rpartition('.')
pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUExceptions')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUExceptions')
_pyUExceptions = 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
......@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError:
import _pyUExceptions
return _pyUExceptions
if fp is not None:
try:
_mod = imp.load_module('_pyUExceptions', fp, pathname, description)
finally:
try:
_mod = imp.load_module('_pyUExceptions', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
return _mod
_pyUExceptions = swig_import_helper()
del swig_import_helper
else:
import _pyUExceptions
del version_info
raise RuntimeError('Python 2.6 or later required')
del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
......@@ -51,25 +64,19 @@ 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):
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)
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)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -84,7 +91,7 @@ class UException:
this = _pyUExceptions.new_UException(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_UException
__del__ = lambda self: None
......@@ -111,7 +118,7 @@ class UTimeOut(UException):
this = _pyUExceptions.new_UTimeOut(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_UTimeOut
__del__ = lambda self: None
......@@ -133,7 +140,7 @@ class USysError(UException):
this = _pyUExceptions.new_USysError(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_USysError
__del__ = lambda self: None
......@@ -155,13 +162,12 @@ class UValidateError(UException):
this = _pyUExceptions.new_UValidateError(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUExceptions.delete_UValidateError
__del__ = lambda self: None
UValidateError_swigregister = _pyUExceptions.UValidateError_swigregister
UValidateError_swigregister(UValidateError)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
# 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
if version_info >= (2, 6, 0):
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_parts = __name__.rpartition('.')
pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUModbus')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUModbus')
_pyUModbus = 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
......@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError:
import _pyUModbus
return _pyUModbus
if fp is not None:
try:
_mod = imp.load_module('_pyUModbus', fp, pathname, description)
finally:
try:
_mod = imp.load_module('_pyUModbus', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
return _mod
_pyUModbus = swig_import_helper()
del swig_import_helper
else:
import _pyUModbus
del version_info
raise RuntimeError('Python 2.6 or later required')
del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
......@@ -51,25 +64,19 @@ 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):
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)
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)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -84,7 +91,7 @@ class UModbus:
this = _pyUModbus.new_UModbus()
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUModbus.delete_UModbus
__del__ = lambda self: None
......@@ -130,6 +137,5 @@ class UModbus:
UModbus_swigregister = _pyUModbus.UModbus_swigregister
UModbus_swigregister(UModbus)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
# 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
if version_info >= (2, 6, 0):
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_parts = __name__.rpartition('.')
pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUniSet')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUniSet')
_pyUniSet = 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
......@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError:
import _pyUniSet
return _pyUniSet
if fp is not None:
try:
_mod = imp.load_module('_pyUniSet', fp, pathname, description)
finally:
try:
_mod = imp.load_module('_pyUniSet', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
return _mod
_pyUniSet = swig_import_helper()
del swig_import_helper
else:
import _pyUniSet
del version_info
raise RuntimeError('Python 2.6 or later required')
del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
......@@ -51,25 +64,19 @@ 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):
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)
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)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
......@@ -129,7 +136,7 @@ class Params:
this = _pyUniSet.new_Params()
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
def add(self, s):
......@@ -141,7 +148,7 @@ class Params:
__swig_getmethods__["argc"] = _pyUniSet.Params_argc_get
__swig_setmethods__["argv"] = _pyUniSet.Params_argv_set
__swig_getmethods__["argv"] = _pyUniSet.Params_argv_get
__swig_getmethods__["inst"] = lambda x: _pyUniSet.Params_inst
inst = _pyUniSet.Params_inst
__swig_destroy__ = _pyUniSet.delete_Params
__del__ = lambda self: None
Params_swigregister = _pyUniSet.Params_swigregister
......@@ -175,7 +182,7 @@ class ShortIOInfo:
this = _pyUniSet.new_ShortIOInfo()
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_ShortIOInfo
__del__ = lambda self: None
......@@ -193,7 +200,7 @@ class UException(Exception):
this = _pyUniSet.new_UException(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UException
__del__ = lambda self: None
......@@ -220,7 +227,7 @@ class UTimeOut(UException):
this = _pyUniSet.new_UTimeOut(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UTimeOut
__del__ = lambda self: None
......@@ -242,7 +249,7 @@ class USysError(UException):
this = _pyUniSet.new_USysError(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_USysError
__del__ = lambda self: None
......@@ -264,7 +271,7 @@ class UValidateError(UException):
this = _pyUniSet.new_UValidateError(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UValidateError
__del__ = lambda self: None
......@@ -282,7 +289,7 @@ class UProxyObject:
this = _pyUniSet.new_UProxyObject(*args)
try:
self.this.append(this)
except Exception:
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _pyUniSet.delete_UProxyObject
__del__ = lambda self: None
......@@ -313,6 +320,5 @@ class UProxyObject:
UProxyObject_swigregister = _pyUniSet.UProxyObject_swigregister
UProxyObject_swigregister(UProxyObject)
# This file is compatible with both classic and new-style classes.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment