Problem

What are the relationships between Components and Configuration Database?

Solution

Let's suppose that we are working under <module_name>/src and we want to define a component "My_Comp"

This Component might be

  1. a simple ACSComponent that does not need to store any specific characteristic information in the Configuration Database
  2. a CharacteristicComponent.


ACSComponent

For simple ACSComponents we only need to put in the configuration database the static deployment information, i.e., we have to configure the Manager for all statically defined instances of our Component. For example, when we write the modular test for our Component we need to

  • create a unit test under <module_name>/test
  • here we will fill in the file:
    <module_name>/test/CDB/MACI/Components/Components.xml
    and add the entries for the instances we want to statically define


CharacteristicComponent

In the case of CharacteristicComponents, we have to specify what information will be stored in the configuration database and make sure that each instance can find the corresponding configuration.

Therefore we need to:


  • create an XML schema for the configuration database under:
    <module_name>/config/CDB/schemas/My_Comp.xsd
    the schema is essentially a "class definition" for the configuration of the component and will contain the description of the structure and all default values.
  • edit <module_name>/src/Makefile setting the variable CDB_SCHEMAS as follows:
    CDB_SCHEMAS = My_Comp
    My_Comp will be installed automatically in $INTROOT/config/CDB/schemas (or in $ACSROOT if $INTROOT is undefined, for example when ITS is performing integration)
  • in the unit test directory we need to create a set of subdirectories:
    <module_name>/test/CDB where the actual configuration data are put under:
    <module_name>/test/CDB/alma/MY_COMP/My_Comp.xml
    here the default values can be overwritten for the specific instance.

In this way, we keep separate the "definition" (the schemas made available at installation time) from the "instantiation" of my object (what is under CDB/MACI and CDB/alma).

-- GianlucaChiozzi - 02 Mar 2004