[prev in list] [next in list] [prev in thread] [next in thread] 

List:       orocos-users
Subject:    [Orocos-users] Reporting components: use ORO_SCHED_OTHER?
From:       klaas.gadeyne () gmail ! com (Klaas Gadeyne)
Date:       2008-01-24 19:35:50
Message-ID: a7b55b4a0801241034s56129b31q4758e6226794948e () mail ! gmail ! com
[Download RAW message or body]

On Jan 24, 2008 11:26 AM, Peter Soetens <peter.soetens@fmtc.be> wrote:
> On Tuesday 22 January 2008 17:54:21 Klaas Gadeyne wrote:
> > I just sat together with a user who has implemented an application
> > using the FileReporting component.
> >
> > To get things running, he copied over the code from
> > ocl-trunk/reporting/tests/main.cpp
> >
> >      PeriodicActivity act(10, 1.0);
> >      ConsoleReporting rc("Reporting");
> >      act.run( rc.engine() );
> >
> > It seems to me reportingcomponents should use the ORO_SCHED_OTHER scheduler
> > when available?
>
> Yes. By default a thread is started in ORO_SCHED_RT, which is not such a good
> idea for a logging/reporting thread.

Untested (orocos on os x is not yet supported :-)

[klaas@Leentje ~/SVN/ocl-trunk/reporting/tests]$
$ svn diff
Index: main.cpp
===================================================================
--- main.cpp    (revision 28882)
+++ main.cpp    (working copy)
@@ -65,7 +65,7 @@
     }


-    PeriodicActivity act(10, 1.0);
+    PeriodicActivity act(ORO_SCHED_OTHER,10, 1.0);
     ConsoleReporting rc("Reporting");
     TestTaskContext gtc("MyPeer");
     TestTaskContext2 gtc2("MyPeer2");
Index: tcpmain.cpp
===================================================================
--- tcpmain.cpp (revision 28882)
+++ tcpmain.cpp (working copy)
@@ -95,7 +95,7 @@
     }


-    PeriodicActivity act(10, 1.0);
+    PeriodicActivity act(ORO_SCHED_OTHER,10, 1.0);
     TcpReporting rc("TCPReporting");
     TestTaskContext gtc("MyPeer");
     TestTaskContext2 gtc2("MyPeer2");

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic