summaryrefslogtreecommitdiffstats
path: root/parameter/ParameterAccessContext.cpp
diff options
context:
space:
mode:
authorFrédéric Boisnard <fredericx.boisnard@intel.com>2013-02-25 15:55:47 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:03:47 +0100
commit6bc17c03f4b006a411b768fca33269843144542d (patch)
tree7012b94b33ca14ab9f22902749855ba01b8787e7 /parameter/ParameterAccessContext.cpp
parent3aa0db4be952157c2842b91a1606cc0edac9e63d (diff)
downloadexternal_parameter-framework-6bc17c03f4b006a411b768fca33269843144542d.zip
external_parameter-framework-6bc17c03f4b006a411b768fca33269843144542d.tar.gz
external_parameter-framework-6bc17c03f4b006a411b768fca33269843144542d.tar.bz2
[PFW] Take into account base offset when accessing value of parameters
BZ: 88357 This patch aims to offer the possibility of accessing the value of parameters from a Configuration blackboard instead of Main blackboard. The read/write operation is now relative to the base offset of the ancestor element associated to the Configuration. The base offset is stored in the ParameterAccessContext. Change-Id: I158df63d2ef3bd8cbacb84b7d2f51723ed1074f5 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/93671 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Dixon, CharlesX <charlesx.dixon@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/ParameterAccessContext.cpp')
-rw-r--r--parameter/ParameterAccessContext.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/parameter/ParameterAccessContext.cpp b/parameter/ParameterAccessContext.cpp
index 9ebd83f..05e3cc3 100644
--- a/parameter/ParameterAccessContext.cpp
+++ b/parameter/ParameterAccessContext.cpp
@@ -26,22 +26,22 @@
#define base CErrorContext
-CParameterAccessContext::CParameterAccessContext(string& strError, CParameterBlackboard* pParameterBlackboard, bool bValueSpaceIsRaw, bool bOutputRawFormatIsHex)
+CParameterAccessContext::CParameterAccessContext(string& strError, CParameterBlackboard* pParameterBlackboard, bool bValueSpaceIsRaw, bool bOutputRawFormatIsHex, uint32_t uiBaseOffset)
: base(strError), _pParameterBlackboard(pParameterBlackboard),
_bValueSpaceIsRaw(bValueSpaceIsRaw), _bOutputRawFormatIsHex(bOutputRawFormatIsHex),
- _bBigEndianSubsystem(false), _bAutoSync(true)
+ _bBigEndianSubsystem(false), _bAutoSync(true), _uiBaseOffset(uiBaseOffset)
{
}
-CParameterAccessContext::CParameterAccessContext(string& strError, bool bBigEndianSubsystem, CParameterBlackboard* pParameterBlackboard)
+CParameterAccessContext::CParameterAccessContext(string& strError, bool bBigEndianSubsystem, CParameterBlackboard* pParameterBlackboard, uint32_t uiBaseOffset)
: base(strError), _pParameterBlackboard(pParameterBlackboard), _bValueSpaceIsRaw(false),
- _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(bBigEndianSubsystem), _bAutoSync(true)
+ _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(bBigEndianSubsystem), _bAutoSync(true), _uiBaseOffset(uiBaseOffset)
{
}
CParameterAccessContext::CParameterAccessContext(string& strError)
: base(strError), _pParameterBlackboard(NULL), _bValueSpaceIsRaw(false),
- _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(false), _bAutoSync(true)
+ _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(false), _bAutoSync(true), _uiBaseOffset(0)
{
}
@@ -54,6 +54,18 @@ CParameterBlackboard* CParameterAccessContext::getParameterBlackboard()
void CParameterAccessContext::setParameterBlackboard(CParameterBlackboard* pBlackboard)
{
_pParameterBlackboard = pBlackboard;
+ _uiBaseOffset = 0;
+}
+
+// Base offset for blackboard access
+void CParameterAccessContext::setBaseOffset(uint32_t uiBaseOffset)
+{
+ _uiBaseOffset = uiBaseOffset;
+}
+
+uint32_t CParameterAccessContext::getBaseOffset() const
+{
+ return _uiBaseOffset;
}
// Value Space