How to execute slave activities?

Hello,
I would like to have a MasterController component which serialize the
execution of many slave components. Using the deployer, I have configured
the master with a PeriodicActivity. The slave component has been configured
like this :

<struct name="Activity" type="SlaveActivity">
<simple name="Master"
type="string"><value>MasterController<value><simple>
<struct>

Now, I would like to trigger the execution engine of the slave activities in
a statemachine with something like that :

state POSITION {

entry {
try TrajectoryGenerator.start();
try PositionController.start();
}

run {
do TrajectoryGenerator.execute();
do PositionController.execute();
}

exit {
try TrajectoryGenerator.stop();
try PositionController.stop();
}

[...]
}

However, it seems that the "execute()" method is not available in the
scripting interface. Do you have to use trigger() or update() ? Does the
execution engine is run in the master thread? It is garanteed that the
PositionController will not be executed until the TrajectoryGenerator
execution has finished?

Thank you!

Philippe

How to execute slave activities?

Hi Philippe,

2009/5/13 Philippe Hamelin <philippe [dot] hamelin [..] ...>:
...
>         run {
>             do TrajectoryGenerator.execute();
>             do PositionController.execute();
>         }
...
>
> However, it seems that the "execute()" method is not available in the scripting > interface. Do you have to use trigger() or update() ? Does the execution engine > is run in the master thread? It is garanteed that the PositionController will not be > executed until the TrajectoryGenerator execution has finished?

You need to use TrajectoryGenerator.update() . You must read this
function as such: calling update() will cause the updateHook() (and
the execution engine) to be called, just like start() causes
startHook() to be called. trigger() is ignored for periodic
activities. The execution with update() is guaranteed to be
sequentially, given that the component has a SlaveActivity.

There are too many execution related functions nowadays (trigger,
update, execute, step, loop ) Maybe there's a chance to reduce the
exposure a bit for the common user in RTT 2.0

Peter