diff options
Diffstat (limited to 'parameter/SubsystemObject.cpp')
-rw-r--r-- | parameter/SubsystemObject.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/parameter/SubsystemObject.cpp b/parameter/SubsystemObject.cpp index f0f1985..ce6275b 100644 --- a/parameter/SubsystemObject.cpp +++ b/parameter/SubsystemObject.cpp @@ -35,6 +35,7 @@ #include <stdlib.h> #include <string.h> #include <sstream> +#include <stdarg.h> CSubsystemObject::CSubsystemObject(CInstanceConfigurableElement* pInstanceConfigurableElement) : _pInstanceConfigurableElement(pInstanceConfigurableElement), @@ -132,7 +133,7 @@ bool CSubsystemObject::receiveFromHW(string& strError) // Fall back HW access bool CSubsystemObject::accessHW(bool bReceive, string& strError) { - // Default access falls back + // Default access fall back if (bReceive) { return receiveFromHW(strError); @@ -160,3 +161,18 @@ void CSubsystemObject::blackboardWrite(const void* pvData, uint32_t uiSize) _uiAccessedIndex += uiSize; } + +// Logging +void CSubsystemObject::log(const string& strMessage, ...) const +{ + char acBuffer[512]; + va_list listPointer; + + va_start(listPointer, strMessage); + + vsnprintf(acBuffer, sizeof(acBuffer), strMessage.c_str(), listPointer); + + va_end(listPointer); + + _pInstanceConfigurableElement->log(acBuffer); +} |