Event ports and components without activities

Hi,

According to the component builder's manual, when an operation is sent
to a component which has defined this operation to be executed by the
client thread, something called the global execution engine takes care
of performing the operation (see [1]).

A somehow similar case happens when a component with no activity
attached receives data on an event port. According to my tests, the
update hook of the component gets indeed called in this case, but I've
been unable to find by whom it is called. The manual only states that
the component's activity (which? it has none!) will be triggered and
that updateHook will be called (by whom?).

Could anyone shed any light on this?

And also, is there any document giving an overview of the design
patterns behind the RTT primitives (e.g. activities, execution engine,
etc.) other than the actual source code or Peter's PhD (which I'm
guessing might be outdated since RTT 2.x was released)?

Thanks!

Miguel.

[1] http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...

Event ports and components without activities

Hi Miguel,

On Tue, Apr 8, 2014 at 3:11 PM, Miguel Prada <
miguel [dot] prada [dot] sarasola [..] ...> wrote:

> Hi,
>
> According to the component builder's manual, when an operation is sent
> to a component which has defined this operation to be executed by the
> client thread, something called the global execution engine takes care
> of performing the operation (see [1]).
>

Correct.

>
> A somehow similar case happens when a component with no activity
> attached receives data on an event port.

How did you manage to create a component without an activity ? It's barely
supported/possible. Normally, you'll have by default a plain Activity
object with getPeriod() == 0

> According to my tests, the
> update hook of the component gets indeed called in this case, but I've
> been unable to find by whom it is called. The manual only states that
> the component's activity (which? it has none!) will be triggered and
> that updateHook will be called (by whom?).
>

So you verified that task->getActivity() returns a null pointer ?

>
> Could anyone shed any light on this?
>
> And also, is there any document giving an overview of the design
> patterns behind the RTT primitives (e.g. activities, execution engine,
> etc.) other than the actual source code or Peter's PhD (which I'm
> guessing might be outdated since RTT 2.x was released)?
>

It is indeed outdated :-) The component builder's manual is the primary
source... Figure 2.6
http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...

is the closest you get... the rest is following the implementation's code
path.

Peter

>
> Thanks!
>
> Miguel.
>
> [1]
> http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

Event ports and components without activities

Hi Peter

On 04/09/2014 03:46 PM, Peter Soetens wrote:
Hi Miguel,

On Tue, Apr 8, 2014 at 3:11 PM, Miguel Prada <miguel [dot] prada [dot] sarasola [..] ...miguel [dot] prada [dot] sarasola [..] ...>> wrote:
Hi,

According to the component builder's manual, when an operation is sent
to a component which has defined this operation to be executed by the
client thread, something called the global execution engine takes care
of performing the operation (see [1]).

Correct.

A somehow similar case happens when a component with no activity
attached receives data on an event port.

How did you manage to create a component without an activity ? It's barely supported/possible. Normally, you'll have by default a plain Activity object with getPeriod() == 0

That, I think, is the answer I was looking for.

I normally use the rttlua deployer and was (aparently incorrectly) assuming that calling loadComponent(...) did not attach any Activity to the component at all. From your comment I gather that every component has a default Activity attached to it by default, and that this is (I guess) replaced by whichever Activity you explicitly attach to it later with setActivity(...). Am I right?

According to my tests, the
update hook of the component gets indeed called in this case, but I've
been unable to find by whom it is called. The manual only states that
the component's activity (which? it has none!) will be triggered and
that updateHook will be called (by whom?).

So you verified that task->getActivity() returns a null pointer ?

I did not, since I didn't find out how to do this from lua.

Could anyone shed any light on this?

And also, is there any document giving an overview of the design
patterns behind the RTT primitives (e.g. activities, execution engine,
etc.) other than the actual source code or Peter's PhD (which I'm
guessing might be outdated since RTT 2.x was released)?

It is indeed outdated :-) The component builder's manual is the primary source... Figure 2.6
http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...

is the closest you get... the rest is following the implementation's code path.

Noted, thanks. :)

Miguel.

Peter

Thanks!

Miguel.

[1] http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...
--
Orocos-Users mailing list
Orocos-Users [..] ...<mailto:Orocos-Users [..] ...>
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Event ports and components without activities

On Thu, Apr 10, 2014 at 9:50 AM, Prada Sarasola, Miguel
<miguel [dot] prada [..] ...> wrote:
>
> Hi Peter
>
>
> On 04/09/2014 03:46 PM, Peter Soetens wrote:
>
> Hi Miguel,
>
>
> On Tue, Apr 8, 2014 at 3:11 PM, Miguel Prada <miguel [dot] prada [dot] sarasola [..] ...> wrote:
>>
>> Hi,
>>
>> According to the component builder's manual, when an operation is sent
>> to a component which has defined this operation to be executed by the
>> client thread, something called the global execution engine takes care
>> of performing the operation (see [1]).
>
>
> Correct.
>
>>
>>
>> A somehow similar case happens when a component with no activity
>> attached receives data on an event port.
>
>
> How did you manage to create a component without an activity ? It's barely supported/possible. Normally, you'll have by default a plain Activity object with getPeriod() == 0
>
>
> That, I think, is the answer I was looking for.
>
> I normally use the rttlua deployer and was (aparently incorrectly) assuming that calling loadComponent(...) did not attach any Activity to the component at all. From your comment I gather that every component has a default Activity attached to it by default, and that this is (I guess) replaced by whichever Activity you explicitly attach to it later with setActivity(...). Am I right?

Yes, setActivity() will create a new activity object and delete the old one.

>
>
>
>
>>
>> According to my tests, the
>> update hook of the component gets indeed called in this case, but I've
>> been unable to find by whom it is called. The manual only states that
>> the component's activity (which? it has none!) will be triggered and
>> that updateHook will be called (by whom?).
>
>
> So you verified that task->getActivity() returns a null pointer ?
>
>
> I did not, since I didn't find out how to do this from lua.
>
>
>
>>
>>
>> Could anyone shed any light on this?
>>
>> And also, is there any document giving an overview of the design
>> patterns behind the RTT primitives (e.g. activities, execution engine,
>> etc.) other than the actual source code or Peter's PhD (which I'm
>> guessing might be outdated since RTT 2.x was released)?
>
>
>
> It is indeed outdated :-) The component builder's manual is the primary source... Figure 2.6
> http://www.orocos.org/stable/documentation/rtt/v2.x/doc-xml/orocos-compo...
>
> is the closest you get... the rest is following the implementation's code path.
>
>
> Noted, thanks. :)
>
> Miguel.
>

Peter