I am new to open PDC and data streaming. I have installed open PDC on Linux and I want to fetch/display the actual data either on the Linux terminal or through some client application to be deployed on Edge.
I have tested the openPDC console through PMU connection Tester and have developed a C# application on Windows using .net4.8 and it uses TCP connection string to fetch the IEEEC37 formatted data through open PDC installed on Linux.
However, my C# program does not work on a Linux environment even if I change target to 5.0.
I always receive this error on Linux when I run the C# program using any target framework,
FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type of field ‘GSF.StringExtensions:s_pluralizationService’ (0) due to: Could not load file or assembly 'System.Data.Entity.Design, Version=184.108.40.206, Culture=neutral, PublicKeyToken=… or one of its dependencies.
at GSF.PhasorProtocols.MultiProtocolFrameParser.set_ConnectionString (System.String value) [0x00007] in … :0
at DeviceToData.Program.Main (System.String args) …
I need the data stream that should be compatible with Linux to run on the embedded devices. Can you please help how can I fetch the data stream through the open PDC console application or any suggestion for a client application?
Would really appreciate any help.
Are you also compiling the GSF dependencies against .NET 5, or are you using the dll’s as-is within your application?
Your exception may have to do with not selecting “Mono” as a build configuration. That particular library that is producing the error is not available on Mono.
Yes, I am using DLL’s as-is within the application. Can you please guide how to compile GSF dependencies against .Net 5.
Just for the information, I am basically a Java developer, my first time working with .Net and Linux as well.
I am a bit wondering if there is any Java-based solution to tap the data stream from the open PDC console application or otherwise can you guide how can I display data stream on the console on Linux or write to a temporary file otherwise?
My final goal is to fetch the raw data, for a PMU, through openDBC that isn’t C37 encoded and deploy the solution on the edge device, so the solution should be compatible with the Linux environment.
Any help would be much appreciated.
Thank you for your reply.
Yeah. I got the same error even if I change the target framework to 4.6, 4.7, 4.8, 5.0 or netcore3.1, it seems to be the same.
Do you mean I should select Mono as the build configuration?
The C# application is developed using “Device to Data in 5 Easy Steps” in the open PDC documentation that runs well in Windows. When I run the same application using the following commands in Mono
csc Program.cs -r:DLL’s
mcs out:Program.exe -r:DLL’s *.cs
it gives the same error at the end, I also tried using different versions of DLL’s. For the system.data.entity.design.dll error, I tried including System.Data.Entity.Repository and others in the project file as well but nothing works well.
This is my .csproj file
<PackageReference Include="Confluent.Kafka" Version="1.4.2"/>
<PackageReference Include="GSF.PhasorProtocols" Version="2.3.386-beta"/>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3"/>
<PackageReference Include="GSF.Communication" Version="2.3.386-beta"/>
<PackageReference Include="GSF.Core" Version="2.3.386-beta"/>
<PackageReference Include="GSF.TimeSeries" Version="2.3.386-beta"/>
<PackageReference Include="System.Data.Entity.Repository" Version="220.127.116.11"/>
Can you please guide me if this is possible to run the same application with MONO or any other way of fetching or displaying data from open PDC console application on Linux. The only problem is I want a distributed solution as working with IoT devices for data streaming across Edge.
Thanks in advance.
Yes, the MONO build configuration. You need a GSF build for MONO, then one for openPDC too.
Also, the code only operates with .NET 4.6 currently.
Thank you for your answer, will build both the source with MONO.
Do we have something in the documentation somewhere for building the source code with MONO. Can you pinpoint any particular section in the documentation?
Will ping you again for help if needed, thank you so much!
Also make sure you update the openPDC GSF dependencies with the new ones you compiled using MONO.
Also note that paths on Linux are a bit different. We have some helpful items on Linux config that may be able to assist you:
This also includes a script that shows the build steps, this could help you too:
Especially from a path and rights perspective. Note that just running script as-is might work, but it references an openPDC version that is several years old, so doing what you are doing manually is best for making use of current code.
Thanks, Ritchie for the answer.
I am a bit wondering, does this mean when I installed open PDC on Linux following the guide here https://www.gridprotectionalliance.org/docs/products/openPDC/openPDConPOSIX.pdf.
it does not build GSF and openPDC itself using Mono.
These are the main steps I followed during the installation process
- Install MONO for the For Ubuntu 18.04
- Install openPDC using the “sudo bash install-openPDC.sh -p” command by downloading scripts from here http://www.gridprotectionalliance.org/NightlyBuilds/openPDC/Scripts/install-openPDC.sh
- Then run this command sudo mono /opt/openPDC/openPDC.exe -RunAsConsole"
I just want to cross-check if GSF code got compiled using Mono during this installation process?
The script install does compile GSF for Mono as part of that operation. It then copies the compiled assemblies into the GSF dependencies folder for openPDC before attempting to compile openPDC for Mono.
Yes, I found the dependencies folder and linked the DLLs path in my client (translator) application. It’s working now.
Thank you so much, much appreciated!!!