Introduction

The TdvCmdRouter is an application which receives requests through RS-232 or TCP/IP, and forwards them to user-defined destinations. When a response is received, TdvCmdRouter forwards it back to the correct requester.

The TdvCmdRouter is a part of the TORDIVEL SOFTWARE SOLUTIONS.

TdvCmdRouter is copyright of TORDIVEL AS 2001.

24 January 2002, Oslo, Norway.

More information is found in the RS232TdvCmdProtocol and IMTdvCmdProtocol help files.

Help Index

•	Using the program

•	The protocol

•	Command line interface


The protocol

Command	Request	Response	Comment
Show	Show; Value=<Hide|Normal|Status>	ShowResponse; Status=<Visible|Hidden>	This request is only valid when received on the port configured in the Command Interface tab.
VersionInformation	GetVersion	GetVersionResponse; Version=<Version_str>	This request is only valid when received on the port configured in the Command Interface tab.
<Command>	<Command>; <Routing>=<n>	<CommandResponse>; <Value>=<n>; <Value>=<n>; <Value>=<n>	This request is valid when received by the port configured in the Router-In tab (either RS-232 or TCP/IP). It is forwarded through the port corresponding to the tag in the Routing table tab. The response is received by the port configured in the Router-Out tag, and forwarded back to the correct requester.


Using the program

The program consists of the following:

•	Communication

•	Configuration

•	About

Example of user scenarios:

•	RS232 to TCP/IP multiplexer

•	RS232 to TCP/IP converter

•	IMTdvCmdProtocol Spy


Communication

Messages which are sent and received are shown in the log.


Configuration

The name of the configuration file has to be defined, either as a command line parameter, or by entering it manually.

The following needs to be configured:

•	Router

o	Router – In configuration

•	RS-232

•	TCP/IP

o	Router – Out configuration

o	Routing table

•	Command interface


Router – In configuration, RS-232

Tick the Activate RS-232 communication radio button if requests are to be received through RS-232. The port must be configured correctly.

If the checkbox is ticked, requests without routing information are sent to the remote computer indicated on the Router – Out tab.


Router – In configuration, TCP/IP

Tick the Activate TCP/IP communication radio button if requests are to be received through TCP/IP. The port must be configured correctly.

If the checkbox is ticked, requests without routing information are sent to the remote computer indicated on the Router – Out tab.


Router – Out configuration

The forwarded requests and responses are sent and received on the port configured on the Router – Out tab. Tick the checkbox to enable communication.


Router configuration – Routing table

When a request is received it is forwarded to the IP-address and port corresponding to the received item.


Command interface

Configure the port and tick the checkbox to enable communication. Received requests are not forwarded, and the response is sent directly back to the requester.


About

Pressing the Licence information button brings up the application’s licence settings.


Licence information


Command Line Interface

When starting the application from the command line the configuration file can be passed as a parameter. If not, a warning is issued, and the user must enter the file manually.

If the user wants the application to start hidden, the parameter “-hide” can be passed as a second parameter.

The syntax is:

> TdvCmdRouter.exe <filename.ini> -hide


RS-232 to TCP/IP multiplexer

To configure the TdvCmdRouter to act like an RS-232 to TCP/IP mulitplexer, do the following:

•	On the Router – In tab:

o	Deactivate Send messages without routing information to remote computer

o	Activate RS-232 communication

•	On the Router – Out tab:

o	Activate TCP/IP communication

•	On the Routing Table tab:

o	Define Items with routing information, the IP address and port of the receiving computers

To test the multiplexer:

•	Open the RS232TdvCmdProtocol test application which follows this packet, and configure the port so that it can send to the TdvCmdRouter.

•	Open more than one instance of the IMTdvCmdProtocol test application which follows this packet

o	Set Remote to the TdvCmdRouter - Out IP address and listen port in all the instances.

o	Set Listen port to unique ports.

•	Send messages with routing information from the RS232TdvCmdProtocol test application.

An example of the configuration is shown below.


RS-232 to TCP/IP converter

To configure the TdvCmdRouter to act like a RS-232 to TCP/IP converter, do the following:

•	On the Router – In tab:

o	Activate Send messages without routing information to remote computer

o	Activate RS-232 communication

o	Configure the port

•	On the Router – Out tab:

o	Activate TCP/IP communication

o	Set Remote to the IP address and port of the receiving computer

To test the converter:

•	Open the RS232TdvCmdProtocol test application which follows this packet, and configure the port so that it can send to the TdvCmdRouter.

•	Open the IMTdvCmdProtocol test application which follows this packet

o	Set Remote to the TdvCmdRouter - Out IP address and listen port

o	Set Listen port to then TdvCmdRouter - Out remote port

An example of the configuration is shown below.


IMTdvCmdProtocol Spy

To configure the TdvCmdRouter to act like an IMTdvCmdProtocol Spy, do the following:

•	On the Router – In tab:

o	Activate Send messages without routing information to remote computer

o	Activate TCP/IP communication

•	On the Router – Out tab:

o	Activate TCP/IP communication

o	Set Remote to the IP address and port of the receiving computer

To test the Spy:

•	Open two instances of the IMTdvCmdProtocol test application which follows this packet

•	Configure on of them as a sender:

o	Set Remote to the TdvCmdRouter - In IP address and listen port

o	Set Listen port to then TdvCmdRouter - In remote port

•	Configure the other as a receiver:

o	Set Remote to the TdvCmdRouter - Out IP address and listen port

o	Set Listen port to then TdvCmdRouter - Out remote port

An example of the configuration is shown below.


TORDIVEL SOFTWARE SOLUTIONS

TORDIVEL AS Software House is developing a portfolio of Windows NT/2000 software components and solutions with the following properties:

•	Simple and easy to use

•	Very high quality

•	Requirements from real use cases

•	Easy to deploy

•	"Simply working"

•	Network applications building blocks

Important keywords are: HTTP, TCP/IP, XML, and stateless servers.

These components and solutions are divided into two categories:

•	Professional Software Components

•	Freeware Components Library

We distribute the components and solutions to promote the skills of the experienced developers working at TORDIVEL and want to establish links to developers and companies all over the world.

If you have comments/suggestions your feedback is more than appreciated. Please contact us.

Storgata 20 N-0184 OSLO NORWAY
Telefax +47 2315 8701 Telephone +47 2315 8700
E-mail: office@tordivel.com Web: http://www.tordivel.com


Copyright Notice

(c) 2001, 2002 TdvCmdRouter is copyright of

Storgata 20 N-0184 OSLO NORWAY
Telefax +47 2315 8701 Telephone +47 2315 8700
E-mail: office@tordivel.com Web: http://www.tordivel.com