COVESA/dlt-daemon

How to use DLT LOGGING Inside a function called from main function in QNX ?

Closed this issue · 1 comments

Hi
Can someone share example CPP code to use DLT Logging inside a function called from main function in compiled in QNX environment.

#include <dlt/dlt.h>

DLT_DECLARE_CONTEXT(ctx);

void hello()

{

 // USE DLT LOGGING HERE 

}

int main()

{
  DLT_REGISTER_APP("MOCK", "Test Application for Logging");

  DLT_REGISTER_CONTEXT(ctx, "MC1", "My hello Context 1");

  std::cout << "Publisher main " << std::endl;

  hello();
  DLT_UNREGISTER_CONTEXT(ctx);

  DLT_UNREGISTER_APP();

}

duplicate to #536