Common Desktop Environment: ToolTalk Messaging Overview

3 Using TTSnoop to Debug Messages and Patterns


Contents of Chapter:
About TTSnoop
Where to Find TTSnoop
Starting TTSnoop
Composing and Sending Messages
Composing and Registering Patterns
Displaying Message Components
Sending Pre-Created Messages
Receiving Messages
Stop Receiving Messages
TTSnoop is a tool provided to create and send custom-constructed ToolTalk messages. You can also use TTSnoop as a tool to selectively monitor any or all ToolTalk messages.

About TTSnoop

TTSnoop is a useful interactive tool that you can use to become familiar with TookTalk concepts and API calls as well as to perform demonstrations. In addition, TTSnoop is a valuable debugging tool when you are developing applications.

You can use TTSnoop to monitor for messages that match more than one pattern. When a matched message is displayed, the name of the pattern that matched the entry can also be displayed.

You can add, edit, or delete messages and patterns to scrollable lists. TTSnoop allows the definitions of multiple patterns and messages to be saved and loaded from files. You can also define, save, and reload patterns and messages particular to a category of applications (for example, DeskSetTM tools) as well as associate messages and patterns with a user-defined name.

Where to Find TTSnoop

The TTSnoop program resides in the directory /usr/dt/bin/ttsnoop.

Starting TTSnoop

To start the program, enter the following command on the command line:

ttsnoop [ -t ] 

The -t option displays the ToolTalk API calls that are being used to construct a particular pattern or message. Table 3-1 describes the buttons that are displayed when TTSnoop starts.

Table 3-1 TTSnoop Buttons


Note: To obtain help for individual buttons and settings, place the mouse over the button or setting and click the F1 key or Help key on your keyboard.

Composing and Sending Messages

When you click the Messages button on the main display window, a display panel containing the choices shown in Table 3-2 is displayed.

Table 3-2 Message Button Display Window Options

Composing and Registering Patterns

When you click the Patterns button on the main display window, a display panel is displayed.

Click the Apply button to register your pattern. Once a pattern is registered, you can use TTSnoop as a debugging tool to observe what messages are being sent by other applications.

Click the Edit Receive Contexts button to add, change, and delete receive message contexts in patterns. The window displayed enables you to edit contexts to be registered with your patterns.

Displaying Message Components

When you click the Display button on the main display window, a display panel of checkboxes is displayed.

When you select a checkbox and click the Apply button, the specified ToolTalk message component is displayed until you make another selection and apply the change.

Sending Pre-Created Messages

When you click the Send Message button on the main display window, you can send one of the messages you created and stored using the Messages display.

Receiving Messages

When you click the Start button on the main display window, TTSnoop will display any incoming messages that match the patterns you registered.

Stop Receiving Messages

When you click the Stop button on the main display window, TTSnoop will stop receiving messages.



Generated with CERN WebMaker