Generating a User-Defined Plug-in

The WinCC OA Access Control Plug-in is an add-on for the WinCC OA managers and must be implemented by using the WinCC OA API for C++. It provides free programmable access control functionality to the managers as shared library.

In order to generate your own user-defined plug-in, read this chapter. It describes the necessary steps to create a plug-in. To build your own access control plug-in, follow the steps described in this section. They apply to all templates available and should help you to implement the functionality for your customized project.

WINDOWS

  1. In a DOS box: set the API_ROOT environment variable (for API, see chapter API installation) and run %API_ROOT%\checkAPIenv.cmd.
  2. In the api directory you can find the newWCCOAAccessControlPlugin.cmd file. Call this file as %API_ROOT%\checkAPIenv.cmd to create a new access control plug-in instance in your current directory The instance can be used in the current project. Typically the cmd file notifies you about missing prerequisites such as missing environment variables.
Note:

checkAPIenv (also called from newWCCOAAccessControlPlugin.cmd) has an argument to set the platform correctly: x86 or x64 for compiling the Security Plug-in for different Operating system variants. The DOS box used to run these commands must be configured accordingly for your developer studio.

CAUTION:

Never try to compile the template directly. This will lead to a broken access control plug-in since the c++ class naming scheme needs to be updated by the cmd file from the template structures to a real instance.

  1. To create a new Access Control Plug-in instance, call the newWCCOAAccessControlPlugin.cmd script in your development directory with the name of the plug-in: <WinCC_OA>/api/newWCCOAAccessControlPlugin.cmd <Name of your plug-in> [template-no].

    This allows you to select a template number interactively (for the templates see chapter Templates for the Access Control Plug-in) or by parameter and creates a new copy of the Access Control Plug-in for implementing the customized filter options. When you started with one of the demo Access Control Plug-in template files, you can use the predefined filter configurations.

  2. Implement authentication options that are used by the Data Manager and other managers of the project.
  3. Implement own configurations for filtering of manager messages.
Note:

Any WinCC OA API component must be compiled with the “Release” configuration for the target platform (64 bit or 32 bit) when compiled with a Microsoft compiler. Check your profile settings in Visual Studio after creating the Security Plug-in from the template. The settings might be changed back to the Visual Studio default: “Debug” for 32 bit applications. This default will not work for WinCC OA components.

You can change the settings in Visual Studio under “BUILD” -> "Configuration Manager". In the dialog you need to set the “Release” for “x64”.

Necessary pdb files are created with the “Release” profile of the WinCC OA component.

LINUX

  1. Set the environment variable API_ROOT to <WinCC_OA_Directory>/api
  2. Set the environment variable PLATFORM to the output of the shell script $API_ROOT/platform.

    The platform script checks the type of the current operating system and the compiler version.

    The range of permitted values depends on the WinCC OA version you are using.

  3. Run the $API_ROOT/newWCCOAAccessControlPlugin.sh in your development directory to create a new Access Control Plug-in.
  4. Run "make" in the directory created in the previous step and move the created shared lib to the folder <WinCC OA project directory>/bin.
Note:

The WinCC OA Access Control Plug-in is not available for Linux 32 Bit!