|
Editing Existing Links
To edit an existing link, select the required
link in the "Configured Links" list in the main program screen and click "Edit
Link" or via the main menu: Tools -> Edit Link. You can also move a link
from one group to another by editing the link, changing its group and saving the
link
Removing Links
To
remove an existing link, select the required link in the "Configured Links" list
in the main program screen and click "Remove Link" or via the main menu: Tools
-> Remove Link
Showing and Hiding the contents of a group in the group
Groups are shown in the groups
list view. Each group has a tick box with it. Tick the box to show the links
which are parts of the group in the links list view. Untick the box to hide the
links which are part of this group in the links list view.
Sorting Links
It is currently possible to sort
links within a selected group by Link name or by status columns. To perform
sorting operation select first link in the required group and click the header
of either the link name or the status column.
Port Configuration Options
Port configuration
options presented in New Link and Edit Link dialog boxes are explained
here:
▪
"Activate on Save" -
check to apply port settings on clicking "Save" button. Port shall be
disconnected and reconnected with the new settings. If these button is
unchecked, some of the options will be saved but will not take effect
until the port is manually disconnected and re-connected (with "Activate
Port x", "Deactivate Port x" buttons.
▪
"Port Type" - select port
type from the list "Serial/COM" or "TCP/UDP"
▪
"COM Port" - select COM
port number from the list (from COM1 to COM32), applicable and displayed
only if Port Type is "Serial/COM"
▪
"Baud Rate" - select COM
port speed from the list (110 to 256000 baud), applicable and displayed
only if Port Type is "Serial/COM"
▪
"Data Bits" - select COM
port data bits from the list (5,6,7 or 8), applicable and displayed only
if Port Type is "Serial/COM"
▪
"Parity" - select COM
port parity from the list (even, mark, none, odd, space), applicable and
displayed only if Port Type is "Serial/COM"
▪
"Stop Bits" - select COM
port stop bits from the list (1, 1.5, 2), applicable and displayed only
if Port Type is "Serial/COM"
▪
"IP Protocol Type" -
select IP protocol from the list (TCP or UDP), applicable if port type is
TCP/UDP
▪
"IP Protocol Type" -
select IP protocol from the list (TCP or UDP), applicable if port type is
TCP/UDP
▪
"Client or Server" -
select client or server mode, applicable if port type is TCP/UDP and
protocol is TCP.
▪
"IP Port Number" - TCP or
UDP port number. The meaning of this parameter depends on the setting of the
port type, IP Protocol and client / server mode. For Port type : Serial /
COM this setting is not applicable. For port type TCP/UDP and IP protocol
TCP: if client mode is selected, IP port Number is the remote port number to
connect to. If the server mode is selected, IP port number is the port to
listen incoming TCP connection. If IP protocol is UDP, the IP Port Number is
used for both outgoing and incoming traffic.
▪
"Remote IP address
or domain name" - remote IP address for client mode, applicable if port
type is TCP/UDP and protocol
▪
"Forward instantly
on data receive" - data received on this port will be immediately
forwarded to another interconnected port on the same link
▪
"On Buffer Full, Buf
Size" - if checked, the data received in this port shall be stored in a
forwarding buffer until it becomes full. When the buffer is full the
contents of the buffer is forwarded to interconnected port on the same link.
Specify buffer size for the forwarding buffer
▪
"Interchar Timeout
(ms)" - if checked, data received on this port will be forwarded to another interconnected port on the same link
if inter-character timer specified in milliseconds has expired, in other
words no characters have been received since the last character for the
specified amount of time. This option can be used together with "On Buffer
Full" option.
▪
"On frame end
character" - if checked the data received on this port is continuously
monitored for the frame end character selected from the list. If the frame
end character not detected, the data is stored into the forwarding buffer.
If forwarding buffer is full the buffer is sent to interconnected port. If
the frame end character is detected, the content of the buffer accumulated
so far is sent to interconnected port. This option can be used together with
"On Buffer Full" and "Interchar Timeout" options.
▪
"Auto Re-connect in
secs" - if checked, the port will periodically attempt to auto
reconnect if it becomes disconnected. Specify time in seconds between
auto-reconnect attempts.
▪
"Port Loopback (Echo
Received Data)" - if checked, the data received on this port will be sent
back out immediately.
▪
"Generate Traffic (Send
Buffer)" - if checked, a data buffer will be sent out on this port
periodically. Check "Hex" or "Ascii" radio button to select preferred entry
format and then enter data to be sent in the data box. Enter traffic
generation interval in milliseconds in the edit bo below.
Activating and Deactivating
Ports
To manually activate
or deactivate port, first select a link in the links list in the main
program screen, then click "Activate Port x" or "Deactivate Port x" to
perform the necessary action.
Status and Statistics
Link and port status
are shown in the configured links list in the "Status" column and in the
"Selected Link Stats" list box when a link is selected.
Diagnostics
▪
Sending Buffers Manually: To send a buffer over any configured port,
first select a link and then click "Send Buffer". In the "Send Buffer"
dialog box, select outgoing port from the list, select data format (Ascii
or HEX), enter data in the edit box, if necessary click "Append CR" to
add carriage return character 0x0d to the end of buffer and click
"Send".
▪
Event Log: all important events are shown in the event log list view
together with corresponding timestamps. If you check the checkbox "Log
Events to File" the same events are also appended to the end of disk
file named "event.log" in the program's working directory
▪
Data Trace: if enabled by checking checkbox "Enable Tracing", all
incoming and outgoing data is logged in the trace window along with
timestamp Port information, direction (receive or transmit) length of
data and first several bytes of data in ASCII or HEX format. ASCII
or HEX format is selected with the corresponding check boxes "Hex" and "Ascii".
The contents of the trace window can be cleared by clicking "Clear
Trace" button. The trace is also saved to disk file "trace.log" if the
checkbox "Log Trace to File" is checked.
Advanced Configuration
▪
Maximum number of links: The program is capable of loading and operating a large
number of links. The total number of links possible is limited by configuration
parameter max_links in file hstcp2com.ini. You must set this parameter to the
maximum expected number of links you will use, before starting the application.
Example: max_links=2000 sets maximum number of links to 2000.
▪
Configuration files: groups and links configuration are stored by the program in
CSV format in two files groups.csv and links.csv. The configuration parameter of
links and groups can be set from within the program at run time or manually by
editing CSV files from Microsoft Excel and pertaining to the format expected by
the program.
On bootup the
program reads in these files and creates groups and links which are member of
the groups.
▪
First line in each csv file is ignored, because it is
assumed to be a header text for each column, designating the meaning of each
colomn
▪
Files can be edited in excel and saved to as csv
▪
Parameter values (columns) must be separated by ',' (comma)
character.
▪
Each line (row) must be terminated with CR LF pair (0x0d
0x0a), including the last row in the file
▪
Double quotes are not permitted, only ',' are accepted as
separators
▪
String parameters, such as link name or comment are must not
contain comma characters
Links.csv row has
the following format (each column described below):
- group id - decimal
group id (for example 0, 1 or 2), must be a valid group present in groups.csv
file (explaned later)
- link name - link
name string
- link comment - link
comment string
- port 1 type -
decimal code representing port type, 0=serial; 1=IP
- port 1 com port -
decimal COM port number (zero based, i.e 0=COM1)
- port 1 baud rate -
decimal COM port speed code (0=110, 1=300, 2=600, 3=1200, 4=2400, 5=4800,
6=9600, 7=14400, 8=19200;
9=38400;10=56000;11=57600;12=115200;13=128000;14=256000
- port 1 databits -
decimal code - number of bits for COM port 0=5, 1=6, 2=7, 3=8
- port 1 parity -
decimal code - parity for COM port - 0=even, 1=mark, 2=none, 3=odd, 4=space
- port 1 stop bits -
decimal code - stop bits for COM port - 0=1, 1=1.5, 2=2
- port 1 use hardware
flow control - 0=no, 1=res
- port 1 IP protocol
- 0=TCP, 1=UDP
- port 1 role =
0=client, 1=server
- port 1 IP port =
decimal IP port
-
port 1 remote ip = remote IP address string or hostname
- port 1 remote ip = remote IP address string (currently this
is the same as the above column)
- port 1 instant forward = 1=forward buffer instantly on receive, 0=no
- port 1 forward on buffer full = 1=yes, 0=no
- port 1 forward on timeout = 1=yes, 0=no
- port 1 forward on char = 1=yes, 0=no
- port 1 forwarding buffer size, decimal value
- port 1 inter-character timeout, decimal value
- port 1 frame ending character, decimal value of ascii character
- port 1 auto-reconnect = 1=yes, 0=no
- port 1 auto reconnect interval, decimal value
- port 1 activate on save = 1=yes, 0=no
- port 1 trace enabled = 1=yes, 0=no
- port 1 loopback enabled = 1=yes, 0=no
- port 1 generate traffic = 1=yes, 0=no
- port 1 is hex = hex or ascii buffer format for traffic generation 1=hex, 0=ascii
- port 1 traffic gen buffer = traffic generation string
- port 1 length of traffic generation buffer, decimal value
- port 1 traffic generation interval, decimal valu
- After that, same parameters for port 2 are repeated starting from port type
Groups.csv has the following format
- Name - group name, string
- state - 1=show links which are members of this group in links view, 0=hide links
which are members of this group
- group id = decimal group id
|