Difference between warning() and recovered() methods

Hi all,

I enjoyed making the rtt-exercises-1.10.0
I'm almost finished with the last one, controller-1.

Unfortunately I can't figure out why I can call the Joystick.warning() method
but it's counterpart recovered() is not available as method in the task's
Methods list.

If I look in the RTT::TaskCore Class reference they are both Protected Member
functions.

I'm pretty sure it will boil down to my insufficient knowledge of C++.
If you however could attempt to point me in the right direction to gain an
understanding?

Thank you,

Gino Strobbe

Difference between warning() and recovered() methods

On Saturday 19 December 2009 23:59:13 Gino Strobbe wrote:
> Hi all,
>
> I enjoyed making the rtt-exercises-1.10.0
> I'm almost finished with the last one, controller-1.
>
> Unfortunately I can't figure out why I can call the Joystick.warning()
> method but it's counterpart recovered() is not available as method in the
> task's Methods list.
>
> If I look in the RTT::TaskCore Class reference they are both Protected
> Member functions.
>
> I'm pretty sure it will boil down to my insufficient knowledge of C++.
> If you however could attempt to point me in the right direction to gain an
> understanding?

The recovered() method is only available from your C++ code and not in
scripting. Because scripting is a public API, we chose to not 'export' that
method because only the component itself can know if it could recover (hence
it's also protected in C++). The design of this error API is flawed. We will
probably propose a more modular/optional/consistent API in 2.x, where methods
are grouped in interfaces.

If you require it in scripting nevertheless, you can just add it to the method
interface just like you would any other function of your TaskContext.

Peter