summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/examples/dlt-example-user.c5
-rwxr-xr-xsrc/system/dlt-system.c4
-rwxr-xr-xsrc/tests/dlt-test-user.c5
3 files changed, 7 insertions, 7 deletions
diff --git a/src/examples/dlt-example-user.c b/src/examples/dlt-example-user.c
index ad4e654..a4203a8 100755
--- a/src/examples/dlt-example-user.c
+++ b/src/examples/dlt-example-user.c
@@ -244,7 +244,7 @@ int main(int argc, char* argv[])
DLT_REGISTER_APP("LOG","Test Application for Logging");
DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging");
- DLT_REGISTER_INJECTION_CALLBACK(mycontext, 0xFFF, dlt_user_injection_callback);
+ DLT_REGISTER_INJECTION_CALLBACK(mycontext, 0x1000, dlt_user_injection_callback);
text = message;
@@ -361,11 +361,12 @@ int main(int argc, char* argv[])
int dlt_user_injection_callback(uint32_t service_id, void *data, uint32_t length)
{
char text[1024];
-
+ DLT_LOG(mycontext, DLT_LOG_INFO, DLT_STRING("Injection: "), DLT_UINT32(service_id));
printf("Injection %d, Length=%d \n",service_id,length);
if (length>0)
{
dlt_print_mixed_string(text,1024,data,length,0);
+ DLT_LOG(mycontext, DLT_LOG_INFO, DLT_STRING("Data: "), DLT_STRING(text));
printf("%s \n", text);
}
diff --git a/src/system/dlt-system.c b/src/system/dlt-system.c
index 13be32d..b04cdfb 100755
--- a/src/system/dlt-system.c
+++ b/src/system/dlt-system.c
@@ -517,7 +517,7 @@ int dlt_user_injection_callback(uint32_t service_id, void *data, uint32_t length
{
case 0x1001:
/* Execute shell command */
- //DLT_LOG(shellContext, DLT_LOG_INFO, DLT_STRING("Execute command:"), DLT_STRING(text));
+ DLT_LOG(shellContext, DLT_LOG_INFO, DLT_STRING("Execute command:"), DLT_STRING(text));
printf("Execute command: %s\n",text);
if((syserr = system(text)) != 0)
{
@@ -525,7 +525,7 @@ int dlt_user_injection_callback(uint32_t service_id, void *data, uint32_t length
}
break;
default:
- //DLT_LOG(shellContext, DLT_LOG_WARN, DLT_STRING("Unknown command received! Service ID:"), DLT_UINT32(service_id),DLT_STRING("Command:"),DLT_STRING(text));
+ DLT_LOG(shellContext, DLT_LOG_WARN, DLT_STRING("Unknown command received! Service ID:"), DLT_UINT32(service_id),DLT_STRING("Command:"),DLT_STRING(text));
printf("Unknown command received! Service ID: %u Command: %s\n",service_id,text);
break;
}
diff --git a/src/tests/dlt-test-user.c b/src/tests/dlt-test-user.c
index 4e26d9d..be4e654 100755
--- a/src/tests/dlt-test-user.c
+++ b/src/tests/dlt-test-user.c
@@ -1016,10 +1016,9 @@ int test_injection_macro_callback(uint32_t service_id, void *data, uint32_t leng
char text[1024];
memset(text,0,1024);
-
snprintf(text,1024,"Injection received (macro IF). ID: 0x%.4x, Length: %d",service_id,length);
printf("%s \n", text);
-
+ DLT_LOG(context_macro_callback, DLT_LOG_INFO, DLT_STRING("Injection received (macro IF). ID: "), DLT_UINT32(service_id),DLT_STRING("Data:"),DLT_STRING(text));
memset(text,0,1024);
if (length>0)
@@ -1039,7 +1038,7 @@ int test_injection_function_callback(uint32_t service_id, void *data, uint32_t l
snprintf(text,1024,"Injection received (function IF). ID: 0x%.4x, Length: %d",service_id,length);
printf("%s \n", text);
-
+ DLT_LOG(context_function_callback, DLT_LOG_INFO, DLT_STRING("Injection received (function IF). ID: "), DLT_UINT32(service_id),DLT_STRING("Data:"),DLT_STRING(text));
memset(text,0,1024);
if (length>0)