Demo Manager

This manager is an example of how to write a simple API manager. It is an example of implementing control algorithms in C++ instead of in CTRL or communicating with simple hardware. Unlike drivers, the API cannot use address configs.

This example manager shows how to connect to the Data and Event Managers. It also connects to a data point and copies a new value to another data point every time. The names of the two data points are defined in the config file.

Preparing the Windows API MANAGER

  1. Create a new API manager project using the script newWCCILManager.cmd. The script copies the source template that contains the demo manager.

  2. Compile the project and start it as usual (F7).

  3. If you want to launch it from the console, you will have to rename it (for example, WCCOAdemo.exe) and copy it to the <proj_path>/bin directory of the project.

Preparing the Linux API Manager

1. Set your environment variables for the API as described in Installation/Linux.

2. Create a new project using the $API_ROOT/newWCCILManager.sh script.

3. Compile the API manager using the "make" command (you have to be located in the project directory)

This input has to be made in the directory where the Makefile.api for the driver is located. This is generally the directory where the sources are located (for example, $API_ROOT/SampleDriver).

The executable file of the created manager is called DemoManager.

Config settings

The sections read by the manager are called [demo] and [demo_<num>] , for example, if the manager starts with -num 1 [demo] and [demo_1].

[demo_1]

dpNameConnect = "ExampleDP_Arg2.:_online.._value"

dpNameSet = "ExampleDP_Arg1.:_original.._value"

In the above entry, specify the data point, config and attribute to which the manager is supposed to connect. The default is "ExampleDP_Arg2.:_online .._value".

Below this, specify the data point, config and attribute to copy the values to. Use the same data type as there is no automatic conversion. The default is "ExampleDP_Arg1.:_original.._value".