Parameter Framework: Parameter property display

BZ: 7137

Added showProperties remote command
Changed EQU to MONO_EQ for CAPTURE paths in LPE Subsystem structure definition
Had to create a generic class for Parameter and BitParameter classes

Change-Id: If6ab97ff002d8ba81df5a4a60bc3eb07dbe14e5e
Orig-Change-Id: I425f81cd414b1c721f5c11169e9a489f5c638ab9
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/16879
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>
diff --git a/parameter/BitParameter.cpp b/parameter/BitParameter.cpp
index cb75477..db1da38 100644
--- a/parameter/BitParameter.cpp
+++ b/parameter/BitParameter.cpp
@@ -35,7 +35,7 @@
 #include "ParameterBlackboard.h"
 #include "BitParameterBlock.h"
 
-#define base CInstanceConfigurableElement
+#define base CBaseParameter
 
 CBitParameter::CBitParameter(const string& strName, const CTypeElement* pTypeElement) : base(strName, pTypeElement)
 {
@@ -48,101 +48,19 @@
 }
 
 // Size
-uint32_t CBitParameter::getSize() const
+uint32_t CBitParameter::getBelongingBlockSize() const
 {
     return static_cast<const CBitParameterBlock*>(getParent())->getSize();
 }
 
-// XML configuration settings parsing/composing
-bool CBitParameter::serializeXmlSettings(CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) const
-{
-    // Handle access
-    if (!configurationAccessContext.serializeOut()) {
-
-        // Write to blackboard
-        if (!doSetValue(xmlConfigurationSettingsElementContent.getTextContent(), getOffset() - configurationAccessContext.getBaseOffset(), configurationAccessContext)) {
-
-            // Append parameter path to error
-            configurationAccessContext.appendToError(" " + getPath());
-
-            return false;
-        }
-    } else {
-
-        // Get string value
-        string strValue;
-
-        doGetValue(strValue, getOffset() - configurationAccessContext.getBaseOffset(), configurationAccessContext);
-
-        // Populate value into xml text node
-        xmlConfigurationSettingsElementContent.setTextContent(strValue);
-    }
-
-    // Done
-    return true;
-}
-
+// Instantiation, allocation
 uint32_t CBitParameter::getFootPrint() const
 {
     // Allocation made on parent side
     return 0;
 }
 
-// Dump
-void CBitParameter::logValue(string& strValue, CErrorContext& errorContext) const
-{
-    CParameterAccessContext& parameterContext = static_cast<CParameterAccessContext&>(errorContext);
-
-    // Dump value
-    doGetValue(strValue, getOffset(), parameterContext);
-}
-
-// Parameter Access
-bool CBitParameter::setValue(CPathNavigator& pathNavigator, const string& strValue, CErrorContext& errorContext) const
-{
-    // Check path validity
-    if (!checkPathExhausted(pathNavigator, errorContext)) {
-
-        return false;
-    }
-    // Parameter context
-    CParameterAccessContext& parameterContext = static_cast<CParameterAccessContext&>(errorContext);
-
-    // Set Value
-    if (!doSetValue(strValue, getOffset(), parameterContext)) {
-
-        // Append parameter path to error
-        parameterContext.appendToError(" " + getPath());
-
-        return false;
-    }
-    // Synchronize
-    if (!sync(parameterContext)) {
-
-        // Append parameter path to error
-        parameterContext.appendToError(" " + getPath());
-
-        return false;
-    }
-    return true;
-}
-
-bool CBitParameter::getValue(CPathNavigator& pathNavigator, string& strValue, CErrorContext& errorContext) const
-{
-    // Check path validity
-    if (!checkPathExhausted(pathNavigator, errorContext)) {
-
-        return false;
-    }
-    // Parameter context
-    CParameterAccessContext& parameterContext = static_cast<CParameterAccessContext&>(errorContext);
-
-    // Get Value
-    doGetValue(strValue, getOffset(), parameterContext);
-
-    return true;
-}
-
+// Actual parameter access
 bool CBitParameter::doSetValue(const string& strValue, uint32_t uiOffset, CParameterAccessContext& parameterAccessContext) const
 {
     uint32_t uiData = 0;
@@ -151,7 +69,7 @@
     CParameterBlackboard* pBlackboard = parameterAccessContext.getParameterBlackboard();
 
     // Beware this code works on little endian architectures only!
-    pBlackboard->read(&uiData, getSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
+    pBlackboard->read(&uiData, getBelongingBlockSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
 
     // Convert
     if (!static_cast<const CBitParameterType*>(getTypeElement())->asInteger(strValue, uiData, parameterAccessContext)) {
@@ -159,7 +77,7 @@
         return false;
     }
     // Write blackboard
-    pBlackboard->write(&uiData, getSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
+    pBlackboard->write(&uiData, getBelongingBlockSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
 
     return true;
 }
@@ -172,7 +90,7 @@
     CParameterBlackboard* pBlackboard = parameterAccessContext.getParameterBlackboard();
 
     // Beware this code works on little endian architectures only!
-    pBlackboard->read(&uiData, getSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
+    pBlackboard->read(&uiData, getBelongingBlockSize(), uiOffset, parameterAccessContext.isBigEndianSubsystem());
 
     // Convert
     static_cast<const CBitParameterType*>(getTypeElement())->asString(uiData, strValue, parameterAccessContext);