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

Multiple Connections with the OpenPDC API

Mar 23, 2011 at 10:12 PM

Hello,

I discovered the OpenPDC project while looking for available code
supporting different Synchrophasor protocols. I am glad that such
a tool exists, and upon browsing the source code I can see
already that it is a great tool.

I'd like to use the OpenPDC API in a future project and I'm
beginning to experiment with it to determine how it's used. I've
run through the guide entitled "Device to Data in 5 Easy Steps"
in the project's documentation and now I am attempting to code
more interesting examples involving multiple, simultaneous
connections to different PDC's using a menu and display similar
to the "PMU Connection Tester."

I have read through most of the documentation and see that I can
retreive any of the device and phasor information through the
MultiProtocolFrameParser class members and properties and making
any calculations I need from them. However, I would like to know
if this is the intended route to take when having to manage
multiple connections. Should I simply have a class which creates
a 'new MultiProtocolFrameParser()' for each PDC and handles all Data
Access through it, or is there a better way?

Regards,
Andrew

Mar 24, 2011 at 1:59 PM

Great to hear you are using the code!

The MultiProtocolFrameParser is used per connection - so yes, you would create a new one for each PDC or device you are connecting to... You can see this in action by downloading the latest openPDC.

Thanks!
Ritchie

Mar 25, 2011 at 10:27 AM

Thank you for your reply!

I'm beginning to make progress in regards to my test project and understanding OpenPDC itself. I'm creating MultiProtocolFrameParser objects for the connections, and I'm accessing all the values through the Cell properties to figure out the PMU, Phasor, and PhasorValues for each connection. However, I am at a point where I must decide on how best to map all of this data so that it will be accessible to my program. Perhaps first as an example would be simply to create a treeview or some hierarchical representation. Would it be wise to map the values I want during the IDataFrame  receive event, like in "Device to Data in 5 Easy Steps?" I imagine I would simply assign values such as device.PhasorValues[x].CompositeValue[y] and build tables and a dataset from them, but is this good practice with OpenPDC? I see sections of the code which have a Measurements table for the devices, but I'm not sure how I would use it.

I am essentially attempting to expand upon the example project and add support for multiple connections and whatever gui features that will help me understand the API.

Thanks,

Andrew

Mar 25, 2011 at 3:38 PM

This is can be a complex process. For your best understanding, I suggest you look at the PhasorMeasurementMapper that uses the MultiprotocolFrameParser internally. This class is an InputAdapter representing one connection per device (PDC, PMU, F-NET, etc.) that takes the composite values and maps them to measurements using the measurement's "signal reference" - the key to the entire mapping process.