Reporting components: use ORO_SCHED_OTHER?

Hi,

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?

regards,

Klaas

ps. I also skimmed the component builders manual (very fast), and I
could not find information about the fact that priorities, when used
like this, map to native RTOS priorities?

Reporting components: use ORO_SCHED_OTHER?

On Tuesday 22 January 2008 17:54:21 Klaas Gadeyne wrote:
> Hi,
>
> 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.

>
> ps. I also skimmed the component builders manual (very fast), and I
> could not find information about the fact that priorities, when used
> like this, map to native RTOS priorities?

This seems to be lacking from the documentation, but on the otherhand, no word
is said about a 'mapping' or 'interpreting' priorities, which would imply
that they are used as-is.

Peter

Reporting components: use ORO_SCHED_OTHER?

On Jan 24, 2008 11:26 AM, Peter Soetens
<peter [dot] soetens [..] ...> 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");