Net
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. You can configure any number of network connections. Each network connection can be associated with at most two blocks. The source block is the outgoing block, the destination block is the captured incoming data. 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 (or both) 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.

The [Net] section determines the network configuration. 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 as the section name, e.g.:

[TLMSrv]
Port=2001
Source=TLM

The section above specifies the setting for the TLMSrv server connection you defined in the [Net] section. This particular example configures the server to listen on port 2001 and export the TLM block.
The next paragraphs explain the various options you can specify for a network connection. The settings that only apply to client connections are indicated.

EntryDescription  
IP-AddressOnly 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 in case of a client connection, the listen port in case of a server connection. There must be a server listening on this port at the IP-Address specified in order for a client 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 of 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. The default behavior is appropriate for fixed length data packets. For variable length packets you want to use the VariableLen flag.


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 (default) automatic connection is disabled.

VariableLen   ['Yes'|'No']. 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' as the first data item. 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 connection. When more data is received than can be placed in the block multiple blocks are generated.

Exclusive   ['Yes'|'No']. 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 enabled (and the network therefore disabled since all data sources are mutual exclusive) 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.

MaxReceiveRateThis setting determines the maximum receive rate in bytes/sec. If 0 (the default) no receive throttling is implemented. This setting might be useful for servers which generate bursty data like playback requests from MOC servers, etc. Keep in mind that the server needs to buffer the data accordingly and not all servers might implement this functionality which might lead to data loss.  

KeepAlive['Yes'|'No']. Sets the keep alive flag for this connection. TCP/IP will send a periodic keep alive signal on the connection.  
 
IdleReconnectTimeoutOnly for client connections. Some routers drop connections after a long time of inactivity. The KeepAlive setting might help in this case. However, if the router still drops the connection you can use the idle reconnect option. After the idle timeout configured (in minutes) of inactivity the connection is dropped by GSEOS and a reconnect is attempted. If you have configured a delay (see below) the reconnect attempt will be delayed for the number of seconds configured. If 0 (the default) no idle timeout is configured.  

IdleReconnectDelayOnly for client connections. If an idle reconnect is configured this setting sets the delay until reconnect after the connection has been dropped by GSEOS due to an idle timeout. If 0 (the default), no reconnect delay is configured.  


Connecting two GSEOS machines
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

Note
Although it is possible to specify an IP-Address by name we recommend against it. The name resolution requires a DNS lookup which is a blocking call and might take a long time, especially for hosts that can't be found or when no DNS server is available. In this case it will look like GSEOS is frozen until the DNS lookup times out.