Using wRTOS Message Viewer

This section provides information about the wRTOS Message Viewer user interface. To perform various functions, select the icons on the top toolbar. The logged messages are displayed in the Message View panel at the bottom.

To log messages on the Message Viewer:

  1. Open the Message Viewer.
  1. Use Channel Editor on the toolbar to define message channels and formats. This step is only necessary for Standard and Trace channels. For the Basic channel, please skip this step.
  2. To log messages from the Basic and Standard channels, select Start in General log to begin logging, then choose the channel you want to view from the Channel List drop-down.
  3. To log messages from the Trace channels, select the messages to log in Log Selection, select Start in Trace log to begin logging, then choose the channel you want to view from the Channel List drop-down. Select the Refresh icon to update the screen and display the latest messages.
  4. If you want to display messages from two different channels simultaneously, select Dual from the View drop-down list, and then select a channel for each view.
  1. Start your real-time applications. Use the Debug Message APIs to create message channels and send messages.

Note: If messages are not displayed, check whether the messages have been enabled (see "Enable channel" in Log Selection), or whether the messages have been filtered (see Filter).

Function Icons on the Toolbar

Icons on the Message Viewer toolbar:

Icon Name Description

Start

Stop; Save

The General log displays messages from both the Basic and Standard channels. Select the Start icon to start logging messages. The icon will change to Stop after you select Start. To stop logging messages, select Stop.

Select the Save icon to save the messages in text format files. This icon becomes available after you select the Start icon. When this icon is selected, the Message Viewer continuously saves the messages automatically. When it's not selected, the messages are not saved. To open the storage folder, select Open. To change a storage folder, see "Destination folder" in Settings.

Note: When you select Start, only chosen messages from enabled channels in the Log Selection are written to shared memory first. The Message Viewer then reads and displays these messages in the Message View. To ensure that channels send messages, make sure they are enabled in the Log Selection.

Start

Stop; Save

The Trace log displays messages from the Trace channel. Select the Start icon to start logging messages, then select the Refresh icon to update messages on the screen. The Start icon will change to Stop after you select Start. To stop displaying messages, select Stop.

Select the Save icon to save the messages in CSV format files. This icon becomes available after you select the Start icon. When this icon is selected, the Message Viewer continuously saves the messages automatically. When it's not selected, the messages are not saved. To open the storage folder, select Open. To change a storage folder, see "Destination folder" in Settings.

Note: When you select Start, only chosen messages from enabled channels in the Log Selection are written to shared memory first. The Message Viewer then reads and displays these messages in the Message View. To ensure that channels send messages, make sure they are enabled in the Log Selection.

Open

Select this icon to open the folder that saves the message files. You can change the storage folder or determine the file size and the number of files stored in a folder, see "Log to files" in Settings.

Log selection

Select this icon to choose the messages you want to log (see Log Selection). You can then use the filter function to exclude specific messages from displaying on the Message Viewer (see Filter).

Single; Dual

Select Single from the drop-down list to display messages in a single view. Select Dual from the drop-down list to display messages in a dual view. See View Mode under Message View.

Settings

Select this icon to configure general message settings. See Settings.

Channel Editor

Select this icon to define message formats and their corresponding data structures. See Creating Custom Message Channels using Channel Editor.

Help

Select this icon to display the Message Viewer help.

About

Select this icon to display the information about Message Viewer.

Icons on the View toolbar:

Icon Name Description

Hide; Show

If Dual is selected for view mode, you can use these icons to hide or show the View window.

Channel List

After selecting a view mode, you can select a channel from the drop-down list to display its messages.

Note: Only the enabled channels are displayed on the Channel List. To enable channels, see "Enable channel" in Log Selection.

Error count

Displays the number of general and fatal error messages. You can hover over the icon or numbers to reveal error details.

Warning count

Displays the number of warning messages. You can hover over the icon or numbers to reveal the details.

Refresh

This icon only appears in the Trace channel view. Select it to update the screen and display the latest messages as the Trace channel generates many messages.

Filter

Select this icon to include or exclude specific messages for displaying on the Message Viewer. When the filter is applied, the icon will include a green check mark. See Filter.

Note: The filtered (deselected) messages are hidden from view but remain recorded in the background.

Search

Select this icon to search for specific messages from the view. See Search.

Export

Select this icon to export messages on the view to a text file format. You can use Filter to exclude certain messages from the view and export only the desired ones.

Clear

Select this icon to clear all messages from the view.

Log Selection

You can select messages to be logged using Log Selection. To open the Log Selection window, select Log Selection on the toolbar.

General Channels

In the Log Selection window, select the General Channels tab to enable the desired messages for Basic and Standard channels.

General Messages - Basic channel:

Select a Basic message channel from the left-side pane and then enable the channel and choose message categories or message severities.

Note: Only chosen messages from enabled channels are logged when selecting Start in the General log.

General Messages - Standard channel:

Select a Standard message channel from the left-side pane and then select the Log selection tab to enable the channel and choose message types or sources or select the Message Content tab to choose items to be included in the message.

Select the Log selection tab to enable the channel and choose message types or sources.

Note: Only chosen messages from enabled channels are logged when selecting Start in the General log.

Select the Message Content tab to choose items to be included in the message.

Trace Channels

In the Log Selection window, select the Trace Channels tab, then select a channel. You can then select the Log selection tab to enable the channel, choose message types or sources and specify certain source indexes, or select the Message Content tab to choose items to be included in the message.

Select the Log selection tab to enable the channel, choose message types or sources and specify certain source indexes.

Note: Only chosen messages from enabled channels are logged when selecting Start in the Trace log.

Select the Message Content tab to choose items to be included in the message.

To select messages using Log Selection:

  1. Stop the General or Trace log in advance by selecting the Stop icon.
  2. Open Log Selection, select the General Channels or Trace Channels tab to choose the desired messages for each channel.
  3. Select Apply to save the changes.

Note: After selecting messages, you can use the filter function to exclude specific messages from displaying on the Message Viewer (see Filter).

Message View

Messages sent from real-time applications are displayed in the Message View.

View Mode

You can display messages in a single view or a dual view by selecting Single or Dual from the View drop-down list on the toolbar. To display a channel's messages, select it from the Channel List drop-down.

Note: Only the enabled channels are displayed on the Channel List. To enable channels, see "Enable channel" in Log Selection.

String Messages

Since string interpolation in the messages consumes a significant amount of time in your real-time application, you can use Message Viewer for string interpolation to minimize the impact on your application's performance. The Message Viewer uses standard .NET string formatting to insert the values in the message text. To do this:

formattedMessage = string.Format(pMessage, Value0, Value1, Value2, Value3);

For example, if parameter pMessage is "Error occurred at {0} with code {1}", Value0 is 404 and Value1 is 500, the pMessage will be formatted as "Error occurred at 404 with code 500" on the Message Viewer.

Message Color

By default, the text color of warning, error and fatal messages is red. You can define text color for messages using Channel Editor.

Copy and Synchronization

You can perform the Copy and Synchronization functions on the view. The Copy function can be performed on both Single and Dual views, while the Synchronization function can only be performed on the Dual view. With the Synchronization function, you can synchronize messages from different channels that occur at specific times.

To copy messages and paste them to another location:

  1. Select messages displayed on the view.
  2. Right-click and select Copy.
  3. Paste the copied messages to another location.

To synchronize a message with the closest one in time:

  1. Select Dual from the View drop-down list and choose a channel for each view.
  2. On one view, right-click a message you want to synchronize, then select Sync selection.
  3. The closest message in time on the other view will be highlighted.

Settings

Settings allow you to set up general configurations for messages. To open the Settings window, select Settings on the toolbar.

Filter

You can decide whether to display certain messages by selecting message options, or by entering text. To open the Filter window, select the Filter icon on the toolbar.

The above image shows a filter window opened in a Trace channel view. The content in the filter window differs among Basic, Standard, and Trace channels.

Channel Filter

Select the Channel Filter tab to display certain messages by selecting message options. Messages associated with the selected options will be displayed in the view. In contrast, messages associated with the deselected (filtered) options will be hidden from view but remain recorded in the background.

The check marks appended to the options indicate they are enabled in Log Selection. Only options with check marks are affected by filtering. If you select an option not enabled in Log Selection, it won't be displayed on the Message Viewer.

Text Filter

Select the Text Filter tab if you want to display certain messages by entering text. Enter the text in the Include in results box to include messages containing the entered text. Enter the text in the Exclude from results box to exclude messages containing the entered text. You can enter multiple texts separated by semicolons (e.g., standard; error; 10:50). Casing does not affect the filter results.

Search

You can search for messages by message type or text. Casing does not affect search results. To open the Search panel at the bottom of the window, select the Search icon on the toolbar.

To search for messages:

  1. Select the Search button in the view. The Search panel will appear at the bottom.
  2. Use the search criteria to search for messages.
    1. To search for messages by text, enter the text in the Find box.
    2. To search for text in a specific message type, enter the text in the Find box and select a specific message type from the Type drop-down list.
    3. To search for messages by message type only, leave the Find box blank and select a message type from the Type drop-down list.
    4. If the selected message type is from a Standard or Trace channel, you can select a severity from the Severity drop-down list.
  3. Select the Search button in the Search panel to display the search results.
  4. Double-clicking a certain message in the search results will navigate to the corresponding one in the Message View.