Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

The BVMS (Bosch Video Management System) plugin for Canary is deigned to allow Witness to send camera movement updates to a BVMS server. This implementation will close a BVMS Virtual Input when a camera move operation is started by Witness and will open the Virtual Input again after a configurable period of camera inactivity. If the camera is moving in response to an alarm then data about the camera, track and alarm will be sent to BVMS each time the camera moves to look at a new alarm.

The BVMS Plugin

Witness Canary 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 Canary and contain code which knows how to convert the Witness data into the required format for the external system.

The BVMS plugin file is entitled Witness.Plugin.Bvms.dll and must be present in the Witness Plugin folder which is inside the main application folder. The plugin depends on two third party files, Bosch.Vms.SDK.dll and GenuineChannels.dll, which must be placed in the main application folder.

The plugin can be selected during setup and will automatically install the files in the correct locations.

The BVMS Plugin Message Payload

The following values are passed to BVMS every time the Alarm that the camera is responding to changes. The payload has 10 available values but currently only 5 are configured.

Data IndexValue

1

The id of the camera within BVMS
2The numeric id of the track within Witness
3The alarm description for the alarm being watched by the camera
4The classification of the track
5The speed of the track in m/s

Configuring the BVMS Plugin

When the plugin is installed and Canary starts, the plugin configuration settings are saved to the PluginConfiguration.xml file. This file is located in the Witness main application folder. To change the settings this file should be opened in a text editor, such as Notepad, however we would recommend an editor which is XML aware, such as Notepad++.

Once the file is open, locate the BVMS section, as illustrated below:

Example BVMS Plugin Configuration
<?xml version="1.0" encoding="utf-8"?>
<Config>
  <Plugins>
    <Bvms>
      <PluginConfig>
        <BvmsServerAddress>10.0.6.11</BvmsServerAddress>
        <BvmsServerPort>5390</BvmsServerPort>
        <User>Admin</User>
        <Password></Password>
        <InputResetPeriod>60</InputResetPeriod>
        <HeartbeatInterval>0</HeartbeatInterval>
      </PluginConfig>
    </Bvms>
  </Plugins>
</Config>


The setting options are as follows:

BvmsServerAddress

This is the address of the BVMS server

BvmsServerPort

This the port used by BVMS (5390 is the default value and is unlikely to need changing)

User

The username used to logon to the BVMS system

Password

The password associated with the above User value

InputResetPeriod

The period (in seconds) after no new alarm updates have been received that will cause the virtual input open command to be sent to BVMS.

Configuring BVMS

  1. Open the BVMS Config Client
  2. Add at least one Virtual Input
  3. Add a client script to capture and process the alarm data from the BVMS plugin
  4. Right click on the ClientScript node and click New Scriptlet


  5. Replace the Scriptlet with the following code

    Example BVMS ClientScript
    using System.Text;
    
    public void WorkstationLogon()
        {
            System.Threading.Thread.Sleep(3000);//wait till logged in has been processed
            try
            {
                RemoteServerApi RSApi= new RemoteServerApi("localhost:5390","admin","");// connect to the server
                MyEventReceiver myRec= new MyEventReceiver(Api); //Api is the current Client Api, hand over to the EventReceiver Instance
                RSApi.EventManager.Register(myRec);//register for all Events 
            }
            catch (Exception eq)
            { 
                Api.ApplicationManager.ShowMessage("Error in Logon Script " + eq.ToString());
            }
            Api.ApplicationManager.ShowMessage("logon finished");
        }
    
        public class MyEventReceiver:EventReceiver
        {
            private IClientApi MyApi;
            static StringBuilder ViString;
    
            public MyEventReceiver(IClientApi api)
            {
                 MyApi=api;
                ViString= new StringBuilder();
            }
    
            public override void OnEvent(EventData e)
            {
                ViString.Clear();
                if (e.Type=="DataInputEvent")   //intercept when virtual input data is received
                {
                    //show the exect data presented via the Virtual Input on the operator station
                    // Here is the Navtech info format
                    ViString.Append("Received Data from Navtech Radar:");
                    ViString.AppendLine();
                    ViString.Append("IncidentCamera: ");
    				ViString.Append(e["Data1"]);
                    ViString.AppendLine();
                    ViString.Append("TargetID: ");
    				ViString.Append(e["Data2"]);
                    ViString.AppendLine();
                    ViString.Append("Alarm Description: ");
    				ViString.Append(e["Data3"]);
                    ViString.AppendLine();
                    ViString.Append("Target Classification: ");
    				ViString.Append(e["Data4"]);
                    ViString.AppendLine();
                    ViString.Append("Target Speed: ");
    				ViString.Append(e["Data5"]);
    				//Uncomment the following line to show the incoming data
                    //MyApi.ApplicationManager.ShowMessage(ViString.ToString());
    
                    MyApi.ContentManager.SetGranularity(1,1);
                    Camera c= MyApi.CameraManager.GetCameraByLogicalNumber(int.Parse(e["Data1"]));
                    ImagePane p=new ImagePane(1,int.Parse(e["Data1"]));
                    MyApi.ContentManager.EnterFullscreen(1);
                    MyApi.ContentManager.DisplayCamera(p,c); //show camera full screen on Monitor 1
                }                            
            }
        }

    This code is for testing purposes only. It will force the the camera stream associated with the incoming Witness alarm data full screen every time the message is received.

  6. Assign the script to the workstation



  7. Save the config and activate the configuration

Configuring Witness

After a camera has been configured in Witness the following fields need to be edited to align the configuration with BVMS

User ID

This is the BVMS Virtual Input that will be closed when a camera movement is triggered by Witness

External System ID

This is the BVMS camera id that relates to this camera and can be found by opening the BVMS Config Client and opening the Cameras and Recording page

  • No labels