DEComm Interface

Using the Interface

The DEComm interface provides a simple Tcl/Tk interface provided by a loadable module. The source for this module is provided in the acmeServer distribution in the directory DEComm. To load the module in your program use the following code sequence:

#load the dataexchange shared library
#for UNIX must be DEComm.so for Windows DEComm.dll
if {$tcl_platform(platform)=="windows"} {
load DEComm.dll DEComm
} else {
load DEComm.so DEComm
}
source morale.messages.tcl

The library provides the following calls (These are all blocking!):

DEComm Proc Name Parameters Return Value
InitDE portNumber hostName If successful returns channel number 0-5. If unsuccessful, returns -1.
SendDEMessage channelNumber messageType param1 param2 Allows you to send a basic_msg to the server on a channel
GetDEMessage channelNumber Allows you to receive a basic_msg from the server on a channel
SendDELongMessage channelNumber messageType param1 param2 param3 param4 param5 param6 Allows you to send a long5_msg to the server on a channel
GetDELongMessage channelNumber Allows you to receive a long5_msg from the server

Compiling the Interface

The DEComm library is built automatically using make in UNIX. For Win32 apps, make a project in the IDE and include the file tcldll.c. Be sure your include and library directories are set to the Dataexhange and PBIO libraries. The file is already set to create a .so file under UNIX and a .dll file under Windows.

[Previous] [Table of Contents]