From f811b7b53c0c2f0d4320c70230e609619c5087c1 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Thu, 6 Mar 2014 14:58:29 +0100 Subject: More README files - More details in the root README.md file; add a nice diagram - Add a lot of README files in subdirectories Signed-off-by: David Wagner --- README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 89700e9..a02c1e1 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,62 @@ # parameter-framework -tl;dr: compilation instructions are at the end - ## Introduction -WIP +The parameter-framework is a plugin-based and rule-based framework for handling +parameters. This means that you can: + +1. Describe your system's structure and its parameters (in XML) - aka. **What**; +2. Write (in C++) or reuse a backend (aka. plugin) for accessing the parameters +that you just described - aka. **How**; +3. Define (in XML or in a domain-specific-language) conditions/rules upon which +a given parameter must take a given value - aka. **When**. + +![What, How, When](https://01org.github.io/parameter-framework/hosting/what-how-when.png) + +### Usage examples + +#### Alsa controls on embedded platforms + +The parameter-framework can be used to set the value of alsa controls +(switches, volumes, etc.) on smartphones/tablets based on parameter-framework +rules (in this example, they transcribe use-cases). For accessing parameters +(i.e. alsa controls), you may use the +[alsa plugin](https://github.com/01org/parameter-framework-plugins-alsa). + +#### Parameters in files + +The [filesystem plugin](https://github.com/01org/parameter-framework-plugins-filesystem) +can be used to write parameters in files. This is particularly useful for +files in `/sys` managing GPIOs. + +### More details + +The parameter-framework's core comes in the form of a shared library. Its +client has to provide: + +- configuration files describing the structure of the system to be managed by + the parameter-framework and what plugins it must use to read/write into each + subsystem; +- a list of criteria (representing the state of the client) and their possible + values; +- configuration files describing the value that each part of the system (aka + parameter) must take - this is done by writing rules based on the criteria + described above. + +At runtime, the most usual communication between the client and the +parameter-framework are: + +1. The update of *criteria* (that are used in the rules introduced above) and +2. Update all relevant parameters according to the new criteria values. The + parameter-framework uses the appropriate backend for writing the values in + each underlying subsystem. + +The parameter-framework comes with several tools, including a command-line +interface: `remote-process`. + +## Going further + +See [the wiki on github](https://github.com/01org/parameter-framework/wiki). ## Compiling @@ -12,4 +64,12 @@ Run `cmake .` then `make`. You may then install libraries, headers and binaries with `make install`. By default, they are installed under `/usr/local` on unix OSes; if you want to install them under a custom directory, you may do so by passing it to the `cmake .` command; e.g. -`cmake -DCMAKE_INSTALL_PREFIX=/path/to/custom/install .`. + + cmake -DCMAKE_INSTALL_PREFIX=/path/to/custom/install . + +Also, CMake can build a project out-of-tree, which is the recommended method: + + mkdir /path/to/build/directory + cd /path/to/build/directory + cmake /path/to/parameter-framework/sources + make -- cgit v1.1