Common Desktop Environment: ToolTalk Messaging Overview

Chapter 3 Using TTSnoop to Debug Messages and Patterns

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 ToolTalk 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

Button 

Description 

Start 

Click this button to activate message reception. TTSnoop will display any incoming messages that match the patterns you register.  

Stop 

Click this button to stop receiving messages.  

Clear 

Click this button to clear the window. 

About TTSnoop 

Click this button to obtain general help for TTSnoop.  

Display 

Click this button to display a panel of checkboxes to highlight specific ToolTalk message components on the TTSnoop display subwindow.  

Messages 

Click this button to display a panel that enables you to create, store, and send ToolTalk messages.  

Patterns 

Click this button to display a panel that enables you to compose and register ToolTalk patterns.  

Send Messages 

Click this button to send messages that were stored using the Messages display. 


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

Button 

Description 

Add Message 

Click this button to store the current message settings. Once the messages are stored, you can recall and send these messages using the Send Message button on the main display window. 

Edit Contexts 

Click this button to add, change, and delete send message contexts. The display window displayed allows you to edit contexts to be sent with your messages. 

Send Message 

Click this button to send the newly created message.  

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.