This project has moved and is read-only. For the latest updates, please go here.

Re:Using the OnNewMeasurements() method

Jun 26, 2012 at 1:04 AM


I am trying to introduce a new measurement to the C37.118 stream via custom action adapter. According to the documentation, I should be able to do this using "void OnNewMeasurements(ICollection<IMeasurement> measurements)", but I could not really figure out how to use it.

What I am trying to do is define a certain status value based on the real-time phasor values. However, I do not know how to go about adding this new variable to the stream. I have tried adding digital and analog inputs from my PMU stream, and overwriting the values, but the program will not allow it since, I found out eventually, the values are read-only.

It'd be nice if someone can post an example of an adapter using the OnNewMeasurements() method.

I'd greatly appreciate your response. Thanks!


Jun 29, 2012 at 10:02 PM
Edited Jun 29, 2012 at 10:02 PM

Check out the PowerAdapters in the open source code - lot's of "custom adapters" here. There are more in the adapters section of the time-series framework source code too.

Assuming you have already followed steps to create a custom adapter:

Writing a Custom Adapter


Jun 29, 2012 at 10:50 PM

Hi again Ritchie,

That was exactly what I was looking for! I think I can work from this. Thank you very much!


Feb 5, 2013 at 5:33 PM

I've developed a custom adapter as the ones in PowerAdapters. After that, I tried to start a subscription in a ViewModel and, although the method OnNewMeasurements() is executed, it didn't trigger the event m_subscriber_NewMeasurements.

Does anybody know what might be the problem?