This documentation is for the PCInterfaceTest.  It can be used with OPENLink to test interface connectivity.  There should be four files in the PCI.ZIP file:

PCInterfaceTest.cab
Setup.exe
Setup.lst
Readme.txt (this document)

Unzip the zip file into an empty directory.  Run the setup program and follow the prompts.
Note:  This program adds nothing to the Windows registry.  It was created this way so that multiple instances can be run on the same PC, as long as it is installed in a different directory for each occurrence.

See the notes on advanced installation if you wish to run multiples instances of the program on a PC.

Main Screen

Boxes
Interface Status
Shows if the interface is connected.

Start Date and Time
Shows the date and time the interface was last started.

Counter
Shows the number of transactions received.

Date and Time of Last ACK
Shows the date and time of last ACK sent

ACK String Sent
Show the ACK string sent

Remote IP Address
The IP address of the OPENLink server.

Remote Port
The port number used for the interface.

Local IP Address
The IP Address of the local PC

Local Port
The port number of the local PC.  This number will automatically change if the Remote port number is changed.

Receive
The data received will display in the Receive window.

Buttons

Start Interface
This button will start the interface.

Stop Interface
This button will stop the interface.

Exit
This button will Exit the program.

Edit
This button is used to edit the Remote IP and port numbers.  The Edit button will not be active if the interface is connected.  After clicking the Edit button, the cursor will appear in the Remote IP Address box.  Type in the IP number for your OPENLink server.  Press the Tab key to tab the cursor to the Remote port box.  Type in the number of the port that you will be using.  Click the Save button to save the changes.  The interface can now be restarted.

Save
This button will save any changes made to the Remote IP and port boxes.

Menu Selections

File -> Start Interface
Same as the Start button.

File -> Stop Interface
Same as the Stop button.

File -> Exit
Same as the Exit button.

Options -> Automatic Start
The Automatic Start feature will start the interface automatically when the program is started.  To cut the feature on, click on Options in the menu bar, and then click on Automatic Start.  A check should appear beside the Automatic Start.  The Automatic Start message at the top of the window should be "Automatic Start is ON".  To turn the automatic start off, follow the same procedure.  The message should then read "Automatic Start is OFF".  This feature is very useful if you wish to add the PCInterfaceTest program to the Windows Startup, and have the interface started automatically on reboots.

Options -> Show Warning Box Before Exit
If this is checked, a box will appear when the program is exited, which will ask
the question "Do you wish to exit PCInterface?".

Options->Edit Remote Settings
Same as the Edit button.

Options->Save Remote Settings
Same as the Save button.

Options ->Setup
This will open the Setup window.  See the Setup window section of this document.

Help-> About
About PCInterfaceTest

Setup window
To go to the Setup window, click on Options, then Setup.  The interface must be stopped before this selection can be made.

Text Boxes
---------
Interface Name
The name of the interface.  This name will be display at the top of the PCInterfaceTest window.  The maximum number of characters is 18.

Show Transaction Count
If checked, the number of transactions received will show with the Interface Name.

Logfile Location
This is the location of the text file in which the received data will be stored.  The default name is logfile.txt, and the default directory is the same directory in which the PCInterfaceTest program resides.  When the box is clicked, the Open File window will appear.  The file can then be selected from it.

ACK information before date
This box is used to build the ACK string.  The data in the box will be after .MSH|^~\&  , and before the date in which the ACK was generated.

ACK information after date
This box is used to complete the build of the ACK string.  The data in the box will appear after the date in which the ACK was generated.

MSA Segment Definition
This box is used to complete the build of the MSA segment for the ACK.  

*** Note on ACK boxes:  If you do not know how to set these up, then leave them out of the
PCTESTIF.INI file.  The program will automatically create the entries.


Buttons
---------

Edit
This button is clicked to change any of the settings.

Save
This button is clicked to save any changes made.

Exit
This button is clicked to exit the Setup window and return to the main window.


All setup information is saved in a program called PCTESTIF.INI.  The program will look for this file in the same directory as the program itself.
If the PCTESTIF.INI file is not found, it will create one.  The INI file can be edited
with any text editor.  It has the following entries:

[RemoteIP] This is the IP address of the interface engine that the test interface will be connecting to.
0.0.0.0

[Port] This is the port that is assigned by the interface engine.  In OPENLink 21, this is in 
the interface object.  In OPENLink 23, this is in the connection.
9999

[AutoStart] This flag tells PCInterface to start or not start the interface when the program
is started.
Off

[ExitWarning] This flag tells PCInterface to display or not display the exit box.
True

[MSH before date] This is the data read in for the MSH before date text box.
|||||

[MSH after date]This is the data read in for the MSH after date text box.
||ACK|||||||||

[MSA Segment] This is the data read in for the MSA Segment text box.
|AA||||||

[Interface Name] This is the data read in for the title box of the program.
Interface

[Show Transaction Count] This tells the program to include or not include the number of
transactions in the title bar.  0 is no, 1 is yes.
 0 

[Logfile Location] This is the location of the logfile.
logfile.txt

************************
Multiple installations
-------------------------
The program can be installed numerous times on the same PC, and can run simultaneaously if the right setup information is entered.

To installed the program a second time, run the Setup program again.  Instead of selecting the directory C:\Program Files\PCInterfaceTest, select a new directory, such as C:\Interfaces\Interface2.  The program will then be installed into the directory C:\Interfaces\Interface2.  When the Setup asks for the Startup folder name, create a new folder, such as Interface2.  The folder Interface2 will be created in Windows Start Programs.  It can be run at the same time as the one in Start Programs PCInterfaceTest.  If the program is copied from the Interface2 directory to the Windows Startup directory, it will run automatically when Windows starts.  More than one occurrence can be copied to the Windows Startup folder.  However, if this done, be sure to give each interface a different name in order to determine which is which.

If you need more detailed instructions or wish to request program changes or make suggestions, please feel free to contact me.

Tim Lewis
twlewis@softhome.net

*********************************
Version 1.6 changes

The MSH and MSA segments are now broken apart.  The ACK problem was corrected.  The 1C and 0D characters were
added to the message framing.  No changes should have to be made in the protocol of the interface
engine.

The Options -> Show Warning Box Before Exit menu item was added to allow the user to bypass the
exit box.

The program now checks for a PCTESTIF.INI file.  If one is not found, it can create one.  It can 
also fix one that contains errors.  It will keep whatever sections that it can keep, and 
add the default parameters to any that do not exist.  It will update any PCTESTIF.INI file 
from the previous version of PCInterface, without overwriting the existing entries, such as
IP address and port.

The program now automatically attempts a reconnect if the connection is broken on the
side of the interface engine.
*********************************
Version 1.6.2 changes
The program now includes an informational logfile that tells when the program was started and stopped,
when the connection was started and stopped, and when the connection was dropped.  The informational
file is called "ifreport.txt".  It will be in the same directory as the interface.

Messages in ifreport.txt file are:

Program started. - The interface program was started.
Start requested. - Start was requested by either clicking the "Start Interface"
   button, or automatically if the automatic switch is on.
Stop requested.  - Stop was requested by either clicking the "Stop Interface" button.  If the program
   was exited without stopping, then the "Stop requested" message will not appear in the
   ifreport.txt file.
Connection was stopped. - The "Stop Interface" button was clicked, and the interface was closed.
Program was ended. - The program was terminated by either clicking the "Exit" button, or by
   closing the program using the Windows X.
Connection closed. Reconnect will be attempted. - The connection was lost through some type of
   network connectivity problem.
Listening for connection. - The interface is actively waiting to connect back to the
   interface engine.
Connection established. - The interface successfully connected.

There was a bug in which the program could not handle a network disconnect.  It would display a
message box with the number 10048 in it.  After the OK button was clicked on the
message box, the program would close.  This has been fixed.  In the event of a network
problem, the program will close communication, reopen communication, and wait for a
connection.  It puts the message "Connection closed" in the ifreport.txt file.

The program window now opens in the center of the Windows desktop instead of on the right side.

There was a bug in which the program would display a message box saying "File already open" if
the program ended abnormally.  This has been corrected.
**********************************
Version 1.6.3 changes
The problem with the message "File already open" was addressed and corrected.
**********************************
Version 1.6.5 changes
Corrected file error message.