diff options
author | Patrick Benavoli <patrickx.benavoli@intel.com> | 2011-10-21 16:48:04 +0200 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-10 17:14:56 +0100 |
commit | 1352ae53c457466fadb3aa35f01afab899548657 (patch) | |
tree | 45fb44ab31d24a4a143681e0ec0177415cec5478 /parameter/ParameterBlackboard.cpp | |
parent | 11e6498a4fa3b27ca34d2fcb76bd6365da9d5c1b (diff) | |
download | external_parameter-framework-1352ae53c457466fadb3aa35f01afab899548657.zip external_parameter-framework-1352ae53c457466fadb3aa35f01afab899548657.tar.gz external_parameter-framework-1352ae53c457466fadb3aa35f01afab899548657.tar.bz2 |
parameter-framework: Added string parameters
BZ: 12819
String parameters are specified in the XML structure with a MaxLength attribute.
MaxLength corresponds to the maximum amount of characters the string parameter
can handle.
String parameters are expressend in the form of tokens, that is they don't
contain any sort of space characters.
For now, string parameter arrays are not supported.
Change-Id: Ifbb006e3d2e3077535c32c0fd579cc04872a82b0
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/22319
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/26778
Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
Diffstat (limited to 'parameter/ParameterBlackboard.cpp')
-rw-r--r-- | parameter/ParameterBlackboard.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/parameter/ParameterBlackboard.cpp b/parameter/ParameterBlackboard.cpp index 242c6a8..d843a0e 100644 --- a/parameter/ParameterBlackboard.cpp +++ b/parameter/ParameterBlackboard.cpp @@ -62,7 +62,7 @@ uint32_t CParameterBlackboard::getSize() const } // Single parameter access -void CParameterBlackboard::write(const void* pvSrcData, uint32_t uiSize, uint32_t uiOffset, bool bBigEndian) +void CParameterBlackboard::writeInteger(const void* pvSrcData, uint32_t uiSize, uint32_t uiOffset, bool bBigEndian) { assert(uiSize + uiOffset <= _uiSize); @@ -81,7 +81,7 @@ void CParameterBlackboard::write(const void* pvSrcData, uint32_t uiSize, uint32_ } } -void CParameterBlackboard::read(void* pvDstData, uint32_t uiSize, uint32_t uiOffset, bool bBigEndian) const +void CParameterBlackboard::readInteger(void* pvDstData, uint32_t uiSize, uint32_t uiOffset, bool bBigEndian) const { assert(uiSize + uiOffset <= _uiSize); @@ -100,6 +100,16 @@ void CParameterBlackboard::read(void* pvDstData, uint32_t uiSize, uint32_t uiOff } } +void CParameterBlackboard::writeString(const char* pcSrcData, uint32_t uiOffset) +{ + strcpy((char*)_pucData + uiOffset, pcSrcData); +} + +void CParameterBlackboard::readString(char* pcDstData, uint32_t uiOffset) const +{ + strcpy(pcDstData, (const char*)_pucData + uiOffset); +} + // Access from/to subsystems uint8_t* CParameterBlackboard::getLocation(uint32_t uiOffset) { |