Carapace

Emulator Communications Agent

The Carapace Emulator is simply a display device for displaying Videotex (and, eventually, for displaying other protocols as well!). The Emulator delegates all communications to a 'communications agent' object.

This page describes the methods which such a communications agent must offer in order to be used by the Emulator.

A simple communications agent is supplied with Carapace: when registered with COM, it has the following progID:


    Carapace.SimpleEmuCommsAgent

Agent Requirements

For a COM object to be usable as an Emulator communications agent, it must have the following methods and properties on its dispatch interface:

name method or property description
protocol property String which is set to hold the particular protocol being used
setEmulator method make the Emulator known to the Agent -- so the Agent can display text etc. on the Emulator
setContainer method make the Container known to the Agent -- so the Agent can update the Container (eg. modify the appearance of the Web page if embedded in InternetExplorer)
connect method connect to the service
connectionState method return the state of the current connection
disconnect method disconnect from the service
write method write data to the service
execScript method execute the supplied Carapace script
uiComponent method give the comms agent acccess to UI component -- eg. a button on the web page


setEmulator

Make the Emulator known to the Agent -- so the Agent can display text etc. on the Emulator.

Arguments:

emuUnknown

Return type: the empty List ()


setContainer

Make the Container known to the Agent -- so the Agent can update the Container (eg. modify the appearance of the Web page if embedded in InternetExplorer).

The Agent can then use the container method on the Unknown object to get the Dispatch interface for the container. This dispatch interface can then be used to control the container.

If Microsoft's web browser InternetExplorer is used as the OLE container, then this dispatch interface is used to modify the appearance of the web page on which this object is embedded -- click here for details.

Arguments:

containerUnknown

Return type: the empty List ()


connect

Connect to the service. The supplied string is the address for the service. The default comms agent supplied with Carapace requires the address to be in one of the following formats:

Arguments:

addressString

Return type: the empty List ()


connectionState

Return the state of the current connection. Possible return values are:

Arguments: none

Return type: String


disconnect

Disonnect from the service.

Arguments: none

Return type: the empty List ()


write

Write data to the service.

Arguments:

dataString

Return type: the empty List ()


execScript

Execute the supplied Carapace script.

Arguments:

scriptString

Return type: Object


uiComponent

Store a reference to a UI component -- eg. a button on the web page.

Arguments:

nameString
uiObjectDispatch

Return type: the empty List ()


Contents Index Current topic: communications Related topics: communications classes, objects