Switching to Hard Real Time

While integrating RTNET ethernet driver in OROCOS I observe some difficulties in switching to hard real time for a thread in Orocos. To send a packet the RTAI procedure rt_make_hard_real_time() should be called. Is it possible to do the same in Orocos for an ACTIVITY for example?

The example in "2.5. Accessing the Threads from Activities" from "Orocos Component Builder's Manual" does not to work: act->thread()->makeHardRealtime(); because the function seams not to exist.

Switching to Hard Real Time

On Monday 11 January 2010 14:28:19 dunets [..] ... wrote:
> While integrating RTNET ethernet driver in OROCOS I observe some
> difficulties in switching to hard real time for a thread in Orocos. To
> send a packet the RTAI procedure rt_make_hard_real_time() should be
> called. Is it possible to do the same in Orocos for an ACTIVITY for
> example?
>
> The example in "2.5. Accessing the Threads from Activities" from "Orocos
> Component Builder's Manual" does not to work:
> act->thread()->makeHardRealtime(); because the function seams not to
> exist.

This is a pre-1.0 function which accidentally remained in the documentation.

The correct way is to use act->thread()->setScheduler(ORO_SCHED_RT);
The restriction this function has is that the thread must be in a stopped
state. A better solution is to create the activity right-away hard real-time
by passing ORO_SCHED_RT in the constructor, and specify a priority between 0
and 99 (for RTAI, where 0 is the highest). In that case, there's no need to
change the scheduler anymore. RTAI will always switch you back to hard real-
time when necessary.

Peter

Switching to Hard Real Time

While integrating RTNET ethernet driver in OROCOS I observe some difficulties in switching to
hard real time for a thread in Orocos. To send a packet the RTAI procedure rt_make_hard_real_time()
should be called. Is it possible to do the same in Orocos for an ACTIVITY for example?

The example in "2.5. Accessing the Threads from Activities" from "Orocos Component Builder's Manual"
does not to work: act->thread()->makeHardRealtime(); because the function seams not to exist.