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
79fd3464
Commit
79fd3464
authored
May 29, 2018
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Config): minor fixes in IOConfig reader
parent
f5c264be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+1
-3
IOConfig_XML.h
include/IOConfig_XML.h
+1
-1
IOConfig_XML.cc
src/Processes/IOConfig_XML.cc
+14
-15
No files found.
extensions/SharedMemory/SharedMemory.cc
View file @
79fd3464
...
...
@@ -537,9 +537,7 @@ namespace uniset
else
{
dinfo
<<
"(smemory): init from configure: "
<<
conf
->
getConfFileName
()
<<
endl
;
UniXML
::
iterator
it
(
conf
->
getXMLSensorsSection
());
it
.
goChildren
();
ioconf
=
make_shared
<
IOConfig_XML
>
(
conf
->
getConfXML
(),
conf
,
it
);
ioconf
=
make_shared
<
IOConfig_XML
>
(
conf
->
getConfXML
(),
conf
,
conf
->
getXMLSensorsSection
());
}
uniset
::
ObjectId
ID
=
conf
->
getControllerID
(
conf
->
getArgParam
(
"--smemory-id"
,
"SharedMemory"
));
...
...
include/IOConfig_XML.h
View file @
79fd3464
...
...
@@ -51,7 +51,7 @@ namespace uniset
/*!
* \param xml - xml формата uniset-project
* \param conf - конфигурация
* \param root - узел с
датчиками
(если не задан, ищется "sensors")
* \param root - узел с
о списком датчиков
(если не задан, ищется "sensors")
*/
IOConfig_XML
(
const
std
::
shared_ptr
<
UniXML
>&
_xml
,
const
std
::
shared_ptr
<
Configuration
>&
conf
,
xmlNode
*
root
=
nullptr
);
...
...
src/Processes/IOConfig_XML.cc
View file @
79fd3464
...
...
@@ -55,26 +55,25 @@ namespace uniset
IOController
::
IOStateList
lst
;
if
(
!
root
)
{
root
=
uxml
->
findNode
(
uxml
->
getFirstNode
(),
"sensors"
);
UniXML
::
iterator
it
(
root
);
it
.
goChildren
();
root
=
it
.
getCurrent
();
}
if
(
!
root
)
return
lst
;
if
(
root
)
{
lst
=
read_list
(
root
);
// только после чтения всех датчиков и формирования списка IOList
// можно инициализировать списки зависимостей
init_depends_signals
(
lst
);
UniXML
::
iterator
it
(
root
);
xmlNode
*
tnode
=
uxml
->
findNode
(
uxml
->
getFirstNode
(),
"thresholds"
);
if
(
!
it
.
goChildren
()
)
return
lst
;
if
(
tnode
)
init_thresholds
(
tnode
,
lst
);
}
lst
=
read_list
(
it
);
// только после чтения всех датчиков и формирования списка IOList
// можно инициализировать списки зависимостей
init_depends_signals
(
lst
);
xmlNode
*
tnode
=
uxml
->
findNode
(
uxml
->
getFirstNode
(),
"thresholds"
);
if
(
tnode
)
init_thresholds
(
tnode
,
lst
);
return
lst
;
}
...
...
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