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
0c3eb913
Commit
0c3eb913
authored
Aug 18, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in PassiveTimer (default getInterval()) and new release
parent
4a845cba
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
5 deletions
+35
-5
libuniset.spec
conf/libuniset.spec
+7
-2
IOControl.cc
extensions/IOControl/IOControl.cc
+12
-2
PassiveTimer.h
include/PassiveTimer.h
+2
-0
PassiveTimer.cc
src/Timers/PassiveTimer.cc
+1
-1
passivetimer.cc
tests/passivetimer.cc
+13
-0
No files found.
conf/libuniset.spec
View file @
0c3eb913
...
...
@@ -3,9 +3,8 @@
Name: libuniset
Version: 0.96
Release: eter4
7
Release: eter4
9
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
Url: http://sourceforge.net/uniset
...
...
@@ -176,6 +175,12 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Tue Aug 18 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter48
- fixed bug in PassiveTimer
* Tue Aug 18 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter47
- new build
* Tue Aug 18 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter46
- new build
...
...
extensions/IOControl/IOControl.cc
View file @
0c3eb913
...
...
@@ -40,7 +40,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
readconf_ok
(
false
),
term
(
false
)
{
cout
<<
"$Id: IOControl.cc,v 1.3 2009/01/23 23:56:54 vpashka Exp $"
<<
endl
;
//
cout << "$Id: IOControl.cc,v 1.3 2009/01/23 23:56:54 vpashka Exp $" << endl;
// {
// string myfullname = conf->oind->getNameById(id);
// myname = ORepHelpers::getShortName(myfullname.c_str());
...
...
@@ -337,7 +337,6 @@ void IOControl::execute()
// --------------------------------------------------------------------------------
void
IOControl
::
iopoll
()
{
for
(
IOMap
::
iterator
it
=
iomap
.
begin
();
it
!=
iomap
.
end
();
++
it
)
{
if
(
it
->
ignore
||
it
->
ncard
==
defCardNum
)
...
...
@@ -345,6 +344,11 @@ void IOControl::iopoll()
ComediInterface
*
card
=
cards
.
getCard
(
it
->
ncard
);
// cout << conf->oind->getMapName(it->si.id)
// << " card=" << card << " ncard=" << it->ncard
// << " subdev: " << it->subdev << " chan: " << it->channel << endl;
if
(
card
==
NULL
||
it
->
subdev
==
DefaultSubdev
||
it
->
channel
==
DefaultChannel
)
continue
;
...
...
@@ -391,7 +395,13 @@ void IOControl::iopoll()
<< endl;
}
*/
// cout << " jar=" << ib->ptJar.getInterval()
// << " ondelay=" << ib->ptOnDelay.getInterval()
// << endl;
IOBase
::
processingAsDI
(
ib
,
set
,
shm
,
force
);
// cout << "val=" << ib->value << endl;
//
// .
...
...
include/PassiveTimer.h
View file @
0c3eb913
...
...
@@ -101,6 +101,8 @@ public:
virtual
timeout_t
getCurrent
();
/*!< , */
virtual
timeout_t
getInterval
()
/*!< , , */
{
if
(
timeSS
==
WaitUpTime
)
return
0
;
return
timeSS
*
10
;
}
...
...
src/Timers/PassiveTimer.cc
View file @
0c3eb913
...
...
@@ -65,7 +65,7 @@ bool PassiveTimer::checkTime()
// printf("times=%d, act=%d\n",times(0),timeAct);
// printf("%d\n",timeSS); msleep(10);
if
(
timeSS
==
WaitUpTime
)
if
(
timeSS
==
WaitUpTime
)
return
false
;
if
(
times
()
>=
timeAct
)
...
...
tests/passivetimer.cc
View file @
0c3eb913
...
...
@@ -9,6 +9,19 @@ PassiveTimer pt(1000);
int
main
()
{
PassiveTimer
pt1
(
5000
);
cout
<<
" pt1.getInterval()="
<<
pt1
.
getInterval
()
<<
endl
;
PassiveTimer
pt2
;
cout
<<
" pt2.getInterval()="
<<
pt2
.
getInterval
()
<<
endl
;
if
(
pt2
.
getInterval
()
!=
0
)
{
cerr
<<
"BAD DEFAULT INITIALIZATION!!!"
<<
endl
;
return
1
;
}
while
(
1
)
{
cerr
<<
"timer="
<<
pt
.
checkTime
()
<<
endl
;
...
...
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