Inheritance from TaskContest failed

Hi,

I would like to create a component that will monitor my joysticks. As I have
2 of them, with different combinaison of button and axes, I created a
generic component (HML::Joystick) that will manage detection, connection,
... and have virtual fonction for button and axis events. The specific
components (HML::ManettePS1 for isntance) will be an implementation of
theses virtual functions and a "Deployable" Orocos Component.

I am stucked with a simple empty code, because HML::ManettePS1 which
inheritates from HML::Joystick which inheritates from TaskContest doesn't
want to deploy :

"Unable to create Orocos Component 'HML::ManettePS1' : unknown component
>

I am quite sure this is not a deployment problem or a build problem because
when a make HML::ManettePS1 a direct child of TaskContext it deploys.

I migth be a very simple inheritance question, but there is so few lines...
Here are the lines :

/* ManettePs1.hpp */
#ifndef MANETTE_PS1_HPP_
#define MANETTE_PS1_HPP_

#include "Joystick.hpp"

namespace HML
{
using namespace RTT;

class ManettePS1: public Joystick
{
public:
ManettePS1(const std::string& name);
~ManettePS1();
};
}
#endif /* MANETTE_PS1_HPP_ */

-----------------------------------------------------------------------------------------------------------------------------

/* ManettePs1.cpp */
#include "ManettePS1.hpp"
#include <ocl/Component.hpp>

using namespace HML;

ORO_CREATE_COMPONENT( HML::ManettePS1 )

ManettePS1::ManettePS1(const std::string& name) :
Joystick(name)
{

}

ManettePS1::~ManettePS1()
{

}

-----------------------------------------------------------------------------------------------------------------------------

/*Joystick.hpp */
#ifndef JOYSTICK_HPP_
#define JOYSTICK_HPP_

#include <rtt/TaskContext.hpp>
#include <rtt/Port.hpp>
#include <rtt/extras/Properties.hpp>
#include <rtt/OperationCaller.hpp>

namespace HML
{
using namespace RTT;

class Joystick: public TaskContext
{
public:
Joystick(const std::string& name);
~Joystick();
};
}

#endif /* JOYSTICK_HPP_ */

-----------------------------------------------------------------------------------------------------------------------------

/* Joystick.cpp */
#include "Joystick.hpp"
#include <ocl/Component.hpp>

using namespace HML;

Joystick::Joystick(const std::string& name) :
TaskContext(name, PreOperational)
{

}

Joystick::~Joystick()
{

}

Inheritance from TaskContest failed

On Wednesday 29 September 2010 18:46:33 Willy Lambert wrote:
> Hi,
>
> I would like to create a component that will monitor my joysticks. As I
> have 2 of them, with different combinaison of button and axes, I created a
> generic component (HML::Joystick) that will manage detection, connection,
> ... and have virtual fonction for button and axis events. The specific
> components (HML::ManettePS1 for isntance) will be an implementation of
> theses virtual functions and a "Deployable" Orocos Component.

Sounds ok.

>
> I am stucked with a simple empty code, because HML::ManettePS1 which
> inheritates from HML::Joystick which inheritates from TaskContest doesn't
> want to deploy :
>
> "Unable to create Orocos Component 'HML::ManettePS1' : unknown component

You can check known components by typing: displayComponentTypes() at the TB
prompt.

Next you can try to force loading a library using the
import("/absolute/path/to/library.so") and see which error messages you get.

>
>
> I am quite sure this is not a deployment problem or a build problem because
> when a make HML::ManettePS1 a direct child of TaskContext it deploys.
>
> I migth be a very simple inheritance question, but there is so few lines...
> Here are the lines :

...

These all look correct. As you might now, ORO_CREATE_COMPONENT only allows one
component in a .so file. Use the alternative macros for multi-component .so
files.

Peter

Inheritance from TaskContest failed

2010/9/30 Peter Soetens <peter [..] ...>

> On Wednesday 29 September 2010 18:46:33 Willy Lambert wrote:
> > Hi,
> >
> > I would like to create a component that will monitor my joysticks. As I
> > have 2 of them, with different combinaison of button and axes, I created
> a
> > generic component (HML::Joystick) that will manage detection, connection,
> > ... and have virtual fonction for button and axis events. The specific
> > components (HML::ManettePS1 for isntance) will be an implementation of
> > theses virtual functions and a "Deployable" Orocos Component.
>
> Sounds ok.
>
> >
> > I am stucked with a simple empty code, because HML::ManettePS1 which
> > inheritates from HML::Joystick which inheritates from TaskContest doesn't
> > want to deploy :
> >
> > "Unable to create Orocos Component 'HML::ManettePS1' : unknown component
>
> You can check known components by typing: displayComponentTypes() at the TB
> prompt.
>

I did but none of my components are here when I use Joystick heritance, the
HML::ManettePS1 is here when I don't use it

>
> Next you can try to force loading a library using the
> import("/absolute/path/to/library.so") and see which error messages you
> get.
>

I wrote this in the TaskBrowser, it answered true, but displayComponent
still doesn't want to show it

>
> >
> >
> > I am quite sure this is not a deployment problem or a build problem
> because
> > when a make HML::ManettePS1 a direct child of TaskContext it deploys.
> >
> > I migth be a very simple inheritance question, but there is so few
> lines...
> > Here are the lines :
>
> ...
>
> These all look correct. As you might now, ORO_CREATE_COMPONENT only allows
> one
> component in a .so file. Use the alternative macros for multi-component .so
> files.
>

I just have one libhnl-manettePS1.so

May I send my eclipse project ?

>
> Peter
>

Inheritance from TaskContest failed

On Thursday 30 September 2010 14:11:41 Willy Lambert wrote:
> 2010/9/30 Peter Soetens <peter [..] ...>
>
> > On Wednesday 29 September 2010 18:46:33 Willy Lambert wrote:
> > > Hi,
> > >
> > > I would like to create a component that will monitor my joysticks. As I
> > > have 2 of them, with different combinaison of button and axes, I
> > > created
> >
> > a
> >
> > > generic component (HML::Joystick) that will manage detection,
> > > connection, ... and have virtual fonction for button and axis events.
> > > The specific components (HML::ManettePS1 for isntance) will be an
> > > implementation of theses virtual functions and a "Deployable" Orocos
> > > Component.
> >
> > Sounds ok.
> >
> > > I am stucked with a simple empty code, because HML::ManettePS1 which
> > > inheritates from HML::Joystick which inheritates from TaskContest
> > > doesn't want to deploy :
> > >
> > > "Unable to create Orocos Component 'HML::ManettePS1' : unknown
> > > component
> >
> > You can check known components by typing: displayComponentTypes() at the
> > TB prompt.
>
> I did but none of my components are here when I use Joystick heritance, the
> HML::ManettePS1 is here when I don't use it

This sounds insane. Inheritance has been used since a long time, I can't
remember that it caused any problems.

>
> > Next you can try to force loading a library using the
> > import("/absolute/path/to/library.so") and see which error messages you
> > get.
>
> I wrote this in the TaskBrowser, it answered true, but displayComponent
> still doesn't want to show it
>
> > > I am quite sure this is not a deployment problem or a build problem
> >
> > because
> >
> > > when a make HML::ManettePS1 a direct child of TaskContext it deploys.
> > >
> > > I migth be a very simple inheritance question, but there is so few
> >
> > lines...
> >
> > > Here are the lines :
> > ...
> >
> > These all look correct. As you might now, ORO_CREATE_COMPONENT only
> > allows one
> > component in a .so file. Use the alternative macros for multi-component
> > .so files.
>
> I just have one libhnl-manettePS1.so
>
>
> May I send my eclipse project ?

You can send it personally (not the ml).

Peter