ToolTalk User's Guide

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


Contents of Appendix:
A.1 - The ttce2xdr Script
A.2 - Converting the User Database
A.3 - Converting the System Database
A.4 - Converting the Network Database

Note: In versions 1.1 and later of the ToolTalk service, ttsession will not read its types from the Classing Engine (CE) database; and the ToolTalk types compiler tt_type_comp will not merge types into the CE database.

This appendix describes how to migrate your existing ToolTalk-aware application from the CE database to the ToolTalk Types database.

A.1 The ttce2xdr Script

The ToolTalk service provides a script called ttce2xdr to convert ToolTalk types stored in the CE database (which was the default database used by versions 1.0.x of the ToolTalk service) to the XDR-format database, which is the database used by versions 1.1 and later of the ToolTalk service.

A.2 Converting the User Database

The first time a ToolTalk version 1.1.x ttsession is started, the user type database is automatically converted from the CE database to the new ToolTalk Types database. However, you can manually convert the current user database with the command:


ttce2xdr [ -xnh ] -d user
Table A-1 describes the options for the ttce2xdr script.

Table A-1 ttce2xdr Script Options

The types are read from the CE database

    ~/.cetables/cetables

and written to the new ToolTalk Types database

    ~/.tt/types.xdr

A.3 Converting the System Database

A system CE database is the per-machine database. You will need to run the ttce2xdr script on each machine on which you have ToolTalk types. To determine whether there are any ToolTalk types in the system CE database, enter the following command on the command line:


tt_type_comp -Epd system
No output is generated if there are no ToolTalk types in the system CE database.


Note: You must be logged in as root to run the ttce2xdr script for the system CE databases.

To run the ttce2xdr script for the system CE database, enter the following commands on the command line:


ttce2xdr [ -xnh ] -d system
Table A-2 describes the options for the ttce2xdr script.

Table A-2 ttce2xdr Script Options

The types are read from the CE database

    /etc/cetables/cetables

and written to the new ToolTalk Types database

    /etc/tt/types.xdr

A.4 Converting the Network Database

A network CE database is the per-OW-installation database. You need to convert each network CE database that has ToolTalk types other than those shipped with the OpenWindows Version3TM product.


Note: You must be logged in as root to run the ttce2xdr script for the network CE databases.

To convert a network-wide database, enter the following command on the command line:


ttce2xdr [ -xnh ] -d network [ OPENWINHOME-from [ OPENWINHOME-to ]]
Table A-3 describes the options for the ttce2xdr script.

Table A-3 ttce2xdr Script Options

The types are read from the CE database

    $OPENWINHOME/lib/cetables/cetables

and written to the new ToolTalk Types database

    $OPENWINHOME/etc/tt/types.xdr

To move ToolTalk types other than the ones shipped with the OpenWindows Version 3 product from the network CE database to the network XDR database, enter the following command on the command line:


ttce2xdr -d network <old_OPENWINHOME> <new_OPENWINHOME>
where <old_OPENWINHOME> is the OpenWindow installation that holds the old network CE database and <new_OPENWINHOME> is the OpenWindow installation in which to update the ToolTalk XDR database.



Generated with CERN WebMaker