Previous Up Next

Chapter 6  Remote Tcl Interface

This chapter describes the remote Tcl interface, which allows a separate external Tcl program to interact with ECLiPSe in much the same fashion as the embedding Tcl interface (see chapter 5). Like the embedding interface, Tcl and ECLiPSe code communicates by sending and receiving streams of bytes via I/O queues (the ec_rpc mechanism is implemented on top of these queues). The interface can thus be used in similar fashion to the embedding interface, e.g. for the development of graphical user interfaces to an ECLiPSe application, with the difference that the ECLiPSe program is a separate program and not embedded into the Tcl program.

The main features of the interface are: The remote interface thus offers more flexibility than an embedding interface in how the Tcl code can be connected to an ECLiPSe program. However, as the Tcl and ECLiPSe processes are not as tightly coupled as in an embedded interface, the speed of communications between the Tcl and ECLiPSe processes is likely to be slower.

Currently, Tcl is the only language available for connecting to ECLiPSe remotely. However, it is expected that remote interfaces for other languages will become available in future releases of ECLiPSe.

The ECLiPSe side may be more complicated than a simple ECLiPSe, as it can be an embedded ECLiPSe, or the ECLiPSe process and other attached remote processes.
Instead of remote_connect/3, the more flexible remote_connect_setup/3 and remote_connect_accept/6 pair of predicates can be used. See the reference manual entries for these predicates for more details.
See section 5.8 for more on EXDR format
For compatibility with previous versions of the embedded Tcl interface, the mode can also be specified as r (equivalent to fromec) or w (equivalent to toec). These can be somewhat confusing as read/write status depends on from which side the queue is viewed (a read queue in ECLiPSe is a write queue in Tcl).

Previous Up Next