TOPCAT is able to communicate with other tools using one or other of two messaging protocols:
SAMP and PLASTIC do much the same job as each other, and work in much the same way. SAMP is an evolution of PLASTIC with a number of technical improvements, and so PLASTIC is now deprecated in favour of SAMP. It is not necessary for users to understand the differences between the two, but in general a tool using SAMP can communicate with other tools using SAMP, and the same with PLASTIC, but in most cases interoperation between PLASTIC and SAMP tools will not work.
The communication architecture of the two protocols is basically the same: all tools communicate with a central "Hub" process, so a hub must be running in order for the messaging to operate. If a hub is running when TOPCAT starts, or if one starts up while TOPCAT is in operation, it will connect to it automatically. A hub can be started from within TOPCAT if required - details of how to do this are given in the SAMP and PLASTIC sections below. Other tools will have their own policies for connecting to the hub, but in general it is a good idea to start a hub first before starting up the tools which you want to talk to it.
TOPCAT can work in either SAMP or PLASTIC mode, but not both at once.
It determines which mode to use at startup:
-plastic flag is supplied
on the command line the corresponding mode will be used;
otherwise if a running SAMP or PLASTIC hub can be found,
the corresponding mode is used, otherwise it defaults to SAMP.
It is easy to tell which mode is being used by looking at the
in SAMP mode the SAMP panel displaying connection
and message status is visible at the bottom of the right hand panel
(there are a few other changes to the GUI as well).
Facilities for communications monitoring are considerably better in
SAMP than in PLASTIC mode.
This communication has two aspects to it: on the one hand TOPCAT can send messages to other applications which causes them to do things, and on the other hand TOPCAT can receive and act on such messages sent by other applications. The sent and received messages are described separately in the subsections below. There are also sections on the, somewhat different, ways to control and monitor messaging operatiion for the cases of SAMP and PLASTIC.