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
1edb174c
Commit
1edb174c
authored
Jun 20, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправил ошибку в порядоке обработки параметров командой строки и конф. файла
в IOControl.
parent
dc139884
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
libuniset.spec
conf/libuniset.spec
+1
-1
IOControl.cc
extensions/IOControl/IOControl.cc
+16
-10
NCRestorer.h
include/NCRestorer.h
+1
-3
No files found.
conf/libuniset.spec
View file @
1edb174c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 1.0
Version: 1.0
Release: alt
39
Release: alt
40
Summary: UniSet - library for building distributed industrial control systems
Summary: UniSet - library for building distributed industrial control systems
License: GPL
License: GPL
Group: Development/C++
Group: Development/C++
...
...
extensions/IOControl/IOControl.cc
View file @
1edb174c
...
@@ -65,8 +65,14 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
...
@@ -65,8 +65,14 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
UniXML_iterator
it
(
cnode
);
UniXML_iterator
it
(
cnode
);
noCards
=
true
;
noCards
=
true
;
for
(
unsigned
int
i
=
1
;
i
<
cards
.
size
();
i
++
)
for
(
unsigned
int
i
=
1
;
i
<
cards
.
size
();
i
++
)
cards
[
i
]
=
NULL
;
buildCardsList
();
for
(
unsigned
int
i
=
1
;
i
<
cards
.
size
();
i
++
)
{
{
stringstream
s1
;
stringstream
s1
;
s1
<<
"--"
<<
prefix
<<
"-dev"
<<
i
;
s1
<<
"--"
<<
prefix
<<
"-dev"
<<
i
;
...
@@ -76,11 +82,13 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
...
@@ -76,11 +82,13 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
string
iodev
=
conf
->
getArgParam
(
s1
.
str
(),
it
.
getProp
(
s2
.
str
()));
string
iodev
=
conf
->
getArgParam
(
s1
.
str
(),
it
.
getProp
(
s2
.
str
()));
if
(
iodev
.
empty
()
||
iodev
==
"/dev/null"
)
if
(
iodev
.
empty
()
||
iodev
==
"/dev/null"
)
{
{
unideb
[
Debug
::
LEVEL3
]
<<
myname
<<
"(init): КАРТА N"
<<
i
if
(
cards
[
i
]
==
NULL
)
<<
" ОТКЛЮЧЕНА (TestMode)!!! в КАЧЕСТВЕ УСТРОЙСТВА УКАЗАНО '"
{
<<
iodev
<<
"'"
<<
endl
;
unideb
[
Debug
::
LEVEL3
]
<<
myname
<<
"(init): КАРТА N"
<<
i
cards
[
i
]
=
NULL
;
<<
" ОТКЛЮЧЕНА (TestMode)!!! в КАЧЕСТВЕ УСТРОЙСТВА УКАЗАНО '"
cout
<<
"******************** CARD"
<<
i
<<
": IO IMITATOR MODE ****************"
<<
endl
;
<<
iodev
<<
"'"
<<
endl
;
cout
<<
"******************** CARD"
<<
i
<<
": IO IMITATOR MODE ****************"
<<
endl
;
}
}
}
else
else
{
{
...
@@ -95,17 +103,15 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
...
@@ -95,17 +103,15 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
{
{
stringstream
t1
;
stringstream
t1
;
t1
<<
s1
.
str
()
<<
"-subdev"
<<
s
<<
"-type"
;
t1
<<
s1
.
str
()
<<
"-subdev"
<<
s
<<
"-type"
;
stringstream
t2
;
t2
<<
s2
.
str
()
<<
"-subdev"
<<
s
<<
"-type"
;
string
stype
=
conf
->
getArgParam
(
t1
.
str
()
,
it
.
getProp
(
t2
.
str
())
);
string
stype
=
conf
->
getArgParam
(
t1
.
str
());
if
(
!
stype
.
empty
()
)
if
(
!
stype
.
empty
()
)
{
{
ComediInterface
::
SubdevType
st
=
ComediInterface
::
str2type
(
stype
.
c_str
());
ComediInterface
::
SubdevType
st
=
ComediInterface
::
str2type
(
stype
.
c_str
());
if
(
!
stype
.
empty
()
&&
st
==
ComediInterface
::
Unknown
)
if
(
!
stype
.
empty
()
&&
st
==
ComediInterface
::
Unknown
)
{
{
ostringstream
err
;
ostringstream
err
;
err
<<
"Unknown subdev type '"
<<
stype
<<
" for "
<<
t1
<<
" OR "
<<
t2
;
err
<<
"Unknown subdev type '"
<<
stype
<<
" for "
<<
t1
;
throw
SystemError
(
err
.
str
());
throw
SystemError
(
err
.
str
());
}
}
...
@@ -122,7 +128,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
...
@@ -122,7 +128,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
}
}
}
}
buildCardsList
();
unideb
[
Debug
::
INFO
]
<<
myname
<<
"(init): result numcards="
<<
cards
.
size
()
<<
endl
;
unideb
[
Debug
::
INFO
]
<<
myname
<<
"(init): result numcards="
<<
cards
.
size
()
<<
endl
;
...
...
include/NCRestorer.h
View file @
1edb174c
...
@@ -151,9 +151,7 @@ class NCRestorer_XML:
...
@@ -151,9 +151,7 @@ class NCRestorer_XML:
*/
*/
void
setDependsFilter
(
const
std
::
string
filterField
,
const
std
::
string
filterValue
=
""
);
void
setDependsFilter
(
const
std
::
string
filterField
,
const
std
::
string
filterValue
=
""
);
/*! Установить фильтр на чтение списка 'порогов')
/*! Установить фильтр на чтение списка 'порогов' */
\note Функцию необходимо вызывать до вызова buildDependsList(...)
*/
void
setThresholdsFilter
(
const
std
::
string
filterField
,
const
std
::
string
filterValue
=
""
);
void
setThresholdsFilter
(
const
std
::
string
filterField
,
const
std
::
string
filterValue
=
""
);
bool
setFileName
(
const
std
::
string
&
file
,
bool
create
);
bool
setFileName
(
const
std
::
string
&
file
,
bool
create
);
...
...
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