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
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 |
setEmulatorMake the Emulator known to the Agent -- so the Agent can display text etc. on the Emulator.
Arguments:
| emu | Unknown |
Return type: the empty List ()
setContainerMake 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:
| container | Unknown |
Return type: the empty List ()
connectConnect 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:
name - a simple string (containing no colons) which is
taken to be the name of a configured service
modules:attribValues - where modules is a
comma-separated list of comms modules and
attribValues is a comma separated list of
attribute=value pairs. The type of the value
is determined as follows:
Arguments:
| address | String |
Return type: the empty List ()
connectionStateReturn the state of the current connection. Possible return values are:
Disconnected
Connecting
Connected
Disconnecting
Arguments: none
Return type: String
disconnectDisonnect from the service.
Arguments: none
Return type: the empty List ()
writeWrite data to the service.
Arguments:
| data | String |
Return type: the empty List ()
execScriptExecute the supplied Carapace script.
Arguments:
| script | String |
Return type: Object
uiComponentStore a reference to a UI component -- eg. a button on the web page.
Arguments:
| name | String |
| uiObject | Dispatch |
Return type: the empty List ()
| Contents | Index | Current topic: communications | Related topics: communications classes, objects |