Output parameter within getNumericalValue not initialized

When calling getNumericalValue on inclusive criterion, the value
to be outputed is never initialized. The Criterion type will append
the value corresponding to each literal value to the uninitialized value
leading to undefined behavior.

This patch initializes the output value.

Issue: GMINL-6007

Change-Id: Id9fc8b010b4d0b6dfc921825387817789d35e5ba
Signed-off-by: Francois Gaffie <francois.gaffie@intel.com>
1 file changed
tree: 536da0c8ee6fbd6074953c768525c49a448ada5a
  1. bindings/
  2. parameter/
  3. remote-process/
  4. remote-processor/
  5. Schemas/
  6. skeleton-subsystem/
  7. test/
  8. tools/
  9. utility/
  10. xmlserializer/
  11. .gitignore
  12. .travis.yml
  13. Android.mk
  14. CMakeLists.txt
  15. COPYING
  16. README.md
README.md

parameter-framework

Build Status

Introduction

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

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.

Parameters in files

The filesystem plugin 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.

Compiling

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 .

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

After an install you may want to run the parameter-framework tests with make test.