This section describes all functions available in CP290CE.EXE and how to use them. It is only intended for people who want to write their own client program to interface to the Comm Engine.

The Comm Engine acts as a server between the CP290 and H2MAIN.EXE or any other client program. It handles CP290 house, device and function code translation by accepting commands like A1 ON and translating them to the required hex code for the CP290 to understand. These functions and their code format are described in the Programmer's manual of the CP290.

Before the Comm Engine functions can be used within your own REXX program, you must load X10LDLL.DLL and setup a pipe. See the section on X10LDLL Function Description for information on that subject.

The command format for the Comm Engine is as follows:

Note: Curly brackets are used to separate out the various error flags, commands and data. This helps in parsing the data and also indicates which way the commands are flowing. Opening brackets indicate that the commands flow from the Comm Engine to the client and closing brackets indicates the flow from the client to the Comm Engine.

Sending command to the Comm Engine: }command options

The closing curly bracket indicates that the following command is sent from the client to the Comm Engine. The command instructs the Comm Engine what operation is to be performed on the Comm Engine itself or on the CP290. Sample commands are ID0, CONNECT, MINIMIZE etc.

The options contain data to set the CP290 or the Comm Engine. Sample options are the actual base house code when setting the CP290 house code or timer information like 128 NORM UMTWHFS 14:02 A 1&2&3&4&16 ON 0 when programming the CP290 timers.

Receiving command from the Comm Engine: {XX }command {Y {data

Commands sent out to the client by the Comm Engine are a reply to a command received by the Comm Engine. The original command is returned with the reply in most cases. Because all commands placed on the pipe will be buffered, and can therefore be queued to be processed later, it allows for easier command identification.

The XX indicates any possible errors the previous command encountered. For example, a zero indicates no error, a one indicates an unsupported command. The error field is always padded to two digits and the next closing curly bracket is always at position five.

The command following the closing curly bracket is the original command that requested this reply.

The value of Y may either be zero or one and represents the CP290 status bit value of the ACK MESSAGE. From the Programmers Manual it states: The STATUS bit is reset to 0 during power up of the Interface and is set to 1 by download of data from the computer (any commands like ID0, ID1, ID2 or ID3). The STATUS bit is used to warn the computer that the interface has been powered down.

For more details on the command structure and samples, see each individual command as listed below.

ID0 - Set Base House Code

ID1 - Direct command (instant on /off)

ID2 - Set Interface Clock

ID3 - Event/graphics upload to interface

ID4 - Request Clock and Base House Code

ID5 - Request Timer Events

ID7 - Diagnostics

ID8 - Clear All Timers


Comm Engine STATUS

Comm Engine SETPORTCOMx

Comm Engine CONNECT

Comm Engine DISCONNECT

Comm Engine CLOSE

Comm Engine SHOW

Comm Engine MINIMIZE