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
8f9b2053
Commit
8f9b2053
authored
Aug 27, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(IOControl): перенёс исправление из 1.x
parent
88641fd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
19 deletions
+30
-19
IOControl.cc
extensions/IOControl/IOControl.cc
+30
-19
No files found.
extensions/IOControl/IOControl.cc
View file @
8f9b2053
...
...
@@ -717,6 +717,36 @@ bool IOControl::initIOItem( UniXML_iterator& it )
inf
.
subdev
=
DefaultSubdev
;
}
if
(
!
IOBase
::
initItem
(
&
inf
,
it
,
shm
,
&
dlog
,
myname
,
filtersize
,
filterT
)
)
return
false
;
// если вектор уже заполнен
// то увеличиваем его на 30 элементов (с запасом)
// после инициализации делается resize
// под реальное количество
if
(
maxItem
>=
iomap
.
size
()
)
iomap
.
resize
(
maxItem
+
30
);
int
prior
=
it
.
getIntProp
(
"iopriority"
);
if
(
prior
>
0
)
{
IOPriority
p
(
prior
,
maxItem
);
pmap
.
push_back
(
p
);
if
(
dlog
.
debugging
(
Debug
::
LEVEL3
)
)
dlog
[
Debug
::
LEVEL3
]
<<
myname
<<
"(readItem): add to priority list: "
<<
it
.
getProp
(
"name"
)
<<
" priority="
<<
prior
<<
endl
;
}
// значит это пороговый датчик..
if
(
inf
.
t_ai
!=
DefaultObjectId
)
{
iomap
[
maxItem
++
]
=
std
::
move
(
inf
);
if
(
dlog
.
debugging
(
Debug
::
LEVEL3
)
)
dlog
[
Debug
::
LEVEL3
]
<<
myname
<<
"(readItem): add threshold '"
<<
it
.
getProp
(
"name"
)
<<
" for '"
<<
conf
->
oind
->
getNameById
(
inf
.
t_ai
)
<<
endl
;
return
true
;
}
inf
.
channel
=
it
.
getIntProp
(
"channel"
);
if
(
inf
.
channel
<
0
||
inf
.
channel
>
32
)
{
...
...
@@ -725,8 +755,6 @@ bool IOControl::initIOItem( UniXML_iterator& it )
return
false
;
}
if
(
!
IOBase
::
initItem
(
&
inf
,
it
,
shm
,
&
dlog
,
myname
,
filtersize
,
filterT
)
)
return
false
;
inf
.
lamp
=
it
.
getIntProp
(
"lamp"
);
inf
.
no_testlamp
=
it
.
getIntProp
(
"no_iotestlamp"
);
...
...
@@ -758,23 +786,6 @@ bool IOControl::initIOItem( UniXML_iterator& it )
dlog3
<<
myname
<<
"(readItem): add: "
<<
inf
.
stype
<<
" "
<<
inf
<<
endl
;
// если вектор уже заполнен
// то увеличиваем его на 10 элементов (с запасом)
// после инициализации делается resize
// под реальное количество
if
(
maxItem
>=
iomap
.
size
()
)
iomap
.
resize
(
maxItem
+
90
);
int
prior
=
it
.
getIntProp
(
"iopriority"
);
if
(
prior
>
0
)
{
IOPriority
p
(
prior
,
maxItem
);
pmap
.
push_back
(
p
);
dlog3
<<
myname
<<
"(readItem): add to priority list: "
<<
it
.
getProp
(
"name"
)
<<
" priority="
<<
prior
<<
endl
;
}
iomap
[
maxItem
++
]
=
std
::
move
(
inf
);
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