The OPC Server Plugin
The Witness system supports integration with many different types of external systems through the use of plugins. These are stand-alone software libraries which are dynamically loaded by the Integration Manager and contain code which knows how to convert the Witness data into the required format for the external system. Navtech Radar can easily develop bespoke plugins to interface with a specific type of equipment or application. The OPC Server plugin has been developed to provide integration to the common OPC UA standard used in highway systems.
The OPC Server plugin file is entitled Tungsten.Integration.ICD007.Plugin.dll and must be present in the Witness Plugin folder which is inside the main application folder. The plugin depends on OPC Foundation's liberaries Opc.Ua.Core.dll and Opc.Ua.Server.dll which must be present in the same folder.
The plugin can be selected during setup and required files will automatically be installed in the correct location.
OPC UA Client Prequisites
The OPC UA client used to connect to the OPC server must login through a Username and Password channel. Other authentication methods are not supported.
To facilitate secure connection, the client server connection requires a security certificate. You may choose to let the plugin generate its own security certificate for the communication or provide a custom certificate. Generated certificates are by default stored under the Windows certificate store → CurrentUser -> My and must be installed as trusted by the OPC Client.
Configuring the OPC Server Plugin
When the plugin is installed and licensed, a plugin configuration with default settings is automatically generated. The settings can be viewed and edited through the Witness Client → Config workspace → Integration plugins folder and can be modified as an administrative user.
Once you have made changes to the plugin configuration and committed the changes by saving, the plugin will automatically rebuilt itself based on the new configuration.
The setting options are as follows:
Enable Plugin
- When not enabled, the plugin will not start up. If the plugin is already running, disabling the plugin will cause it to stop.
Plugin Name
- Name of the plugin within the Witness UI
Health Timer
- Interval, in seconds, at which the heartbeat counter on the OPC Server will count up while it is connected to the Witness system. This can be used to monitor the overall health of the OPC Server plugin.
ApplicationName
- Application Name reported through the OPC protocol
ApplicationUri
- Application Uri reported through the OPC protocol
BaseUri
- Location where the OPC Server is hosted. This should be the actual Canary hosting machine name, localhost or the canary machine IP followed by an unused port and optionally location.
Carriageways
- This section indicates the carriageways, sections and rules that we want to track in the OPC server.
When a highway alarm is received, only an alarm matching a configured Carriageway, Section and Rule will be processed.
NodeConfiguration
- Customize the name for each node. Each string must be different from the other string. It is recommended to stay with the defaults.
To review the structure of the OPC nodes, please see the "Generating OPC Node Structure" section below. - Description: Name of the node for the alarm description
- Raised: The last time the alarm was raised
- LocationX: The X position of the Track causing this alarm is stored on this node if a track is available
- LocationY: The Y position of the Track causing this alarm is stored on this node if a track is available
- Active: Indicates if the alarm is active
- SensorHealth: Last health from a radar or other sensor
- SensorHealthTime: When the sensor health was last updated
- LaneId: Lane where the last alarm was raised
- SectionCount: Indicates the number of sections within a carriageway
- CarriagewayCount: Number of carriageways being tracked
- RadarCount: Number of radars or sensors having their healths tracked
- DatabaseHealth: Last health of the database (Vault) module
- RadarId: Radar Id of the radar in Radar healths or section radar
- TrafficData: Indicates that traffic data is available for this section
- AveSpeed: Traffic data average speed
- AveCount: Traffic data tracks count
- HeartBeat: This is an increasing overall health indicator. This indicator resets to 0 after 32767
GenerateCertificate
- Defaults to True. This indicates that a server certificate will be generated if the specified one is not available. This is the recommended option.
- If a custom pregenerated certificate is used, the OPC Server must be configured to match the certified application name and URI.
ServerCertificateType
- Windows - Default - tries to read the certificate from in Windows Certificate Store. Certificate path must be a valid windows certificate store path e.g. "CurrentUser\My" or "LocalMachine\TrustedPublisher"
- Directory - This tries to read the certificate from the file storage. If the certificate does not exist it will attempt to create one if the Opc foundation redistributable is installed or else will fail to start up the plugin.
ServerCertificatePath
- Location to store the server certificate. This can be a file location e.g. "C:\OpcCertificate\" if using Directory certificate type or Certificate Store path e.g. "CurrentUser\My"
ServerCertificateName
- Name on the server certificate file. This name is used as both the issuer and the issued to.
UserName
- Username for the OPC login. The OPC UA client should be set up to always use this.
Password
- Password for OPC login. The OPC UA client should be set up to always use this.
HeartbeatInterval
- Interval, in seconds, at which the heartbeat counter on the OPC Server will count up while it is connected to the Witness system. This can be used to monitor the overall health of the OPC Server plugin.
DisableTrafficData
- Setting this to true will cause the plugin to ignore traffic data and will only output the more accurate Count Classify date
Generating the OPC Node Structure
To assist development or configuration of the OPC UA Client, the OPC node structure will be output to the local program data folder in csv format each time the plugin is started. As you add or remove radars or change plugin configuration, OPC Node structure will change.
You should be able to find the output at: ProgramData → Navtech\OPCServer\OPCNodes.csv. The location of your ProgramData folder will depend on your Windows setup.
Example output in table format:
Each node is listed first with Display Name, DataType and namespace : relative browse name. Child nodes are indented relative to their parent.
Witness | Folder | 1:Witness | |||||
Heartbeat | Int32 | 1:Heartbeat | |||||
DatabaseHealth | Int32 | 1:DatabaseHealth | |||||
CarriagewayCount | Int32 | 1:CarriagewayCount | |||||
RadarCount | Int32 | 1:RadarCount | |||||
CarriageWays | Folder | 1:CarriageWays | |||||
Carriageway 1 | Folder | 1:Carriageway1 | |||||
SectionCount | Int32 | 1:SectionCount | |||||
Section 1 | Folder | 1:Section1 | |||||
SectionId | Int32 | 1:SectionId | |||||
RadarId | Int32 | 1:RadarId | |||||
TrafficData | Boolean | 1:TrafficData | |||||
AverageSpeed | Double | 1:AverageSpeed | |||||
AverageCount | Int32 | 1:AverageCount | |||||
Reversing Rule | Folder | 1:Rule1 | |||||
Description | String | 1:Description | |||||
Active | Boolean | 1:Active | |||||
Raised | DateTime | 1:Raised | |||||
LocationX | Double | 1:LocationX | |||||
LocationY | Double | 1:LocationY | |||||
Lane | Int32 | 1:Lane | |||||
Speed Rule | Folder | 1:Rule2 | |||||
Description | String | 1:Description | |||||
Active | Boolean | 1:Active | |||||
Raised | DateTime | 1:Raised | |||||
LocationX | Double | 1:LocationX | |||||
LocationY | Double | 1:LocationY | |||||
Lane | Int32 | 1:Lane | |||||
Section 2 | Folder | 1:Section2 | |||||
SectionId | Int32 | 1:SectionId | |||||
RadarId | Int32 | 1:RadarId | |||||
TrafficData | Boolean | 1:TrafficData | |||||
AverageSpeed | Double | 1:AverageSpeed | |||||
AverageCount | Int32 | 1:AverageCount | |||||
Reversing Rule | Folder | 1:Rule1 | |||||
Description | String | 1:Description | |||||
Active | Boolean | 1:Active | |||||
Raised | DateTime | 1:Raised | |||||
LocationX | Double | 1:LocationX | |||||
LocationY | Double | 1:LocationY | |||||
Lane | Int32 | 1:Lane | |||||
Speed Rule | Folder | 1:Rule2 | |||||
Description | String | 1:Description | |||||
Active | Boolean | 1:Active | |||||
Raised | DateTime | 1:Raised | |||||
LocationX | Double | 1:LocationX | |||||
LocationY | Double | 1:LocationY | |||||
Lane | Int32 | 1:Lane | |||||
Person Rule | Folder | 1:Rule3 | |||||
Description | String | 1:Description | |||||
Active | Boolean | 1:Active | |||||
Raised | DateTime | 1:Raised | |||||
LocationX | Double | 1:LocationX | |||||
LocationY | Double | 1:LocationY | |||||
Lane | Int32 | 1:Lane | |||||
Sensors | Folder | 1:Sensors | |||||
Radar 1 | Folder | 1:Sensor7083798e-329d-4eb6-a4bc-4dee3553faea | |||||
LastHealth | Int32 | 1:LastHealth | |||||
LastTime | DateTime | 1:LastTime | |||||
RadarId | Int32 | 1:RadarId | |||||
Radar 2 | Folder | 1:Sensord8aec3b1-4f71-41c1-8d90-0bb0387340b0 | |||||
LastHealth | Int32 | 1:LastHealth | |||||
LastTime | DateTime | 1:LastTime | |||||
RadarId | Int32 | 1:RadarId | |||||
README | String | 1:README |
Related information