beanit / iec61850bean

A Java IEC 61850 MMS stack for clients and servers.
https://www.beanit.com/iec-61850/
Apache License 2.0
143 stars 82 forks source link

Server dont update changes from Client #34

Open Helix2551 opened 2 years ago

Helix2551 commented 2 years ago

I am using the current git repo. When I am setting for example "ied1lDevice1/DSCH1.NamPlt.vendor[DC]" to "TestClient" via ClientGUI or ConsoleClient, changes are available on each connected Client when sending a "GetDataValue request" for the same node. So setting data was successful, but when I print the server model in ConsoleServer the changes are not visible.

But when I set the same attribute via "w- write value to model node" from ConsoleServer, changes are visible when printing the server model.

Is this behavior on purpose? Did I miss something?

Helix2551 commented 2 years ago

I found the "problem". ConsoleServer creats an initial copy of the serverModel from ServerSAP. --> serverModel = serverSap.getModelCopy(); So changes from Clients are not visible in that Copy.

My Solution: case PRINT_SERVER_MODEL_KEY: System.out.println("** Printing model."); serverModel = serverSap.getModelCopy(); System.out.println(serverModel);