Automatic setActivity on ExecutionEngine::setxxxProcessor()

Hi,

I want to change the command processor of an ExecutionEngine. But to get
the CP working I need to call setActivity() on the EE.

What do you think of calling setActivity() in
ExecutionEngine::setxxxProcessor() by default.

Met vriendelijke groeten,

NV Michel Van de Wiele

Sander Vandenbroucke

Sander [dot] Vandenbroucke [..] ...

________________________________

Van de Wiele Company or its affiliates do not accept legal
responsibility for the contents of this message. The views or opinions
presented are solely those of the author and do not necessarily
represent those of Van de Wiele Company or any of its affiliates.

________________________________

Automatic setActivity on ExecutionEngine::setxxxProcessor()

On Friday 27 February 2009 09:45:48 Vandenbroucke Sander wrote:
> Hi,
>
>
>
> I want to change the command processor of an ExecutionEngine. But to get
> the CP working I need to call setActivity() on the EE.
>
> What do you think of calling setActivity() in
> ExecutionEngine::setxxxProcessor() by default.

Yes, it's a bug. That is the correct solution. In addition, it also does
setActivity(0) on the 'old' CP pointer. In older RTT versions, this will not
work however (may cause crashes / null pointers), it only works relyably in
RTT 1.8

The safest way for older versions is to change processors before you attach
any activity to the taskcontext.

Peter

Automatic setActivity on ExecutionEngine::setxxxProcessor()

> > Hi,
> >
> >
> >
> > I want to change the command processor of an ExecutionEngine. But to
get
> > the CP working I need to call setActivity() on the EE.
> >
> > What do you think of calling setActivity() in
> > ExecutionEngine::setxxxProcessor() by default.
>
> Yes, it's a bug. That is the correct solution. In addition, it also
does
> setActivity(0) on the 'old' CP pointer. In older RTT versions, this
will
> not
> work however (may cause crashes / null pointers), it only works
relyably
> in
> RTT 1.8
>
I see, do I have to bother sending a patch?

> The safest way for older versions is to change processors before you
> attach
> any activity to the taskcontext.
>
I'll try that.

Sander

Automatic setActivity on ExecutionEngine::setxxxProcessor()

On Friday 27 February 2009 11:19:07 Vandenbroucke Sander wrote:
>
> I see, do I have to bother sending a patch?

Only if it's for RTT 1.8.0.

Peter