aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Schemas/ConfigurableDomains.xsd147
-rw-r--r--Schemas/FileIncluder.xsd15
-rw-r--r--Schemas/Parameter.xsd149
-rw-r--r--Schemas/ParameterFrameworkConfiguration.xsd32
-rw-r--r--Schemas/ParameterSettings.xsd92
-rw-r--r--Schemas/Subsystem.xsd82
-rw-r--r--Schemas/SystemClass.xsd17
-rw-r--r--parameter-connector-test/Android.mk34
-rw-r--r--parameter-connector-test/ExamplePlatform.cpp136
-rw-r--r--parameter-connector-test/ExamplePlatform.h81
-rw-r--r--parameter-connector-test/main.cpp104
-rw-r--r--parameter-test/Android.mk34
-rw-r--r--parameter-test/Test.txt8
-rw-r--r--parameter-test/main.cpp204
-rw-r--r--parameter/Android.mk1
-rw-r--r--parameter/BinarySerializableElement.h2
-rw-r--r--parameter/ConfigurableDomains.cpp2
-rw-r--r--parameter/ConfigurableDomains.h2
-rw-r--r--parameter/ConfigurableElement.h2
-rw-r--r--parameter/Element.h3
-rw-r--r--parameter/FrameworkConfigurationLocation.cpp12
-rw-r--r--parameter/ParameterFrameworkConfiguration.cpp35
-rw-r--r--parameter/ParameterFrameworkConfiguration.h19
-rw-r--r--parameter/ParameterMgr.cpp80
-rw-r--r--parameter/ParameterMgr.h10
-rw-r--r--parameter/ParameterMgrPlatformConnector.cpp10
-rw-r--r--parameter/ParameterMgrPlatformConnector.h2
-rw-r--r--parameter/SystemClass.cpp4
-rw-r--r--parameter/SystemClass.h2
-rw-r--r--parameter/SystemClassConfiguration.cpp63
-rw-r--r--parameter/SystemClassConfiguration.h54
-rw-r--r--remote-processor-test/Android.mk32
-rw-r--r--remote-processor-test/main.cpp69
-rw-r--r--xmlparser-test/Android.mk33
-rw-r--r--xmlparser-test/main.cpp210
35 files changed, 640 insertions, 1142 deletions
diff --git a/Schemas/ConfigurableDomains.xsd b/Schemas/ConfigurableDomains.xsd
new file mode 100644
index 0000000..d306c64
--- /dev/null
+++ b/Schemas/ConfigurableDomains.xsd
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:include schemaLocation="ParameterSettings.xsd"/>
+ <xs:complexType name="SelectionCriterionRuleType">
+ <xs:attribute name="SelectionCriterion" type="xs:NMTOKEN" use="required"/>
+ <xs:attribute name="MatchesWhen" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Is"/>
+ <xs:enumeration value="IsNot"/>
+ <xs:enumeration value="Includes"/>
+ <xs:enumeration value="Excludes"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="Value" use="required"/>
+ </xs:complexType>
+ <xs:group name="RuleGroup">
+ <xs:choice>
+ <xs:element name="CompoundRule" type="CompoundRuleType"/>
+ <xs:element name="SelectionCriterionRule" type="SelectionCriterionRuleType"/>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="CompoundRuleType">
+ <xs:sequence>
+ <xs:group ref="RuleGroup" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Type">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Any"/>
+ <xs:enumeration value="All"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="ConfigurationsType">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" name="Configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CompoundRule" type="CompoundRuleType" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="Name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:group name="ComponentGroup">
+ <xs:choice>
+ <xs:group ref="ParameterBlockGroup"/>
+ <xs:element name="Component" type="ComponentType"/>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="ComponentType">
+ <xs:sequence>
+ <xs:choice>
+ <xs:group ref="ComponentGroup" maxOccurs="unbounded"/>
+ <xs:element name="Subsystem" type="ComponentType" maxOccurs="unbounded"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="Name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ <xs:complexType name="ConfigurableElementsType">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="ConfigurableElement">
+ <xs:complexType>
+ <xs:attribute name="Path" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:anyURI">
+ <xs:pattern value="/.*[^/]"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ConfigurableElementSettingsType">
+ <xs:group ref="ComponentGroup"/>
+ <xs:attribute name="Path" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:anyURI">
+ <xs:pattern value="/.*[^/]"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="SettingsType">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="Configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ConfigurableElement" minOccurs="0" maxOccurs="unbounded" type="ConfigurableElementSettingsType"/>
+ </xs:sequence>
+ <xs:attribute name="Name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ <xs:unique name="ConfigurableElementUniqueness">
+ <xs:selector xpath="ConfigurableElement"/>
+ <xs:field xpath="@Path"/>
+ </xs:unique>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ConfigurableDomainType">
+ <xs:sequence>
+ <xs:element name="Configurations" type="ConfigurationsType"/>
+ <xs:element name="ConfigurableElements" type="ConfigurableElementsType"/>
+ <xs:element name="Settings" type="SettingsType" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="Name" use="required" type="xs:NCName"/>
+ <xs:attribute name="SequenceAware" use="optional" type="xs:boolean" default="false"/>
+ </xs:complexType>
+ <xs:element name="ConfigurableDomains">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" name="ConfigurableDomain" type="ConfigurableDomainType">
+ <xs:key name="ConfigurableElementKey">
+ <xs:selector xpath="ConfigurableElements/ConfigurableElement"/>
+ <xs:field xpath="@Path"/>
+ </xs:key>
+ <xs:keyref refer="ConfigurableElementKey" name="ConfigurableDomainReference">
+ <xs:selector xpath="Settings/Configuration/ConfigurableElement"/>
+ <xs:field xpath="@Path"/>
+ </xs:keyref>
+ <xs:key name="ConfigurationKey">
+ <xs:selector xpath="Configurations/Configuration"/>
+ <xs:field xpath="@Name"/>
+ </xs:key>
+ <xs:keyref refer="ConfigurationKey" name="ConfigurationReference2">
+ <xs:selector xpath="ConfigurableElements/ConfigurableElement/Configuration"/>
+ <xs:field xpath="@Name"/>
+ </xs:keyref>
+ <xs:keyref refer="ConfigurationKey" name="ConfigurationReference">
+ <xs:selector xpath="Settings/Configuration"/>
+ <xs:field xpath="@Name"/>
+ </xs:keyref>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="SystemClassName" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ <xs:unique name="ConfigurableDomainUniqueness">
+ <xs:selector xpath="ConfigurableDomain"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+</xs:schema>
diff --git a/Schemas/FileIncluder.xsd b/Schemas/FileIncluder.xsd
new file mode 100644
index 0000000..3278aea
--- /dev/null
+++ b/Schemas/FileIncluder.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Samuel Gravez (Siemens VDO S.A.S.) -->
+<xs:schema xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:complexType name="FileIncluderType">
+ <xs:annotation>
+ <xs:documentation>Element type used to import a root element from a file.</xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="Path" type="xs:anyURI" use="required">
+ <xs:annotation>
+ <xs:documentation>Path to the file to import.
+This path may be absolute or relative to the path of the includer file.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+</xs:schema>
diff --git a/Schemas/Parameter.xsd b/Schemas/Parameter.xsd
new file mode 100644
index 0000000..17d256a
--- /dev/null
+++ b/Schemas/Parameter.xsd
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:attributeGroup name="Nameable">
+ <xs:attribute name="Name" type="xs:NCName" use="required"/>
+ <xs:attribute name="Description" type="xs:string" use="optional"/>
+ </xs:attributeGroup>
+ <xs:simpleType name="SizeType">
+ <xs:restriction base="xs:positiveInteger">
+ <xs:pattern value="8|16|32"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attributeGroup name="IntegerParameterAttributes">
+ <xs:attribute name="Size" type="SizeType" use="required"/>
+ <xs:attribute name="Min" type="xs:integer" use="optional"/>
+ <xs:attribute name="Max" type="xs:integer" use="optional"/>
+ <xs:attribute name="Signed" type="xs:boolean" use="optional" default="false"/>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="ArrayLengthAttribute">
+ <xs:attribute name="ArrayLength" type="xs:nonNegativeInteger" use="optional" default="0"/>
+ </xs:attributeGroup>
+ <xs:complexType name="Parameter" abstract="true">
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Mapping" type="xs:string" use="optional"/>
+ <xs:attributeGroup ref="ArrayLengthAttribute"/>
+ </xs:complexType>
+ <xs:element name="BooleanParameter">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="Parameter">
+ <xs:attribute name="Size" fixed="8"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="IntegerParameterType">
+ <xs:complexContent>
+ <xs:extension base="Parameter">
+ <xs:attributeGroup ref="IntegerParameterAttributes"/>
+ <xs:attribute name="Unit" type="xs:token" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="IntegerParameter" type="IntegerParameterType"/>
+ <xs:complexType name="EnumParameterType">
+ <xs:complexContent>
+ <xs:extension base="Parameter">
+ <xs:sequence>
+ <xs:element name="ValuePair" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="Literal" type="xs:NMTOKEN" use="required"/>
+ <xs:attribute name="Numerical" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="0|[+-]?[1-9][0-9]*"/>
+ <xs:pattern value="0x[0-9a-fA-F]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="Size" type="SizeType" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="EnumParameter" type="EnumParameterType">
+ <xs:unique name="LiteralUniqueness">
+ <xs:selector xpath="ValuePair"/>
+ <xs:field xpath="@Literal"/>
+ </xs:unique>
+ <xs:unique name="NumericalUniqueness">
+ <xs:selector xpath="ValuePair"/>
+ <xs:field xpath="@Numerical"/>
+ </xs:unique>
+ </xs:element>
+ <xs:complexType name="FixedPointParameterType">
+ <xs:complexContent>
+ <xs:extension base="Parameter">
+ <xs:attribute name="Size" type="SizeType" use="required"/>
+ <xs:attribute name="Integral" type="xs:nonNegativeInteger" use="required"/>
+ <xs:attribute name="Fractional" type="xs:nonNegativeInteger" use="required"/>
+ <xs:attribute name="Unit" type="xs:token" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="FixedPointParameter" type="FixedPointParameterType"/>
+ <xs:complexType name="BitParameterType">
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Size" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:positiveInteger">
+ <xs:maxInclusive value="32"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="Pos" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:maxInclusive value="31"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:element name="BitParameterBlock">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="BitParameter" type="BitParameterType" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Size" type="SizeType" use="required"/>
+ <xs:attribute name="Mapping" type="xs:string" use="optional"/>
+ </xs:complexType>
+ <xs:unique name="BitParameterBlockSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ <xs:element name="StringParameter">
+ <xs:complexType>
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Mapping" type="xs:string" use="optional"/>
+ <xs:attribute name="MaxLength" type="xs:nonNegativeInteger" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:group name="ParameterBlockGroup">
+ <xs:choice>
+ <xs:element ref="BooleanParameter"/>
+ <xs:element ref="IntegerParameter"/>
+ <xs:element ref="EnumParameter"/>
+ <xs:element ref="FixedPointParameter"/>
+ <xs:element ref="BitParameterBlock"/>
+ <xs:element ref="StringParameter"/>
+ <xs:element name="ParameterBlock" type="ParameterBlockType">
+ <xs:unique name="ParameterBlockSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="ParameterBlockType">
+ <xs:sequence>
+ <xs:group ref="ParameterBlockGroup" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attributeGroup ref="ArrayLengthAttribute"/>
+ <xs:attribute name="Mapping" type="xs:string" use="optional"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/Schemas/ParameterFrameworkConfiguration.xsd b/Schemas/ParameterFrameworkConfiguration.xsd
new file mode 100644
index 0000000..d84d108
--- /dev/null
+++ b/Schemas/ParameterFrameworkConfiguration.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--W3C Schema generated by XMLSpy v2011 sp1 (http://www.altova.com)-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="ConfigurationFilePath">
+ <xs:attribute name="Path" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ <xs:element name="SubsystemPluginFolders">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PluginFolderLocation" type="ConfigurationFilePath" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="SettingsConfigurationType">
+ <xs:sequence>
+ <xs:element name="ConfigurableDomainsFileLocation" type="ConfigurationFilePath"/>
+ <xs:element name="BinarySettingsFileLocation" type="ConfigurationFilePath" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ParameterFrameworkConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="SubsystemPluginFolders"/>
+ <xs:element name="StructureDescriptionFileLocation" type="ConfigurationFilePath"/>
+ <xs:element name="SettingsConfiguration" type="SettingsConfigurationType" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="SystemClassName" use="required" type="xs:NMTOKEN"/>
+ <xs:attribute name="ServerPort" use="required" type="xs:positiveInteger"/>
+ <xs:attribute name="TuningAllowed" use="required" type="xs:boolean"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/Schemas/ParameterSettings.xsd b/Schemas/ParameterSettings.xsd
new file mode 100644
index 0000000..d0a14fe
--- /dev/null
+++ b/Schemas/ParameterSettings.xsd
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:complexType name="ParameterType" abstract="true">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
+ <xs:attribute name="ValueSpace" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Raw"/>
+ <xs:enumeration value="Real"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="BooleanParameterType">
+ <xs:simpleContent>
+ <xs:restriction base="ParameterType">
+ <xs:pattern value="([01][\s]*)+"/>
+ <xs:pattern value="((0x0|0x1)[\s]*)+"/>
+ <xs:attribute name="ValueSpace" use="prohibited"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="IntegerParameterType">
+ <xs:simpleContent>
+ <xs:restriction base="ParameterType">
+ <xs:pattern value="(0|[+-]?[1-9][0-9]*[\s]*)+"/>
+ <xs:pattern value="(0x[0-9a-fA-F]+\s*)+"/>
+ <xs:attribute name="ValueSpace" use="prohibited"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="EnumParameterType">
+ <xs:simpleContent>
+ <xs:restriction base="ParameterType">
+ <xs:attribute name="ValueSpace" use="prohibited"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="FixedPointParameterType">
+ <xs:simpleContent>
+ <xs:restriction base="ParameterType">
+ <xs:pattern value="((0|[+-]?[1-9][0-9]*)\s*)+"/>
+ <xs:pattern value="(0\.0|[+-]?([1-9][0-9]*|0)(\.[0-9]+)?\s*)+"/>
+ <xs:pattern value="(0x[0-9a-fA-F]+\s*)+"/>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="BitParameterBlockType">
+ <xs:sequence>
+ <xs:element name="BitParameter" maxOccurs="unbounded" type="IntegerParameterType"/>
+ </xs:sequence>
+ <xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="StringParameterType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:group name="ParameterBlockGroup">
+ <xs:choice>
+ <xs:element name="BooleanParameter" type="BooleanParameterType"/>
+ <xs:element name="IntegerParameter" type="IntegerParameterType"/>
+ <xs:element name="EnumParameter" type="EnumParameterType"/>
+ <xs:element name="FixedPointParameter" type="FixedPointParameterType"/>
+ <xs:element name="BitParameterBlock" type="BitParameterBlockType">
+ <xs:unique name="BitParameterBlockSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ <xs:element name="StringParameter" type="StringParameterType"/>
+ <xs:element name="ParameterBlock" type="ParameterBlockType">
+ <xs:unique name="ParameterBlockSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="ParameterBlockType">
+ <xs:sequence>
+ <xs:group ref="ParameterBlockGroup" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/Schemas/Subsystem.xsd b/Schemas/Subsystem.xsd
new file mode 100644
index 0000000..bd2e091
--- /dev/null
+++ b/Schemas/Subsystem.xsd
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com)-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:include schemaLocation="Parameter.xsd"/>
+ <xs:attributeGroup name="TypedNameable">
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Type" type="xs:NMTOKEN" use="required"/>
+ </xs:attributeGroup>
+ <xs:complexType name="ComponentInstance">
+ <xs:attributeGroup ref="TypedNameable"/>
+ <xs:attribute name="Mapping" use="optional"/>
+ </xs:complexType>
+ <xs:complexType name="ComponentType">
+ <xs:sequence>
+ <xs:choice maxOccurs="unbounded">
+ <xs:group ref="ParameterBlockGroup"/>
+ <xs:element name="Component" type="ComponentInstance"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Extends" use="optional"/>
+ <xs:attribute name="Mapping" use="optional"/>
+ </xs:complexType>
+ <xs:complexType name="SubsystemType">
+ <xs:sequence>
+ <xs:element name="ComponentLibrary">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ComponentType" type="ComponentType" minOccurs="0" maxOccurs="unbounded">
+ <xs:unique name="ComponentTypeSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="InstanceDefinition">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice maxOccurs="unbounded">
+ <xs:group ref="ParameterBlockGroup"/>
+ <xs:element name="Component" type="ComponentInstance"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:unique name="InstanceDefintionSubElementsUniqueness">
+ <xs:selector xpath="*"/>
+ <xs:field xpath="@Name"/>
+ </xs:unique>
+ </xs:element>
+ </xs:sequence>
+ <xs:attributeGroup ref="Nameable"/>
+ <xs:attribute name="Endianness" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="Little"/>
+ <xs:enumeration value="Big"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="Type" use="required"/>
+ </xs:complexType>
+ <xs:element name="Subsystem" type="SubsystemType">
+ <xs:key name="ComponentTypeUniqueness">
+ <xs:selector xpath="ComponentLibrary/ComponentType"/>
+ <xs:field xpath="@Name"/>
+ </xs:key>
+ <xs:keyref name="InstanceDefinitionComponentTypeNotFound" refer="ComponentTypeUniqueness">
+ <xs:selector xpath="InstanceDefinition/Component"/>
+ <xs:field xpath="@Type"/>
+ </xs:keyref>
+ <xs:keyref name="ComponentTypeNotFound" refer="ComponentTypeUniqueness">
+ <xs:selector xpath="ComponentLibrary/ComponentType/Component"/>
+ <xs:field xpath="@Type"/>
+ </xs:keyref>
+ <!--xs:keyref name="ExtendedComponentTypeNotFound" refer="ComponentTypeUniqueness">
+ <xs:selector xpath="ComponentLibrary/ComponentType"/>
+ <xs:field xpath="@Extends"/>
+ </xs:keyref-->
+ </xs:element>
+</xs:schema>
diff --git a/Schemas/SystemClass.xsd b/Schemas/SystemClass.xsd
new file mode 100644
index 0000000..daf3cd7
--- /dev/null
+++ b/Schemas/SystemClass.xsd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com)-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:include schemaLocation="FileIncluder.xsd"/>
+ <xs:include schemaLocation="Subsystem.xsd"/>
+ <xs:element name="SystemClass">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="SubsystemInclude" type="FileIncluderType"/>
+ <xs:element ref="Subsystem"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/parameter-connector-test/Android.mk b/parameter-connector-test/Android.mk
deleted file mode 100644
index b3b52a2..0000000
--- a/parameter-connector-test/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_PATH :=
-
-
-LOCAL_SRC_FILES:= \
- main.cpp \
- ExamplePlatform.cpp
-
-
-LOCAL_MODULE:= parameter-connector-test
-
-LOCAL_MODULE_TAGS := optional
-
-TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
-
-LOCAL_C_INCLUDES += \
- external/stlport/stlport/ \
- external/webkit/WebCore/icu/ \
- bionic/libstdc++ \
- bionic/
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../parameter
-
-LOCAL_SHARED_LIBRARIES := libstlport libicuuc libparameter
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_LDLIBS +=
-LOCAL_LDFLAGS +=
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/parameter-connector-test/ExamplePlatform.cpp b/parameter-connector-test/ExamplePlatform.cpp
deleted file mode 100644
index fd66654..0000000
--- a/parameter-connector-test/ExamplePlatform.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include "ExamplePlatform.h"
-#include "ParameterMgrPlatformConnector.h"
-#include <iostream>
-
-// Logger
-class CParameterMgrPlatformConnectorLogger : public CParameterMgrPlatformConnector::ILogger
-{
-public:
- CParameterMgrPlatformConnectorLogger() {}
-
- virtual void log(const std::string& strLog)
- {
- cout << strLog << endl;
- }
-};
-
-// CExamplePlatform Implementation
-CExamplePlatform::CExamplePlatform(const string& strClass) : _pParameterMgrPlatformConnector(new CParameterMgrPlatformConnector(strClass)), _pParameterMgrPlatformConnectorLogger(new CParameterMgrPlatformConnectorLogger)
-{
- // Logger
- _pParameterMgrPlatformConnector->setLogger(_pParameterMgrPlatformConnectorLogger);
-
- /// Criteria Types
- // Mode
- _pModeType = _pParameterMgrPlatformConnector->createSelectionCriterionType();
- _pModeType->addValuePair(0, "Normal");
- _pModeType->addValuePair(1, "InCsvCall");
- _pModeType->addValuePair(2, "InVoipCall");
- _pModeType->addValuePair(3, "RingTone");
-
- // InputDevice
- _pInputDeviceType = _pParameterMgrPlatformConnector->createSelectionCriterionType(true);
- _pInputDeviceType->addValuePair(0x1, "BuiltIn");
- _pInputDeviceType->addValuePair(0x2, "Headset");
- _pInputDeviceType->addValuePair(0x4, "BluetoothHeadsetSCO");
- _pInputDeviceType->addValuePair(0x8, "VoiceCall");
-
- // OutputDevice
- _pOutputDeviceType = _pParameterMgrPlatformConnector->createSelectionCriterionType(true);
- _pOutputDeviceType->addValuePair(0x1, "Headphones");
- _pOutputDeviceType->addValuePair(0x2, "Headset");
- _pOutputDeviceType->addValuePair(0x4, "Earpiece");
- _pOutputDeviceType->addValuePair(0x8, "IHF");
- _pOutputDeviceType->addValuePair(0x10, "BluetoothSCO");
- _pOutputDeviceType->addValuePair(0x20, "BluetoothHeadsetSCO");
- _pOutputDeviceType->addValuePair(0x40, "BluetoothCarKitSCO");
- _pOutputDeviceType->addValuePair(0x80, "BluetoothA2DP");
-
- /// Criteria
- _pMode = _pParameterMgrPlatformConnector->createSelectionCriterion("Mode", _pModeType);
- _pSelectedInputDevice = _pParameterMgrPlatformConnector->createSelectionCriterion("SelectedInputDevice", _pInputDeviceType);
- _pSelectedOutputDevice = _pParameterMgrPlatformConnector->createSelectionCriterion("SelectedOutputDevice", _pOutputDeviceType);
-}
-
-CExamplePlatform::~CExamplePlatform()
-{
- delete _pParameterMgrPlatformConnectorLogger;
- delete _pParameterMgrPlatformConnector;
-}
-
-// Start
-bool CExamplePlatform::start(string& strError)
-{
- if (!_pParameterMgrPlatformConnector->start(strError)) {
-
- return false;
- }
- // Init state
- return setState(EInitState, strError);
-}
-
-// State
-bool CExamplePlatform::setState(CExamplePlatform::State eState, string& strError)
-{
- switch(eState) {
- case EInitState:
- _pMode->setCriterionState(0);
- _pSelectedInputDevice->setCriterionState(0);
- _pSelectedOutputDevice->setCriterionState(0x4);
- break;
- case EState1:
- _pMode->setCriterionState(0);
- _pSelectedInputDevice->setCriterionState(0);
- // Select Headset
- _pSelectedOutputDevice->setCriterionState(0x1);
- break;
- case EState2:
- break;
- case EState3:
- break;
- default:
- break;
- }
- return _pParameterMgrPlatformConnector->applyConfigurations(strError);
-}
-
-// Dynamic parameter access
-bool CExamplePlatform::setValue(const string& strPath, const string& strValue, string& strError)
-{
- return _pParameterMgrPlatformConnector->setValue(strPath, strValue, strError);
-}
-
-bool CExamplePlatform::getValue(const string& strPath, string& strValue, string& strError) const
-{
- return _pParameterMgrPlatformConnector->getValue(strPath, strValue, strError);
-}
diff --git a/parameter-connector-test/ExamplePlatform.h b/parameter-connector-test/ExamplePlatform.h
deleted file mode 100644
index 0e907a4..0000000
--- a/parameter-connector-test/ExamplePlatform.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#pragma once
-
-#include <string>
-
-using namespace std;
-
-class CParameterMgrPlatformConnector;
-class CParameterMgrPlatformConnectorLogger;
-class ISelectionCriterionTypeInterface;
-class ISelectionCriterionInterface;
-
-class CExamplePlatform
-{
-public:
- enum State {
- EInitState,
- EState1,
- EState2,
- EState3,
-
- ENbStates
- };
-
- CExamplePlatform(const string& strClass);
- ~CExamplePlatform();
-
- // Start
- bool start(string& strError);
-
- // State
- bool setState(State eState, string& strError);
-
- // Dynamic parameter access
- bool setValue(const string& strPath, const string& strValue, string& strError);
- bool getValue(const string& strPath, string& strValue, string& strError) const;
-
-private:
- // The connector
- CParameterMgrPlatformConnector* _pParameterMgrPlatformConnector;
- // Logger
- CParameterMgrPlatformConnectorLogger* _pParameterMgrPlatformConnectorLogger;
- // Criteria Types
- ISelectionCriterionTypeInterface* _pModeType;
- ISelectionCriterionTypeInterface* _pInputDeviceType;
- ISelectionCriterionTypeInterface* _pOutputDeviceType;
-
- // Criteria
- ISelectionCriterionInterface* _pMode;
- ISelectionCriterionInterface* _pSelectedInputDevice;
- ISelectionCriterionInterface* _pSelectedOutputDevice;
-};
diff --git a/parameter-connector-test/main.cpp b/parameter-connector-test/main.cpp
deleted file mode 100644
index 5ead71e..0000000
--- a/parameter-connector-test/main.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include <iostream>
-#include <semaphore.h>
-#include "ExamplePlatform.h"
-
-using namespace std;
-
-const char* gpcParameter = "/Audio/MSIC/SOUND_CARD/PLAYBACK_ROGUE/HEADPHONE/VOLUME";
-const char* gpcParameterValue = "51 53";
-
-int main(int argc, char *argv[])
-{
- if (argc < 2) {
-
- cerr << "Missing arguments" << endl;
-
- return -1;
- }
-
- string strError;
-
- // Create param mgr
- CExamplePlatform examplePlatform(argv[1]);
-
- // Start platformmgr
- if (!examplePlatform.start(strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Get parameter
- string strValue;
-
- if (!examplePlatform.getValue(gpcParameter, strValue, strError)) {
-
- cerr << "Unable to get parameter: " << strError << endl;
-
- return -1;
- }
- cout << gpcParameter << " = " << strValue << endl;
-
- // Change parameter
- cout << "Setting " << gpcParameter << " to " << gpcParameterValue << endl;
-
- if (!examplePlatform.setValue(gpcParameter, gpcParameterValue, strError)) {
-
- cerr << "Unable to set parameter: " << strError << endl;
-
- return -1;
- }
-
- // Check parameter
- if (!examplePlatform.getValue(gpcParameter, strValue, strError)) {
-
- cerr << "Unable to get parameter: " << strError << endl;
-
- return -1;
- }
- cout << gpcParameter << " = " << strValue << endl;
-
- // Change criteria
-
- // Block here
- sem_t sem;
-
- sem_init(&sem, false, 0);
-
- sem_wait(&sem);
-
- sem_destroy(&sem);
-
- return 0;
-}
diff --git a/parameter-test/Android.mk b/parameter-test/Android.mk
deleted file mode 100644
index 88c66e4..0000000
--- a/parameter-test/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_PATH :=
-
-
-LOCAL_SRC_FILES:= \
- main.cpp
-
-
-LOCAL_MODULE:= parameter-test
-
-LOCAL_MODULE_TAGS := optional
-
-TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
-
-LOCAL_C_INCLUDES += \
- external/stlport/stlport/ \
- external/libxml2/include/ \
- external/webkit/WebCore/icu/ \
- bionic/libstdc++ \
- bionic/
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../parameter $(LOCAL_PATH)/../xmlserializer/ $(LOCAL_PATH)/../remote-processor/
-
-LOCAL_SHARED_LIBRARIES := libstlport libicuuc libparameter libxmlserializer
-LOCAL_STATIC_LIBRARIES := libxml2
-
-LOCAL_LDLIBS += -Lexternal/libxml2/lib
-LOCAL_LDFLAGS +=
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/parameter-test/Test.txt b/parameter-test/Test.txt
deleted file mode 100644
index cae237e..0000000
--- a/parameter-test/Test.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-/home/pat/projects/qt/XML/AudioStructure/ParameterFrameworkConfiguration.xml
-/Audio/LPE/HSEP_PATH/STEREO_EQ/ENABLE 1
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/FIR/COEFFS/TAPS 0
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/FIR/COEFF_SIZE 18
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/FIR/COEFFS/TAPS 1.3
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/IIR/COEFFS/SECTIONS/0/SN_SHIFT1 -9
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/FIR/COEFFS/TAPS/1 -0.3
-/Audio/LPE/HSEP_PATH/STEREO_EQ/LEFT_EQ/FIR/COEFFS/TAPS/100 -0.3 => out of range
diff --git a/parameter-test/main.cpp b/parameter-test/main.cpp
deleted file mode 100644
index a0d30a0..0000000
--- a/parameter-test/main.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include <iostream>
-#include "ParameterMgr.h"
-#include "ParameterMgrPlatformConnector.h"
-#include <semaphore.h>
-
-using namespace std;
-
-#ifdef SIMULATION
-const char* gpcParameterFrameworkConfigurationFolderPath = "/home/pat/projects/qt/parameter-framework/XML";
-#else
-const char* gpcParameterFrameworkConfigurationFolderPath = "/etc/parameter-framework";
-#endif
-
-//#define SIMPLE_TEST
-
-int main(int argc, char *argv[])
-{
-#ifndef SIMPLE_TEST
- if (argc != 4) {
-
- cerr << "Wrong number of arguments" << endl;
-
- return -1;
- }
-#else
- if (argc < 2) {
-
- cerr << "Missing arguments" << endl;
-
- return -1;
- }
-#endif
- string strError;
-
- //CParameterMgrPlatformConnector parameterMgrPlatformConnector(argv[1]);
- CParameterMgr parameterMgr(gpcParameterFrameworkConfigurationFolderPath, argv[1]);
-
- // Load data structure
- if (!parameterMgr.load(strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Init flow
- if (!parameterMgr.init(strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-#ifndef SIMPLE_TEST
- // Set Tuning Mode on
- if (!parameterMgr.setTuningMode(true, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Restore some configuration
- if (!parameterMgr.restoreConfiguration("Multimedia.OutputDevice.Private.Selected", "Earpiece", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
- // Save some configuration
- if (!parameterMgr.saveConfiguration("Multimedia.OutputDevice.Public.Selected", "IHF", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Log content
- string strContent;
- parameterMgr.logStructureContent(strContent);
-
- cout << strContent;
-
- //parameterMgr.setValueSpaceRaw(true);
-
- string strValue;
- if (!parameterMgr.getValue(argv[2], strValue, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
- cout << "Before setting: " << strValue << endl;
-
- if (!parameterMgr.setValue(argv[2], argv[3], strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- if (!parameterMgr.getValue(argv[2], strValue, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
- cout << "After setting: " << strValue << endl;
-
- // Save some configuration
- if (!parameterMgr.saveConfiguration("Multimedia.OutputDevice.Private.Selected", "WiredSpeakers", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Save some configuration
- if (!parameterMgr.saveConfiguration("Multimedia.OutputDevice.Private.Selected", "BluetoothSCO", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
- // Export configurations
- if (!parameterMgr.exportDomainsXml(string(gpcParameterFrameworkConfigurationFolderPath) + "/Settings/Audio/AudioSettingsExport.xml", true, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
- // Import configurations
- if (!parameterMgr.importDomainsXml(string(gpcParameterFrameworkConfigurationFolderPath) + "/Settings/Audio/AudioSettingsExport.xml", true, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Export configuration as binary
- if (!parameterMgr.exportDomainsBinary(string(gpcParameterFrameworkConfigurationFolderPath) + "/Settings/Audio/AudioSettingsExport.bin", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Import configuration as binary
- if (!parameterMgr.importDomainsBinary(string(gpcParameterFrameworkConfigurationFolderPath) + "/Settings/Audio/AudioSettingsExport.bin", strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-
- // Set Tuning Mode off
- if (!parameterMgr.setTuningMode(false, strError)) {
-
- cerr << strError << endl;
-
- return -1;
- }
-#endif
- // Block here
- sem_t sem;
-
- sem_init(&sem, false, 0);
-
- sem_wait(&sem);
-
- sem_destroy(&sem);
-
- return 0;
-}
-
diff --git a/parameter/Android.mk b/parameter/Android.mk
index caa2fb4..57bbe96 100644
--- a/parameter/Android.mk
+++ b/parameter/Android.mk
@@ -53,7 +53,6 @@ LOCAL_SRC_FILES:= \
KindElement.cpp \
ElementLibrarySet.cpp \
ErrorContext.cpp \
- SystemClassConfiguration.cpp \
AreaConfiguration.cpp \
DomainConfiguration.cpp \
ConfigurableDomain.cpp \
diff --git a/parameter/BinarySerializableElement.h b/parameter/BinarySerializableElement.h
index bf27789..f1d4b0d 100644
--- a/parameter/BinarySerializableElement.h
+++ b/parameter/BinarySerializableElement.h
@@ -36,7 +36,7 @@
class CBinarySerializableElement : public CElement
{
public:
- CBinarySerializableElement(const string& strName);
+ CBinarySerializableElement(const string& strName = "");
// Serialization
virtual void binarySerialize(CBinaryStream& binaryStream);
diff --git a/parameter/ConfigurableDomains.cpp b/parameter/ConfigurableDomains.cpp
index c65bf3f..597d453 100644
--- a/parameter/ConfigurableDomains.cpp
+++ b/parameter/ConfigurableDomains.cpp
@@ -36,7 +36,7 @@
#define base CBinarySerializableElement
-CConfigurableDomains::CConfigurableDomains(const string& strSystemClassName) : base(strSystemClassName)
+CConfigurableDomains::CConfigurableDomains()
{
}
diff --git a/parameter/ConfigurableDomains.h b/parameter/ConfigurableDomains.h
index 4c6192f..8b62d0f 100644
--- a/parameter/ConfigurableDomains.h
+++ b/parameter/ConfigurableDomains.h
@@ -40,7 +40,7 @@ class CSyncerSet;
class CConfigurableDomains : public CBinarySerializableElement
{
public:
- CConfigurableDomains(const string& strSystemClassName);
+ CConfigurableDomains();
// Configuration/Domains handling
/// Domains
diff --git a/parameter/ConfigurableElement.h b/parameter/ConfigurableElement.h
index 61a8bda..4cb2d72 100644
--- a/parameter/ConfigurableElement.h
+++ b/parameter/ConfigurableElement.h
@@ -47,7 +47,7 @@ class CConfigurableElement : public CElement
friend class CDomainConfiguration;
typedef list<const CConfigurableDomain*>::const_iterator ConfigurableDomainListConstIterator;
public:
- CConfigurableElement(const string& strName);
+ CConfigurableElement(const string& strName = "");
virtual ~CConfigurableElement();
// Offset in main blackboard
diff --git a/parameter/Element.h b/parameter/Element.h
index 99e7d10..af4fc33 100644
--- a/parameter/Element.h
+++ b/parameter/Element.h
@@ -59,6 +59,7 @@ public:
// Name / Path
const string& getName() const;
+ void setName(const string& strName);
bool rename(const string& strName, string& strError);
string getPath() const;
string getQualifiedPath() const;
@@ -111,8 +112,6 @@ public:
protected:
// Content dumping
virtual void logValue(string& strValue, CErrorContext& errorContext) const;
- // Name setting
- void setName(const string& strName);
// Utility to underline
static void appendTitle(string& strTo, const string& strTitle);
diff --git a/parameter/FrameworkConfigurationLocation.cpp b/parameter/FrameworkConfigurationLocation.cpp
index 22f1c7f..b8d9b79 100644
--- a/parameter/FrameworkConfigurationLocation.cpp
+++ b/parameter/FrameworkConfigurationLocation.cpp
@@ -44,7 +44,7 @@ bool CFrameworkConfigurationLocation::fromXml(const CXmlElement& xmlElement, CXm
if (_strPath.empty()) {
- serializingContext.setError("Empty Path attribute in elememnt " + xmlElement.getPath());
+ serializingContext.setError("Empty Path attribute in element " + xmlElement.getPath());
return false;
}
@@ -66,15 +66,11 @@ string CFrameworkConfigurationLocation::getFolderPath(const string& strBaseFolde
{
uint32_t uiSlashPos = _strPath.rfind('/', -1);
- string strFolderPath = ".";
-
if (isPathRelative()) {
if (uiSlashPos != (uint32_t)-1) {
- strFolderPath = _strPath.substr(0, uiSlashPos);
-
- return strBaseFolder + "/" + strFolderPath;
+ return strBaseFolder + "/" + _strPath.substr(0, uiSlashPos);
} else {
@@ -84,9 +80,7 @@ string CFrameworkConfigurationLocation::getFolderPath(const string& strBaseFolde
assert(uiSlashPos != (uint32_t)-1);
- strFolderPath = _strPath.substr(0, uiSlashPos);
-
- return strFolderPath;
+ return _strPath.substr(0, uiSlashPos);
}
}
diff --git a/parameter/ParameterFrameworkConfiguration.cpp b/parameter/ParameterFrameworkConfiguration.cpp
index 388e375..d1c032b 100644
--- a/parameter/ParameterFrameworkConfiguration.cpp
+++ b/parameter/ParameterFrameworkConfiguration.cpp
@@ -33,6 +33,7 @@
#define base CElement
CParameterFrameworkConfiguration::CParameterFrameworkConfiguration()
+ : _bTuningAllowed(false), _uiServerPort(0)
{
}
@@ -45,3 +46,37 @@ bool CParameterFrameworkConfiguration::childrenAreDynamic() const
{
return true;
}
+
+// System class name
+const string& CParameterFrameworkConfiguration::getSystemClassName() const
+{
+ return _strSystemClassName;
+}
+
+// Tuning allowed
+bool CParameterFrameworkConfiguration::isTuningAllowed() const
+{
+ return _bTuningAllowed;
+}
+
+// Server port
+uint16_t CParameterFrameworkConfiguration::getServerPort() const
+{
+ return _uiServerPort;
+}
+
+// From IXmlSink
+bool CParameterFrameworkConfiguration::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext)
+{
+ // System class name
+ _strSystemClassName = xmlElement.getAttributeString("SystemClassName");
+
+ // Tuning allowed
+ _bTuningAllowed = xmlElement.getAttributeBoolean("TuningAllowed");
+
+ // Server port
+ _uiServerPort = (uint16_t)xmlElement.getAttributeInteger("ServerPort");
+
+ // Base
+ return base::fromXml(xmlElement, serializingContext);
+}
diff --git a/parameter/ParameterFrameworkConfiguration.h b/parameter/ParameterFrameworkConfiguration.h
index e0891e3..f8290e4 100644
--- a/parameter/ParameterFrameworkConfiguration.h
+++ b/parameter/ParameterFrameworkConfiguration.h
@@ -37,8 +37,25 @@ class CParameterFrameworkConfiguration : public CElement
public:
CParameterFrameworkConfiguration();
- virtual string getKind() const;
+ // System class name
+ const string& getSystemClassName() const;
+
+ // Tuning allowed
+ bool isTuningAllowed() const;
+
+ // Server port
+ uint16_t getServerPort() const;
+ // From IXmlSink
+ virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext);
private:
+ virtual string getKind() const;
virtual bool childrenAreDynamic() const;
+
+ // System class name
+ string _strSystemClassName;
+ // Tuning allowed
+ bool _bTuningAllowed;
+ // Server port
+ uint16_t _uiServerPort;
};
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index 61e204a..102d28b 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -55,7 +55,6 @@
#include "ParameterFrameworkConfiguration.h"
#include "FrameworkConfigurationGroup.h"
#include "FrameworkConfigurationLocation.h"
-#include "SystemClassConfiguration.h"
#include "ConfigurableDomains.h"
#include "ConfigurableDomain.h"
#include "DomainConfiguration.h"
@@ -88,7 +87,7 @@ const char* gacSystemSchemasSubFolder = "Schemas";
// Config File System looks normally like this:
// ---------------------------------------------
-//├── ParameterFrameworkConfiguration.xml
+//├── <ParameterFrameworkConfiguration>.xml
//├── Schemas
//│ └── *.xsd
//├── Settings
@@ -168,16 +167,14 @@ const CParameterMgr::SRemoteCommandParserItem CParameterMgr::gastRemoteCommandPa
// Remote command parsers array Size
const uint32_t CParameterMgr::guiNbRemoteCommandParserItems = sizeof(gastRemoteCommandParserItems) / sizeof(gastRemoteCommandParserItems[0]);
-CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFolderPath, const string& strSystemClassName) :
+CParameterMgr::CParameterMgr(const string& strConfigurationFilePath) :
_bTuningModeIsOn(false),
_bValueSpaceIsRaw(false),
_bOutputRawFormatIsHex(false),
_bAutoSyncOn(true),
_pMainParameterBlackboard(new CParameterBlackboard),
_pElementLibrarySet(new CElementLibrarySet),
- _strParameterFrameworkConfigurationFolderPath(strParameterFrameworkConfigurationFolderPath),
- _strSchemaFolderLocation(strParameterFrameworkConfigurationFolderPath + "/" + gacSystemSchemasSubFolder),
- _pSystemClassConfiguration(NULL),
+ _strXmlConfigurationFilePath(strConfigurationFilePath),
_uiStructureChecksum(0),
_pRemoteProcessorServer(NULL),
_uiMaxCommandUsageLength(0),
@@ -191,8 +188,8 @@ CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFol
// Deal with children
addChild(new CParameterFrameworkConfiguration);
addChild(new CSelectionCriteria);
- addChild(new CSystemClass(strSystemClassName));
- addChild(new CConfigurableDomains(strSystemClassName));
+ addChild(new CSystemClass);
+ addChild(new CConfigurableDomains);
// Feed element library
feedElementLibraries();
@@ -212,6 +209,16 @@ CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFol
pRemoteCommandParserItem->_pcHelp,
pRemoteCommandParserItem->_pcDescription);
}
+
+ // Configuration file folder
+ uint32_t uiSlashPos = _strXmlConfigurationFilePath.rfind('/', -1);
+
+ assert(uiSlashPos != (uint32_t)-1);
+
+ _strXmlConfigurationFolderPath = _strXmlConfigurationFilePath.substr(0, uiSlashPos);
+
+ // Schema absolute folder location
+ _strSchemaFolderLocation = _strXmlConfigurationFolderPath + "/" + gacSystemSchemasSubFolder;
}
CParameterMgr::~CParameterMgr()
@@ -348,18 +355,19 @@ bool CParameterMgr::loadFrameworkConfiguration(string& strError)
{
CAutoLog autoLog(this, "Loading framework configuration");
- // Get Xml config file name
- string strXmlConfigurationFilePath = _strParameterFrameworkConfigurationFolderPath + "/" + gacParameterFrameworkConfigurationFileName;
-
// Parse Structure XML file
CXmlElementSerializingContext elementSerializingContext(strError);
- if (!xmlParse(elementSerializingContext, getFrameworkConfiguration(), strXmlConfigurationFilePath, _strParameterFrameworkConfigurationFolderPath, EFrameworkConfigurationLibrary)) {
+ if (!xmlParse(elementSerializingContext, getFrameworkConfiguration(), _strXmlConfigurationFilePath, _strXmlConfigurationFolderPath, EFrameworkConfigurationLibrary)) {
return false;
}
+ // Set class name to system class and configurable domains
+ getSystemClass()->setName(getConstFrameworkConfiguration()->getSystemClassName());
+ getConfigurableDomains()->setName(getConstFrameworkConfiguration()->getSystemClassName());
+
// Get subsystem plugins folders element
- const CFrameworkConfigurationGroup* pSubsystemPluginFolders= static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChild("SubsystemPluginFolders"));
+ const CFrameworkConfigurationGroup* pSubsystemPluginFolders = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChild("SubsystemPluginFolders"));
if (!pSubsystemPluginFolders) {
@@ -378,32 +386,16 @@ bool CParameterMgr::loadFrameworkConfiguration(string& strError)
return false;
}
+ // Collect plugin paths
for (uiPluginFolderLocation = 0; uiPluginFolderLocation < uiNbPluginFolderLocations; uiPluginFolderLocation++) {
const CFrameworkConfigurationLocation* pSubsystemPluginLocation = static_cast<const CFrameworkConfigurationLocation*>(pSubsystemPluginFolders->getChild(uiPluginFolderLocation));
- _astrPluginFolderPaths.push_back(pSubsystemPluginLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath));
+ _astrPluginFolderPaths.push_back(pSubsystemPluginLocation->getFilePath(_strXmlConfigurationFilePath));
}
- // Get configuration for current system class
- const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChildOfKind("ParameterConfiguration"));
-
- if (!pParameterConfigurationGroup) {
-
- strError = "Parameter Framework Configuration: couldn't find ParameterConfiguration element";
-
- return false;
- }
- _pSystemClassConfiguration = static_cast<const CSystemClassConfiguration*>(pParameterConfigurationGroup->findChild(getSystemClass()->getName()));
-
- if (!_pSystemClassConfiguration) {
-
- strError = "No framework configuration found for SystemClass " + getSystemClass()->getName();
-
- return false;
- }
// Log tuning availability
- log("Tuning %s", _pSystemClassConfiguration->isTuningAllowed() ? "allowed" : "prohibited");
+ log("Tuning %s", getConstFrameworkConfiguration()->isTuningAllowed() ? "allowed" : "prohibited");
return true;
}
@@ -416,7 +408,7 @@ bool CParameterMgr::loadStructure(string& strError)
CAutoLog autoLog(this, "Loading " + pSystemClass->getName() + " system class structure");
// Get structure description element
- const CFrameworkConfigurationLocation* pStructureDescriptionFileLocation = static_cast<const CFrameworkConfigurationLocation*>(_pSystemClassConfiguration->findChildOfKind("StructureDescriptionFileLocation"));
+ const CFrameworkConfigurationLocation* pStructureDescriptionFileLocation = static_cast<const CFrameworkConfigurationLocation*>(getConstFrameworkConfiguration()->findChildOfKind("StructureDescriptionFileLocation"));
if (!pStructureDescriptionFileLocation) {
@@ -426,10 +418,10 @@ bool CParameterMgr::loadStructure(string& strError)
}
// Get Xml structure folder
- string strXmlStructureFolder = pStructureDescriptionFileLocation->getFolderPath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlStructureFolder = pStructureDescriptionFileLocation->getFolderPath(_strXmlConfigurationFolderPath);
// Get Xml structure file name
- string strXmlStructureFilePath = pStructureDescriptionFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlStructureFilePath = pStructureDescriptionFileLocation->getFilePath(_strXmlConfigurationFolderPath);
// Parse Structure XML file
CXmlParameterSerializingContext parameterBuildContext(strError);
@@ -455,7 +447,7 @@ bool CParameterMgr::loadSettings(string& strError)
CAutoLog autoLog(this, "Loading settings");
// Get settings configuration element
- const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(_pSystemClassConfiguration->findChildOfKind("SettingsConfiguration"));
+ const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChildOfKind("SettingsConfiguration"));
if (!pParameterConfigurationGroup) {
@@ -471,7 +463,7 @@ bool CParameterMgr::loadSettings(string& strError)
if (pBinarySettingsFileLocation) {
// Get Xml binary settings file name
- strXmlBinarySettingsFilePath = pBinarySettingsFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ strXmlBinarySettingsFilePath = pBinarySettingsFileLocation->getFilePath(_strXmlConfigurationFolderPath);
}
// Get configurable domains element
@@ -487,10 +479,10 @@ bool CParameterMgr::loadSettings(string& strError)
CConfigurableDomains* pConfigurableDomains = getConfigurableDomains();
// Get Xml configuration domains file name
- string strXmlConfigurationDomainsFilePath = pConfigurableDomainsFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlConfigurationDomainsFilePath = pConfigurableDomainsFileLocation->getFilePath(_strXmlConfigurationFolderPath);
// Get Xml configuration domains folder
- string strXmlConfigurationDomainsFolder = pConfigurableDomainsFileLocation->getFolderPath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlConfigurationDomainsFolder = pConfigurableDomainsFileLocation->getFolderPath(_strXmlConfigurationFolderPath);
// Parse configuration domains XML file (ask to read settings from XML file if they are not provided as binary)
CXmlDomainSerializingContext xmlDomainSerializingContext(strError, !pBinarySettingsFileLocation);
@@ -1247,7 +1239,7 @@ bool CParameterMgr::getValue(const string& strPath, string& strValue, string& st
bool CParameterMgr::setTuningMode(bool bOn, string& strError)
{
// Tuning allowed?
- if (bOn && !_pSystemClassConfiguration->isTuningAllowed()) {
+ if (bOn && !getConstFrameworkConfiguration()->isTuningAllowed()) {
strError = "Tuning prohibited";
@@ -1700,8 +1692,6 @@ void CParameterMgr::feedElementLibraries()
pFrameworkConfigurationLibrary->addElementBuilder(new TElementBuilderTemplate<CParameterFrameworkConfiguration>("ParameterFrameworkConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("SubsystemPluginFolders"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("PluginFolderLocation"));
- pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("ParameterConfiguration"));
- pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CSystemClassConfiguration>("SystemClassConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("StructureDescriptionFileLocation"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("SettingsConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("ConfigurableDomainsFileLocation"));
@@ -1744,7 +1734,7 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError)
CAutoLog autoLog(this, "Handling remote processing interface");
// Start server if tuning allowed
- if (_pSystemClassConfiguration->isTuningAllowed()) {
+ if (getConstFrameworkConfiguration()->isTuningAllowed()) {
log("Loading remote processor library");
@@ -1777,9 +1767,9 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError)
}
// Create server
- _pRemoteProcessorServer = pfnCreateRemoteProcessorServer(_pSystemClassConfiguration->getServerPort(), _pCommandHandler);
+ _pRemoteProcessorServer = pfnCreateRemoteProcessorServer(getConstFrameworkConfiguration()->getServerPort(), _pCommandHandler);
- log("Starting remote processor server on port %d", _pSystemClassConfiguration->getServerPort());
+ log("Starting remote processor server on port %d", getConstFrameworkConfiguration()->getServerPort());
// Start
if (!_pRemoteProcessorServer->start()) {
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h
index 857034a..c7bdcb6 100644
--- a/parameter/ParameterMgr.h
+++ b/parameter/ParameterMgr.h
@@ -80,7 +80,7 @@ class CParameterMgr : private CElement
};
// Version
static const uint32_t guiEditionMajor = 0x1;
- static const uint32_t guiEditionMinor = 0x0;
+ static const uint32_t guiEditionMinor = 0x1;
static const uint32_t guiRevision = 0x0;
public:
// Logger interface
@@ -91,7 +91,7 @@ public:
};
// Construction
- CParameterMgr(const string& strParameterFrameworkConfigurationFolderPath, const string& strSystemClassName);
+ CParameterMgr(const string& strConfigurationFilePath);
virtual ~CParameterMgr();
// Logging
@@ -303,15 +303,13 @@ private:
CElementLibrarySet* _pElementLibrarySet;
// XML parsing, object creation handling
- string _strParameterFrameworkConfigurationFolderPath; // Root folder for framework configuration
+ string _strXmlConfigurationFilePath; // Configuration file path
+ string _strXmlConfigurationFolderPath; // Root folder for configuration file
string _strSchemaFolderLocation; // Place where schemas stand
// Subsystem plugin location
vector<string> _astrPluginFolderPaths;
- // System Class Configuration
- const CSystemClassConfiguration* _pSystemClassConfiguration;
-
// Whole system structure checksum
uint8_t _uiStructureChecksum;
diff --git a/parameter/ParameterMgrPlatformConnector.cpp b/parameter/ParameterMgrPlatformConnector.cpp
index 6fe5c65..17d202c 100644
--- a/parameter/ParameterMgrPlatformConnector.cpp
+++ b/parameter/ParameterMgrPlatformConnector.cpp
@@ -33,15 +33,9 @@
#include "ParameterMgrLogger.h"
#include <assert.h>
-#ifdef SIMULATION
-const char* gpcParameterFrameworkConfigurationFolderPath = "/home/pat/Documents/gingerbread2/hardware/intel/PRIVATE/parameter-framework/XML";
-#else
-const char* gpcParameterFrameworkConfigurationFolderPath = "/etc/parameter-framework";
-#endif
-
// Construction
-CParameterMgrPlatformConnector::CParameterMgrPlatformConnector(const string& strSystemClassName)
- : _pParameterMgr(new CParameterMgr(gpcParameterFrameworkConfigurationFolderPath, strSystemClassName)), _bStarted(false), _pLogger(NULL)
+CParameterMgrPlatformConnector::CParameterMgrPlatformConnector(const string& strConfigurationFilePath)
+ : _pParameterMgr(new CParameterMgr(strConfigurationFilePath)), _bStarted(false), _pLogger(NULL)
{
// Logging
_pParameterMgrLogger = new CParameterMgrLogger(this);
diff --git a/parameter/ParameterMgrPlatformConnector.h b/parameter/ParameterMgrPlatformConnector.h
index 518fd92..14e408c 100644
--- a/parameter/ParameterMgrPlatformConnector.h
+++ b/parameter/ParameterMgrPlatformConnector.h
@@ -39,7 +39,7 @@ public:
};
// Construction
- CParameterMgrPlatformConnector(const std::string& strSystemClassName);
+ CParameterMgrPlatformConnector(const std::string& strConfigurationFilePath);
~CParameterMgrPlatformConnector(); // Not virtual since not supposed to be derived!
// Selection Criteria interface. Beware returned objects are lent, clients shall not delete them!
diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp
index d2adaac..6443e2c 100644
--- a/parameter/SystemClass.cpp
+++ b/parameter/SystemClass.cpp
@@ -54,7 +54,7 @@ const char* gpcPluginSymbolSuffix = "SusbystemBuilder";
// Used by subsystem plugins
typedef void (*GetSusbystemBuilder)(CSubsystemLibrary*);
-CSystemClass::CSystemClass(const string& strName) : base(strName), _pSubsystemLibrary(new CSubsystemLibrary)
+CSystemClass::CSystemClass() : _pSubsystemLibrary(new CSubsystemLibrary)
{
}
@@ -85,7 +85,7 @@ bool CSystemClass::loadSubsystems(string& strError, const vector<string>& astrPl
for (uiFolderLocation = 0; uiFolderLocation < astrPluginFolderPaths.size(); uiFolderLocation++) {
// Folder for current SystemClass
- string strPluginPath = astrPluginFolderPaths[uiFolderLocation] + "/" + getName() + "/";
+ string strPluginPath = astrPluginFolderPaths[uiFolderLocation] + "/";
// Get plugin list
getPluginFiles(strPluginPath, astrPluginFiles);
diff --git a/parameter/SystemClass.h b/parameter/SystemClass.h
index a739f1a..d80ab52 100644
--- a/parameter/SystemClass.h
+++ b/parameter/SystemClass.h
@@ -38,7 +38,7 @@ class CSubsystemLibrary;
class CSystemClass : public CConfigurableElement
{
public:
- CSystemClass(const string& strName);
+ CSystemClass();
virtual ~CSystemClass();
// Called from parent before actual init
diff --git a/parameter/SystemClassConfiguration.cpp b/parameter/SystemClassConfiguration.cpp
deleted file mode 100644
index 0ebb2b1..0000000
--- a/parameter/SystemClassConfiguration.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include "SystemClassConfiguration.h"
-
-#define base CFrameworkConfigurationGroup
-
-CSystemClassConfiguration::CSystemClassConfiguration(const string& strName, const string& strKind)
- : base(strName, strKind), _bTuningAllowed(false), _uiServerPort(0)
-{
-}
-
-// Tuning allowed
-bool CSystemClassConfiguration::isTuningAllowed() const
-{
- return _bTuningAllowed;
-}
-
-// Server port
-uint16_t CSystemClassConfiguration::getServerPort() const
-{
- return _uiServerPort;
-}
-
-// From IXmlSink
-bool CSystemClassConfiguration::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext)
-{
- // Tuning allowed
- _bTuningAllowed = xmlElement.getAttributeBoolean("TuningAllowed");
-
- // Server port
- _uiServerPort = (uint16_t)xmlElement.getAttributeInteger("ServerPort");
-
- // Base
- return base::fromXml(xmlElement, serializingContext);
-}
diff --git a/parameter/SystemClassConfiguration.h b/parameter/SystemClassConfiguration.h
deleted file mode 100644
index 0a24a8a..0000000
--- a/parameter/SystemClassConfiguration.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#pragma once
-
-#include "FrameworkConfigurationGroup.h"
-
-class CSystemClassConfiguration : public CFrameworkConfigurationGroup
-{
-public:
- CSystemClassConfiguration(const string& strName, const string& strKind);
-
- // Tuning allowed
- bool isTuningAllowed() const;
-
- // Server port
- uint16_t getServerPort() const;
-
- // From IXmlSink
- virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext);
-private:
- // Tuning allowed
- bool _bTuningAllowed;
- // Server port
- uint16_t _uiServerPort;
-};
-
diff --git a/remote-processor-test/Android.mk b/remote-processor-test/Android.mk
deleted file mode 100644
index 66c0cab..0000000
--- a/remote-processor-test/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_PATH :=
-
-
-LOCAL_SRC_FILES:= \
- main.cpp
-
-
-LOCAL_MODULE:= remote-processor-test
-
-LOCAL_MODULE_TAGS := optional
-
-TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
-
-LOCAL_C_INCLUDES += \
- external/stlport/stlport/ \
- bionic/libstdc++ \
- bionic/
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../remote-processor
-
-LOCAL_SHARED_LIBRARIES := libstlport libicuuc libremote-processor
-LOCAL_STATIC_LIBRARIES :=
-
-LOCAL_LDLIBS +=
-LOCAL_LDFLAGS +=
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/remote-processor-test/main.cpp b/remote-processor-test/main.cpp
deleted file mode 100644
index 8c68f29..0000000
--- a/remote-processor-test/main.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include <iostream>
-#include <stdlib.h>
-#include "RemoteProcessorServer.h"
-#include <semaphore.h>
-
-using namespace std;
-
-int main(int argc, char *argv[])
-{
- // Enough args?
- if (argc < 2) {
-
- cerr << "Missing arguments (port number)" << endl;
-
- return -1;
- }
- // Get port number
- uint16_t uiPort = (uint16_t)strtoul(argv[1], NULL, 0);
-
- CRemoteProcessorServer remoteProcessorServer(uiPort, NULL);
-
- if (!remoteProcessorServer.start()) {
-
- cerr << "Unable to start server" << endl;
-
- return -1;
- }
-
- // Block here
- sem_t sem;
-
- sem_init(&sem, false, 0);
-
- sem_wait(&sem);
-
- sem_destroy(&sem);
-
- return 0;
-}
diff --git a/xmlparser-test/Android.mk b/xmlparser-test/Android.mk
deleted file mode 100644
index ccb867d..0000000
--- a/xmlparser-test/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_PATH :=
-
-
-LOCAL_SRC_FILES:= \
- main.cpp
-
-
-LOCAL_MODULE:= xmlparser-test
-
-LOCAL_MODULE_TAGS := optional
-
-TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
-
-LOCAL_C_INCLUDES += \
- external/stlport/stlport/ \
- external/libxml2/include/ \
- external/webkit/Source/WebCore/icu/ \
- bionic/libstdc++ \
- bionic/
-
-LOCAL_C_INCLUDES +=
-
-LOCAL_SHARED_LIBRARIES := libstlport libicuuc
-LOCAL_STATIC_LIBRARIES := libxml2
-
-LOCAL_LDLIBS +=
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/xmlparser-test/main.cpp b/xmlparser-test/main.cpp
deleted file mode 100644
index a399b9c..0000000
--- a/xmlparser-test/main.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-/**
- * section: Tree
- * synopsis: Navigates a tree to print element names
- * purpose: Parse a file to a tree, use xmlDocGetRootElement() to
- * get the root element, then walk the document and print
- * all the element name in document order.
- * usage: tree1 filename_or_URL
- * test: tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp
- * author: Dodji Seketeli
- * copy: see Copyright for the status of this software.
- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xmlschemas.h>
-
-/*
- *To compile this file using gcc you can type
- *gcc `xml2-config --cflags --libs` -o xmlexample libxml2-example.c
- */
-static void schemaValidityErrorFunc(void *ctx, const char *msg, ...)
-{
- char acBuffer[256];
- va_list listPointer;
-
- (void)ctx;
-
- va_start( listPointer, msg );
- //vprintf(msg, listPointer);
-
- vsnprintf(acBuffer, sizeof(acBuffer), msg, listPointer);
-
- va_end( listPointer );
-
- puts(acBuffer);
-}
-
-static void schemaValidityWarningFunc(void *ctx, const char *msg, ...)
-{
- char acBuffer[256];
- va_list listPointer;
-
- (void)ctx;
-
- va_start( listPointer, msg );
-
- vsnprintf(acBuffer, sizeof(acBuffer), msg, listPointer);
-
- va_end( listPointer );
-
- puts(acBuffer);
-}
-
-static int is_valid(const xmlDocPtr doc, const char *schema_filename)
-{
-#ifdef LIBXML_SCHEMAS_ENABLED
- xmlDocPtr schema_doc = xmlReadFile(schema_filename, NULL, XML_PARSE_NONET);
- if (schema_doc == NULL) {
- /* the schema cannot be loaded or is not well-formed */
- return -1;
- }
- xmlSchemaParserCtxtPtr parser_ctxt = xmlSchemaNewDocParserCtxt(schema_doc);
- if (parser_ctxt == NULL) {
- /* unable to create a parser context for the schema */
- xmlFreeDoc(schema_doc);
- return -2;
- }
-
- xmlSchemaPtr schema = xmlSchemaParse(parser_ctxt);
- if (schema == NULL) {
- /* the schema itself is not valid */
- xmlSchemaFreeParserCtxt(parser_ctxt);
- xmlFreeDoc(schema_doc);
- return -3;
- }
- xmlSchemaValidCtxtPtr valid_ctxt = xmlSchemaNewValidCtxt(schema);
- if (valid_ctxt == NULL) {
- /* unable to create a validation context for the schema */
- xmlSchemaFree(schema);
- xmlSchemaFreeParserCtxt(parser_ctxt);
- xmlFreeDoc(schema_doc);
- return -4;
- }
- xmlSchemaSetValidErrors(valid_ctxt, schemaValidityErrorFunc, schemaValidityWarningFunc, NULL);
-
- int is_valid = (xmlSchemaValidateDoc(valid_ctxt, doc) == 0);
- xmlSchemaFreeValidCtxt(valid_ctxt);
- xmlSchemaFree(schema);
- xmlSchemaFreeParserCtxt(parser_ctxt);
- xmlFreeDoc(schema_doc);
-
- /* force the return value to be non-negative on success */
- return is_valid ? 1 : 0;
-#else
- return 1;
-#endif
-}
-
-/**
- * print_element_names:
- * @a_node: the initial xml node to consider.
- *
- * Prints the names of the all the xml elements
- * that are siblings or children of a given xml node.
- */
-static void
-print_element_names(xmlNode * a_node, int iLevel = 0)
-{
- xmlNode *cur_node = NULL;
-
- for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
-
- int iIndent = iLevel;
-
- while (iIndent--) {
- printf(" ");
- }
-
- if (cur_node->type == XML_ELEMENT_NODE) {
-
- printf("node type: Element, name: %s\n", cur_node->name);
- }
- print_element_names(cur_node->children, iLevel + 1);
- }
-}
-
-
-/**
- * Simple example to parse a file called "file.xml",
- * walk down the DOM, and print the name of the
- * xml elements nodes.
- */
-int
-main(int argc, char **argv)
-{
- xmlDoc *doc = NULL;
- xmlNode *root_element = NULL;
-
- if (argc != 3)
- return(1);
-
- /*
- * this initialize the library and check potential ABI mismatches
- * between the version it was compiled for and the actual shared
- * library used.
- */
- LIBXML_TEST_VERSION
-
- /*parse the file and get the DOM */
- doc = xmlReadFile(argv[1], NULL, 0);
-
- if (doc == NULL) {
- printf("error: could not parse file %s\n", argv[1]);
- }
- // Validate
- if (!is_valid(doc, argv[2])) {
- printf("error: doc is not valid\n");
-
- return -1;
- }
-
-
- /*Get the root element node */
- root_element = xmlDocGetRootElement(doc);
-
-
- print_element_names(root_element);
-
- /*free the document */
- xmlFreeDoc(doc);
-
- /*
- *Free the global variables that may
- *have been allocated by the parser.
- */
- xmlCleanupParser();
-
- return 0;
-}