suggested change in Deployment component

Hi,

I am playing around with the deployment component.

What I noticed is that (apparently) the philosophy is to load all the components (using for example XML), then configure them all at once and start them all at once.

The way we usually works is different, since we want to start a producer and load and unload in run-time the consumer (without stopping the consumer).

I will do an example.

CASE 1 (it works)

DeploymentComponent dc( "Deployer" );
dc.loadComponents("producer.xml");
dc.loadComponents("consumer.xml");
dc.configureComponents();
dc.startComponents();

CASE 2 (does not work. it fails in the second configureComponents() )

dc.loadComponents("producer.xml");
dc.configureComponents();
dc.startComponents();

sleep(1)

dc.loadComponents("consumer.xml");
dc.configureComponents();
dc.startComponents();

I don't know if I am the only Orocos user that needs to work in this way. May suggestion is to change the following part of code of DeploymentComponent.cpp (line 882):

// AutoConf
if (comps[comp.getName()].autoconf )
{
if( !peer->isConfigured() || !peer->isRunning() )
{
if ( peer->configure() == false)
valid = false;
}
else
log(Warning) << "Apparently component "<< peer->getName()<< " don't need to be configured." < }

Do you think it makes sense?

suggested change in Deployment component

[ All your mails got stuck in the orocos-dev moderation list.
Normally, I would get notifications,
but for some reason, none came through the last month (until today).
Sorry for this huge delay ]

At 09:13 16/10/2008, faconti [..] ... wrote:
>Hi,
>
>I am playing around with the deployment component.
>
>What I noticed is that (apparently) the philosophy is to load all
>the components (using for example XML), then configure them all at
>once and start them all at once.
>
>The way we usually works is different, since we want to start a
>producer and load and unload in run-time the consumer (without
>stopping the consumer).
>
>I will do an example.
>
>CASE 1 (it works)
>
>DeploymentComponent dc( "Deployer" );
>dc.loadComponents("producer.xml");
>dc.loadComponents("consumer.xml");
>dc.configureComponents();
>dc.startComponents();
>
>CASE 2 (does not work. it fails in the second configureComponents() )
>
>dc.loadComponents("producer.xml");
>dc.configureComponents();
>dc.startComponents();
>
>sleep(1)
>
>dc.loadComponents("consumer.xml");
>dc.configureComponents();
>dc.startComponents();
>
>
>I don't know if I am the only Orocos user that needs to work in this
>way. May suggestion is to change the following part of code of
>DeploymentComponent.cpp (line 882):
>
> // AutoConf
> if (comps[comp.getName()].autoconf )
> {
> if( !peer->isConfigured() || !peer->isRunning() )
> {
> if ( peer->configure() == false)
> valid = false;
> }
> else log(Warning) --

The use case and the solution look fine to me.

Peter