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:


pcintfac.cab
Setup.exe
Setup.lst
Readme.txt (this document)
pcintfac.exe(This is the actual program.  Current users can copy this to the current directory(or directories if multiple installations)
  and not have to run the setup program.

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 # This is no longer used in version 1.8.4
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.

Start Of Transaction Frame
This is the control characters that will be at the beginning of the acknowledgement message.  There are
five boxes for this feature.  Each box is for the ASCII number of the desired control character.  For example,
if a carriage return is needed first, then enter the number 13 in the first box.  If no other control
characters are needed besides the carriage return, then enter 0 in the remaining four boxes.  Entering a
zero in a box will cause the program to ignore that box.  Alphanumeric characters are not valid.  If a
non-numeric character is entered into the box, then the value will be set to "0".  The typical interface
setup for start of transaction frame is the Vertical Tab character, or ASCII number 11.  The program will 
have this value when first installed.  The values entered must match the values setup in your interface
protocol.Feel free to email me if you have trouble setting this up.

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.

End Of Transaction Frame
This is the control characters that will be at the end of the acknowledgement message.  There are
five boxes for this feature.  Each box is for the ASCII number of the desired control character.  For example,
if a carriage return is needed last, then enter the number 13 in the first box of the End Of Transaction
Frame section.  If no other control
characters are needed besides the carriage return, then enter 0 in the remaining four boxes.  Entering a
zero in a box will cause the program to ignore that box.  Alphanumeric characters are not valid.  If a
non-numeric character is entered into the box, then the value will be set to "0".  The typical interface
setup for end of transaction frame is the file separator character, or ASCII number 28, followed by the
carriage return, or ASCII number 13.  The program will have these values when first installed.  The values
entered must match the values setup in your interface protocol.  Feel free
to email me if you have trouble setting this up.

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.
# This is no longer used in version 1.8.4
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
************************
I have included the information from a pctestif.ini file below.  If needed, the sample lines below
can be copied to a text file and saved as pctestif.ini.  For the program to use it, it must be in the
same directory as the program.

**Sample pctestif.ini file ***
[RemoteIP]
10.10.10.10

[Port]
1

[AutoStart]
On

[ExitWarning]
False

[MSH before date]
|||||

[MSH after date]
||ACK|||||||||

[MSA Segment]
|AA||||||

[Interface Name]
Interface

[Show Transaction Count]
 0 

[Logfile Location]
C:\TEMP\logfile.txt
[Start of Text]
11
0
0
0
0
[End of Text]
28
13
0
0
0
**End of sample pctestif.ini file ***
************************
Program icons
The program will change its icon, based on what event is happening.  The icons are:
Single computer:  this is the icon when the program starts.  It will change whenever the start button is clicked.
Arrow: this is the icon when the start button is clicked.
Double computers: this is the icon when a connection is made.
Exclamation point: this is the icon when an error occurs.
Stop sign: this is the icon when the stop button is clicked.

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.
**********************************
Version 1.6.8 changes
There was a problem when the transaction count reached 32767.  This has been corrected.
**********************************
Version 1.6.9 changes
Program now checks for invalid values in the IP address and port fields.
**********************************
Version 1.7.0 changes
Increased program flow for hopefully faster speed.
**********************************
Version 1.8.0 changes
Added ability for user to put in a customized Start of Transaction Frame and
End of Transaction Frame
**********************************
Version 1.8.1 changes
Changed port number maximum from 9999 to 99999
**********************************
Version 1.8.2 changes
Changed port number maximum from 99999 to 65535.  This is the maximum number that the port can be in Winsock.
Added code to change the icon, based on the status of the connection.  The icons are:
Single computer:  this is the icon when the program starts.  It will change whenever the start button is clicked.
Arrow: this is the icon when the start button is clicked.
Double computers: this is the icon when a connection is made.
Exclamation point: this is the icon when an error occurs.
Stop sign: this is the icon when the stop button is clicked.
**********************************
Version 1.8.4 changes
The program no longer needs the Remote IP address.