NonPeriodicActivity

Hi,

I have a component which does a blocking read on a socket. Therefor I deploy
it using a NonPeriodicActivity and use the trigger mechanism to wake it up
again:

updateHook(){

rcv_from(...);
//do stuff
send_to(...);

this->trigger();
}

This worked fine in RTT 1.x, but in RTT 2.x I see that for some reason my
updateHook gets scheduled only with a sample time of 1s, instead of directly
scheduling it again.

I'm deploying my component with the deployer as follows:

<struct name="Activity" type="NonPeriodicActivity">
<simple name="Priority" type="short"><value>1<value><simple>
<simple name="Scheduler" type="string"><value>ORO_SCHED_RT<value>&lt;/\
simple&gt;
<struct>

What could be the cause of this?

Ruben

NonPeriodicActivity

On Monday 11 October 2010 12:18:14 Ruben Smits wrote:
> Hi,
>
> I have a component which does a blocking read on a socket. Therefor I
> deploy it using a NonPeriodicActivity and use the trigger mechanism to
> wake it up again:
>
> updateHook(){
>
> rcv_from(...);
> //do stuff
> send_to(...);
>
> this->trigger();
> }
>
>
> This worked fine in RTT 1.x, but in RTT 2.x I see that for some reason my
> updateHook gets scheduled only with a sample time of 1s, instead of
> directly scheduling it again.
>
> I'm deploying my component with the deployer as follows:
>
> <struct name="Activity" type="NonPeriodicActivity">
> <simple name="Priority" type="short"><value>1<value><simple>
> <simple name="Scheduler" type="string"><value>ORO_SCHED_RT<value>&lt;/\
&gt; simple>
> <struct>
>
> What could be the cause of this?

It's a bug in the 'backwards compatibility' of the Deployer. You can change to
type="Activity" to get the fix immediately, or pull the ocl toolchain-2.0
branch for the patch.

Peter

Ruben Smits's picture

NonPeriodicActivity

On Monday 11 October 2010 12:30:54 Peter Soetens wrote:
> On Monday 11 October 2010 12:18:14 Ruben Smits wrote:
> > Hi,
> >
> > I have a component which does a blocking read on a socket. Therefor I
> > deploy it using a NonPeriodicActivity and use the trigger mechanism to
> > wake it up again:
> >
> > updateHook(){
> >
> > rcv_from(...);
> > //do stuff
> > send_to(...);
> >
> > this->trigger();
> > }
> >
> >
> > This worked fine in RTT 1.x, but in RTT 2.x I see that for some reason my
> > updateHook gets scheduled only with a sample time of 1s, instead of
> > directly scheduling it again.
> >
> > I'm deploying my component with the deployer as follows:
> >
> > <struct name="Activity" type="NonPeriodicActivity">
> >
> > <simple name="Priority" type="short"><value>1<value><simple>
> > <simple name="Scheduler"
> > type="string"><value>ORO_SCHED_RT<value>&lt;/\
&gt; >
> > simple>
> >
> > <struct>
> >
> > What could be the cause of this?
>
> It's a bug in the 'backwards compatibility' of the Deployer. You can change
> to type="Activity" to get the fix immediately,

I changed it to Activity, but now my updateHook does not get called anymore (I
added a log message before recv_from to check), I also added a trigger to the
startHook, to make sure that it is started.

Ruben

> or pull the ocl
> toolchain-2.0 branch for the patch.
>
> Peter