summaryrefslogtreecommitdiffstats
path: root/parameter/SystemClass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Type mismatch corrections (Windows 64 bits)Patrick Benavoli2015-04-241-4/+4
| | | | | | | | This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
* SystemClass: remove useless overridden init() methodDavid Wagner2015-02-181-5/+0
| | | | | | | | The overridden implementation was only calling the base implementation. It can therefore can be completely removed as it is the default behaviour. Change-Id: Ic0eadf82abfdaad0ca76d3e9a757544d5ec31427 Signed-off-by: David Wagner <david.wagner@intel.com>
* Fix SystemClass duplicate 'Name' attribute in xml exportDavid Wagner2015-02-181-9/+0
| | | | | | | | | | | | | When refactoring Element::toXml, we forgot to make the necessary adaptation in SystemClass::toXml. The latter does not need to set the Name attribute anymore because this is taken care of by the base toXml method. SystemClass::toXml now only calls the base and can therefore be completely removed. Change-Id: Ibd12feaac2c101dcc22e8716e332cb02f03ba99a Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-19676 Signed-off-by: David Wagner <david.wagner@intel.com>
* Delete subsystem instances *before* plugin unloadPatrick Benavoli2015-02-181-6/+11
| | | | | | | | | | | | | | | | | | BZ: 208504 Before this patch there was a crash in CElement destructor in Ubuntu upon destuction of parameter framework instance. The crash was caused by the attempt to call unmapped code: The subsystem plugin libraries were getting unloaded before the execution of the subsystem destructors. Note: In Android the issue is not seen since library unload is not implemented. This patch ensures SystemClass destructor destroys the subsystems explicitely unloading the plugins. Change-Id: I19dad262b384bdbd63c7c319a41a5d547d0e75e9 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
* Merge pull request #13 from 01org/OznOg-bisDavid Wagner2014-10-241-0/+3
|\ | | | | some C++ cleanup
| * Remove using std::XXX from headersSebastien Gonzalve2014-09-111-0/+3
| | | | | | | | | | This is a bad practice to have using in headers because it pollutes the namespace of any user of that header.
* | Allow the plugin libraries to have empty path for locationLouis Le Gall2014-10-011-3/+5
|/ | | | | | | | | | | | | | | If the xml defines the path of plugin library as empty, as a slash is always added between the folder path and the library name, the parameter framework will look for the library at the root of the file system. This patch prevents from adding the slash except if the path is not empty. Issue: GMINL-1748 Change-Id: I14ed5a5ddbef7e0305300479f4fd44bf611f3442 Signed-off-by: Louis Le Gall <louis.le.gall@intel.com>
* Fix KW10 issuesEduardo Mendi2014-06-251-2/+6
| | | | | | | | | | | | BZ: 186081 Due to upgrade klocwork (KW version from 9.6 to 10.0) new issues have been raised. This patch fix the new issues raised in PFW. Change-Id: I54c14e4d6da1c9a5f8d82aec1769a9e7e948db50 Signed-off-by: Eduardo Mendi <eduardox.mendi@intel.com>
* Change the license to 3-clause BSDDavid Wagner2014-02-131-19/+24
| | | | | | | Add license header in all source files and Makefiles, Add a "COPYING" file containing the license text. Signed-off-by: David Wagner <david.wagner@intel.com>
* Close all dynamic libraries when PFW is destroyedRenaud de Chivre2014-02-121-0/+10
| | | | | | | | | | | | | BZ: 159294 The PFW opens many dynamic libs but does not keep any track of them. This prevents to close them cleanly and have border effect when trying to do coverage measurement. The patch ensures that the PFW closes its libraries when destroyed. Change-Id: Idd1f69bfbc719e8e000914bef990c809ec5ed206 Signed-off-by: Renaud de Chivre <renaud.de.chivre@intel.com>
* Fix typo in PFW when loading pluginsFrédéric Boisnard2014-02-121-1/+1
| | | | | | | | | | | | BZ: 151782 There is a typo in the error message when a plugin is not found (folowings instead of following). This patch updates the error message. Change-Id: Ifdb749fd90d646d0c04522874e879a329520de0f Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Split subsystems loadingKevin Rocard2014-02-121-25/+43
| | | | | | | | | | | | | | | | BZ: 122982 The CSystemClass::loadSubsystems was too long. Create a subfunction to load subsystems defined in shared libraries. Change-Id: I8f40ee271f25d0996e1976d8ee2ef6c12581d1d4 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/118192 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* Optional fallback on virtual subsystemKevin Rocard2014-02-121-48/+40
| | | | | | | | | | | | | | | | | | | BZ: 122982 When the PFW starts, it loads subsystems using their corresponding plugins. If a requested plugin is not found, the start fails. This is a problem, as for host, plugins are not compiled. Add an option to fallback on virtual subsystem if a plugin is not found during load. Change-Id: Id408873fdc904612c0c741524b33025d7d199fe9 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/117709 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* Change the element builder semanticKevin Rocard2014-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | BZ: 122982 To parse XML, the PFW uses factories containing a map of XML tags and their associated builder builder. The builders used to contain the XML tag of the XML element that it will use in the context of the factory. A builder and an XML tag are already linked by the factory, thus the tag member in the builder is redundant. Remove the XML tag builder attribute and provide it on factory filling. Change-Id: I827c3b34dffb23bc850316d0b092b31c21987ac2 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/124214 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* Fix issue in PFW when loading host librariesFrédéric Boisnard2014-02-121-13/+18
| | | | | | | | | | | | | | | | | | | | | BZ: 127874 Default entry point for plugins libraries must follow the pattern "lib*-subsystem.so". However, when compiling on host, the plugins are named "lib*-subsystem_host.so", so the PFW is unable to load them. This patch modifies the way plugins symbols are detected, so that host libraries can be loaded successfully. Change-Id: I079162c3e47a975641b3d7cb1fc054f95c86028e Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/122812 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* [PFW] Fix typo in the naming of the SubsystemBuilder APIFrédéric Boisnard2014-02-121-6/+6
| | | | | | | | | | | | | | | | | | BZ: 124779 There is a typo in the naming of the SubsystemBuilder API, "Susbystem" is used instead of "Subsystem". This patch replaces all occurences of "Susbystem" with "Subsystem". Change-Id: Ic132bdc685013257a138465545b99d001c46535a Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/120166 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fix the useless subsystem resync on PFW loadKevin Rocard2014-02-121-1/+14
| | | | | | | | | | | | | | | | | | | | BZ: 97808 The PFW used to resynchronise some subsystems at start before back/forward syncronisation. Which was useless. Reset subsystems 'needToResync' flag during PFW start before sync to avoid this dummy resync. Change-Id: Id0c0bb786f10e2724222fc18f2085164e95f963f Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/98452 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Add resync mechanism if a subsystem needs resyncGuillaume Denneulin2014-02-121-0/+20
| | | | | | | | | | | | | | | | | | | BZ: 76267 In the case of a hw subsystems reset, it's possible that its parameter managed by the PFW may not be aligned with the PFW blackboard. A re-synchronization mechanism is implemented to ensure that the subsystem is re-synchronized on the next configurations application. Change-Id: I032150955d25a7020cf494e69456897b4c157916 Signed-off-by: Guillaume Denneulin <guillaume.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/83015 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Do not stop on hard sync errorsKevin Rocard2014-02-121-5/+5
| | | | | | | | | | | | | | | | BZ: 76263 When synchronization fails, the parameter-framework should log a warning and continue synchronization instead of stopping Change-Id: Ic12d8798ea25584db714ee26e644fac793c28881 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/81825 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Add two commands to print xml settings and structureGeorges-Henri Baron2014-02-121-0/+8
| | | | | | | | | | | | | | | | | | | | | BZ: 44910 Creates two commands that can be called through the command line of the parameter-framework. First command getDomainXML returns a string containing the xml structure of the domains, configurations and settings. Second command getSystemClassXML returns a string containing the xml structure of all the instantiated parameter with their attributes. Change-Id: I9a35333802049a2177b8fc416754fdb67e6efff0 Signed-off-by: Georges-Henri Baron <georges-henrix.baron@intel.com> Reviewed-on: http://android.intel.com:8080/55155 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Remove names from PFW license headerKevin Rocard2014-02-121-7/+1
| | | | | | | | | | | | | | | BZ: 47701 As parameter framework code is proprietary, it should not be signed (patrick Benavoli name inside the header). Change-Id: I198f2851ee2a6cffed64a552fa399b072a0cbd3e orig-Change-Id: I335ecce2fa22ad11d6fa24f57c7cbbae3423bf1e Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/59560 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Enhance subsytem libraries load mechanismGuillaume Denneulin2014-02-101-42/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 24093 If a subsystem library depends on another one, the libraries have to be loaded in a predefined order. the previous recovery mechanism on PFW was: When a subsystem library does not load because of a missing dependency, it tries to load all the other subsystems before trying one more time to load the failing library. Unfortunately, Android linker does not allow several try when loading a library. In consequence, this patch implements a new mechanism to load its subsystem libraries. For this new mechanism, the PFW will load the subsystem libraries in the order they are disposed in the file ParameterFrameworkConfiguration.xml Change-Id: I39b97e33c77a6b4392c3813cd3d780e10e3b60f8 Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/35903 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Enum parameter mappingPatrick Benavoli2014-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | BZ: 22125 Enum parameter types are now fully parsed as any other types, which allow Mapping attributes to be correctly interpreted. Now inner structure of enum parameter types is based on automatically created objects: ValuePair Slight adaptation of to ICS environment in Android.mk files and XmlComposer (time.h). More explicit error statement issued in case of plugin load failure in SystemClass.cpp. Added a log for Alsa mixer elements accesses. Change-Id: Ia71fd854e639a288c5dae79260b1e2a0eb1a7ac2 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/33756 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Manage subsystem plugin dependencyPatrick Benavoli2014-02-101-55/+109
| | | | | | | | | | | | | | | | | | | | BZ: 15204 As subsystem plugins might depend on one another, they can't always be all loaded at once. Because a certain order must sometimes be respected, the loading process has now become iterative, not merely failing upon the first loading failure. - Fixed a missing carriage return in the configurable domains listing functionallity Change-Id: I7e0d6ecbb258fcb1acaad78359e65f0e132d09ab Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25408 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Virtual subsystemsPatrick Benavoli2014-02-101-0/+5
| | | | | | | | | | | | | | | | | | | BZ: 14587 - Added the possibility to declare parameters which have no real hardware implementation. They are only intended to configure the hosting platform. - A new subsystem type "Virtual" has been introduced to support those hardwareless parameters. - Virtual subsystems need no Mapping declaration in the structure description Change-Id: I44115f0dd0a26af74a544c6f08473b200aad94d3 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25405 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: file organizationPatrick Benavoli2014-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 12888, 12925, 13285, 13289 - Removed hard coded paths from source files - Separated test related resources and programs into a test subfolder - Schemas folder at root containing the schemas, a symbolic link to that folder might be a good way to enable schema aware editing - Now global configuration file path is passed from the hosting platform instead of the class name. - Global configuration path contains only the relevant class related descriptions (plugin paths, structure, settings) - .user environment file eclipsed through git-ignore (and removed from projects) - Removed system class configuration obsolete files Change-Id: I99b783ba22bca05238a760b2127939a91e976be8 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25404 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Plugin inheritancePatrick Benavoli2014-02-101-4/+34
| | | | | | | | | | | | | | | | | | | | | BZ: 13276 Modified the subsystem plugin symbol lookup sttrategy so as to allow the plugins to be extensible in the form of richer plugins. Now the plugin symbol is of the form: get<TYPE>SusbystemBuilder where TYPE comes from the name of the plugin file itself: lib<type>-subsystem.so Change-Id: Ie698c5200227c51a0fecf06f7e91a55cd7ee1fde Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/22636 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com> Reviewed-on: http://android.intel.com:8080/26783 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
* Min/max value computation; Tuning lock handlingPatrick Benavoli2014-02-101-0/+2
| | | | | | | | | | | | | | | | | | | | | BZ: 7466 - Min/max values are now correctly computed. They concern integer and fixed point parameters - tuning mode lock issue solved: created an AutoLock class for safe lock handling - added configuration files for a demo on Ubuntu environment - had AMIXER subsystem plugin compliant for derivation - LPE library: add carriage return on logs - removed obsolete files - some cosmetics Change-Id: Ife7a4799fd48dd4a1ca25dae666c4e453815881e Orig-Change-Id: I72fc5c1ff6abf638b43266a75bc00e21ad412349 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/16880 Reviewed-by: Mahe, Erwan <erwan.mahe@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* parameter-framework: initial commitPatrick Benavoli2011-09-081-0/+177
BZ: 6081 Parameter-framework is still-under-development, Intel proprietary, multi-platform (standard C++, for now only linux, no dependency on Android) software that allows system-wide parameter management. It relies on a number of configurations files, from which it knows how / when to hand out settings towards the hardware (subsystems) at runtime. 3 kinds of configuration files are used: - Structure description files indicating the actual parameter structure, types, min/max values, data representation. - Configurable domain description file containing the actual distribution of parameters over different domains, that is, different set of configurations, each of which being dynamically activated based on selection criteria rules that are themselves configurable. Configurable domains file contain the tuned settings along the tuning process, that is during the period where the system is being tuned. - Binary settings file used to store the settings when the tuning process is complete. Changing any of those files causes no recompilation of the framework. This project is based on a open plugin architecture allowing any kind of subsystems to be handled, whatever their respective Endianness. It fully relies on the platform SW to provide it with with the kowledge of exisitng selection criteria (selected device, current mode), as well as change events that occuring on them, thus triggering the application of corresponding configuration settings wherever appropriate. It supports handling mutliple parameter classes (Audio, Energy management) through TCP/IP interface. For now tuning commands can be sent to parameter-framework instances through a command-line utility, via adb over USB or via ethernet/WIFI. Change-Id: If7709c464db118f367f953e0824f49cce9fd0402 Orig-Change-Id: I7842e8808a4cfc0c615e0365e6d02101971ae2dc Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/16877 Reviewed-by: Mahe, Erwan <erwan.mahe@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>