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
-
Begin by creating a new .NET Framework 4.8 Class Library project.

-
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.

-
Select Create.
-
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

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

-
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”.

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

-
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.

-
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:
-
Instead of adding a reference to OASySDNA.LMS.BatchXfer.BatchDataHandler.*, add a reference to OASySDNA.LMS.BatchXfer.BatchTransferPlugin.BatchTransferSourcePlugin.
-
Instead of extending a specific source type class, implement the BatchTransferSourcePlugin abstract class. In this case, every abstract method must be implemented.
