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
337de1f1
Commit
337de1f1
authored
Feb 14, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(NCRestorer): добавил проверку на тип указанного датчика связанного с порогом.
Потому-что пока пороги умеют работать только с 'DI'.
parent
3f4ab8f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
NCRestorer_XML.cc
src/Various/NCRestorer_XML.cc
+16
-20
No files found.
src/Various/NCRestorer_XML.cc
View file @
337de1f1
...
...
@@ -427,41 +427,37 @@ bool NCRestorer_XML::getConsumerList( UniXML& xml,xmlNode* node,
bool
NCRestorer_XML
::
getThresholdInfo
(
UniXML
&
xml
,
xmlNode
*
node
,
IONotifyController
::
ThresholdInfoExt
&
ti
)
{
string
sid_name
=
xml
.
getProp
(
node
,
"sid"
);
UniXML_iterator
uit
(
node
);
string
sid_name
=
uit
.
getProp
(
"sid"
);
if
(
!
sid_name
.
empty
()
)
{
ti
.
sid
=
conf
->
getSensorID
(
sid_name
);
if
(
ti
.
sid
==
UniSetTypes
::
DefaultObjectId
)
{
unideb
[
Debug
::
CRIT
]
<<
"(NCRestorer_XML:getThresholdInfo): "
<<
" Неверно указан НАЗВАНИЕ датчика "
<<
sid_name
<<
" Не найден ID для данного дачика
\n
"
<<
flush
;
<<
" Not found ID for "
<<
sid_name
<<
endl
;
}
else
{
UniversalIO
::
IOTypes
iotype
=
conf
->
getIOType
(
sid_name
);
// Пока что IONotifyController поддерживает работу только с 'DI'.
if
(
iotype
!=
UniversalIO
::
DigitalInput
)
{
unideb
[
Debug
::
CRIT
]
<<
"(NCRestorer_XML:getThresholdInfo): "
<<
" Bad iotype for "
<<
sid_name
<<
". iotype must be 'DI'!"
<<
endl
;
return
false
;
}
}
}
UniXML_iterator
uit
(
node
);
ti
.
id
=
uit
.
getIntProp
(
"id"
);
ti
.
lowlimit
=
uit
.
getIntProp
(
"lowlimit"
);
ti
.
hilimit
=
uit
.
getIntProp
(
"hilimit"
);
ti
.
sensibility
=
uit
.
getIntProp
(
"sensibility"
);
ti
.
inverse
=
uit
.
getIntProp
(
"inverse"
);
ti
.
state
=
IONotifyController_i
::
NormalThreshold
;
if
(
ti
.
sid
==
UniSetTypes
::
DefaultObjectId
)
{
string
sid_name
(
uit
.
getProp
(
"sid"
));
if
(
!
sid_name
.
empty
()
)
{
ti
.
sid
=
conf
->
getSensorID
(
sid_name
);
if
(
ti
.
sid
==
UniSetTypes
::
DefaultObjectId
)
{
unideb
[
Debug
::
CRIT
]
<<
"(NCRestorer_XML:getThresholdInfo): "
<<
" Неверно указан НАЗВАНИЕ датчика "
<<
sid_name
<<
" Не найден ID для данного дачика
\n
"
<<
flush
;
}
}
}
return
true
;
}
// ------------------------------------------------------------------------------------------
...
...
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