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

Extracting measurements from data stream using Action Adapters

Sep 10, 2011 at 3:33 AM
Edited Sep 10, 2011 at 5:28 AM

I have been attempting to extract specific measurements coming from multiple PMU devices in openPDC. These measurements will be processed and the result is intended to trigger an external device.

We have been trying to perform measurement extraction using a custom Action Adapter using the PublishFrame method, but to no avail. I was wondering if this is the best way to go about this task?

We have not reached the implementation of the trigger since we have been failing miserably with the aforementioned task. I would greatly appreciate if anyone can help me with this. 

Sep 13, 2011 at 10:29 PM

might help:

    Probably Input Adapter is what would work best if you want use trigger functionality just overrite event

    OnNewMeasurements(ICollection<IMeasurement>)

    "When the input adapter has received measurements from the data input source, it needs to call this method in order to notify the system and send in the new measurements."

     http://openpdc.codeplex.com/wikipage?title=Custom Adapter&referringTitle=Documentation

     Or if it takes too much time you can setup stream into external source like database, to write trigger there.

dk.

 

Sep 14, 2011 at 2:07 AM

Also make sure you are defining the "input measurements" you want your adapter to process (see http://openpdc.codeplex.com/wikipage?title=Connection Strings&referringTitle=Documentation#input_and_output_syntax).

Additonally the lead and lag time parameters (see http://openpdc.codeplex.com/wikipage?title=Connection Strings&referringTitle=Documentation#ActionAdapterBase) are very important to configure properly, otherwise measurements will be discarded - you can check the adapter statistics by issuing a "list <adapter>" command from any of the console windows where <adapter> is your adapter acronym or runtime ID. These stats will show how many measurements are actually making it into your adapter.

Thanks!
Ritchie

Sep 14, 2011 at 4:33 AM

Hello,

 

It turns out that our problem was with the database. I had to re-install MySQL and openPDC and our code worked. We had the connection strings properly configured before but because of some error in the installation we could not identify, it kept on failing. A complete re-installation was the last thing we ever thought of. 

Nevertheless, I appreciate your responses. Thanks!

 

Noah