User Programmable Client Interface to EpicClient
================================================

With effect from Version 1.05 EpicClient can be run on a PC without an EPIC
card installed. This is not much use on its own, as it cannot do anything.
However, additional facilities are provided to allow QP and PH events to be
originated from a user-written program instead of the EPIC (or as well as
the EPIC if there is an EPIC card installed).

If no EPIC is installed, the fact is logged, but EpicClient doesn't close.
It just discards messages from the Server, and doesn't attempt to scan the
non-existent EPIC for Enque16 data.

QP and PH data to be sent to the Server is provided to EpicClient by
messages sent specifically to the Epicclient main window. It processes three
new messages:

	WM_EPICQP for a QP event
	WM_EPICPH for PH data
	WM_EPICDU for a Display Update*

These WM_ names equate to WM_USER+1, +2 and +3 respectively. i.e. in C:

	#define WM_EPICQP (WM_USER+1)
	#define WM_EPICPH (WM_USER+2)
	#define WM_EPICDU (WM_USER+3)

Send the messages using either PostMessage or SendMessageTimeout. The data
required is placed into the wParam and lParam parameters, as follows:

QP	wParam = QP number, lParam is ignored
PH	wParam = PH number, the 4 bytes of PH data are in lParam.
DU	wParam = Display Number, 2 bytes (16 bits) of display value in lParam.

The window handle (hwnd) used should be the one for the main EpicClient
window. To obtain this you use the FindWindowEx call, looking for the window
title "Client for LAN-connected EPICs", or enumerating top-level windows
looking for the window class "EpicClientMain".

EpicClient saves all received requests ready for its next 'packet' to the
server (in a maximum of 55msecs time). Up to 8k bytes of data can be saved
between each packet, so there should be no danger of an overload.

Note that the QP and PH numbers received by EpicClient in this way are still
subject to the same filtering as those from an EPIC card. To get them sent
to the Server, they must be added via the [Inlcude] section of your INI
file.

* Direct display updates are not currently supported by the EpicLink protocol,
so don't use the WM_EPICDU message. It is present here for possible future
expansion.


Pete Dowson
5th July 2000
=============
