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
3f11f0fe
Commit
3f11f0fe
authored
Oct 28, 2013
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(python): исправил ошибку в интерфейсе (доступ к несуществующей функции)
parent
8a647064
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
libuniset.spec
conf/libuniset.spec
+4
-1
UGlobal.py
python/lib/UGlobal.py
+3
-3
UInterface.py
python/lib/UInterface.py
+9
-0
No files found.
conf/libuniset.spec
View file @
3f11f0fe
...
...
@@ -7,7 +7,7 @@
Name: libuniset
Version: 1.6
Release: alt1
4
Release: alt1
5
Summary: UniSet - library for building distributed industrial control systems
...
...
@@ -319,6 +319,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Oct 28 2013 Pavel Vainerman <pv@altlinux.ru> 1.6-alt15
- (python): fixed bug in UInterface
* Sat Oct 26 2013 Pavel Vainerman <pv@altlinux.ru> 1.6-alt14
- (python): fixed bug in UInterface
...
...
python/lib/UGlobal.py
View file @
3f11f0fe
...
...
@@ -6,7 +6,7 @@ import time
import
sys
def
is_id
(
str_id
):
if
str_id
.
__class__
.
__name__
==
"int"
:
if
str_id
.
__class__
.
__name__
==
"int"
or
str_id
.
__class__
.
__name__
==
"long"
:
return
True
if
str_id
.
strip
()
.
isdigit
():
...
...
@@ -19,7 +19,7 @@ def to_int(s):
if
s
==
None
or
s
==
""
:
return
0
if
s
.
__class__
.
__name__
==
"int"
:
if
s
.
__class__
.
__name__
==
"int"
or
s
.
__class__
.
__name__
==
"long"
:
return
s
if
s
.
__class__
.
__name__
==
"float"
:
...
...
@@ -238,7 +238,7 @@ def getArgInt(param,defval=0):
for
i
in
range
(
0
,
len
(
sys
.
argv
)):
if
sys
.
argv
[
i
]
==
param
:
if
i
+
1
<
len
(
sys
.
argv
):
return
to_int
(
s
trs
ys
.
argv
[
i
+
1
])
return
to_int
(
sys
.
argv
[
i
+
1
])
else
:
break
;
...
...
python/lib/UInterface.py
View file @
3f11f0fe
...
...
@@ -121,3 +121,12 @@ class UInterface():
return
None
raise
UException
(
"(getNodeID): Unknown interface
%
s"
%
self
.
utype
)
def
getSensorID
(
self
,
s_name
):
if
self
.
itype
==
"uniset"
:
return
self
.
i
.
getSensorID
(
s_name
)
if
self
.
itype
==
"modbus"
:
return
None
raise
UException
(
"(getSensorID): Unknown interface
%
s"
%
self
.
utype
)
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