xref: /aosp_15_r20/external/parameter-framework/upstream/schemas/README.md (revision c33452fb792a5495ec310a9626f2638b053af5dd)
1*c33452fbSAndroid Build Coastguard Worker# parameter-framework configuration file XML Schemas
2*c33452fbSAndroid Build Coastguard Worker
3*c33452fbSAndroid Build Coastguard WorkerThese are W3C Schemas for the various configuration files.
4*c33452fbSAndroid Build Coastguard Worker
5*c33452fbSAndroid Build Coastguard Worker`xmllint` may be used to check for correctness, e.g:
6*c33452fbSAndroid Build Coastguard Worker
7*c33452fbSAndroid Build Coastguard Worker    xmllint --xinclude --noout --schema ParameterFrameworkConfiguration.xsd /path/to/your/ParameterFrameworkConfiguration.xml
8*c33452fbSAndroid Build Coastguard Worker
9*c33452fbSAndroid Build Coastguard WorkerSee `tools/xmlValidator` for a custom alternative tool.
10*c33452fbSAndroid Build Coastguard Worker
11*c33452fbSAndroid Build Coastguard WorkerOnly `ParameterFrameworkConfiguration.xsd`, `SystemClass.xsd`, `Subsystem.xsd` and
12*c33452fbSAndroid Build Coastguard Worker`ConfigurableDomains.xsd` are relevant for use with xmllint: the others are
13*c33452fbSAndroid Build Coastguard Workerincluded by these 4 XSDs.
14*c33452fbSAndroid Build Coastguard Worker
15*c33452fbSAndroid Build Coastguard Worker**You may refer to samples at
16*c33452fbSAndroid Build Coastguard Worker<https://github.com/01org/parameter-framework-samples>.**
17*c33452fbSAndroid Build Coastguard Worker
18*c33452fbSAndroid Build Coastguard Worker## ParameterFrameworkConfiguration.xsd
19*c33452fbSAndroid Build Coastguard Worker
20*c33452fbSAndroid Build Coastguard WorkerSchema for the **top-level configuration**.  It contains:
21*c33452fbSAndroid Build Coastguard Worker
22*c33452fbSAndroid Build Coastguard Worker- A reference to the `SystemClass` (aka StructureDescription) XML file (see
23*c33452fbSAndroid Build Coastguard Worker  below);
24*c33452fbSAndroid Build Coastguard Worker- The list of plugins (libraries) to be used. They may be split according to
25*c33452fbSAndroid Build Coastguard Workerthe folder they reside in. The `Folder` attribute can either be:
26*c33452fbSAndroid Build Coastguard Worker
27*c33452fbSAndroid Build Coastguard Worker    - an absolute path,
28*c33452fbSAndroid Build Coastguard Worker    - a relative path (relative to the execution directory),
29*c33452fbSAndroid Build Coastguard Worker    - empty.
30*c33452fbSAndroid Build Coastguard Worker
31*c33452fbSAndroid Build Coastguard Worker    In the first two cases, the runtime loader will be asked to explicitely load
32*c33452fbSAndroid Build Coastguard Worker    the libraries found in the specified folder; in the last case (empty string)
33*c33452fbSAndroid Build Coastguard Worker    the runtime loader will search for the library on its own (e.g. on Linux
34*c33452fbSAndroid Build Coastguard Worker    distribution this is usually `/lib`, `/usr/lib` - see `man ld.so`)
35*c33452fbSAndroid Build Coastguard Worker- Optionally, a reference to the `Settings`.
36*c33452fbSAndroid Build Coastguard Worker
37*c33452fbSAndroid Build Coastguard WorkerAttributes of `ParameterFrameworkConfiguration` are:
38*c33452fbSAndroid Build Coastguard Worker
39*c33452fbSAndroid Build Coastguard Worker- The `SystemClass` name (for consistency check)
40*c33452fbSAndroid Build Coastguard Worker- `TuningAllowed` (whether the parameter-framework listens for commands)
41*c33452fbSAndroid Build Coastguard Worker- The `ServerPort` bind Address (PATH or TCP port) on which the parameter-framework listens if
42*c33452fbSAndroid Build Coastguard Worker  `TuningAllowed=true`.
43*c33452fbSAndroid Build Coastguard Worker
44*c33452fbSAndroid Build Coastguard Worker## SystemClass.xsd
45*c33452fbSAndroid Build Coastguard Worker
46*c33452fbSAndroid Build Coastguard WorkerSchema for the **SystemClass associated with the top-level configuration**.  It
47*c33452fbSAndroid Build Coastguard Workerpoints to all the "Subsystem" files (see below).
48*c33452fbSAndroid Build Coastguard Worker
49*c33452fbSAndroid Build Coastguard WorkerThe `Name` attribute of the SystemClass must match the `SystemClass` attribute
50*c33452fbSAndroid Build Coastguard Workerof the top-level configuration file. This name will be the first component of
51*c33452fbSAndroid Build Coastguard Workerall parameters in it, i.e. if its name is "FooBar", its path is `/FooBar`. We
52*c33452fbSAndroid Build Coastguard Workerwill use this name in examples below.
53*c33452fbSAndroid Build Coastguard Worker
54*c33452fbSAndroid Build Coastguard Worker## Subsystem.xsd
55*c33452fbSAndroid Build Coastguard Worker
56*c33452fbSAndroid Build Coastguard WorkerSchema for all **Subsystem files** (aka Structure files).  These files describe the
57*c33452fbSAndroid Build Coastguard Workercontent and structure of the system to be managed by the parameter-framework
58*c33452fbSAndroid Build Coastguard Workerand also indicate which plugin is to be used.
59*c33452fbSAndroid Build Coastguard Worker
60*c33452fbSAndroid Build Coastguard WorkerA Subsystem has the following attribute:
61*c33452fbSAndroid Build Coastguard Worker
62*c33452fbSAndroid Build Coastguard Worker- `Name` (self-explanatory); again it is the base component of all parameters
63*c33452fbSAndroid Build Coastguard Worker  inside it; i.e. if its name is "Spam", its path is `/FooBar/Spam`;
64*c33452fbSAndroid Build Coastguard Worker- `Type`, which indicates which SubsystemBuilder is to be used (each plugin can
65*c33452fbSAndroid Build Coastguard Worker  declare one or more SubsystemBuilders); it may be defined as `Virtual`, in
66*c33452fbSAndroid Build Coastguard Worker  which case, no plugin will be used and the parameters won't be synchronized.
67*c33452fbSAndroid Build Coastguard Worker  This is useful for debugging but may also be used for the parameter-framework
68*c33452fbSAndroid Build Coastguard Worker  to act as a configurable settings database;
69*c33452fbSAndroid Build Coastguard Worker- `Mapping` (optional), defines a Mapping to be inherited by all Components in
70*c33452fbSAndroid Build Coastguard Worker  the Subsystem.
71*c33452fbSAndroid Build Coastguard Worker
72*c33452fbSAndroid Build Coastguard WorkerA Subsystem *must* contain:
73*c33452fbSAndroid Build Coastguard Worker
74*c33452fbSAndroid Build Coastguard Worker- A `ComponentLibrary`, which may include (using `<xi:include href="xyz.xml"/>`)
75*c33452fbSAndroid Build Coastguard Worker  other files containing a `<ComponentLibrary>` or a `<ComponentTypeSet>` tag.
76*c33452fbSAndroid Build Coastguard Worker- An `InstanceDefinition` which instantiates the parameters and may use
77*c33452fbSAndroid Build Coastguard Worker  ComponentTypes defined in the ComponentLibrary.
78*c33452fbSAndroid Build Coastguard Worker
79*c33452fbSAndroid Build Coastguard Worker## ConfigurableDomains.xsd
80*c33452fbSAndroid Build Coastguard Worker
81*c33452fbSAndroid Build Coastguard WorkerSchema for the ConfigurableDomains (aka Settings files).  These files contain
82*c33452fbSAndroid Build Coastguard Workerthe rules for applying values to parameters.
83*c33452fbSAndroid Build Coastguard Worker
84*c33452fbSAndroid Build Coastguard WorkerWriting this file by hand is painful but it is not intended to be dealt
85*c33452fbSAndroid Build Coastguard Workerwith directly: instead, you may use the command-line interface (see
86*c33452fbSAndroid Build Coastguard Worker`remote-process/README.md`) to set the settings and export the resulting
87*c33452fbSAndroid Build Coastguard WorkerSettings with the `getDomainsWithSettingsXML` command.
88