The online doc's indicate that this should work
Handle h = a_task.events()->setupConnection("Event") .callback( &r, &Reactor::react_callback ) .handle(); assert( h.ready() );
but it *ONLY* works if you do
events()->addEvent(&evt, "Event");
but *NOT* if you do
events()->addEvent(&evt);
Why is this different? The first case adds to "this->mhooks[]" however the second case does not.
If this is not a bug, then we should update section "3.13.1. Adding Event" of "orocos-components-manual.html" at the least.
S
Incorrect documentation for C code attaching to events
On Friday 13 March 2009 14:22:41 kiwi [dot] net [..] ... wrote:
> The online doc's indicate that this should work
>
>
> but it *ONLY* works if you do
>
>
> but *NOT* if you do
>
>
> Why is this different? The first case adds to "this->mhooks[]" however the
> second case does not.
>
> If this is not a bug, then we should update section "3.13.1. Adding Event"
> of "orocos-components-manual.html" at the least. S
It's the infamous 'adding with a description' is 'adding with extra features'
behaviour (there was a thread about this some week ago, wrt rtt 2.0 & data
flow). The 'setupConnection' function uses the same infrastructure as scripting
to setup an event connection. So if you added an event with addEvent( &evt ),
it's not available to scripting, and not available to that part of the
interface.
This needs to be documented clearly indeed.
Peter
Incorrect documentation for C code attaching to events
On Mar 16, 2009, at 05:44 , Peter Soetens wrote:
> On Friday 13 March 2009 14:22:41 kiwi [dot] net [..] ... wrote:
>> The online doc's indicate that this should work
>>
>>
>> but it *ONLY* works if you do
>>
>>
>> but *NOT* if you do
>>
>>
>> Why is this different? The first case adds to "this->mhooks[]"
>> however the
>> second case does not.
>>
>> If this is not a bug, then we should update section "3.13.1. Adding
>> Event"
>> of "orocos-components-manual.html" at the least. S
>
> It's the infamous 'adding with a description' is 'adding with extra
> features'
> behaviour (there was a thread about this some week ago, wrt rtt 2.0
> & data
> flow). The 'setupConnection' function uses the same infrastructure
> as scripting
> to setup an event connection. So if you added an event with
> addEvent( &evt ),
> it's not available to scripting, and not available to that part of the
> interface.
But this simply wasn't available to C++ code. I wasn't trying to use
it within a script.
> This needs to be documented clearly indeed.
Aye.
Cheers
S
Incorrect documentation for C code attaching to events
The online doc's indicate that this should work
but it *ONLY* works if you do
but *NOT* if you do
Why is this different? The first case adds to "this->mhooks[]" however the second case does not.
If this is not a bug, then we should update section "3.13.1. Adding Event" of "orocos-components-manual.html" at the least.
S