First execution of updateHook

Dear all, I''m curious about the policy of the "trigger" of a component. I realized on non periodic component (but it should affect also periodic ones) that as long as start is called, an update is triggered. This makes the output ports to stream the initialization values.

How is it possible to disable this behavior? In my aperiodic component I have eventports and I'd like the component to be triggered only by those ports.

Thank you. Best regards,

Mirko

Ruben Smits's picture

First execution of updateHook

Hi Mirko,

On Mon, Sep 23, 2013 at 11:44 PM, <mirkodaniele [dot] comparetti [..] ...> wrote:

> Dear all,
> I''m curious about the policy of the "trigger" of a component.
> I realized on non periodic component (but it should affect also periodic
> ones) that as long as start is called, an update is triggered. This makes
> the
> output ports to stream the initialization values.
>
> How is it possible to disable this behavior? In my aperiodic component I
> have
> eventports and I'd like the component to be triggered only by those ports.
>
>
I don't know if it is possible to disable this behavior, I do remember long
discussion threads about this behavior in the past though.

But you can easily check at the start of your updateHook to see if there is
NewData available on the ports and only continue if this is the case.

Ruben

> Thank you.
> Best regards,
>
> Mirko
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

Solved

Thanks Ruben, I did like this with a manual control on that as you suggested.

Thank you!

Regards,

Mirko