I have configured an ActionAdapter and i can see in the OpenPDC console this adapter is disposed but running, but when i tried to debbug the code, it never go into the PublishFrame function.
i have tried changed the .netFramework, use another OpenPDC version, send and read constant but nothing work to me.
Could you tell me what can i check?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.ComponentModel;
using GSF.TimeSeries;
using GSF.TimeSeries.Adapters;
using GSF.Diagnostics;namespace RAG_Adapter_OPDC2942
{
[Description(“RAG Adapter: Este es el adaptador para la prueba del Core para OpenPDC versión 2.9.49”)]
public class Rag : ActionAdapterBase
{
#region[parametros]
public int multiplicador = 2;
#endregion//public override bool SupportsTemporalProcessing => throw new NotImplementedException(); public override bool SupportsTemporalProcessing => false; protected override void Dispose(bool disposing) { OnStatusMessage(MessageLevel.Info, "Both inputs were not available - could not calculate :-("); //OnStatusMessage(MessageLevel.Info, fasor1.Value.ToString()); OnStatusMessage(MessageLevel.Info, multiplicador.ToString()); base.Dispose(disposing); // Kill my database connections, etc... //m_database.Dispose(); } public override void Initialize() { base.Initialize(); OnStatusMessage(MessageLevel.Warning, "Logré inicializarme otra vez"); } protected override void PublishFrame(IFrame frame, int index) { IMeasurement fasor1 = frame.Measurements.Values.ElementAtOrDefault(0); IMeasurement fasor2 = frame.Measurements.Values.ElementAtOrDefault(1); IMeasurement fasor3 = frame.Measurements.Values.ElementAtOrDefault(2); double resultado1 = (fasor1.Value + fasor2.Value + fasor3.Value) * multiplicador; bool buenacalidad = fasor1.TimestampQualityIsGood() && fasor1.ValueQualityIsGood() && fasor2.TimestampQualityIsGood() && fasor2.ValueQualityIsGood() && fasor3.TimestampQualityIsGood() && fasor3.ValueQualityIsGood(); //if(resultado1 > 120 || resultado1 < 120) //{ IMeasurement disparo = Measurement.Clone(OutputMeasurements[0], resultado1, frame.Timestamp); //disparo.StateFlags = buenacalidad ? MeasurementStateFlags.Normal : MeasurementStateFlags.BadData; OnNewMeasurements(new[] { disparo }); //} //throw new NotImplementedException(); } }
}