libiec61850 icon indicating copy to clipboard operation
libiec61850 copied to clipboard

Generate .cfg from a .cid with C++ ?

Open DonavanMartin opened this issue 3 years ago • 7 comments

Hi,

Is it possible to generate a .cfg from a .cid without JAVA (genmodel.jar)? I looked in the tools folder and it seems that this feature is only available in JAVA but the libiec61850 server language is C++. The optimal way should be the generation of the .cfg directly from the iec61850 server.

Thanks

DonavanMartin avatar Apr 01 '22 12:04 DonavanMartin

I have C#. Actually, it's rewritten from Java.

kevinjhang avatar Jul 19 '22 07:07 kevinjhang

Thanks for your reply @kevinjhang... Python or C should be a better option to make it compatible. Server don't necessary have C#, that's also the case with JAVA...

donavan-tangible avatar Nov 03 '22 17:11 donavan-tangible

I create model directly from cid file use pugixml lib. So it is possible, you can do it from the JAVA

jameszxj avatar Jan 31 '23 03:01 jameszxj

I know I can do it in JAVA... But JAVA and C# are only ~15% of the languages used in this repo. If you are running a server in C or C++ then you need to add all the JAVA logic just to convert a .cid to a .cfg file... Actually this ticket is related to an implementation issue.

Capture d’écran, le 2023-01-31 à 09 00 16

DonavanMartin avatar Jan 31 '23 14:01 DonavanMartin

The idea of the cfg file is that you don't need a SCL/XML parser on the target system and also not having to download the SCL(CID) file to the target system running the IEC 61850 server. It's to save resources on the target system.

In the cases we use the cfg files we usually have a separate configuration tool (usually a .NET windows tool) to create the file.

When the device running the server has more resources it also makes sense to download the CID file directly to the device. For this the commercial version of libiec61850 has C code to read the CID file and generate the data model and configuration at runtime.

But I think it doesn't make so much sense to create the cfg at runtime using C code on the same system where the server runs.

mzillgith avatar Jan 31 '23 14:01 mzillgith

I know the whole process of .cid and .cfg files... (static/dynamic model) The problem is that the languages used to convert the .cid file to .cfg file are only C# and JAVA... This is nonsense... The server code is written in C... Currently, it is absolutely necessary to install another language for a simple file conversion. At the end, the .cfg is used on a server written in C or maybe C# (I don't use C#).

It should be really simpler if the file converting process is a part of the server it self, by uploading a new .cid file.

DonavanMartin avatar Jan 31 '23 15:01 DonavanMartin