summaryrefslogtreecommitdiff
path: root/AudioManagerUtilities/src
diff options
context:
space:
mode:
authorJens Lorenz <jlorenz@de.adit-jv.com>2015-10-06 09:52:55 +0200
committerChristian Linke <christian.linke@bmw.de>2015-10-06 19:28:39 +0100
commita2567bc1e0d3d5521f2a135f96baffa8779b4ea8 (patch)
treea421d978423fc4108d9b7f8bda45ce67960d3e60 /AudioManagerUtilities/src
parent276ec7d3e207f089cf9cd1dd375bf8508fc4cde3 (diff)
downloadaudiomanager-a2567bc1e0d3d5521f2a135f96baffa8779b4ea8.tar.gz
Utility DLT: Created template parameter pack to generate recursive code and added logDebug
Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
Diffstat (limited to 'AudioManagerUtilities/src')
-rw-r--r--AudioManagerUtilities/src/CAmDltWrapper.cpp100
1 files changed, 1 insertions, 99 deletions
diff --git a/AudioManagerUtilities/src/CAmDltWrapper.cpp b/AudioManagerUtilities/src/CAmDltWrapper.cpp
index 149edcd..33baa46 100644
--- a/AudioManagerUtilities/src/CAmDltWrapper.cpp
+++ b/AudioManagerUtilities/src/CAmDltWrapper.cpp
@@ -25,7 +25,6 @@
#include "CAmDltWrapper.h"
#include <string>
-#include <sstream>
#include <iostream>
#include <string.h>
@@ -227,22 +226,9 @@ void CAmDltWrapper::append(const uint32_t value)
#endif
}
-void CAmDltWrapper::append(const char*& value)
-{
-#ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, value);
-#else
- mDltContextData.buffer << value;
-#endif
-}
-
void CAmDltWrapper::append(const std::string& value)
{
-#ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, value.c_str());
-#else
- mDltContextData.buffer << value;
-#endif
+ append(value.c_str());
}
void CAmDltWrapper::append(const bool value)
@@ -272,90 +258,6 @@ void CAmDltWrapper::append(const uint64_t value)
#endif
}
-void CAmDltWrapper::append(const am_Error_e value)
-{
- switch (value)
- {
- case am_Error_e::E_OK:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_OK");
- #else
- mDltContextData.buffer << "E_OK";
- #endif
- break;
- case am_Error_e::E_ABORTED:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_ABORTED");
- #else
- mDltContextData.buffer << "E_ABORTED";
- #endif
- break;
- case am_Error_e::E_ALREADY_EXISTS:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_ALREADY_EXISTS");
- #else
- mDltContextData.buffer << "E_ALREADY_EXISTS";
- #endif
- break;
- case am_Error_e::E_DATABASE_ERROR:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_DATABASE_ERROR");
- #else
- mDltContextData.buffer << "E_DATABASE_ERROR";
- #endif
- break;
- case am_Error_e::E_NON_EXISTENT:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_NON_EXISTENT");
- #else
- mDltContextData.buffer << "E_NON_EXISTENT";
- #endif
- break;
- case am_Error_e::E_NOT_POSSIBLE:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_NOT_POSSIBLE");
- #else
- mDltContextData.buffer << "E_NOT_POSSIBLE";
- #endif
- break;
- case am_Error_e::E_NOT_USED:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_NOT_USED");
- #else
- mDltContextData.buffer << "E_NOT_USED";
- #endif
- break;
- case am_Error_e::E_NO_CHANGE:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_NO_CHANGE");
- #else
- mDltContextData.buffer << "E_NO_CHANGE";
- #endif
- break;
- case am_Error_e::E_OUT_OF_RANGE:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_OUT_OF_RANGE");
- #else
- mDltContextData.buffer << "E_OUT_OF_RANGE";
- #endif
- break;
- case am_Error_e::E_UNKNOWN:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_UNKNOWN");
- #else
- mDltContextData.buffer << "E_UNKNOWN";
- #endif
- break;
- default:
- #ifdef WITH_DLT
- dlt_user_log_write_string(&mDltContextData, "E_UNKNOWN");
- #else
- mDltContextData.buffer << "E_UNKNOWN";
- #endif
-
- }
-}
-
void CAmDltWrapper::append(const std::vector<uint8_t> & data)
{
#ifdef WITH_DLT