Ktaskbroser

Hi,

in the KTaskBrowser example you put something like:

-----------------------------------------------------------------------------
Setting up your Application
===========================

The following lines must be in your Orocos application:

#include

int ORO_main(int argc, char** argv)
{
RTT::Corba::ControlTaskServer::InitOrb(argc, argv);

// ...

RTT::Corba::ControlTaskServer( &mytask ); // export TaskContext 'mytask' to
CORBA.

RTT::Corba::ControlTaskServer::RunOrb(); // waits for ktaskbrower
connection

RTT::Corba::ControlTaskServer::DestroyOrb();
}
-----------------------------------------------------------------------------

in our application we have several components and a:

/**
* Browse the task.
*/
TaskBrowser browser(&lliClient);

/**
* Start the console reader.
*/
browser.loop();

so, as I understand, my lliclient is the "mytask" to be exported to CORBA.
However, if I try to put the lines as the example, it cannot compile.

home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:56: error:
conflicting declaration ‘RTT::Corba::ControlTaskServer& lliClient’
/home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:48:
error: ‘lliClient’ has a previous declaration as ‘LLIClient lliClient’

so, what I'm doing wrong?

regards,

Leo

Ktaskbroser

On Thursday 12 June 2008 16:58:41 Leopold Palomo-Avellaneda wrote:
>
> RTT::Corba::ControlTaskServer( &mytask ); // export TaskContext 'mytask'
> to CORBA.

[...]

> so, as I understand, my lliclient is the "mytask" to be exported to CORBA.
> However, if I try to put the lines as the example, it cannot compile.
>
>
> home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:56:
> error: conflicting declaration ‘RTT::Corba::ControlTaskServer& lliClient’
> /home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:48:
> error: ‘lliClient’ has a previous declaration as ‘LLIClient lliClient’
>
> so, what I'm doing wrong?

Typo. It should have been:

RTT::Corba::ControlTaskServer::Create( &lliClient );

See also

Peter

Ktaskbroser

A Dijous 12 Juny 2008, Peter Soetens va escriure:
> On Thursday 12 June 2008 16:58:41 Leopold Palomo-Avellaneda wrote:
> > RTT::Corba::ControlTaskServer( &mytask ); // export TaskContext
> > 'mytask' to CORBA.
>
> [...]
>
> > so, as I understand, my lliclient is the "mytask" to be exported to
> > CORBA. However, if I try to put the lines as the example, it cannot
> > compile.
> >
> >
> > home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:56:
> > error: conflicting declaration ‘RTT::Corba::ControlTaskServer& lliClient’
> > /home/palomo/robotica/projects/mrcuoxar/soft/prototipe/src/main.cpp:48:
> > error: ‘lliClient’ has a previous declaration as ‘LLIClient lliClient’
> >
> > so, what I'm doing wrong?
>
> Typo. It should have been:
>
> RTT::Corba::ControlTaskServer::Create( &lliClient );
>
> See also
> >nents-manual.html#orocos-corba>

Thanks Peter

Leo