How do I configure the networking module?
Previous  Top  Next

GSEOS network support is very flexible and accommodates various different networking configurations. The basic concept of the network module is to import/export data blocks via the TCP/IP protocol. The network module functions as a data source when importing data. You can configure any number of network connections. Each network connection can be associated with at most two blocks. One that gets exported on this connection and one that gets imported. From a network perspective GSEOS can act as a server or a client. For each connection you have to specify if you want GSEOS to act as a server or a client. This does not necessarily determine if you export or import blocks on that connection. A common scenario is to configure a server connection and export a block on that connection. However you may as well configure a client connection and export a block on that connection.

Configuration options
The network module is configured in the gseos.ini configuration file. Specify all your connections in the [Net] section (or an according instance specific name). The keys you specify in this section are the names of the connections you want to configure. The value can be either Server or Client for a network server or a network client respectively.

[Net]
TLMSrv=Server
TestServer1=Server
TomsServer=Server
SOPC33=Server
TLMClnt=Client
CmdSrc=Client
TestClient=Client

The above example configures four server connections and three client connections. You can manage these connections from within the GSEOS Explorer. In order to configure the individual connections you have to create new sections with the connection name for the section name, e.g.:

[TLMSrv]
Port=2001
Source=TLM

The section above specifies the setting for the TLMSrv server connection. This particular example configures the server to listen on port 2001 and export the TLM block.
The following sections discuss the various options you can specify. The settings that only apply to client connections are indicated.

Key   
Assignment
IP-Address
Only for Client connections. The IP address of the remote server. Specify the IP address in 4-byte dotted format, e.g. 150.144.103.23
Port
The port number of the remote machine. There must be a server listening on this port in order for a connect attempt to be successful.
Source
The data block you want to EXPORT on this connection. Every time the system encounters this block it will send the contents of the block to the remote machine. The actual amount of data sent depends on the VariableLen setting.
Destination
The data block you want to IMPORT on this connection. All data received from the server will be written to this block. Once the number or bytes specified in the block definition is received the block is submitted to the system. (This is the default behavior and can be modified with the VariableLen setting.)
AutoConnect
Only for Client connections. Allows to automatically connect to a server. Specify a number of seconds that will elapse before an attempt is made to connect to the remote machine. If the connection is already established no attempt to connect will be made. If you set this value to 0, the default value, automatic connection is disabled.
VariableLen
This setting controls the amount of data sent over the network connection. The default is "No". For the source block the amount of bytes specified in the block definition file is sent. for the destination block the amount of bytes specified in the block definition has to be received before a block is generated. This setting is preferred for inter GSEOS connections or connections that generate fixed length data. If you specify "Yes" for this setting the connection uses variable length packets. The blocks specified in either Source or Destination have to have a 32-bit field called "Len" at the beginning of their block definition. For Source blocks the Len field specifies how many bytes of data are transferred. The Len field itself is not sent, only the data immediately following the Len field. For Destination blocks the Len field is filled with the amount of data read from the network. When more data is received than can be placed in the block multiple blocks are generated.
Exclusive
The network module is considered a data source. The default behavior for the network will be to discard all data received on the network connection unless the network is enabled. There are some circumstances where this is not desirable. E.g. consider the case of remote commanding. In this case we may have incoming data from the Bios but want to be able to feed in command data over the network. If we were to enable the network the Bios data would be discarded, not an option. However if the Bios is on all command data from the network would be discarded. To enable network input while getting data from another data source set this value to "No" and do not enable the network. The default is "Yes" which means all incoming data from the network is discarded unless the network is enabled.


Connecting two GSEOS computers
Oftentimes it is desirable to distribute the data decoding/display to various machines. This can easily be done by having one machine exporting a data block and the other importing the same block. The default behavior of a connection is to export/import the entire block. This is a fixed size packet based on the block definition for the block you import or export. This is what you need to interconnect two GSEOS machines (given of course that the block definitions on both machines are the same!). The decision which machine to configure as server and which one as client pretty much depends on where you want to initiate the connection from. The client machine has to initiate the connection. Lets assume we have two machines, the Lab machine with the physical data connection to the instrument and an Office machine were we want to run remote display. The Lab machine will be configured as server and the Office machine as client so we can start the remote display from the Office machine. The block exported by the Lab machine and imported into the client machine is TLM. We also want to enable commanding from the Office machine. This means we have to set the Exclusive setting on the Lab machine to "No". If we don't want to enable commanding we would not need to set the Exclusive flag to "No" and we would not need to specify the CMDSTRING block in either configuration.
Here the configuration for the Lab machine:

[Net]
TLMSrv=Server
[TLMSrv]
Port=2020
Source=TLM
Destination=CMDSTRING
Exclusive=No

Here the configuration for the office machine:

[Net]
TLMClient=Client
[TLMSrv]
IP-Address=150.134.123.87
Port=2020
Source=CMDSTRING
Destination=TLM