The online doc's show an example slave activity using trigger() to
activate the slave, but this doesn't work when the master is a
periodic activity. Reaons being that slave.trigger() ends up calling
master.trigger(), which simply returns false for a PeriodicActivity.
It does work if you call slave.execute() however. Am I missing
something here?
FYI, the unit tests for SlaveActivity all use execute() instead of
trigger(). Is it just the doc's that are incorrect?
Thanks
Stephen
Slave activity example incorrect?
On Friday 18 April 2008 18:07:21 S Roderick wrote:
> The online doc's show an example slave activity using trigger() to
> activate the slave, but this doesn't work when the master is a
> periodic activity. Reaons being that slave.trigger() ends up calling
> master.trigger(), which simply returns false for a PeriodicActivity.
> It does work if you call slave.execute() however. Am I missing
> something here?
>
> FYI, the unit tests for SlaveActivity all use execute() instead of
> trigger(). Is it just the doc's that are incorrect?
Both the manual and the doxygen docs are incorrect and the implementation is
right. trigger() can only be used for waking up non periodic activities. For
executing slaves directly, you need to call execute().
I've updated the documentation (XML/Doxygen). Thanks for noticing this !
Peter
$ svn ci doc/xml/orocos-corelib.xml src/SlaveActivity.hpp -m"Fix wrong docs
about 'trigger()', should read 'execute()'."
Sending doc/xml/orocos-corelib.xml
Sending src/SlaveActivity.hpp
Transmitting file data ..
Committed revision 29198.