OpenPDC to OpenPDC communication

Okay, like I originally thought, it looks like it’s not subscribing to the data from PDC1. Here are some things you can check.


When the subscriber connects to the publisher, you should see some messages in the openPDC Console on the publisher system that look similar to the following.

[INTERNAL!DATAPUBLISHER] Start time sent to swills-desk.gpa.gridprotectionalliance.org ([::ffff:127.0.0.1]:46925).
[INTERNAL!DATAPUBLISHER] Client subscribed as compact unsynchronized with 138 signals.
[INTERNAL!DATAPUBLISHER] Received meta-data refresh request from swills-desk.gpa.gridprotectionalliance.org ([::ffff:127.0.0.1]:46925), preparing response...
[INTERNAL!DATAPUBLISHER] 258 records spanning 4 tables of meta-data prepared in 19 milliseconds, sending response to swills-desk.gpa.gridprotectionalliance.org ([::ffff:127.0.0.1]:46925)...

First, launch the openPDC Console on PDC1. Next, initialize the subscriber on PDC2. You should see the messages appear in the console on PDC1. Pay particular attention to the message that describes the number of signals the client subscribed to. If the message says it subscribed to 0 signals, then we know that it’s a problem with how the subscriber is evaluating the filter string in the OutputMeasurements connection string parameter.


You can query the database to determine what measurements the subscriber thinks it’s subscribing to. On PDC2, use the Browse Input Devices page, find and click on the subscriber device, and look at the connection string. At the end of that string, there should be a connection string parameter that defines the measurements the subscriber is subscribing to. It should look like this.

outputMeasurements={FILTER ActiveMeasurements WHERE Protocol = 'GatewayTransport' }

We can convert this string to a database query by replacing “FILTER ActiveMeasurements” with “SELECT * FROM ActiveMeasurement”. Note that the filter expression uses the plural ActiveMeasurements while the database uses the singular ActiveMeasurement.

SELECT * FROM ActiveMeasurement WHERE Protocol = 'GatewayTransport'

Execute that query against the database to get the list of measurements.


The next step would be to determine if the measurements returned by the subscriber query actually exist on the publisher, but we’ll start with this. If the publisher claims that the subscriber is subscribing to more than 0 signals, then we’re barking up the wrong tree. If the query returns no results, then we need to figure out why.

Thanks,
Stephen