Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Enterprise SCADA HPDEF API Reference

Write the plugin initializer

This scenario guides you through the steps required to write initialization code for a High Performance Data Export Framework (HPDEF) plugin. Follow the steps in this scenario to create a plugin initializer that the system invokes once when the Data Export Engine starts up.

To identify the code associated with each step, see the code comments in the Example code section.

To write the plugin initializer

In this example, the initializer code is written to a file called Initializer.cs.
  1. In the created project used to implement the plugin initialization code, open or create the class file.    
  2. Set the class to implement the IPluginInitializer interface.
  3. Create the Initialize() method where the initialization logic will be written:
    1. Add any initialization logic that the Data Export Engine executes when it starts up.
    2. If required, validate the correctness of the logic.
    3. Return true if initialization was successful; otherwise, return false.

Example code

// In the created project used to implement the plugin initialization code, open or create the class file.
using System;
namespace OASySDNA.RealTime.DataExport.ExamplePlugin
{
    // Set the class to implement the IPluginInitializer interface.
    public sealed class Initializer : IPluginInitializer
    {
        // Create the Initialize() method where the initialization logic will be written.
        public Boolean Initialize()
        {
            // Add any initialization logic that the Data Export Engine executes when it starts up.
            var cache = new ExampleCache();
            cache.Initialize();
            // If required, validate the correctness of the logic.
            if (cache.Count == 2)
            {
                // Return true if initialization was successful.
                return true;
            }
            else
            {
                // Otherwise, return false.
                return false;
            }
        }
    }
}

TitleResults for “How to create a CRG?”Also Available in