calling reporter trigger from peer

Hello,

I want to call the trigger of the update component inside a method of a peer
TaskContext.
I tried the following code: this->getPeer("Reporting")->doTrigger();
But this doesn't seem to work.

Any ideas?

Tinne

calling reporter trigger from peer

Tinne De Laet wrote:
> Hello,
>
> I want to call the trigger of the update component inside a method of a peer
> TaskContext.
> I tried the following code: this->getPeer("Reporting")->doTrigger();
> But this doesn't seem to work.
>
> Any ideas?
>
> Tinne
>
Hi,

What is the return value (false or true) of your doTrigger() call?

And since the behaviour of trigger() depends on the ActivityInterface
implemented, what is the activity associated with the Reporting peer
(PeriodicActivity, NonPeriodicActivity, EventDriven, etc.)?
For example, for an EventDriven/Periodic activity a trigger() will
always just return false without doing anything.

You can have a quick look at NonPeriodicActivity.cpp / PeriodicActivity.cpp
/ etc. in http://svn.mech.kuleuven.be/websvn/orocos/trunk/rtt/src/
to see what the exact trigger behaviour is with your activity.

Hope that helps.

Viktor STARK

calling reporter trigger from peer

Hi,

Thanks for your answer Victor!

> > I want to call the trigger of the update component inside a method of a
> > peer TaskContext.
> > I tried the following code: this->getPeer("Reporting")->doTrigger();
> > But this doesn't seem to work.

> What is the return value (false or true) of your doTrigger() call?
>
> And since the behaviour of trigger() depends on the ActivityInterface
> implemented, what is the activity associated with the Reporting peer
> (PeriodicActivity, NonPeriodicActivity, EventDriven, etc.)?
> For example, for an EventDriven/Periodic activity a trigger() will
> always just return false without doing anything.
>
> You can have a quick look at NonPeriodicActivity.cpp / PeriodicActivity.cpp
> / etc. in http://svn.mech.kuleuven.be/websvn/orocos/trunk/rtt/src/
> to see what the exact trigger behaviour is with your activity.
My mistake was that I forgot to create an activity for the reporter.
Now I created a nonPeriodic activity and used the following code in my peer
TaskContext:
snapshotReporting =
this->getPeer("Reporting")->methods()->getMethod("snapshot");

and
snapshotReporting();

Greetings,

Tinne