Access Control Overview

Step by step guide for plug-in development

Design topics before you start coding

Here is a list of topics that we suggest you consider before getting too much into the implementation phase:

A couple of hints:

Start coding

Start by creating a new project based on the AccessControl template. This template will create the 10 key classes you need to work with, including generating specific guids and class names.

Select the “Visual C#” template node on the left and the “MIPAccessControl” on the right.

Please consider your “Name” careful, as it gets inserted many places in class names and the code (do not use . or any special characters).

When the following functionality shown above has been created, you get this project:

The project must reference the VideoOS.Platform.AccessControl.dll, but should not need to reference anything else from the MIPSDK.

We have added an ISystem.cs class to the template that is not really part of the AC-classes per se, but is convenient to have for referencing classes across your project.

MIP-AC Flow and calling sequences

Below, a drawing showing how events are flowing from the access control system on the left hand side and handled by MIP-AC towards the right hand side.

A simple access controller with one door and 2 access points could be represented within MIP-AC with the following classes:

Deployment

You must install, or copy, the compiled DLL(s) together with your acplugin.def file on the machine running the XProtect Event Server.

The acplugin.def file is similar to the plugin.def used by the general MIP Environment.

Sample:

<plugin>
  <file name="DemoAccessControlPlugin.dll"/>
  <load env="Service"/>
</plugin>

Install the files at:

C:\Program Files\Milestone\MIPPlugins\”your-plug-in-name”

Or, to support future OEM versions of the XProtect software, at:

C:\Program Files\VideoOS\MIPPlugins\”your-plug-in-name”

Debugging

Enable Development panel in the Management Client.

When the above tick mark has been checked. A set of extra tabs become available with detailed information on the configuration the AC-plugin has returned, and real time display of events and states.

You can use this option at customer site, if issues should arise that needs deep understanding.

The extra tabs all start with “DEV:” to identify that they are for development purpose and that the UI are for developers and not for administrators.

Logs

To log entries in the text log file, please use the built-in ACUtil.Log( ... ) method.

The result is located in the following folder:

C:\ProgramData\Milestone\XProtect Event Server\logs

Sample log entries:

2013-09-06 14:54:03 UTC+02:00 Error AccessControlSystem The state from 'Door Reception' contains the unknown state type id 'Unknown'. The state type will be ignored.

2013-09-06 14:54:13 UTC+02:00 Error AccessControlSystem Unable to handle EventOccurred event from access control system plugin. Event source not licensed. Id: 13507552-d8e1-22d4-cf49-2b8db34bbb87