Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

HP ToolTalk Programmer's Guide

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

HP Part Number: B1171-90163

Published: August 1997


Table of Contents

Preface
Who Should Use This Guide
How This Manual Is Organized
Related Documentation
What DocBook SGML Markup Means
Shell Prompt Characters
1 Introducing the ToolTalk Service
What Kind of Work Problems Can the ToolTalk Service Solve?
Tool Inter-changeability
Control Integration
Network-Transparent Events
Automatic Tool Invocation
Distributed-Object System
Persistent Objects
ToolTalk Scenarios
Using the ToolTalk Desktop Services Message Set
Using the ToolTalk Document and Media Exchange Message Set
How Applications Use ToolTalk Messages
Sending ToolTalk Messages
Message Patterns
Receiving ToolTalk Messages
ToolTalk Message Distribution
Process-Oriented Messages
Object-Oriented Messages
Determining Message Delivery
Modifying Applications to Use the ToolTalk Service
2 ToolTalk Service Overview
ToolTalk Architecture
Starting a ToolTalk Session
Background and Batch Sessions
X Window System
Locating ttsession
Maintaining ToolTalk Files and Databases
Demonstration Programs
3 Setting Up and Maintaining the ToolTalk Processes
Location of the ToolTalk Service Files
Version
Environment Variables
ToolTalk Environment Variables
Other Environment Variables
Using Context Slots to Create Environment Variables
Installing the ToolTalk Database Server
When the ToolTalk Service is Installed Elsewhere on the System
Running the New ToolTalk Database Server
Redirecting the ToolTalk Database Server
Redirecting the Host Machine
Redirecting the File System Partition
4 Maintaining Application Information
Installing Application Types
Examining ToolTalk Type Information
Removing ToolTalk Type Information
Updating the ToolTalk Service
Process Type Errors
Using TTSnoop to Debug Messages and Patterns
About TTSnoop
How to Run TTSnoop
How to Turn Tracing On and Off
How to Create a Message
How to Run TTSnoop
How to Generate a List of ToolTalk Actions
5 Maintaining Files and Objects Referenced in ToolTalk Messages
ToolTalk-Enhanced Shell Commands
Maintaining and Updating ToolTalk Databases
Displaying, Checking, and Repairing Databases
6 Participating in ToolTalk Sessions
The ToolTalk Libraries
Including the ToolTalk API Header File
Registering with the ToolTalk Service
Registering in the Initial Session
Registering in a Specified Session
Registering in Multiple Sessions
Setting Up to Receive Messages
Sending and Receiving Messages in the Same Process
Sending and Receiving Messages in a Networked Environment
Unregistering from the ToolTalk Service
7 Sending Messages
How the ToolTalk Service Routes Messages
Sending Notices
Sending Requests
Changes in State of Sent Message
Message Attributes
Address Attribute
Scope Attributes
Serialization of Structured Data
ToolTalk Message Delivery Algorithm
Process-Oriented Message Delivery
Object-Oriented Message Delivery
Otype Addressing
Modifying Applications to Send ToolTalk Messages
Creating Messages
Adding Message Callbacks
Sending a Message
Examples
8 Message Patterns
Message Pattern Attributes
Scope Attributes
Scoping Only to a Session
Context Attributes
Disposition Attributes
9 Dynamic Message Patterns
Defining Dynamic Messages
Creating a Message Pattern
Adding a Message Pattern Callback
Registering a Message Pattern
Deleting and Unregistering a Message Pattern
Updating Message Patterns with the Current Session or File
Joining Multiple Sessions
10 Static Message Patterns
Defining Static Messages
Defining Process Types
Signatures
Creating a Ptype File
Defining Object Types
Installing Type Information
Checking for Existing Process Types
Ptypes
Declaring Process Type
Undeclaring Process Types
11 Receiving Messages
Retrieving Messages
Identifying and Processing Messages Easily
Recognizing and Handling Replies Easily
Checking Message Status
Examining Messages
Callback Routines
Callbacks for Messages Addressed to Handlers
Handling Requests
Replying to Requests
Rejecting or Failing a Request
Rejecting a Request
Failing a Request
Destroying Messages
12 Objects
Object-Oriented Messaging
Object Data
Creating Object Specs
Writing Object Specs
Updating Object Specs
Maintaining Object Specs
Examining Spec Information
Comparing Object Specs
Querying for Specific Specs in a File
Moving Object Specs
Destroying Object Specs
Managing Object and File Information
An Example of Object-Oriented Messaging
13 Managing Information Storage
Information Provided to the ToolTalk Service
Information Provided by the ToolTalk Service
Calls Provided to Manage the Storage of Information
Marking and Releasing Information
Allocating and Freeing Storage Space
Special Case: Callback and Filter Routines
14 Handling Errors
Retrieving ToolTalk Error Status
Checking ToolTalk Error Status
Returned Value Status
Returned Pointer Status
Returned Integer Status
Broken Connections
Error Propagation
Initialization Error Messages
ToolTalk Error Messages
15 The ToolTalk Enumerated Types
Tt_address
Tt_callback
Tt_category
Tt_class
Tt_disposition
Tt_filter
Tt_mode
Tt_scope
Tt_state
Tt_status
16 The ToolTalk Functional Groupings
Initialization Functions
Message Patterns
Ptypes
Sessions
Files
Messages
ToolTalk Storage Management
ToolTalk Error Status
Exiting
ToolTalk Error-Handling Macros
Miscellaneous ToolTalk Function
17 ToolTalk Functions/Commands
ToolTalk Functions
Miscellaneous ToolTalk Functions
Tooltalk Commands
18 Using ToolTalk Messaging
Telling Your Application about ToolTalk Functionality
Using the Messaging Toolkit and Including ToolTalk Commands
Using the ToolTalk Libraries
Before You Start Coding
What Is the Difference Between an Event and an Operation?
Developing a Scenario
Preparing Your Application for Communication
Creating a Ptype File
Tasks Every ToolTalk-aware Application Needs to Perform
Tasks ToolTalk-aware Editor Applications Need to Perform
Optional Tasks ToolTalk-aware Editor Applications Can Perform
19 The Messaging Toolkit
General Description of the ToolTalk Messaging Toolkit
Toolkit Conventions
Using the Messaging Toolkit When Writing Applications
Accepting Desktop Requests
Registering for Standard Desktop Messages
20 ToolTalk Message Sets
General ToolTalk Message Definitions and Conventions
Errors
General ToolTalk Development Guidelines and Conventions
Always Make Anonymous Requests
Let Tools Be Started as Needed
Reply When Operation has been Completed
Avoid Statefulness Whenever Possible
Declare One Process Type per Role
Developing ToolTalk Applications
The ToolTalk Desktop Services Message Set
Why the ToolTalk Desktop Services Message Set was Developed
Key Benefits of the ToolTalk Desktop Services Message Set
General Description of the ToolTalk Desktop Services Message Set
Desktop Definitions and Conventions
Errors
The ToolTalk Document and Media Exchange Message Set
Why the ToolTalk Document and Media Exchange Message Set was Developed
Key Benefits of the ToolTalk Document and Media Exchange Message Set
General Description of the ToolTalk Document and Media Exchange Message Set
Media Exchange Definitions and Conventions
Errors
A Frequently Asked Questions
Questions Answered
What is the ToolTalk service?
What files are part of the ToolTalk service?
Where is the initial X-based ttsession started?
Where are the ToolTalk type databases stored?
Do I need X Windows to use the ToolTalk service?
Can I use the ToolTalk service with MIT X?
Where is the session id of the X-session?
How does tt_open connect to a ttsession?
After calling tt_open, when does a session actually begin?
If another session is attached, does the first session get killed?
How can processes on different machines communicate using the ToolTalk service?
What is the purpose of tt_default_session_set?
How can a process connect to more than one session?
Can you start a ttsession with a known session id?
What information does a session id contain?
Is there a standard way to announce that a new program has joined a session?
Where is my message going?
What is the basic flow of a message?
What happens when a message arrives to my application?
How can I differentiate between messages?
Can a process send a request to itself?
Can I pass my own data to a function registered by tt_message_callback_add?
How can I send arbitrary data in a message?
Can I transfer files with the ToolTalk service?
How are memory (byte) ordering issues handled by the ToolTalk service?
Can I re-use messages?
What happens when I destroy a message?
Can I have more than one handler per message?
Can I run more than one handler of a given ptype?
What value is disposition in a message?
What are the message status elements?
When should I use tt_free?
What does the ptype represent?
Why are my new types not recognized?
Can I declare a ptype that is not in the types database?
Is ptype information used if a process of that ptype already exists?
Can the ptype definition be modified to always start an instance (whether or not one is already running)?
What does tt_ptype_declare do?
What is TT_TOKEN?
When are my patterns active?
Must I register patterns to get replies?
How can I observe requests?
How do I match to attribute values in static patterns?
Why am I unable to wildcard a pattern for TT_HANDLER?
Can I set a pattern to watch for any file scoped message?
Is file scope in static patterns the same as file_in_session scope?
What is the difference between arg_add, barg_add, and iarg_add?
What is the type or vtype in a message argument?
How do I use contexts?
How does ttsession check for matches?
How many kinds of scope does the ToolTalk service have?
What are the tt_db directories, and what is the difference between the types database and the tt_db directories?
What should the tt_db databases contain?
What does rpc.ttdbserver do?
Do ttsession and rpc.ttdbserver ever communicate?
What message bandwidth can be supported?
Is there a limit to the message size or the number of arguments?
What is the most time efficient method to send a message?
What network overhead is involved?
Does the ToolTalk service use load balancing to handle requests?
What resources are required by a ToolTalk application?
What happens if the ttsession exits unexpectedly?
What happens if rpc.ttdbserver exits unexpectedly?
What happens if a host or a link is down?
What does tt_close do?
Is message delivery guaranteed on a network?
Is there a temporal sequence of message delivery?
What is unix, xauth, and des?
Can my applications hide messages from each other?
Is there protection against interception or imitation?
Where are queued messages stored and how secure is the storage?
Is the ToolTalk service C2 qualified?
How can I trace my message's progress?
How can I isolate my debugging tool from all the other tools using the ToolTalk service?
Can I use the ToolTalk service with C++?
Should I qualify my filenames?
Can you tell me about ToolTalk objects?
Is there a ToolTalk news group?
Glossary

List of Tables

DocBook SGML Markup
Shell Prompt Characters
2-1 ttsession Command Line Options
3-1 Environment Variables
4-1 XDR-base Format ToolTalk Types Table
5-1 ToolTalk-Enhanced Shell Commands
5-2 ToolTalk-aware shell commands in .cshrc
6-1 Registering with the ToolTalk Service
6-2 Code Used to Watch for Arriving Messages
7-1 ToolTalk Message Attributes
7-2 Scoping a Message with Patterns to a File
7-3 Scoping Mechanisms for Messages
7-4 Functions Used to Create Messages
7-5 Functions Used to Complete Messages
8-1 ToolTalk Message Pattern Attributes
8-2 Static Session-Scoped Pattern
8-3 Dynamic Session-Scoped Pattern with a File Attribute
8-4 Static File-Scoped Pattern
8-5 Dynamic File-Scoped Patter
8-6 Adding a Session to the TT_FILE_IN_SESSION-Scoped Pattern
8-7 Joining a Session to Set the Session of a TT_FILE_IN_SESSION-Scoped Pattern
8-8 Setting the Scope Value for a TT_FILE_IN_SESSION Static Pattern
8-9 A Dynamic Pattern that Uses the TT_BOTH Scope
8-10 A Static Pattern that Uses the TT_BOTH Scope
8-11 Adding Two File Attributes to a Session-Scoped Pattern
9-1 Functions for Creating, Updating, and Deleting Message Patterns
9-2 Functions Used to Create Messages
9-3 ToolTalk Functions for Joining Files of Interest
10-1 ToolTalk Functions for Joining Files of Interest
10-2 Undeclaring a Ptype
11-1 Functions to Examine Message Attributes
11-2 Functions to Reply to Requests
11-3 Rejecting or Failing Requests
12-1 Functions to Examine Message Attributes
12-2 Functions to Maintain Object Specifications
12-3 Functions to Copy, Move, or Remove Files that Contain Object Data
12-4 ToolTalk-Wrapped Shell Commands Data
13-1 Managing ToolTalk Storage
14-1 Retrieving ToolTalk Error Status
14-2 Retrieving ToolTalk Error Status
14-3 Retrieving ToolTalk Error Status
14-4 Title not available (ToolTalk Error Messages)
14-5 Alphabetical List of ToolTalk Error Messages
14-6 ToolTalk Error Messagess
15-1 Possible Values for Tt_address
15-2 Possible Values for Tt_callback
15-3 Possible Values for Tt_category
15-4 Possible Values for Tt_class
15-5 Possible Values for Tt_disposition
15-6 Possible Values for Tt_filter
15-7 Possible Values for Tt_mode
15-8 Possible Values for Tt_scope
15-9 Possible Values for Tt_state
16-1 Initializing and Registering with the ToolTalk Service
16-2 Creating, Filling In, Registering, and Destroying Message Patterns
16-3 Declaring, Undeclaring, and Checking Ptypes
16-4 Expressing Interest in Sessions
16-5 Managing Session Information
16-6 Expressing Interest in Files
16-7 Managing Files
16-8 Creating Messages
16-9 Filling In Messages and Replies
16-10 Examining Messages
16-11 Sending and Destroying Messages
16-12 Receiving, Replying to, Rejecting, and Destroying Messages
16-13 Creating, Moving, and Destroying Objects
16-14 Using ToolTalk Storage
16-15 Examining Object Type Information
16-16 Managing ToolTalk Storage
16-17 Retrieving ToolTalk Error Information
16-18 Encoding Error Values
16-19 Leaving the ToolTalk Session
16-20 ToolTalk Error-Handling Macros
16-21 Miscellaneous ToolTalk Functions
17-1 ToolTalk Functions and Descriptions
17-2 Miscellaneous ToolTalk Functions
17-3 ToolTalk Functions and Descriptions
19-1 ToolTalk Messaging Toolkit Functions
19-2 Miscellaneous ToolTalk Functions
20-1 Document and Media Exchange Message Set Descriptions
20-2 The ToolTalk Desktop Services Message Set
20-3 Values Associated with Fields
20-4 Desktop Services Error Messages
20-5 ToolTalk Desktop Services Message Set
20-6 ToolTalk Document and Media Exchange Message Set
20-7 Standard Media Types
20-8 ToolTalk Document and Media Exchange Message Set
A-1 Title not available (Frequently Asked Questions)
A-2 ToolTalk Files
A-3 Default Locations of ToolTalk Types Database
A-4 Default Locations of ToolTalk Types Database
A-5 How ttsession Checks for Matches
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.