slink Client

Description

See slinkServer documentation for a general description of slink and a comparison with FABIAN and information on inter-working.

slinkClient connects to a slinkServer or FABIAN server to present remote BNCS devices to a local network.

It connects via TCP/IP with optional SSL encryption (when connecting to slinkServer only).

The slink system follows the same general principles as FABIAN control system link.

slink has slightly different philosophy to FABIAN in that there is one slinkClient for each remote site. This is easier to understand, allows easier maintenance.

The slink client/server provides extended BNCS addressing and large slot-size.

Dependencies

slinkClient requires CSI32 version 1.2.72 or later, or bncs_csi

slinkClient is Qt5 based application and requires the following DLLs in the path (these are all included in a default BNCS V4.6 install):

  • Qt5Core.dll
  • Qt5Gui.dll
  • Qt5Network.dll
  • Qt5Widgets.dll

and this in the windows\lib\platforms directory (for V4.5), or in a platforms subfolder of the SystemPath specified for V3 in c:\bncs_config.ini:

  • qwindows.dll

If you are using SSL then the following additional DLLs are required (see note below about version-clash issues):

  • libeay32.dll
  • ssleay32.dll

Configuration

Command Line Overrides

These are for not-recommended settings, but if you must...

/nocache

Disables the cacheing of data - means poll requests will always hit the link, data from the link will always hit the network whether or not it's changed

/nopollonconnect

Won't automatically poll on receiving device profile response from the server. Note: If you turn this off, also run /nocache too otherwise you end up with a cache of old data that is only refreshed on change of state.

Config file settings

Configuration may be set from the UI of the application and this writes the ini file. Setting from the UI has the advantage that changes are dynamic without having to restart the application. Don't forget to copy the resulting config back to your system file server!

There can be more than one slinkClient.exe application for any one system - so there must be more than one configuration file.

Configuration files are held in %CC_ROOT%/%CC_SYSTEM/config/

There is a default file:

slinkClient_default.ini

but you can supply a command line parameter which is a profile name. So a command line of:

slinkClient myRemoteSystem

results in config being taken from:

slinkClient_myRemoteSystem.ini

Configuration files are located in the "system config" location appropriate for your system type alongside BNCS database files.

[slink]
;This can be a dotted network address but for SSL to work should be the DNS name of the server which must match the SSL certificate
;Default port is 46277
Address=team.bncs.tv
Port=46277
StatusInfodriver=2

;Login credentials for the remote slinkServer
userName=A
password=B
controlPassword=C

;non-zero indicates the connection should be SSL
SSL=1

;This application may optionally use a SOCKS proxy so the connection may tunnel out. Set address and port and optional user credentials here
SocksAddress=
SocksPort=0
SocksUser=
SocksPassword=

;BNCS device list. These are the BNCS devices that this link will create on the local network and will pass messages to/from the remote network
;entries are of format <local>,<remote>,<type I|R|G>
;remote is optional and can be used to map the device number
;type is optional and sets either Infodriver, Router or GPI. This defaults to I
device_1=123
device_2=124,1
device_3=125,125,R

Security

This application will use SSL if configured. This only works if the "Address" of the server matches the SSL certificate that the server presents.

Refer to the slinkServer documentation with regards to notes on setting up SSL

Client authentication could be made to work but is not currently configured.

Redundancy

You can run slinkClient in pairs to provide redundancy, and connect to two different servers.

CSI32 introduced redundancy mastering (in CSI32 version 1.2.59) to allow for a single device to control the TxRx state of all it's siblings. slink relies on this to maintain consistency of all its drivers and to provide the redundancy mechanism for the link itself. Unlike FABIAN slink does not use, or require 'F' messages.

You cannot run slinkClient and FABIANLink32 presenting the same devices to the one system, but you can use slinkClient and FabianLink32 for different devices.

Closedown

To closedown with CSI slinkClient requires a client connection to CSI. Client connection is not compulsory.

Connection status

If a device number is supplied:

StatusInfodriver=2

then slot 1 contains "1" if connection is made, and "0" if there is no connection. This mimics exactly the green/red, ok/failed indication on the UI

Repoll on connection

slinkClient represents the state of BNCS devices on a remote network, so on start-up it has to get the state of those devices.

On connection made it polls all the devices for which it's configured taking the range from the "DatabaseSize_1" configuration in the database file for that device.

To prevent a massive dump of information to the slinkClient network, it maintains a cache of the data for all the devices configured. On connection lost/restored or application restart the amount of traffic on the slinkClient network should be minimal as it sends only changes since last connection.

Debug/Diagnostics

It is a design decision that the application debugging is events only. If you want traffic level debugging then all of this is available using an external debugger.

The reasons for this are:

you actively have to run an external debugger if you want that level of detail (you can't just leave it enabled so ruining the performance of this application)
external debugger may have far better filtering/highlighting than is usually available on applications such as these

Version History

Version | Date | Notes
1.0.0.1 | 01/02/2016 | development version
1.0.0.2 | 16/02/2016 | development version
1.0.0.3 | 11/03/2016 | adds log-to-disk, fixes closedown crash
1.0.0.4 | 17/03/2016 | tidies up registration of drivers so that it behaves on duplicate local registration
1.0.0.5 | 17/03/2016 | flushes cache when removing driver (just saves a bit of memory, and removing reinstating a driver doesn't pull up a load of out-of-date guff). Logging a bit better behaved
1.0.0.6 | 17/10/2017 | Registers the entire range as defined by BNCS_V6
1.0.0.7 | 24/10/2017 | Router modify handling (kinda)
1.0.0.8 | 26/10/2017 | Router modify handling (anti-howlround)
1.0.0.9 | 30/10/2017 | Doesn't now propogate database changes when not in TXRX
1.0.0.10 | 06/12/2017 | Closes with CSI
1.0.0.11 | 08/12/2017 | More considered implementation of 1.0.0.10 (close with CSI)
1.0.0.12 | 21/12/2017 | Conversion of docs to markdown
1.0.13.0 | 30/01/2018 | Adds rudimentary infodriver status slot
1.0.14.0 | 24/04/2018 | Removes extended range support
1.0.15.0 | 15/05/2018 | RD support (to match FABIAN for anti-howlround)
1.0.16.0 | 16/05/2018 | Now only sends revertives on change of state. Allows for wholesale polling of the server without bothering the local network with information that hasn't changed
1.0.17.0 | 18/05/2018 | Persists state (as say an infodriver would) on closedown. Also implements ADP command which it uses for startup poll. NOTE change of ini file settings to include the device type
1.0.18.0 | 21/05/2018 | Now doesn't barge the existing TxRx driver out of the way on startup. Another couple of messages logged to debug. Better behaved creating device connections from the UI.
1.0.19.0 | 21/05/2018 | UI button relabelled "Force tx"
1.0.20.0 | 22/05/2018 | Minor wrinkle ironed out when doing quick-add of driver. Not entering a valid local device would tell you it hasn't got a db1 size. NSS.
1.0.21.0 | 23/05/2018 | Cross checks the value from the ADP response against the local DB1 size, and flags in the debug if there's an anomaly
1.0.22.0 | 29/05/2018 | Adds traffic counters to BNCS and session. Adds missing editor for user credentials and status infodriver
1.0.23.0 | 29/05/2018 | Minor tarting following code review
1.0.24.0 | 30/05/2018 | Updated documentation to include device type setting and to clarify ini file location and SSL settings
1.0.25.0 | 31/05/2018 | Expands socket error message (as per slinkServer)
1.0.26.0 | 15/06/2018 | Makes cache a command line option
1.0.27.0 | 18/06/2018 | Makes poll on connect (or at least no poll on connect) a command line options
1.0.28.0 | 12/07/2018 | Adds "V3" search path for finding Qt plugins to path defined in c:\bncs_config.ini (or V2 default of Windows)
1.0.29.0 | 19/07/2018 | Sets path to log after getting the profile name (otherwise path can't contain that profile name)
Build: master 3798 615debad Atos © 2018