[genivi-dlt] DLT function interface shows strange behaviour

Helwing, Lutz Lutz_Helwing at mentor.com
Thu Jul 27 09:14:30 EDT 2017


Hi again,

a little update:

when using the macro interface the same behaviour can be observed:

#include <iostream>

#include <dlt/dlt.h>

DLT_DECLARE_CONTEXT(ctx0)
DLT_DECLARE_CONTEXT(ctx1)

int main()
{
    DLT_REGISTER_APP("ABCD", "This is the application known as ABCD");

    DLT_REGISTER_CONTEXT_LL_TS(ctx0,
                               "CTX0",
                               "some context of application ABCD",
                               DLT_LOG_VERBOSE,
                               DLT_TRACE_STATUS_OFF);

    DLT_REGISTER_CONTEXT_LL_TS(ctx1,
                               "CTX1",
                               "some OTHER context of application ABCD",
                               DLT_LOG_VERBOSE,
                               DLT_TRACE_STATUS_OFF);

    DLT_LOG(ctx0, DLT_LOG_INFO, DLT_STRING("The answer is"), DLT_INT(42));
    DLT_LOG(ctx1, DLT_LOG_INFO, DLT_STRING("The question is"),
DLT_FLOAT32(4.2f));

    DLT_UNREGISTER_CONTEXT(ctx1);
    DLT_UNREGISTER_CONTEXT(ctx0);

    DLT_UNREGISTER_APP();

    return 0;
}

On 27.07.2017 14:23, Helwing, Lutz wrote:
> Hi DLT community,
> 
> I have found a problem while writing a simple DLT test programme using
> the function interface.
> 
> When I run a tiny test application once the output stops at some point.
> When I run it the second time the missing output from the last run is
> logged before the output of the current run. Notice the "rewinded"
> timestamps. None of the used DLT functions return an error.
> This happens just occasionally when repeatedly running the programme. No
> other application logs to DLT.
> 
> See the test application's source code attached. Also attached are
> snippets from the DLT log that illustrate the problem and the cmake
> flags used for building DLT. Also attached is a snippet taken from the
> journal which shows dlt-daemon output with Debug information. Skip the
> first two successful tries here. When the error occurs the journal
> contains this entry:
> 
> "Jul 27 14:10:24 dem-lhelwing-ubuntu DLT[7967]: [81948.963456]~DLT~
> 7967~WARNING  ~Can't send current log level as response to
> dlt_daemon_process_user_message_register_context for (ABCD;CTX1)"
> 
> The dlt-daemon is running on my local machine.
> Output of "dlt-receive -a localhost" and DLT Viewer is the same.
> 
> DLT version: 2.16.0
> DLT Viewer version: 2.18.0 STABLE
> 
> Am I doing something wrong when using the DLT library or is it a problem
> in DLT itself? It would be great to hear your ideas.
> 
> Thank you very much.
> 
> Kind regards
> Lutz
> 
> 
> 
> _______________________________________________
> genivi-diagnostic-log-and-trace mailing list
> genivi-diagnostic-log-and-trace at lists.genivi.org
> https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace
> 

-- 
Mentor A Siemens Business

Lutz Helwing, Senior Engineer, Mentor Embedded
Mentor Graphics Development (Deutschland) GmbH, Arnulfstrasse 201, 80634
Muenchen, Germany
Lutz_Helwing at mentor.com | office: +49(89)57096-297

http://www.mentor.com

Mentor Graphics Development (Deutschland) GmbH
Geschaeftsfuehrung: Daniel Trebes, Hanns Windele

Handelsregister: Amtsgericht Freiburg i.Br., HRB 705237
Sitz der Gesellschaft: Peterzeller Strasse 8, 78048 Villingen-Schwenningen
USt-Id Nummer: DE268786819
	
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by return e-mail and destroy all
copies of the original message. 	


More information about the genivi-diagnostic-log-and-trace mailing list