SemysTraceSetListener

01 Register (or unregister) a user provided SemysTraceOutput function with this function.
02

void SemysTraceSetListener(SemysTraceOutput pListener);

03 Parameters:
  • pListener: Pointer to a SemysTraceOutput function (or 0).
04 This function sets the internal function pointer used by SemysTrace().
This internal function pointer is initially 0.
05 The output function may be set outside the context specified by SemysLibInit() and SemysLibDeinit().
06 Note that the internal function pointer is not secured by a mutex object.
It is expected that the output function is set once at the beginning of the application and possibly at the end to 0, where the existence of any worker threads within Semys Library is clear to be none.
07 Example:
void TraceLib(char const *text)
{
  printf("%s\n", text);
}

void main(void)
{
  SemysTraceSetListener(TraceLib);
  SemysLibInit();

  SemysTrace("DBG Hello World!");

  SemysLibDeinit();
  SemysTraceSetListener(0);
}
08 Reference: SemysTrace.h
Implementation: Semys Library
See Also: Trace Sub-System, SemysTrace(), SemysTraceOutput()

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.