diff options
| author | Patrick Benavoli <patrickx.benavoli@intel.com> | 2011-11-20 18:52:24 +0100 | 
|---|---|---|
| committer | David Wagner <david.wagner@intel.com> | 2014-02-10 17:15:00 +0100 | 
| commit | ee65e6d992e5fd7c81f62ced1cbed532989c09f7 (patch) | |
| tree | 43f01d51846eaa76dcba968a615633f79fa938f2 /Schemas | |
| parent | 065264a93ce9c63b6a5c95e985188ee33ba587d3 (diff) | |
| download | external_parameter-framework-ee65e6d992e5fd7c81f62ced1cbed532989c09f7.zip external_parameter-framework-ee65e6d992e5fd7c81f62ced1cbed532989c09f7.tar.gz external_parameter-framework-ee65e6d992e5fd7c81f62ced1cbed532989c09f7.tar.bz2  | |
PFW: Parameter adaptation (platform interface)
BZ: 15069
Adaptation nodes have been added to integer parameter types in the structural
description.
They all convert values between a platform value and the actual parameter
value.
When a conversion node affects the definition of an integer type parameter,
its interface type becomes "double" (instead of integer).
For now only linear adaptation type is supported.
Linear adaptation:
=================
Linear adaptation nodes consists of the following attributes:
- slope numerator (double, default = 1)
- slope denominator (double, defult = 1)
- offset (signed integer, default = 0)
Conversions from user (platform) values to blackboard are done the follwing
way:
blackboard_value = user_value * slope_numerator / slope_denominator + offset
Change-Id: I00abe9ba5961d8e541b616225531bbc7c8b465b0
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/25407
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>
Diffstat (limited to 'Schemas')
| -rw-r--r-- | Schemas/Parameter.xsd | 22 | 
1 files changed, 19 insertions, 3 deletions
diff --git a/Schemas/Parameter.xsd b/Schemas/Parameter.xsd index 17d256a..10d506a 100644 --- a/Schemas/Parameter.xsd +++ b/Schemas/Parameter.xsd @@ -1,7 +1,7 @@  <?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="Name" type="xs:NMTOKEN" use="required"/>
  		<xs:attribute name="Description" type="xs:string" use="optional"/>
  	</xs:attributeGroup>
  	<xs:simpleType name="SizeType">
 @@ -18,6 +18,19 @@  	<xs:attributeGroup name="ArrayLengthAttribute">
  		<xs:attribute name="ArrayLength" type="xs:nonNegativeInteger" use="optional" default="0"/>
  	</xs:attributeGroup>
 +	<xs:complexType name="Adaptation">
 +		<xs:attribute name="Offset" type="xs:integer" default="0"/>
 +	</xs:complexType>
 +	<xs:element name="LinearAdaptation">
 +		<xs:complexType>
 +			<xs:complexContent>
 +				<xs:extension base="Adaptation">
 +					<xs:attribute name="SlopeNumerator" type="xs:double" default="1"/>
 +					<xs:attribute name="SlopeDenominator" type="xs:double" default="1"/>
 +				</xs:extension>
 +			</xs:complexContent>
 +		</xs:complexType>
 +	</xs:element>
  	<xs:complexType name="Parameter" abstract="true">
  		<xs:attributeGroup ref="Nameable"/>
  		<xs:attribute name="Mapping" type="xs:string" use="optional"/>
 @@ -35,6 +48,9 @@  	<xs:complexType name="IntegerParameterType">
  		<xs:complexContent>
  			<xs:extension base="Parameter">
 +				<xs:choice minOccurs="0">
 +					<xs:element ref="LinearAdaptation"/>
 +				</xs:choice>
  				<xs:attributeGroup ref="IntegerParameterAttributes"/>
  				<xs:attribute name="Unit" type="xs:token" use="optional"/>
  			</xs:extension>
 @@ -48,7 +64,7 @@  					<xs:element name="ValuePair" maxOccurs="unbounded">
  						<xs:complexType>
  							<xs:attribute name="Literal" type="xs:NMTOKEN" use="required"/>
 -							<xs:attribute name="Numerical" use="required">					
 +							<xs:attribute name="Numerical" use="required">
  								<xs:simpleType>
  									<xs:restriction base="xs:string">
  										<xs:pattern value="0|[+-]?[1-9][0-9]*"/>
 @@ -71,7 +87,7 @@  		<xs:unique name="NumericalUniqueness">
  			<xs:selector xpath="ValuePair"/>
  			<xs:field xpath="@Numerical"/>
 -		</xs:unique>		
 +		</xs:unique>
  	</xs:element>
  	<xs:complexType name="FixedPointParameterType">
  		<xs:complexContent>
  | 
