Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
4def8c92
Commit
4def8c92
authored
Oct 14, 2021
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[python]: module refactoring
parent
33108cc9
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
321 additions
and
317 deletions
+321
-317
configure.ac
configure.ac
+1
-1
Makefile.am
wrappers/python/lib/Makefile.am
+1
-1
UGlobal.py
wrappers/python/lib/UGlobal.py
+1
-1
UInterface.py
wrappers/python/lib/UInterface.py
+1
-1
UInterfaceModbus.py
wrappers/python/lib/UInterfaceModbus.py
+1
-1
UInterfaceUniSet.py
wrappers/python/lib/UInterfaceUniSet.py
+1
-1
UniSetHTTP.py
wrappers/python/lib/UniSetHTTP.py
+2
-1
__init__.py
wrappers/python/lib/__init__.py
+4
-4
Makefile.am
wrappers/python/lib/lib/Makefile.am
+71
-0
PyUInterface.cc
wrappers/python/lib/lib/PyUInterface.cc
+0
-0
PyUInterface.h
wrappers/python/lib/lib/PyUInterface.h
+0
-0
UConnector.i
wrappers/python/lib/lib/UConnector.i
+1
-1
UConnector.py
wrappers/python/lib/lib/UConnector.py
+60
-60
UConnector_wrap.cxx
wrappers/python/lib/lib/UConnector_wrap.cxx
+4
-4
UExceptions.i
wrappers/python/lib/lib/UExceptions.i
+1
-1
UExceptions.py
wrappers/python/lib/lib/UExceptions.py
+25
-25
UExceptions_wrap.cxx
wrappers/python/lib/lib/UExceptions_wrap.cxx
+4
-4
UInterface.i
wrappers/python/lib/lib/UInterface.i
+1
-1
UInterface_wrap.cxx
wrappers/python/lib/lib/UInterface_wrap.cxx
+4
-4
UModbus.i
wrappers/python/lib/lib/UModbus.i
+1
-1
UModbus.py
wrappers/python/lib/lib/UModbus.py
+24
-24
UModbus_wrap.cxx
wrappers/python/lib/lib/UModbus_wrap.cxx
+4
-4
UProxyObject.i
wrappers/python/lib/lib/UProxyObject.i
+1
-1
UniSet.py
wrappers/python/lib/lib/UniSet.py
+95
-94
__init__.py
wrappers/python/lib/lib/__init__.py
+1
-1
Makefile.am
wrappers/python/lib/pyUniSet/Makefile.am
+0
-71
uniset.chart.py
wrappers/python/netdata-plugin/uniset.chart.py
+1
-1
testUC.py
wrappers/python/tests/UConnector/testUC.py
+4
-3
testUI.py
wrappers/python/tests/UInterface/testUI.py
+3
-3
testUModbus.py
wrappers/python/tests/UModbus/testUModbus.py
+4
-3
No files found.
configure.ac
View file @
4def8c92
...
...
@@ -621,7 +621,7 @@ AC_CONFIG_FILES([Makefile
testsuite/Makefile
wrappers/Makefile
wrappers/python/lib/Makefile
wrappers/python/lib/
pyUniSet
/Makefile
wrappers/python/lib/
lib
/Makefile
wrappers/python/netdata-plugin/Makefile
wrappers/python/Makefile])
...
...
wrappers/python/lib/Makefile.am
View file @
4def8c92
if
ENABLE_PYTHON
SUBDIRS
=
pyUniSet
SUBDIRS
=
lib
#lib_LTLIBRARIES = libUniSet2Python.la
#libUniSet2Python_la_SOURCES =
...
...
wrappers/python/lib/UGlobal.py
View file @
4def8c92
...
...
@@ -3,7 +3,7 @@
import
sys
from
.
pyUniSet.py
UConnector
import
*
from
.
lib.
UConnector
import
*
def
is_id
(
str_id
):
...
...
wrappers/python/lib/UInterface.py
View file @
4def8c92
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from
.
pyUniSet.py
UniSet
import
*
from
.
lib.
UniSet
import
*
class
UInterface
():
...
...
wrappers/python/lib/UInterfaceModbus.py
View file @
4def8c92
...
...
@@ -5,7 +5,7 @@ import sys
from
.UInterface
import
*
from
.UGlobal
import
*
from
.
pyUniSet.py
UModbus
import
*
from
.
lib.
UModbus
import
*
class
UInterfaceModbus
(
UInterface
):
...
...
wrappers/python/lib/UInterfaceUniSet.py
View file @
4def8c92
...
...
@@ -3,7 +3,7 @@
from
.UInterface
import
*
from
.UGlobal
import
*
from
.
pyUniSet.py
UConnector
import
*
from
.
lib.
UConnector
import
*
class
UInterfaceUniSet
(
UInterface
):
...
...
wrappers/python/lib/UniSetHTTP.py
View file @
4def8c92
...
...
@@ -22,8 +22,9 @@ import urllib.request, urllib.parse, urllib.error
UHTTP_API_VERSION
=
'v0'
class
UHTTPError
:
class
UHTTPError
(
BaseException
)
:
def
__init__
(
self
,
err
=
''
):
BaseException
.
__init__
(
self
)
self
.
message
=
err
...
...
wrappers/python/lib/__init__.py
View file @
4def8c92
...
...
@@ -3,8 +3,8 @@
__all__
=
[
"UGlobal"
,
"UInterface"
,
"UInterfaceModbus"
,
"UInterfaceUniSet"
,
"UniSetHTTP"
,
"UniXML"
]
from
.
pyUniSet.py
UniSet
import
*
from
.
pyUniSet.py
UModbus
import
*
from
.
pyUniSet.py
UConnector
import
*
from
.
lib.
UniSet
import
*
from
.
lib.
UModbus
import
*
from
.
lib.
UConnector
import
*
from
.
pyUniSet.py
UExceptions
import
*
from
.
lib.
UExceptions
import
*
wrappers/python/lib/lib/Makefile.am
0 → 100644
View file @
4def8c92
if
ENABLE_PYTHON
SWIG
=
swig
#python_SCRIPTS = pyUniSet.py pyUConnector.py pyUModbus.py pyUExceptions.py
pydir
=
$(pkgpythondir)
/lib
py_DATA
=
__init__.py UniSet.py UConnector.py UModbus.py UExceptions.py
BUILD_SRCDIR
=
$(srcdir)
/../../../core
BUILD_SRC
=
UModbus.cc UConnector.cc UProxyObject.cc
UniSet.py
:
UInterface_wrap.cxx _UniSet.la
UConnector.py
:
UConnector_wrap.cxx _UConnector.la
UModbus.py
:
_UModbus.la UModbus_wrap.cxx
UExceptions.py
:
_UExceptions.la
pyexec_LTLIBRARIES
=
_UConnector.la _UModbus.la _UExceptions.la _UniSet.la
_UniSet_la_SOURCES
=
PyUInterface.cc UInterface_wrap.cxx UProxyObject.cc
_UniSet_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(PYTHON_CFLAGS)
_UniSet_la_LDFLAGS
=
-module
-avoid-version
_UniSet_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(PYTHON_LIBS)
UInterface_wrap.cxx
:
UInterface.i UProxyObject.i PyUInterface.h $(BUILD_SRCDIR)/UProxyObject.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UInterface.i
#PyUObject_wrap.cxx: UObject.i PyUObject.h
# swig -python -c++ -classic UObject.i
_UConnector_la_SOURCES
=
UConnector.cc UConnector_wrap.cxx
_UConnector_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(PYTHON_CFLAGS)
_UConnector_la_LDFLAGS
=
-module
-avoid-version
_UConnector_la_LIBADD
=
$(UNISET_LIBS)
$(PYTHON_LIBS)
UConnector_wrap.cxx
:
UConnector.i $(BUILD_SRCDIR)/UConnector.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UConnector.i
_UModbus_la_SOURCES
=
UModbus.cc UModbus_wrap.cxx
_UModbus_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(POCO_CFLAGS)
$(PYTHON_CFLAGS)
_UModbus_la_LDFLAGS
=
-module
-avoid-version
_UModbus_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(POCO_LIBS)
$(PYTHON_LIBS)
UModbus_wrap.cxx
:
UInterface.i $(BUILD_SRCDIR)/UModbus.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UModbus.i
_UExceptions_la_SOURCES
=
UExceptions_wrap.cxx
_UExceptions_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(PYTHON_CFLAGS)
_UExceptions_la_LDFLAGS
=
-module
-avoid-version
_UExceptions_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(PYTHON_LIBS)
UExceptions_wrap.cxx
:
UExceptions.i $(BUILD_SRCDIR)/UExceptions.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UExceptions.i
# Специальное правило для удаления сгенерированного кода
# для дальнейшей перегенерации
clean-gen
:
rm
-rf
*
.py
*
*
_wrap.cxx
$(BUILD_SRC)
:
ln
-sf
$(BUILD_SRCDIR)
/
$@
all-local
:
$(BUILD_SRC)
include
$(top_builddir)/include.mk
endif
wrappers/python/lib/
pyUniSet
/PyUInterface.cc
→
wrappers/python/lib/
lib
/PyUInterface.cc
View file @
4def8c92
File moved
wrappers/python/lib/
pyUniSet
/PyUInterface.h
→
wrappers/python/lib/
lib
/PyUInterface.h
View file @
4def8c92
File moved
wrappers/python/lib/
pyUniSet
/UConnector.i
→
wrappers/python/lib/
lib
/UConnector.i
View file @
4def8c92
...
...
@@ -5,7 +5,7 @@
***********************************************************/
%include <std_string.i>
%module
py
UConnector
%module UConnector
%{
#include "UConnector.h"
%}
...
...
wrappers/python/lib/
pyUniSet/py
UConnector.py
→
wrappers/python/lib/
lib/
UConnector.py
View file @
4def8c92
...
...
@@ -10,12 +10,12 @@ if _swig_python_version_info >= (2, 7, 0):
import
importlib
pkg_parts
=
__name__
.
rpartition
(
'.'
)
pkg
=
pkg_parts
[
0
]
if
pkg_parts
[
1
]
==
'.'
else
pkg_parts
[
2
]
mname
=
'.'
.
join
((
pkg
,
'_
py
UConnector'
))
.
lstrip
(
'.'
)
mname
=
'.'
.
join
((
pkg
,
'_UConnector'
))
.
lstrip
(
'.'
)
try
:
return
importlib
.
import_module
(
mname
)
except
ImportError
:
return
importlib
.
import_module
(
'_
py
UConnector'
)
_
py
UConnector
=
swig_import_helper
()
return
importlib
.
import_module
(
'_UConnector'
)
_UConnector
=
swig_import_helper
()
del
swig_import_helper
elif
_swig_python_version_info
>=
(
2
,
6
,
0
):
def
swig_import_helper
():
...
...
@@ -23,17 +23,17 @@ elif _swig_python_version_info >= (2, 6, 0):
import
imp
fp
=
None
try
:
fp
,
pathname
,
description
=
imp
.
find_module
(
'_
py
UConnector'
,
[
dirname
(
__file__
)])
fp
,
pathname
,
description
=
imp
.
find_module
(
'_UConnector'
,
[
dirname
(
__file__
)])
except
ImportError
:
import
_
py
UConnector
return
_
py
UConnector
import
_UConnector
return
_UConnector
try
:
_mod
=
imp
.
load_module
(
'_
py
UConnector'
,
fp
,
pathname
,
description
)
_mod
=
imp
.
load_module
(
'_UConnector'
,
fp
,
pathname
,
description
)
finally
:
if
fp
is
not
None
:
fp
.
close
()
return
_mod
_
py
UConnector
=
swig_import_helper
()
_UConnector
=
swig_import_helper
()
del
swig_import_helper
else
:
raise
RuntimeError
(
'Python 2.6 or later required'
)
...
...
@@ -97,43 +97,43 @@ class Params(_object):
__swig_getmethods__
=
{}
__getattr__
=
lambda
self
,
name
:
_swig_getattr
(
self
,
Params
,
name
)
__repr__
=
_swig_repr
max
=
_
py
UConnector
.
Params_max
max
=
_UConnector
.
Params_max
def
__init__
(
self
):
this
=
_
py
UConnector
.
new_Params
()
this
=
_UConnector
.
new_Params
()
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
def
add
(
self
,
s
:
'char *'
)
->
"bool"
:
return
_
py
UConnector
.
Params_add
(
self
,
s
)
return
_UConnector
.
Params_add
(
self
,
s
)
def
add_str
(
self
,
s
:
'std::string const'
)
->
"bool"
:
return
_
py
UConnector
.
Params_add_str
(
self
,
s
)
__swig_setmethods__
[
"argc"
]
=
_
py
UConnector
.
Params_argc_set
__swig_getmethods__
[
"argc"
]
=
_
py
UConnector
.
Params_argc_get
return
_UConnector
.
Params_add_str
(
self
,
s
)
__swig_setmethods__
[
"argc"
]
=
_UConnector
.
Params_argc_set
__swig_getmethods__
[
"argc"
]
=
_UConnector
.
Params_argc_get
if
_newclass
:
argc
=
property
(
_
pyUConnector
.
Params_argc_get
,
_py
UConnector
.
Params_argc_set
)
__swig_setmethods__
[
"argv"
]
=
_
py
UConnector
.
Params_argv_set
__swig_getmethods__
[
"argv"
]
=
_
py
UConnector
.
Params_argv_get
argc
=
property
(
_
UConnector
.
Params_argc_get
,
_
UConnector
.
Params_argc_set
)
__swig_setmethods__
[
"argv"
]
=
_UConnector
.
Params_argv_set
__swig_getmethods__
[
"argv"
]
=
_UConnector
.
Params_argv_get
if
_newclass
:
argv
=
property
(
_
pyUConnector
.
Params_argv_get
,
_py
UConnector
.
Params_argv_set
)
argv
=
property
(
_
UConnector
.
Params_argv_get
,
_
UConnector
.
Params_argv_set
)
if
_newclass
:
inst
=
staticmethod
(
_
py
UConnector
.
Params_inst
)
inst
=
staticmethod
(
_UConnector
.
Params_inst
)
else
:
inst
=
_
py
UConnector
.
Params_inst
__swig_destroy__
=
_
py
UConnector
.
delete_Params
inst
=
_UConnector
.
Params_inst
__swig_destroy__
=
_UConnector
.
delete_Params
__del__
=
lambda
self
:
None
Params_swigregister
=
_
py
UConnector
.
Params_swigregister
Params_swigregister
=
_UConnector
.
Params_swigregister
Params_swigregister
(
Params
)
cvar
=
_
py
UConnector
.
cvar
cvar
=
_UConnector
.
cvar
DefaultID
=
cvar
.
DefaultID
DefaultSupplerID
=
cvar
.
DefaultSupplerID
def
Params_inst
()
->
"UTypes::Params"
:
return
_
py
UConnector
.
Params_inst
()
Params_inst
=
_
py
UConnector
.
Params_inst
return
_UConnector
.
Params_inst
()
Params_inst
=
_UConnector
.
Params_inst
class
ShortIOInfo
(
_object
):
__swig_setmethods__
=
{}
...
...
@@ -141,36 +141,36 @@ class ShortIOInfo(_object):
__swig_getmethods__
=
{}
__getattr__
=
lambda
self
,
name
:
_swig_getattr
(
self
,
ShortIOInfo
,
name
)
__repr__
=
_swig_repr
__swig_setmethods__
[
"value"
]
=
_
py
UConnector
.
ShortIOInfo_value_set
__swig_getmethods__
[
"value"
]
=
_
py
UConnector
.
ShortIOInfo_value_get
__swig_setmethods__
[
"value"
]
=
_UConnector
.
ShortIOInfo_value_set
__swig_getmethods__
[
"value"
]
=
_UConnector
.
ShortIOInfo_value_get
if
_newclass
:
value
=
property
(
_
pyUConnector
.
ShortIOInfo_value_get
,
_py
UConnector
.
ShortIOInfo_value_set
)
__swig_setmethods__
[
"tv_sec"
]
=
_
py
UConnector
.
ShortIOInfo_tv_sec_set
__swig_getmethods__
[
"tv_sec"
]
=
_
py
UConnector
.
ShortIOInfo_tv_sec_get
value
=
property
(
_
UConnector
.
ShortIOInfo_value_get
,
_
UConnector
.
ShortIOInfo_value_set
)
__swig_setmethods__
[
"tv_sec"
]
=
_UConnector
.
ShortIOInfo_tv_sec_set
__swig_getmethods__
[
"tv_sec"
]
=
_UConnector
.
ShortIOInfo_tv_sec_get
if
_newclass
:
tv_sec
=
property
(
_
pyUConnector
.
ShortIOInfo_tv_sec_get
,
_py
UConnector
.
ShortIOInfo_tv_sec_set
)
__swig_setmethods__
[
"tv_nsec"
]
=
_
py
UConnector
.
ShortIOInfo_tv_nsec_set
__swig_getmethods__
[
"tv_nsec"
]
=
_
py
UConnector
.
ShortIOInfo_tv_nsec_get
tv_sec
=
property
(
_
UConnector
.
ShortIOInfo_tv_sec_get
,
_
UConnector
.
ShortIOInfo_tv_sec_set
)
__swig_setmethods__
[
"tv_nsec"
]
=
_UConnector
.
ShortIOInfo_tv_nsec_set
__swig_getmethods__
[
"tv_nsec"
]
=
_UConnector
.
ShortIOInfo_tv_nsec_get
if
_newclass
:
tv_nsec
=
property
(
_
pyUConnector
.
ShortIOInfo_tv_nsec_get
,
_py
UConnector
.
ShortIOInfo_tv_nsec_set
)
__swig_setmethods__
[
"supplier"
]
=
_
py
UConnector
.
ShortIOInfo_supplier_set
__swig_getmethods__
[
"supplier"
]
=
_
py
UConnector
.
ShortIOInfo_supplier_get
tv_nsec
=
property
(
_
UConnector
.
ShortIOInfo_tv_nsec_get
,
_
UConnector
.
ShortIOInfo_tv_nsec_set
)
__swig_setmethods__
[
"supplier"
]
=
_UConnector
.
ShortIOInfo_supplier_set
__swig_getmethods__
[
"supplier"
]
=
_UConnector
.
ShortIOInfo_supplier_get
if
_newclass
:
supplier
=
property
(
_
pyUConnector
.
ShortIOInfo_supplier_get
,
_py
UConnector
.
ShortIOInfo_supplier_set
)
__swig_setmethods__
[
"supplier_node"
]
=
_
py
UConnector
.
ShortIOInfo_supplier_node_set
__swig_getmethods__
[
"supplier_node"
]
=
_
py
UConnector
.
ShortIOInfo_supplier_node_get
supplier
=
property
(
_
UConnector
.
ShortIOInfo_supplier_get
,
_
UConnector
.
ShortIOInfo_supplier_set
)
__swig_setmethods__
[
"supplier_node"
]
=
_UConnector
.
ShortIOInfo_supplier_node_set
__swig_getmethods__
[
"supplier_node"
]
=
_UConnector
.
ShortIOInfo_supplier_node_get
if
_newclass
:
supplier_node
=
property
(
_
pyUConnector
.
ShortIOInfo_supplier_node_get
,
_py
UConnector
.
ShortIOInfo_supplier_node_set
)
supplier_node
=
property
(
_
UConnector
.
ShortIOInfo_supplier_node_get
,
_
UConnector
.
ShortIOInfo_supplier_node_set
)
def
__init__
(
self
):
this
=
_
py
UConnector
.
new_ShortIOInfo
()
this
=
_UConnector
.
new_ShortIOInfo
()
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UConnector
.
delete_ShortIOInfo
__swig_destroy__
=
_UConnector
.
delete_ShortIOInfo
__del__
=
lambda
self
:
None
ShortIOInfo_swigregister
=
_
py
UConnector
.
ShortIOInfo_swigregister
ShortIOInfo_swigregister
=
_UConnector
.
ShortIOInfo_swigregister
ShortIOInfo_swigregister
(
ShortIOInfo
)
class
UConnector
(
_object
):
...
...
@@ -181,56 +181,56 @@ class UConnector(_object):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UConnector
.
new_UConnector
(
*
args
)
this
=
_UConnector
.
new_UConnector
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UConnector
.
delete_UConnector
__swig_destroy__
=
_UConnector
.
delete_UConnector
__del__
=
lambda
self
:
None
def
getUIType
(
self
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getUIType
(
self
)
return
_UConnector
.
UConnector_getUIType
(
self
)
def
getConfFileName
(
self
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getConfFileName
(
self
)
return
_UConnector
.
UConnector_getConfFileName
(
self
)
def
getValue
(
self
,
id
:
'long'
,
node
:
'long'
)
->
"long"
:
return
_
py
UConnector
.
UConnector_getValue
(
self
,
id
,
node
)
return
_UConnector
.
UConnector_getValue
(
self
,
id
,
node
)
def
setValue
(
self
,
*
args
)
->
"void"
:
return
_
py
UConnector
.
UConnector_setValue
(
self
,
*
args
)
return
_UConnector
.
UConnector_setValue
(
self
,
*
args
)
def
getTimeChange
(
self
,
*
args
)
->
"UTypes::ShortIOInfo"
:
return
_
py
UConnector
.
UConnector_getTimeChange
(
self
,
*
args
)
return
_UConnector
.
UConnector_getTimeChange
(
self
,
*
args
)
def
getSensorID
(
self
,
name
:
'std::string const &'
)
->
"long"
:
return
_
py
UConnector
.
UConnector_getSensorID
(
self
,
name
)
return
_UConnector
.
UConnector_getSensorID
(
self
,
name
)
def
getNodeID
(
self
,
name
:
'std::string const &'
)
->
"long"
:
return
_
py
UConnector
.
UConnector_getNodeID
(
self
,
name
)
return
_UConnector
.
UConnector_getNodeID
(
self
,
name
)
def
getObjectID
(
self
,
name
:
'std::string const &'
)
->
"long"
:
return
_
py
UConnector
.
UConnector_getObjectID
(
self
,
name
)
return
_UConnector
.
UConnector_getObjectID
(
self
,
name
)
def
getShortName
(
self
,
id
:
'long'
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getShortName
(
self
,
id
)
return
_UConnector
.
UConnector_getShortName
(
self
,
id
)
def
getName
(
self
,
id
:
'long'
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getName
(
self
,
id
)
return
_UConnector
.
UConnector_getName
(
self
,
id
)
def
getTextName
(
self
,
id
:
'long'
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getTextName
(
self
,
id
)
return
_UConnector
.
UConnector_getTextName
(
self
,
id
)
def
getObjectInfo
(
self
,
*
args
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_getObjectInfo
(
self
,
*
args
)
return
_UConnector
.
UConnector_getObjectInfo
(
self
,
*
args
)
def
apiRequest
(
self
,
*
args
)
->
"std::string"
:
return
_
py
UConnector
.
UConnector_apiRequest
(
self
,
*
args
)
return
_UConnector
.
UConnector_apiRequest
(
self
,
*
args
)
def
activate_objects
(
self
)
->
"void"
:
return
_
py
UConnector
.
UConnector_activate_objects
(
self
)
UConnector_swigregister
=
_
py
UConnector
.
UConnector_swigregister
return
_UConnector
.
UConnector_activate_objects
(
self
)
UConnector_swigregister
=
_UConnector
.
UConnector_swigregister
UConnector_swigregister
(
UConnector
)
# This file is compatible with both classic and new-style classes.
...
...
wrappers/python/lib/
pyUniSet
/UConnector_wrap.cxx
→
wrappers/python/lib/
lib
/UConnector_wrap.cxx
View file @
4def8c92
...
...
@@ -2754,16 +2754,16 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
/*-----------------------------------------------
@(target):= _
py
UConnector.so
@(target):= _UConnector.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__
py
UConnector
# define SWIG_init PyInit__UConnector
#else
# define SWIG_init init_
py
UConnector
# define SWIG_init init_UConnector
#endif
#define SWIG_name "_
py
UConnector"
#define SWIG_name "_UConnector"
#define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION
...
...
wrappers/python/lib/
pyUniSet
/UExceptions.i
→
wrappers/python/lib/
lib
/UExceptions.i
View file @
4def8c92
...
...
@@ -5,7 +5,7 @@
***********************************************************/
%include <std_string.i>
%module
py
UExceptions
%module UExceptions
%{
#include "UExceptions.h"
%}
...
...
wrappers/python/lib/
pyUniSet/py
UExceptions.py
→
wrappers/python/lib/
lib/
UExceptions.py
View file @
4def8c92
...
...
@@ -10,12 +10,12 @@ if _swig_python_version_info >= (2, 7, 0):
import
importlib
pkg_parts
=
__name__
.
rpartition
(
'.'
)
pkg
=
pkg_parts
[
0
]
if
pkg_parts
[
1
]
==
'.'
else
pkg_parts
[
2
]
mname
=
'.'
.
join
((
pkg
,
'_
py
UExceptions'
))
.
lstrip
(
'.'
)
mname
=
'.'
.
join
((
pkg
,
'_UExceptions'
))
.
lstrip
(
'.'
)
try
:
return
importlib
.
import_module
(
mname
)
except
ImportError
:
return
importlib
.
import_module
(
'_
py
UExceptions'
)
_
py
UExceptions
=
swig_import_helper
()
return
importlib
.
import_module
(
'_UExceptions'
)
_UExceptions
=
swig_import_helper
()
del
swig_import_helper
elif
_swig_python_version_info
>=
(
2
,
6
,
0
):
def
swig_import_helper
():
...
...
@@ -23,17 +23,17 @@ elif _swig_python_version_info >= (2, 6, 0):
import
imp
fp
=
None
try
:
fp
,
pathname
,
description
=
imp
.
find_module
(
'_
py
UExceptions'
,
[
dirname
(
__file__
)])
fp
,
pathname
,
description
=
imp
.
find_module
(
'_UExceptions'
,
[
dirname
(
__file__
)])
except
ImportError
:
import
_
py
UExceptions
return
_
py
UExceptions
import
_UExceptions
return
_UExceptions
try
:
_mod
=
imp
.
load_module
(
'_
py
UExceptions'
,
fp
,
pathname
,
description
)
_mod
=
imp
.
load_module
(
'_UExceptions'
,
fp
,
pathname
,
description
)
finally
:
if
fp
is
not
None
:
fp
.
close
()
return
_mod
_
py
UExceptions
=
swig_import_helper
()
_UExceptions
=
swig_import_helper
()
del
swig_import_helper
else
:
raise
RuntimeError
(
'Python 2.6 or later required'
)
...
...
@@ -99,22 +99,22 @@ class UException(BaseException, _object):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
BaseException
.
__init__
(
self
,
*
args
)
this
=
_
py
UExceptions
.
new_UException
(
*
args
)
BaseException
.
__init__
(
self
,
args
)
this
=
_UExceptions
.
new_UException
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UExceptions
.
delete_UException
__swig_destroy__
=
_UExceptions
.
delete_UException
__del__
=
lambda
self
:
None
def
getError
(
self
)
->
"std::string const"
:
return
_
py
UExceptions
.
UException_getError
(
self
)
__swig_setmethods__
[
"err"
]
=
_
py
UExceptions
.
UException_err_set
__swig_getmethods__
[
"err"
]
=
_
py
UExceptions
.
UException_err_get
return
_UExceptions
.
UException_getError
(
self
)
__swig_setmethods__
[
"err"
]
=
_UExceptions
.
UException_err_set
__swig_getmethods__
[
"err"
]
=
_UExceptions
.
UException_err_get
if
_newclass
:
err
=
property
(
_
pyUExceptions
.
UException_err_get
,
_py
UExceptions
.
UException_err_set
)
UException_swigregister
=
_
py
UExceptions
.
UException_swigregister
err
=
property
(
_
UExceptions
.
UException_err_get
,
_
UExceptions
.
UException_err_set
)
UException_swigregister
=
_UExceptions
.
UException_swigregister
UException_swigregister
(
UException
)
class
UTimeOut
(
UException
):
...
...
@@ -129,14 +129,14 @@ class UTimeOut(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UExceptions
.
new_UTimeOut
(
*
args
)
this
=
_UExceptions
.
new_UTimeOut
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UExceptions
.
delete_UTimeOut
__swig_destroy__
=
_UExceptions
.
delete_UTimeOut
__del__
=
lambda
self
:
None
UTimeOut_swigregister
=
_
py
UExceptions
.
UTimeOut_swigregister
UTimeOut_swigregister
=
_UExceptions
.
UTimeOut_swigregister
UTimeOut_swigregister
(
UTimeOut
)
class
USysError
(
UException
):
...
...
@@ -151,14 +151,14 @@ class USysError(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UExceptions
.
new_USysError
(
*
args
)
this
=
_UExceptions
.
new_USysError
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UExceptions
.
delete_USysError
__swig_destroy__
=
_UExceptions
.
delete_USysError
__del__
=
lambda
self
:
None
USysError_swigregister
=
_
py
UExceptions
.
USysError_swigregister
USysError_swigregister
=
_UExceptions
.
USysError_swigregister
USysError_swigregister
(
USysError
)
class
UValidateError
(
UException
):
...
...
@@ -173,14 +173,14 @@ class UValidateError(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UExceptions
.
new_UValidateError
(
*
args
)
this
=
_UExceptions
.
new_UValidateError
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UExceptions
.
delete_UValidateError
__swig_destroy__
=
_UExceptions
.
delete_UValidateError
__del__
=
lambda
self
:
None
UValidateError_swigregister
=
_
py
UExceptions
.
UValidateError_swigregister
UValidateError_swigregister
=
_UExceptions
.
UValidateError_swigregister
UValidateError_swigregister
(
UValidateError
)
# This file is compatible with both classic and new-style classes.
...
...
wrappers/python/lib/
pyUniSet
/UExceptions_wrap.cxx
→
wrappers/python/lib/
lib
/UExceptions_wrap.cxx
View file @
4def8c92
...
...
@@ -2754,16 +2754,16 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
/*-----------------------------------------------
@(target):= _
py
UExceptions.so
@(target):= _UExceptions.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__
py
UExceptions
# define SWIG_init PyInit__UExceptions
#else
# define SWIG_init init_
py
UExceptions
# define SWIG_init init_UExceptions
#endif
#define SWIG_name "_
py
UExceptions"
#define SWIG_name "_UExceptions"
#define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION
...
...
wrappers/python/lib/
pyUniSet
/UInterface.i
→
wrappers/python/lib/
lib
/UInterface.i
View file @
4def8c92
...
...
@@ -4,7 +4,7 @@
* swig -python UInterface.i
***********************************************************/
%module
py
UniSet
%module UniSet
%include "std_string.i"
...
...
wrappers/python/lib/
pyUniSet
/UInterface_wrap.cxx
→
wrappers/python/lib/
lib
/UInterface_wrap.cxx
View file @
4def8c92
...
...
@@ -2758,16 +2758,16 @@ static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
/*-----------------------------------------------
@(target):= _
py
UniSet.so
@(target):= _UniSet.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__
py
UniSet
# define SWIG_init PyInit__UniSet
#else
# define SWIG_init init_
py
UniSet
# define SWIG_init init_UniSet
#endif
#define SWIG_name "_
py
UniSet"
#define SWIG_name "_UniSet"
#define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION
...
...
wrappers/python/lib/
pyUniSet
/UModbus.i
→
wrappers/python/lib/
lib
/UModbus.i
View file @
4def8c92
...
...
@@ -5,7 +5,7 @@
***********************************************************/
%include <std_string.i>
%module
py
UModbus
%module UModbus
%{
#include "UModbus.h"
%}
...
...
wrappers/python/lib/
pyUniSet/py
UModbus.py
→
wrappers/python/lib/
lib/
UModbus.py
View file @
4def8c92
...
...
@@ -10,12 +10,12 @@ if _swig_python_version_info >= (2, 7, 0):
import
importlib
pkg_parts
=
__name__
.
rpartition
(
'.'
)
pkg
=
pkg_parts
[
0
]
if
pkg_parts
[
1
]
==
'.'
else
pkg_parts
[
2
]
mname
=
'.'
.
join
((
pkg
,
'_
py
UModbus'
))
.
lstrip
(
'.'
)
mname
=
'.'
.
join
((
pkg
,
'_UModbus'
))
.
lstrip
(
'.'
)
try
:
return
importlib
.
import_module
(
mname
)
except
ImportError
:
return
importlib
.
import_module
(
'_
py
UModbus'
)
_
py
UModbus
=
swig_import_helper
()
return
importlib
.
import_module
(
'_UModbus'
)
_UModbus
=
swig_import_helper
()
del
swig_import_helper
elif
_swig_python_version_info
>=
(
2
,
6
,
0
):
def
swig_import_helper
():
...
...
@@ -23,17 +23,17 @@ elif _swig_python_version_info >= (2, 6, 0):
import
imp
fp
=
None
try
:
fp
,
pathname
,
description
=
imp
.
find_module
(
'_
py
UModbus'
,
[
dirname
(
__file__
)])
fp
,
pathname
,
description
=
imp
.
find_module
(
'_UModbus'
,
[
dirname
(
__file__
)])
except
ImportError
:
import
_
py
UModbus
return
_
py
UModbus
import
_UModbus
return
_UModbus
try
:
_mod
=
imp
.
load_module
(
'_
py
UModbus'
,
fp
,
pathname
,
description
)
_mod
=
imp
.
load_module
(
'_UModbus'
,
fp
,
pathname
,
description
)
finally
:
if
fp
is
not
None
:
fp
.
close
()
return
_mod
_
py
UModbus
=
swig_import_helper
()
_UModbus
=
swig_import_helper
()
del
swig_import_helper
else
:
raise
RuntimeError
(
'Python 2.6 or later required'
)
...
...
@@ -99,53 +99,53 @@ class UModbus(_object):
__repr__
=
_swig_repr
def
__init__
(
self
):
this
=
_
py
UModbus
.
new_UModbus
()
this
=
_UModbus
.
new_UModbus
()
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UModbus
.
delete_UModbus
__swig_destroy__
=
_UModbus
.
delete_UModbus
__del__
=
lambda
self
:
None
def
getUIType
(
self
)
->
"std::string"
:
return
_
py
UModbus
.
UModbus_getUIType
(
self
)
return
_UModbus
.
UModbus_getUIType
(
self
)
def
isWriteFunction
(
self
,
mbfunc
:
'int'
)
->
"bool"
:
return
_
py
UModbus
.
UModbus_isWriteFunction
(
self
,
mbfunc
)
return
_UModbus
.
UModbus_isWriteFunction
(
self
,
mbfunc
)
def
prepare
(
self
,
ip
:
'std::string const &'
,
port
:
'int'
)
->
"void"
:
return
_
py
UModbus
.
UModbus_prepare
(
self
,
ip
,
port
)
return
_UModbus
.
UModbus_prepare
(
self
,
ip
,
port
)
def
connect
(
self
,
ip
:
'std::string const &'
,
port
:
'int'
)
->
"void"
:
return
_
py
UModbus
.
UModbus_connect
(
self
,
ip
,
port
)
return
_UModbus
.
UModbus_connect
(
self
,
ip
,
port
)
def
conn_port
(
self
)
->
"int"
:
return
_
py
UModbus
.
UModbus_conn_port
(
self
)
return
_UModbus
.
UModbus_conn_port
(
self
)
def
conn_ip
(
self
)
->
"std::string"
:
return
_
py
UModbus
.
UModbus_conn_ip
(
self
)
return
_UModbus
.
UModbus_conn_ip
(
self
)
def
isConnection
(
self
)
->
"bool"
:
return
_
py
UModbus
.
UModbus_isConnection
(
self
)
return
_UModbus
.
UModbus_isConnection
(
self
)
def
setTimeout
(
self
,
msec
:
'int'
)
->
"void"
:
return
_
py
UModbus
.
UModbus_setTimeout
(
self
,
msec
)
return
_UModbus
.
UModbus_setTimeout
(
self
,
msec
)
def
mbread
(
self
,
*
args
)
->
"long"
:
return
_
py
UModbus
.
UModbus_mbread
(
self
,
*
args
)
return
_UModbus
.
UModbus_mbread
(
self
,
*
args
)
def
getWord
(
self
,
addr
:
'int'
,
mbreg
:
'int'
,
mbfunc
:
'int'
=
0x4
)
->
"long"
:
return
_
py
UModbus
.
UModbus_getWord
(
self
,
addr
,
mbreg
,
mbfunc
)
return
_UModbus
.
UModbus_getWord
(
self
,
addr
,
mbreg
,
mbfunc
)
def
getByte
(
self
,
addr
:
'int'
,
mbreg
:
'int'
,
mbfunc
:
'int'
=
0x4
)
->
"long"
:
return
_
py
UModbus
.
UModbus_getByte
(
self
,
addr
,
mbreg
,
mbfunc
)
return
_UModbus
.
UModbus_getByte
(
self
,
addr
,
mbreg
,
mbfunc
)
def
getBit
(
self
,
addr
:
'int'
,
mbreg
:
'int'
,
mbfunc
:
'int'
=
0x2
)
->
"bool"
:
return
_
py
UModbus
.
UModbus_getBit
(
self
,
addr
,
mbreg
,
mbfunc
)
return
_UModbus
.
UModbus_getBit
(
self
,
addr
,
mbreg
,
mbfunc
)
def
mbwrite
(
self
,
*
args
)
->
"void"
:
return
_
py
UModbus
.
UModbus_mbwrite
(
self
,
*
args
)
UModbus_swigregister
=
_
py
UModbus
.
UModbus_swigregister
return
_UModbus
.
UModbus_mbwrite
(
self
,
*
args
)
UModbus_swigregister
=
_UModbus
.
UModbus_swigregister
UModbus_swigregister
(
UModbus
)
# This file is compatible with both classic and new-style classes.
...
...
wrappers/python/lib/
pyUniSet
/UModbus_wrap.cxx
→
wrappers/python/lib/
lib
/UModbus_wrap.cxx
View file @
4def8c92
...
...
@@ -2751,16 +2751,16 @@ static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
/*-----------------------------------------------
@(target):= _
py
UModbus.so
@(target):= _UModbus.so
------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
# define SWIG_init PyInit__
py
UModbus
# define SWIG_init PyInit__UModbus
#else
# define SWIG_init init_
py
UModbus
# define SWIG_init init_UModbus
#endif
#define SWIG_name "_
py
UModbus"
#define SWIG_name "_UModbus"
#define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION
...
...
wrappers/python/lib/
pyUniSet
/UProxyObject.i
→
wrappers/python/lib/
lib
/UProxyObject.i
View file @
4def8c92
...
...
@@ -4,7 +4,7 @@
* swig -python UInterface.i
***********************************************************/
%module
py
UniSet
%module UniSet
%include <std_string.i>
...
...
wrappers/python/lib/
pyUniSet/py
UniSet.py
→
wrappers/python/lib/
lib/
UniSet.py
View file @
4def8c92
...
...
@@ -10,12 +10,12 @@ if _swig_python_version_info >= (2, 7, 0):
import
importlib
pkg_parts
=
__name__
.
rpartition
(
'.'
)
pkg
=
pkg_parts
[
0
]
if
pkg_parts
[
1
]
==
'.'
else
pkg_parts
[
2
]
mname
=
'.'
.
join
((
pkg
,
'_
py
UniSet'
))
.
lstrip
(
'.'
)
mname
=
'.'
.
join
((
pkg
,
'_UniSet'
))
.
lstrip
(
'.'
)
try
:
return
importlib
.
import_module
(
mname
)
except
ImportError
:
return
importlib
.
import_module
(
'_
py
UniSet'
)
_
py
UniSet
=
swig_import_helper
()
return
importlib
.
import_module
(
'_UniSet'
)
_UniSet
=
swig_import_helper
()
del
swig_import_helper
elif
_swig_python_version_info
>=
(
2
,
6
,
0
):
def
swig_import_helper
():
...
...
@@ -23,17 +23,17 @@ elif _swig_python_version_info >= (2, 6, 0):
import
imp
fp
=
None
try
:
fp
,
pathname
,
description
=
imp
.
find_module
(
'_
py
UniSet'
,
[
dirname
(
__file__
)])
fp
,
pathname
,
description
=
imp
.
find_module
(
'_UniSet'
,
[
dirname
(
__file__
)])
except
ImportError
:
import
_
py
UniSet
return
_
py
UniSet
import
_UniSet
return
_UniSet
try
:
_mod
=
imp
.
load_module
(
'_
py
UniSet'
,
fp
,
pathname
,
description
)
_mod
=
imp
.
load_module
(
'_UniSet'
,
fp
,
pathname
,
description
)
finally
:
if
fp
is
not
None
:
fp
.
close
()
return
_mod
_
py
UniSet
=
swig_import_helper
()
_UniSet
=
swig_import_helper
()
del
swig_import_helper
else
:
raise
RuntimeError
(
'Python 2.6 or later required'
)
...
...
@@ -93,91 +93,91 @@ except __builtin__.Exception:
def
uniset_init_params
(
p
:
'Params'
,
xmlfile
:
'std::string const &'
)
->
"void"
:
return
_
py
UniSet
.
uniset_init_params
(
p
,
xmlfile
)
uniset_init_params
=
_
py
UniSet
.
uniset_init_params
return
_UniSet
.
uniset_init_params
(
p
,
xmlfile
)
uniset_init_params
=
_UniSet
.
uniset_init_params
def
uniset_init
(
argc
:
'int'
,
argv
:
'char **'
,
xmlfile
:
'std::string const &'
)
->
"void"
:
return
_
py
UniSet
.
uniset_init
(
argc
,
argv
,
xmlfile
)
uniset_init
=
_
py
UniSet
.
uniset_init
return
_UniSet
.
uniset_init
(
argc
,
argv
,
xmlfile
)
uniset_init
=
_UniSet
.
uniset_init
def
uniset_activate_objects
()
->
"void"
:
return
_
py
UniSet
.
uniset_activate_objects
()
uniset_activate_objects
=
_
py
UniSet
.
uniset_activate_objects
return
_UniSet
.
uniset_activate_objects
()
uniset_activate_objects
=
_UniSet
.
uniset_activate_objects
def
getValue
(
id
:
'long'
)
->
"long"
:
return
_
py
UniSet
.
getValue
(
id
)
getValue
=
_
py
UniSet
.
getValue
return
_UniSet
.
getValue
(
id
)
getValue
=
_UniSet
.
getValue
def
setValue
(
*
args
)
->
"void"
:
return
_
py
UniSet
.
setValue
(
*
args
)
setValue
=
_
py
UniSet
.
setValue
return
_UniSet
.
setValue
(
*
args
)
setValue
=
_UniSet
.
setValue
def
getSensorID
(
name
:
'std::string const &'
)
->
"long"
:
return
_
py
UniSet
.
getSensorID
(
name
)
getSensorID
=
_
py
UniSet
.
getSensorID
return
_UniSet
.
getSensorID
(
name
)
getSensorID
=
_UniSet
.
getSensorID
def
getObjectID
(
name
:
'std::string const &'
)
->
"long"
:
return
_
py
UniSet
.
getObjectID
(
name
)
getObjectID
=
_
py
UniSet
.
getObjectID
return
_UniSet
.
getObjectID
(
name
)
getObjectID
=
_UniSet
.
getObjectID
def
getShortName
(
id
:
'long'
)
->
"std::string"
:
return
_
py
UniSet
.
getShortName
(
id
)
getShortName
=
_
py
UniSet
.
getShortName
return
_UniSet
.
getShortName
(
id
)
getShortName
=
_UniSet
.
getShortName
def
getName
(
id
:
'long'
)
->
"std::string"
:
return
_
py
UniSet
.
getName
(
id
)
getName
=
_
py
UniSet
.
getName
return
_UniSet
.
getName
(
id
)
getName
=
_UniSet
.
getName
def
getTextName
(
id
:
'long'
)
->
"std::string"
:
return
_
py
UniSet
.
getTextName
(
id
)
getTextName
=
_
py
UniSet
.
getTextName
return
_UniSet
.
getTextName
(
id
)
getTextName
=
_UniSet
.
getTextName
def
getConfFileName
()
->
"std::string"
:
return
_
py
UniSet
.
getConfFileName
()
getConfFileName
=
_
py
UniSet
.
getConfFileName
return
_UniSet
.
getConfFileName
()
getConfFileName
=
_UniSet
.
getConfFileName
class
Params
(
_object
):
__swig_setmethods__
=
{}
__setattr__
=
lambda
self
,
name
,
value
:
_swig_setattr
(
self
,
Params
,
name
,
value
)
__swig_getmethods__
=
{}
__getattr__
=
lambda
self
,
name
:
_swig_getattr
(
self
,
Params
,
name
)
__repr__
=
_swig_repr
max
=
_
py
UniSet
.
Params_max
max
=
_UniSet
.
Params_max
def
__init__
(
self
):
this
=
_
py
UniSet
.
new_Params
()
this
=
_UniSet
.
new_Params
()
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
def
add
(
self
,
s
:
'char *'
)
->
"bool"
:
return
_
py
UniSet
.
Params_add
(
self
,
s
)
return
_UniSet
.
Params_add
(
self
,
s
)
def
add_str
(
self
,
s
:
'std::string const'
)
->
"bool"
:
return
_
py
UniSet
.
Params_add_str
(
self
,
s
)
__swig_setmethods__
[
"argc"
]
=
_
py
UniSet
.
Params_argc_set
__swig_getmethods__
[
"argc"
]
=
_
py
UniSet
.
Params_argc_get
return
_UniSet
.
Params_add_str
(
self
,
s
)
__swig_setmethods__
[
"argc"
]
=
_UniSet
.
Params_argc_set
__swig_getmethods__
[
"argc"
]
=
_UniSet
.
Params_argc_get
if
_newclass
:
argc
=
property
(
_
pyUniSet
.
Params_argc_get
,
_py
UniSet
.
Params_argc_set
)
__swig_setmethods__
[
"argv"
]
=
_
py
UniSet
.
Params_argv_set
__swig_getmethods__
[
"argv"
]
=
_
py
UniSet
.
Params_argv_get
argc
=
property
(
_
UniSet
.
Params_argc_get
,
_
UniSet
.
Params_argc_set
)
__swig_setmethods__
[
"argv"
]
=
_UniSet
.
Params_argv_set
__swig_getmethods__
[
"argv"
]
=
_UniSet
.
Params_argv_get
if
_newclass
:
argv
=
property
(
_
pyUniSet
.
Params_argv_get
,
_py
UniSet
.
Params_argv_set
)
argv
=
property
(
_
UniSet
.
Params_argv_get
,
_
UniSet
.
Params_argv_set
)
if
_newclass
:
inst
=
staticmethod
(
_
py
UniSet
.
Params_inst
)
inst
=
staticmethod
(
_UniSet
.
Params_inst
)
else
:
inst
=
_
py
UniSet
.
Params_inst
__swig_destroy__
=
_
py
UniSet
.
delete_Params
inst
=
_UniSet
.
Params_inst
__swig_destroy__
=
_UniSet
.
delete_Params
__del__
=
lambda
self
:
None
Params_swigregister
=
_
py
UniSet
.
Params_swigregister
Params_swigregister
=
_UniSet
.
Params_swigregister
Params_swigregister
(
Params
)
cvar
=
_
py
UniSet
.
cvar
cvar
=
_UniSet
.
cvar
DefaultID
=
cvar
.
DefaultID
DefaultSupplerID
=
cvar
.
DefaultSupplerID
def
Params_inst
()
->
"UTypes::Params"
:
return
_
py
UniSet
.
Params_inst
()
Params_inst
=
_
py
UniSet
.
Params_inst
return
_UniSet
.
Params_inst
()
Params_inst
=
_UniSet
.
Params_inst
class
ShortIOInfo
(
_object
):
__swig_setmethods__
=
{}
...
...
@@ -185,39 +185,39 @@ class ShortIOInfo(_object):
__swig_getmethods__
=
{}
__getattr__
=
lambda
self
,
name
:
_swig_getattr
(
self
,
ShortIOInfo
,
name
)
__repr__
=
_swig_repr
__swig_setmethods__
[
"value"
]
=
_
py
UniSet
.
ShortIOInfo_value_set
__swig_getmethods__
[
"value"
]
=
_
py
UniSet
.
ShortIOInfo_value_get
__swig_setmethods__
[
"value"
]
=
_UniSet
.
ShortIOInfo_value_set
__swig_getmethods__
[
"value"
]
=
_UniSet
.
ShortIOInfo_value_get
if
_newclass
:
value
=
property
(
_
pyUniSet
.
ShortIOInfo_value_get
,
_py
UniSet
.
ShortIOInfo_value_set
)
__swig_setmethods__
[
"tv_sec"
]
=
_
py
UniSet
.
ShortIOInfo_tv_sec_set
__swig_getmethods__
[
"tv_sec"
]
=
_
py
UniSet
.
ShortIOInfo_tv_sec_get
value
=
property
(
_
UniSet
.
ShortIOInfo_value_get
,
_
UniSet
.
ShortIOInfo_value_set
)
__swig_setmethods__
[
"tv_sec"
]
=
_UniSet
.
ShortIOInfo_tv_sec_set
__swig_getmethods__
[
"tv_sec"
]
=
_UniSet
.
ShortIOInfo_tv_sec_get
if
_newclass
:
tv_sec
=
property
(
_
pyUniSet
.
ShortIOInfo_tv_sec_get
,
_py
UniSet
.
ShortIOInfo_tv_sec_set
)
__swig_setmethods__
[
"tv_nsec"
]
=
_
py
UniSet
.
ShortIOInfo_tv_nsec_set
__swig_getmethods__
[
"tv_nsec"
]
=
_
py
UniSet
.
ShortIOInfo_tv_nsec_get
tv_sec
=
property
(
_
UniSet
.
ShortIOInfo_tv_sec_get
,
_
UniSet
.
ShortIOInfo_tv_sec_set
)
__swig_setmethods__
[
"tv_nsec"
]
=
_UniSet
.
ShortIOInfo_tv_nsec_set
__swig_getmethods__
[
"tv_nsec"
]
=
_UniSet
.
ShortIOInfo_tv_nsec_get
if
_newclass
:
tv_nsec
=
property
(
_
pyUniSet
.
ShortIOInfo_tv_nsec_get
,
_py
UniSet
.
ShortIOInfo_tv_nsec_set
)
__swig_setmethods__
[
"supplier"
]
=
_
py
UniSet
.
ShortIOInfo_supplier_set
__swig_getmethods__
[
"supplier"
]
=
_
py
UniSet
.
ShortIOInfo_supplier_get
tv_nsec
=
property
(
_
UniSet
.
ShortIOInfo_tv_nsec_get
,
_
UniSet
.
ShortIOInfo_tv_nsec_set
)
__swig_setmethods__
[
"supplier"
]
=
_UniSet
.
ShortIOInfo_supplier_set
__swig_getmethods__
[
"supplier"
]
=
_UniSet
.
ShortIOInfo_supplier_get
if
_newclass
:
supplier
=
property
(
_
pyUniSet
.
ShortIOInfo_supplier_get
,
_py
UniSet
.
ShortIOInfo_supplier_set
)
__swig_setmethods__
[
"supplier_node"
]
=
_
py
UniSet
.
ShortIOInfo_supplier_node_set
__swig_getmethods__
[
"supplier_node"
]
=
_
py
UniSet
.
ShortIOInfo_supplier_node_get
supplier
=
property
(
_
UniSet
.
ShortIOInfo_supplier_get
,
_
UniSet
.
ShortIOInfo_supplier_set
)
__swig_setmethods__
[
"supplier_node"
]
=
_UniSet
.
ShortIOInfo_supplier_node_set
__swig_getmethods__
[
"supplier_node"
]
=
_UniSet
.
ShortIOInfo_supplier_node_get
if
_newclass
:
supplier_node
=
property
(
_
pyUniSet
.
ShortIOInfo_supplier_node_get
,
_py
UniSet
.
ShortIOInfo_supplier_node_set
)
supplier_node
=
property
(
_
UniSet
.
ShortIOInfo_supplier_node_get
,
_
UniSet
.
ShortIOInfo_supplier_node_set
)
def
__init__
(
self
):
this
=
_
py
UniSet
.
new_ShortIOInfo
()
this
=
_UniSet
.
new_ShortIOInfo
()
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_ShortIOInfo
__swig_destroy__
=
_UniSet
.
delete_ShortIOInfo
__del__
=
lambda
self
:
None
ShortIOInfo_swigregister
=
_
py
UniSet
.
ShortIOInfo_swigregister
ShortIOInfo_swigregister
=
_UniSet
.
ShortIOInfo_swigregister
ShortIOInfo_swigregister
(
ShortIOInfo
)
class
UException
(
_object
):
class
UException
(
BaseException
,
_object
):
__swig_setmethods__
=
{}
__setattr__
=
lambda
self
,
name
,
value
:
_swig_setattr
(
self
,
UException
,
name
,
value
)
__swig_getmethods__
=
{}
...
...
@@ -225,21 +225,22 @@ class UException(_object):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_pyUniSet
.
new_UException
(
*
args
)
BaseException
.
__init__
(
self
,
args
)
this
=
_UniSet
.
new_UException
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_UException
__swig_destroy__
=
_UniSet
.
delete_UException
__del__
=
lambda
self
:
None
def
getError
(
self
)
->
"std::string const"
:
return
_
py
UniSet
.
UException_getError
(
self
)
__swig_setmethods__
[
"err"
]
=
_
py
UniSet
.
UException_err_set
__swig_getmethods__
[
"err"
]
=
_
py
UniSet
.
UException_err_get
return
_UniSet
.
UException_getError
(
self
)
__swig_setmethods__
[
"err"
]
=
_UniSet
.
UException_err_set
__swig_getmethods__
[
"err"
]
=
_UniSet
.
UException_err_get
if
_newclass
:
err
=
property
(
_
pyUniSet
.
UException_err_get
,
_py
UniSet
.
UException_err_set
)
UException_swigregister
=
_
py
UniSet
.
UException_swigregister
err
=
property
(
_
UniSet
.
UException_err_get
,
_
UniSet
.
UException_err_set
)
UException_swigregister
=
_UniSet
.
UException_swigregister
UException_swigregister
(
UException
)
class
UTimeOut
(
UException
):
...
...
@@ -254,14 +255,14 @@ class UTimeOut(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UniSet
.
new_UTimeOut
(
*
args
)
this
=
_UniSet
.
new_UTimeOut
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_UTimeOut
__swig_destroy__
=
_UniSet
.
delete_UTimeOut
__del__
=
lambda
self
:
None
UTimeOut_swigregister
=
_
py
UniSet
.
UTimeOut_swigregister
UTimeOut_swigregister
=
_UniSet
.
UTimeOut_swigregister
UTimeOut_swigregister
(
UTimeOut
)
class
USysError
(
UException
):
...
...
@@ -276,14 +277,14 @@ class USysError(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UniSet
.
new_USysError
(
*
args
)
this
=
_UniSet
.
new_USysError
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_USysError
__swig_destroy__
=
_UniSet
.
delete_USysError
__del__
=
lambda
self
:
None
USysError_swigregister
=
_
py
UniSet
.
USysError_swigregister
USysError_swigregister
=
_UniSet
.
USysError_swigregister
USysError_swigregister
(
USysError
)
class
UValidateError
(
UException
):
...
...
@@ -298,14 +299,14 @@ class UValidateError(UException):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UniSet
.
new_UValidateError
(
*
args
)
this
=
_UniSet
.
new_UValidateError
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_UValidateError
__swig_destroy__
=
_UniSet
.
delete_UValidateError
__del__
=
lambda
self
:
None
UValidateError_swigregister
=
_
py
UniSet
.
UValidateError_swigregister
UValidateError_swigregister
=
_UniSet
.
UValidateError_swigregister
UValidateError_swigregister
(
UValidateError
)
class
UProxyObject
(
_object
):
...
...
@@ -316,41 +317,41 @@ class UProxyObject(_object):
__repr__
=
_swig_repr
def
__init__
(
self
,
*
args
):
this
=
_
py
UniSet
.
new_UProxyObject
(
*
args
)
this
=
_UniSet
.
new_UProxyObject
(
*
args
)
try
:
self
.
this
.
append
(
this
)
except
__builtin__
.
Exception
:
self
.
this
=
this
__swig_destroy__
=
_
py
UniSet
.
delete_UProxyObject
__swig_destroy__
=
_UniSet
.
delete_UProxyObject
__del__
=
lambda
self
:
None
def
addToAsk
(
self
,
id
:
'long'
)
->
"void"
:
return
_
py
UniSet
.
UProxyObject_addToAsk
(
self
,
id
)
return
_UniSet
.
UProxyObject_addToAsk
(
self
,
id
)
def
askSensor
(
self
,
id
:
'long'
)
->
"void"
:
return
_
py
UniSet
.
UProxyObject_askSensor
(
self
,
id
)
return
_UniSet
.
UProxyObject_askSensor
(
self
,
id
)
def
getValue
(
self
,
id
:
'long'
)
->
"long"
:
return
_
py
UniSet
.
UProxyObject_getValue
(
self
,
id
)
return
_UniSet
.
UProxyObject_getValue
(
self
,
id
)
def
getFloatValue
(
self
,
id
:
'long'
)
->
"float"
:
return
_
py
UniSet
.
UProxyObject_getFloatValue
(
self
,
id
)
return
_UniSet
.
UProxyObject_getFloatValue
(
self
,
id
)
def
setValue
(
self
,
id
:
'long'
,
val
:
'long'
)
->
"void"
:
return
_
py
UniSet
.
UProxyObject_setValue
(
self
,
id
,
val
)
return
_UniSet
.
UProxyObject_setValue
(
self
,
id
,
val
)
def
askIsOK
(
self
)
->
"bool"
:
return
_
py
UniSet
.
UProxyObject_askIsOK
(
self
)
return
_UniSet
.
UProxyObject_askIsOK
(
self
)
def
reaskSensors
(
self
)
->
"bool"
:
return
_
py
UniSet
.
UProxyObject_reaskSensors
(
self
)
return
_UniSet
.
UProxyObject_reaskSensors
(
self
)
def
updateValues
(
self
)
->
"bool"
:
return
_
py
UniSet
.
UProxyObject_updateValues
(
self
)
return
_UniSet
.
UProxyObject_updateValues
(
self
)
def
smIsOK
(
self
)
->
"bool"
:
return
_
py
UniSet
.
UProxyObject_smIsOK
(
self
)
UProxyObject_swigregister
=
_
py
UniSet
.
UProxyObject_swigregister
return
_UniSet
.
UProxyObject_smIsOK
(
self
)
UProxyObject_swigregister
=
_UniSet
.
UProxyObject_swigregister
UProxyObject_swigregister
(
UProxyObject
)
# This file is compatible with both classic and new-style classes.
...
...
wrappers/python/lib/
pyUniSet
/__init__.py
→
wrappers/python/lib/
lib
/__init__.py
View file @
4def8c92
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__all__
=
[
"
pyUniSet"
,
"pyUModbus"
,
"pyUConnector"
,
"py
UExceptions"
]
__all__
=
[
"
UniSet"
,
"UModbus"
,
"UConnector"
,
"
UExceptions"
]
wrappers/python/lib/pyUniSet/Makefile.am
deleted
100644 → 0
View file @
33108cc9
if
ENABLE_PYTHON
SWIG
=
swig
#python_SCRIPTS = pyUniSet.py pyUConnector.py pyUModbus.py pyUExceptions.py
pydir
=
$(pkgpythondir)
/pyUniSet
py_DATA
=
__init__.py pyUniSet.py pyUConnector.py pyUModbus.py pyUExceptions.py
BUILD_SRCDIR
=
$(srcdir)
/../../../core
BUILD_SRC
=
UModbus.cc UConnector.cc UProxyObject.cc
pyUniSet.py
:
UInterface_wrap.cxx _pyUniSet.la
pyUConnector.py
:
UConnector_wrap.cxx _pyUConnector.la
pyUModbus.py
:
_pyUModbus.la UModbus_wrap.cxx
pyUExceptions.py
:
_pyUExceptions.la
pyexec_LTLIBRARIES
=
_pyUConnector.la _pyUModbus.la _pyUExceptions.la _pyUniSet.la
_pyUniSet_la_SOURCES
=
PyUInterface.cc UInterface_wrap.cxx UProxyObject.cc
_pyUniSet_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(PYTHON_CFLAGS)
_pyUniSet_la_LDFLAGS
=
-module
-avoid-version
_pyUniSet_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(PYTHON_LIBS)
UInterface_wrap.cxx
:
UInterface.i UProxyObject.i PyUInterface.h $(BUILD_SRCDIR)/UProxyObject.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UInterface.i
#PyUObject_wrap.cxx: UObject.i PyUObject.h
# swig -python -c++ -classic UObject.i
_pyUConnector_la_SOURCES
=
UConnector.cc UConnector_wrap.cxx
_pyUConnector_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(PYTHON_CFLAGS)
_pyUConnector_la_LDFLAGS
=
-module
-avoid-version
_pyUConnector_la_LIBADD
=
$(UNISET_LIBS)
$(PYTHON_LIBS)
UConnector_wrap.cxx
:
UConnector.i $(BUILD_SRCDIR)/UConnector.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UConnector.i
_pyUModbus_la_SOURCES
=
UModbus.cc UModbus_wrap.cxx
_pyUModbus_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(POCO_CFLAGS)
$(PYTHON_CFLAGS)
_pyUModbus_la_LDFLAGS
=
-module
-avoid-version
_pyUModbus_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(POCO_LIBS)
$(PYTHON_LIBS)
UModbus_wrap.cxx
:
UInterface.i $(BUILD_SRCDIR)/UModbus.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UModbus.i
_pyUExceptions_la_SOURCES
=
UExceptions_wrap.cxx
_pyUExceptions_la_CXXFLAGS
=
-I
$(BUILD_SRCDIR)
$(UNISET_CFLAGS)
$(UNISET_EXT_CFLAGS)
$(PYTHON_CFLAGS)
_pyUExceptions_la_LDFLAGS
=
-module
-avoid-version
_pyUExceptions_la_LIBADD
=
$(UNISET_LIBS)
$(UNISET_EXT_LIBS)
$(PYTHON_LIBS)
UExceptions_wrap.cxx
:
UExceptions.i $(BUILD_SRCDIR)/UExceptions.h
$(SWIG)
-python
-py3
-c
++
-outcurrentdir
-I
$(BUILD_SRCDIR)
UExceptions.i
# Специальное правило для удаления сгенерированного кода
# для дальнейшей перегенерации
clean-gen
:
rm
-rf
*
.py
*
*
_wrap.cxx
$(BUILD_SRC)
:
ln
-sf
$(BUILD_SRCDIR)
/
$@
all-local
:
$(BUILD_SRC)
include
$(top_builddir)/include.mk
endif
wrappers/python/netdata-plugin/uniset.chart.py
View file @
4def8c92
...
...
@@ -30,7 +30,7 @@ import os
import
sys
import
uniset2
from
uniset2
import
UniXML
from
uniset2
.lib
import
UniXML
from
subprocess
import
Popen
,
PIPE
sys
.
path
.
append
(
"./python_modules"
)
...
...
wrappers/python/tests/UConnector/testUC.py
View file @
4def8c92
...
...
@@ -5,10 +5,11 @@ import sys
import
time
sys
.
path
.
append
(
'../../'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/.libs'
)
sys
.
path
.
append
(
'../../lib/
lib
/'
)
sys
.
path
.
append
(
'../../lib/
lib
/.libs'
)
from
lib
import
*
from
UniSet
import
*
from
UConnector
import
*
def
myfunc
(
act
):
act
[
'test'
]
=
'test'
...
...
wrappers/python/tests/UInterface/testUI.py
View file @
4def8c92
...
...
@@ -4,10 +4,10 @@
import
sys
sys
.
path
.
append
(
'../../'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/.libs'
)
sys
.
path
.
append
(
'../../lib/
lib
/'
)
sys
.
path
.
append
(
'../../lib/
lib
/.libs'
)
from
lib
import
*
from
UniSet
import
*
if
__name__
==
"__main__"
:
...
...
wrappers/python/tests/UModbus/testUModbus.py
View file @
4def8c92
...
...
@@ -4,10 +4,11 @@
import
sys
sys
.
path
.
append
(
'../../'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/'
)
sys
.
path
.
append
(
'../../lib/
pyUniSet
/.libs'
)
sys
.
path
.
append
(
'../../lib/
lib
/'
)
sys
.
path
.
append
(
'../../lib/
lib
/.libs'
)
from
lib
import
*
from
UniSet
import
*
from
UModbus
import
*
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment