ADTF  3.12.8
Setup dependencies between components


Required and provided functionality
On the one hand services can publish interfaces to make certain funtionality available for other components. These interfaces have to define a unique interface id (IID). On the other hand services may want to build on this funtionality. To do so they request an instance of an object that implements the desired functionality.
Automation
In order to let ADTF automatically find out which services need to be loaded for a given configuration, the used components must enumerate their dependecies with a special macro. To show that a component offers an implementation for a particular interface use this macro: If a component wants to make use of functionality provided by others use this macro: If a component provides an interface as well as requires an interface the macro can be combined like this:
Why should I follow this procedure?
Using this macro enables the ADTF Plugin Description Generator to create more intelligent plugindescription files, containing provided and required interfaces. As a consequence the Configuration Editor is able to manage the required services and plugins automatically and produce adequate adtfsystem files.
Example
class cPlaybackService: public object<cPlaybackEventService,IPlaybackService>
{
public:
ADTF_CLASS_ID_NAME(cPlaybackService, "playback.service.adtf.cid", "ADTF Player");
PROVIDE_INTERFACE(IPlaybackService)
...
};
Processed by the ADTF Plugin Description Generator the created Plugin Description file looks like this:
<plugindescription>
...
<service_descriptions>
<service_description>
<name>playback.service.adtf.cid</name>
<label>ADTF Player</label>
<versions>
...
</versions>
<provided_interfaces>
<interface_description>
<iid>playback_service.services.adtf.iid</iid>
</interface_description>
<interface_description>
<iid>player.ant.services.adtf.iid</iid>
</interface_description>
<interface_description>
<iid>player.bat.services.adtf.iid</iid>
</interface_description>
</provided_interfaces>
<required_interfaces>
<interface_description>
<iid>reference_clock.ant.streaming.adtf.iid</iid>
</interface_description>
<interface_description>
<iid>kernel.ant.services.adtf.iid</iid>
</interface_description>
</required_interfaces>
<required_optional_interfaces/>
<description></description>
...
<service_description>
<service_descriptions>
</plugindescription>

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Aug 19 2021 by doxygen 1.8.14)