Debug messages

KINGSTAR Analysis Console displays the traffic data among KINGSTAR Subsystem, hardware, and user applications to help you find problems. From KINGSTAR 4.1, you are able to display your own messages in Analysis Console. This allows you to monitor the change of some customized values. In this section you'll learn how to set and get names for your log messages, and display them in KINGSTAR Analysis Console.

Functions

DebugMessage: sends the KINGSTAR log messages to KINGSTAR Analysis Console.

GetCategoryName: gets a string assigned to a log ID.

SetCategoryName: sets a string to associate to a log ID.

Code

We break the steps down into a few parts so you can easily learn how each function works.

Before we start, in Log.cpp, add the following function. We include the header wchar.h because wide characters will be used. We are writing code in the DebugMessages function.

NOTE:  Some header files overlaps with others in different sections.

Copy
#include "RT_Project_01.h"
#include <wchar.h>

int DebugMessages()
{
    RtPrintf("Display customized messages in Analysis Console.\n\n");
    return 0;
}

Topics