Hello,
I am trying to create a custom output adapter which will contain multiple input measurment keys which will be assigned to seperate value columns in a database table. The table looks like below
CREATE TABLE PMUMeasurementsTable
(
Timestamp VARCHAR(24) NOT NULL,
Volt_Phase_A DOUBLE NOT NULL,
Volt_Phase_B DOUBLE NOT NULL,
Volt_Phase_C DOUBLE NOT NULL,
Volt_Pos_Seq DOUBLE NOT NULL,
Angle_Phase_A DOUBLE NOT NULL,
Angle_Phase_B DOUBLE NOT NULL,
Angle_Phase_C DOUBLE NOT NULL,
Angle_Pos_Seq DOUBLE NOT NULL,
Frequencie DOUBLE NOT NULL,
ROCOF DOUBLE NOT NULL,
)
I have used ADO output adapter, in that the value column is limited to 1. So I cann’t send all PMU measurements to single table.
So I want to create a output adapter similar to ADO output adapter with this change. Is it possible to create this kind of output adapter? What should I reffer for implementing this. Please provide some inputs on the same.
Regards,
Balaji TS
Hello Balaji TS,
The AdoOutputAdapter
is going to be the most obvious reference for the implementation of an adapter that dumps data into a database. However, you may also consider using the MySqlOutputAdapter
as a reference. It’s less feature-complete, but the code is much simpler so it may serve as a better example for your use-case.
AdoOutputAdapter: https://github.com/GridProtectionAlliance/gsf/blob/master/Source/Libraries/Adapters/AdoAdapters/AdoOutputAdapter.cs
MySqlOutputAdapter: https://github.com/GridProtectionAlliance/gsf/blob/master/Source/Libraries/Adapters/MySqlAdapters/MySqlOutputAdapter.cs
If all the values you’re putting in the table are coming from the same PMU, you may be able to get away with an implementation that does not use concentration. However, I’d think the easiest way to ensure that this adapter will work properly would be to implement it using the CalculatedMeasurementBase
base class. You can refer to the following document for a couple example implementations using this base class.
https://github.com/GridProtectionAlliance/openPDC/blob/master/Source/Documentation/wiki/Developers_Two_Custom_Adapter_Examples.md
You may also want to refer to the more general document describing how to create a custom adapter.
https://github.com/GridProtectionAlliance/openPDC/blob/master/Source/Documentation/wiki/Developers_Custom_Adapters.md
Thanks,
Stephen
Hello Stephen,
Thank You for the reference links. I will go throgh them.
Regards,
Balaji