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

AVEVA Pipeline Operations for Liquids

Create a new class

  • Last UpdatedApr 24, 2025
  • 3 minute read

The following example will walk you through the steps to create a .Net project and configure it correctly for the two options described earlier.

Option 1: Extend the source type class to customize some aspects of the baseline implementation

  1. Begin by creating a new .NET Framework 4.8 Class Library project.

  2. Type the name for your new project. Your project must use the naming convention “LMS.BatchXfer.BatchHandler.*”, with * replaced by the name of your choice. In this example, we will use "LMS.BatchXfer.BatchHandler.VFCX" because we would like to extend the behavior of the existing VFC class.

  3. Select Create.

  4. Add the following references from C:\Program Files\AVEVA\DNA\RealTime\bin.

    • OASySDNA.Common

    • OASySDNA.Realtime.Data.Common

    • OASySDNA.Realtime.HighPerformanceDB

    • OASySDNA.Realtime.HighPerformanceSetDB

    • OASySDNA.LMS.BatchXfer

      In this example, we will also add OASySDNA.LMS.BatchXfer.BatchDataHandler.VFC because we want to extend the behavior of the existing VFC class. The following table presents the mapping between source types and the corresponding classes:

      Source Type

      Class

      Rate

      OASySDNA.LMS.BatchXfer.BatchDataHandler.Rate

      Tank

      OASySDNA.LMS.BatchXfer.BatchDataHandler.Tank

      VFC

      OASySDNA.LMS.BatchXfer.BatchDataHandler.VFC

      FlowComputer

      OASySDNA.LMS.BatchXfer.BatchDataHandler.FlowComputer

  5. Configure the references with property “Copy Local” and “Specific Version” set to False to avoid any conflict or replacement issue.

  6. Open Projects > Properties and update the assembly’s name to “OASySDNA.LMS.BatchXfer.BatchDataHandler.*” where * is the name previously assigned to the project. For this example, use “OASySDNA.LMS.BatchXfer.BatchDataHandler.VFCX” and your default namespace as “OASySDNA.LMS.BatchXfer.BatchDataHandler”.

  7. Set the build output path to “C:\Program Files\AVEVA\Realtime\bin\”.

  8. Create your entry point class. For this example, it is VFCX for consistency—but this is not a requirement. The class should inherit from VFC, Tank, Rate, or FlowComputer, depending on the source type you want to extend.

  9. You can now override the exposed methods of the class you extend.

    Note: If the exposed methods are not overridden, Batch Transfer will continue to use the baseline method. If the exposed methods are overridden, you can still call the baseline method using “base.methodName”.

Option 2: Implement the BatchTransferSourcePlugin abstract class to provide a full implementation.

If you decide to go with an entirely new implementation, follow the steps described in Option 1, but note the following exceptions:

  1. Instead of adding a reference to OASySDNA.LMS.BatchXfer.BatchDataHandler.*, add a reference to OASySDNA.LMS.BatchXfer.BatchTransferPlugin.BatchTransferSourcePlugin.

  2. Instead of extending a specific source type class, implement the BatchTransferSourcePlugin abstract class. In this case, every abstract method must be implemented.