bncs_csi

DDS BNCS Control System Interface: bncs_csi

Description

This is a technology evaluation application.

Features

A subset of CSI32's features has been implemented:

Fundamental Features:

  • Client and driver support
  • Normal messaging device messaging (i.e. commands and "revertives")
  • BNCS "Database" support
  • both IPC mechanisms (BBC_COPYDATA and WM_COPYDATA)
  • driver redundancy switching
  • Configurable external DDS quality of service settings file
  • extended device/index ranges to the maximum extent of the IPC messages (try running Infodriver32 12345 it'll just work!)

Notable ommissions:

  • Workstation status infodriver
  • Driver status infodriver
  • enhanced IPC for access to 32 bit device/index/database

CSI's in years gone by have been very chilled about sending some values and will accept any string whatsoever. This version however decodes, validates and sends specific messages.

Environment

This version requires the following environment variable:

Variable | Value
OSPL_URI | <your system root>\config\dds\ospl.xml

Dependencies

The following files are required in windows\lib

File | Notes
cmsoap.dll | DDS
cmxml.dll | DDS
dcpssacpp.dll | DDS
ddsi2.dll | DDS
ddskernel.dll | DDS
spliced.dll | DDS
qt5core.dll | Qt
qt5gui.dll | Qt
qt5network.dll | Qt
qt5widgets.dll | Qt
qwindows.dll | Qt (in subfolder platforms\windows)

Maximum indexes using original inter-process communications (IPC)

These are IPC limits - the bit that transfers messages about between applications on a workstation. These are not related to NetBIOS limits or those hard-coded into the CSI application.

32767 devices (1 to 32767)

This is limited by messages such as BBC_TXINFONETMSG which uses the top bit of a 16 bit value as a flag to carry extra information - so only 15 bits of unsigned value are available

65536 databases (0 to 65535)

Values are transferred as 16 bit values and all values are allowed (including database 0 of course)

65535 indexes (1 to 65535)

Values are transferred as 16 bit values throughout

32767 sources (-32767 to +32767)

Source is a signed value which limits the range

Supported Messages: external to CSI

BBC_GETHWNDCSI32, BBC_GETHWNDSHIM_ALT, BBC_GETHWNDCSI32_ALT

All handled the same, but using handleShare DLL is preferred means of getting "CSI" handle without needing to do a HWND_BROADCAST

BBC_NOTWPARAM

A simple means of seeing if this is a current CSI version

BBC_REGDEVICEID, BBC_REGDEVICEID32, BBC_DEVDRVCLOSE, BBC_UNREGDEVICEID

Driver registration

BBC_GETMAXDATABASES

Return the number of BNCS databases supported. Currently hard coded to 65536.

BBC_GETDEVTXRXMODE, BBC_SETDEVTXRXMODE

Redundancy Messages

BBC_DEVDRVREVMSG, BBC_DEVDRVPOLLMSG

Driver poll resonse - only IR, RR and GR types are supported

BBC_CACHEFLUSH, BBC_CACHETEST, BBC_CACHESWITCH, BBC_QUERYCACHEMODE, BBC_GETCACHEDDATA, BBC_GETCACHEDINDEX

Cache functions

BBC_REGCLIENT32, BBC_REGCLIENT

Handled the same to register a client

BBC_REGDEVICE, BBC_UNREGDEVICE, BBC_UNREGDEVICERANGE

"Revertive" registration functions

BBC_GETDEVPROPERTIES

String formulated to indicate databases that are avilable for the given device

BBC_TXRTRNETMSG

Free-form text message but where this implementation only messages starting "RC", "RP", "RL", "RM" are supported.

BBC_TXINFONETMSG

Free-form text message but where this implementation only messages starting "IW", "IP", "IL", "IQ" are supported.

BBC_TXGPINETMSG

Free-form text message but where this implementation only messages starting "GS", "GP", "GL" are supported.

BBC_GETDBASENAME, BBC_GETDBASEINDEX, BBC_GETDBASEINDEXEXT

Database functions

BBC_GETCSIVERSION

Hard-coded to return "2"

Supported Messages: CSI to external application

BBC_HWNDCSI, BBC_CSICLOSING

CSI application Messages

BBC_RXRTRNETMSG, BBC_RXINFONETMSG, BBC_RXGPINETMSG

"Revertive" messages

BBC_CLIENTMSG

Command messages

BBC_DATABASECHANGE

BBC_REQDEVGORXONLY, BBC_REQDEVGOTXRX, BBC_INQDEVGOTXRX, BBC_DEVICEIDINUSE

Redundancy messages

Common Error

bncs_csi requires a particular environment - specifically OSPL_URI environment variable set. If you run from workstation manager this is set by that. If you see this message:

It's entirely likely that you've tried to run bncs_csi from the command line.

You can run from the command line, but you need to have set OSPL_URI in your machien environment variables as described above.

Version Control

Version | Date | Author | Comments
0.0.0.1 | 07/07/2015 | DY | Development started
0.0.0.2 |  | DY | Internal Development version
0.0.0.3 | 11/02/2016 | DY | Internal Development version
0.0.0.4 | 14/03/2016 | DY | Better behaved with aborted startups, Adds clarity to the message about USER_QOS_PROFILES.xml if one of these exists on the system and overrides our custom settings, Adds option to IPC type as to whether it should be BBC_COPYDATA messaging with type 2 messages (binary packed rather than continually pack/unpack strings
0.0.0.5 | 10/01/2017 | DY | adds domain to the command line, removes a number of debug messages
1.0.0.6 | 07/02/2017 | DY | Check of command line domain param before trying to use it. Makes a proper V1!
1.0.0.7 | 09/02/2017 | DY | adds version history file, makes app start minimised
1.0.0.8 | 05/05/2017 | DY | returns a value for BBC_GETMAXDATABASES
1.0.0.9 | 05/05/2017 | DY | DDS unexpectedly getting upset by unset string values in bncs_legacyMessage
1.0.0.10 | 29/06/2017 | DY | Fix to 1.0.0.9 to free memory used by null strings created
2.0.0.1 | 20/07/2017 | DY | First version using different DDS vendor
2.0.0.2 | 24/07/2017 | DY | Some tidying, now uses handleshare DLL to save IPC lock-ups, minor changes to command line ("/domain=2" rather than just "2")
2.0.0.3 | 25/07/2017 | DY | Adds traffic counters
2.0.0.4 | 17/07/2017 | DY | Makes routerModify work again, sorts some of the mutexes, adds BBC_NOTWPARAM handling
2.0.0.5 | 01/10/2017 | DY | Restores about box and adds DDS version info (hard coded since this isn't available in DDS DLL or any API)
Build: trunk 4125 Atos © 2017