JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
ToolTalk User's Guide
search filter icon
search icon

Document Information

Preface

1.  Introducing the ToolTalk Service

2.  An Overview of the ToolTalk Service

3.  Message Patterns

4.  Setting Up and Maintaining the ToolTalk Processes

5.  Maintaining Application Information

6.  Maintaining Files and Objects Referenced in ToolTalk Messages

7.  Participating in ToolTalk Sessions

8.  Sending Messages

How the ToolTalk Service Routes Messages

Sending Notices

Sending Requests

Sending Offers

Changes in State of Sent Message

Message Attributes

Address Attribute

Scope Attributes

File Scope

File-based Scoping in Patterns

File-based Scoping in Messages

Session Scope

File-In-Session Scope

Serialization of Structured Data

ToolTalk Message Delivery Algorithm

Process-Oriented Message Delivery

Example

Object-Oriented Message Delivery

Example

Otype Addressing

Modifying Applications to Send ToolTalk Messages

Creating Messages

Using the General-Purpose Function to Create ToolTalk Messages

Class

Address

Scope

Op

Args

Creating Process-Oriented Messages

Creating and Completing Object-Oriented Messages

Adding Message Callbacks

Sending a Message

Examples

9.  Dynamic Message Patterns

10.  Static Message Patterns

11.  Receiving Messages

12.  Objects

13.  Managing Information Storage

14.  Handling Errors

A.  Migrating from the Classing Engine to the ToolTalk Types Database

B.  A Simple Demonstration of How the ToolTalk Service Works

C.  The ToolTalk Standard Message Sets

D.  Frequently Asked Questions

Glossary

Index

Examples

illustrates how to create and send a pnotice.

Example 8-5 Creating and Sending a Pnotice

    /*
    * Create and send a ToolTalk notice message
    * ttsample1_value(in int <new value)
    */

    msg_out = tt_pnotice_create(TT_SESSION, “ttsample1_value”);
    tt_message_arg_add(msg_out, TT_IN, “integer”, NULL);
    tt_message_arg_ival_set(msg_out, 0, (int)xv_get(slider, 
        PANEL_VALUE));
    tt_message_send(msg_out);

    /*
    * Since this message is a notice, we don't expect a reply, so
    * there's no reason to keep a handle for the message.
    */

    tt_message_destroy(msg_out);

illustrates how an orequest is created and sent when the callback routine for cntl_ui_hilite_button is called.

Example 8-6 Creating and Sending an Orequest

/*
 * Notify callback function for `cntl_ui_hilite_button'.
 */
void
cntl_ui_hilite_button_handler(item, event)
    Panel_item        item;
    Event        *event;
{
    Tt_message        msg;
    
    if (cntl_objid == (char *)0) {
        xv_set(cntl_ui_base_window, FRAME_LEFT_FOOTER,
         “No object id selected”, NULL);
        return;
    }
    msg = tt_orequest_create(cntl_objid, “hilite_obj”);
    tt_message_arg_add(msg, TT_IN, “string”, cntl_objid);
    tt_message_callback_add(msg, cntl_msg_callback);
    tt_message_send(msg);
}