Hi devs.
The manual says
So this code should work ?
#include <rtt/os/main.h> #include <rtt/TaskContext.hpp> struct Bar { std::string foo(void) const { return "a string"; } }; std::string foo(void) { return "a string"; } int ORO_main(int argc, char** argv) { RTT::TaskContext tc("test"); Bar bar; tc.addOperation("foo" , &foo , 0 , RTT::ClientThread); tc.addOperation("Bar::foo" , &Bar::foo, &bar, RTT::ClientThread); return 0; }
But i get
Have you had this problem ? What is the correct way of adding a plain C function ?
Thanks for your help.
Paul.
Add plain C operation.
On Tuesday 07 December 2010 18:31:07 paul [dot] chavent [..] ... wrote:
> Hi devs.
>
> The manual says
>
> task's method interface, not just functions of a TaskContext You can also
> add plain C functions, just omit the this pointer.
>
> So this code should work ?
>