[Rock-dev] Multiple services of same type in tasks and data_service_type
Christian Rauch
Christian.Rauch at dfki.de
Tue Nov 5 16:15:12 CET 2013
Am 05.11.2013 15:56, schrieb Sylvain Joyeux:
>> Ok, this is also what syskit proposes ('command_out' => 'command_out'; I
>> meant <..>ControllerSrv in the previous mail). But I guess after I do
>> this, I won't be able to use the output ports of both services any more.
>> For example the command_out of Base::Motion2DControllerSrv and the
>> command_out of Base::<some_other_type>ControllerSrv will not be
>> reachable later because one service superposes the other.
> I am not sure what you want to do here. Could you give us an example ?
>
Let's take the service:
{{{
data_service_type 'AriaSimMotionProxySrv' do
provides Base::Motion2DControlledSystemSrv
provides Base::Motion2DControllerSrv
provides TimeConsumerSrv
provides Base::MotionSample2DControllerSrv
end
}}}
Syskit will not be able to create the service, as both, the
'Base::Motion2DControllerSrv' and the
'Base::MotionSample2DControllerSrv' have the output port 'command_out'.
The later service is created by:
{{{
ControlLoop.declare "MotionSample2D", '/base/samples/Motion2D'
}}}
So, a service cannot have ports with the same name from different
sources and types.
Of course, syskit has a problem with that, because it does not know
which service I mean, when I later refer to port 'command_out' of
'AriaSimMotionProxySrv'. Syskit therefore proposes to superpose on of
the two 'command_out' ports:
{{{
port collision: #<Syskit::Models::DataServiceModel:0x00000002e4c170> and
Base::MotionSample2DControllerSrv both have a port named command_out. If
you mean to tell syskit that this is the same port, you must provide the
mapping explicitely by adding 'command_out' => 'command_out' to the
provides statement (Syskit::SpecError)
}}}
If I do that, I am not able to refer to both 'command_out' ports (e.g.
by giving the service additionally) when I want to access one of the
'command_out' ports of that service (I want to do that, because they
have different sources and types).
--
Christian Rauch
Space Robotics
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel: +49 (0)421 178 45-6619
Empfang: +49 (0)421 178 45-6611
Fax: +49 (0)421 178 45-4150
E-Mail: Christian.Rauch at dfki.de
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
More information about the Rock-dev
mailing list