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
61828f30
Commit
61828f30
authored
Feb 14, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправил ошибку в предыдущем коммите и в функции getIOType(string)
parent
e2cbe9cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
libuniset.spec
conf/libuniset.spec
+5
-1
Configuration.cc
src/Various/Configuration.cc
+9
-0
NCRestorer_XML.cc
src/Various/NCRestorer_XML.cc
+2
-2
conftest.cc
tests/conftest.cc
+3
-0
No files found.
conf/libuniset.spec
View file @
61828f30
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 1.0
Release: alt
1
Release: alt
2
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -187,6 +187,10 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Feb 14 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt2
- minor fixes
- new version ModbusTCPMaster
* Wed Feb 09 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt1
- fixed bug in VERSION (bad pc-files)
...
...
src/Various/Configuration.cc
View file @
61828f30
...
...
@@ -1049,6 +1049,15 @@ UniversalIO::IOTypes Configuration::getIOType( UniSetTypes::ObjectId id )
// -------------------------------------------------------------------------
UniversalIO
::
IOTypes
Configuration
::
getIOType
(
const
std
::
string
name
)
{
// Если указано "короткое" имя
// то просто сперва ищём ID, а потом по нему
// iotype
ObjectId
id
=
getSensorID
(
name
);
if
(
id
!=
DefaultObjectId
)
return
getIOType
(
id
);
// Пробуем искать, считая, что задано mapname
// ("RootSection/Sensors/name")
const
ObjectInfo
*
i
=
oind
->
getObjectInfo
(
name
);
if
(
i
&&
(
xmlNode
*
)(
i
->
data
)
)
{
...
...
src/Various/NCRestorer_XML.cc
View file @
61828f30
...
...
@@ -456,12 +456,12 @@ bool NCRestorer_XML::getThresholdInfo( UniXML& xml,xmlNode* node,
}
else
{
UniversalIO
::
IOTypes
iotype
=
conf
->
getIOType
(
sid_name
);
UniversalIO
::
IOTypes
iotype
=
conf
->
getIOType
(
ti
.
sid
);
// Пока что IONotifyController поддерживает работу только с 'DI'.
if
(
iotype
!=
UniversalIO
::
DigitalInput
)
{
unideb
[
Debug
::
CRIT
]
<<
"(NCRestorer_XML:getThresholdInfo): "
<<
" Bad iotype for "
<<
sid_name
<<
". iotype must be 'DI'!"
<<
endl
;
<<
" Bad iotype
("
<<
iotype
<<
")
for "
<<
sid_name
<<
". iotype must be 'DI'!"
<<
endl
;
return
false
;
}
...
...
tests/conftest.cc
View file @
61828f30
...
...
@@ -31,9 +31,12 @@ int main(int argc, const char **argv)
cout
<<
"**** check getMapName: "
<<
(
mn
.
empty
()
?
"FAILED"
:
"OK"
)
<<
endl
;
UniversalIO
::
IOTypes
t1
=
conf
->
getIOType
(
1
);
cout
<<
"**** getIOType for "
<<
mn
<<
endl
;
cout
<<
"**** check getIOType(id): ("
<<
t1
<<
") "
<<
(
t1
==
UniversalIO
::
UnknownIOType
?
"FAILED"
:
"OK"
)
<<
endl
;
UniversalIO
::
IOTypes
t2
=
conf
->
getIOType
(
mn
);
cout
<<
"**** check getIOType(name): ("
<<
t2
<<
") "
<<
(
t2
==
UniversalIO
::
UnknownIOType
?
"FAILED"
:
"OK"
)
<<
endl
;
UniversalIO
::
IOTypes
t3
=
conf
->
getIOType
(
"Input1_S"
);
cout
<<
"**** check getIOType(name): for short name 'Input1_S': ("
<<
t3
<<
") "
<<
(
t3
==
UniversalIO
::
UnknownIOType
?
"FAILED"
:
"OK"
)
<<
endl
;
return
0
;
}
...
...
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