libiec61850 icon indicating copy to clipboard operation
libiec61850 copied to clipboard

How to use SetConnectionIndicationHandler

Open SpaghettiCodeBoy opened this issue 2 years ago • 2 comments

Hello! I'm currently working on a research project and absolutely love this project. I'm just wondering, how you can use the SetConnectionIndicationHandler() function. The ConnectionIndicationHandler needs the following Parameters: IedServer iedServer, ClientConnection clientConnection, bool connected, object parameter, but how do I get the clientConnection?

Thanks a lot!

SpaghettiCodeBoy avatar May 13 '22 15:05 SpaghettiCodeBoy

The ConnectionIndicationHandler is a callback function you have to provide and when called your code will receive these parameters. Like in this example: https://github.com/mz-automation/libiec61850/blob/35ac4794301fb5d1f660d6ff0b4e50acd64632d9/examples/server_example_basic_io/server_example_basic_io.c#L74

mzillgith avatar May 31 '22 18:05 mzillgith

Thank you very much for your answer @mzillgith, but I'm working in C#. I tried to setup the SetConnectionHandler Function like the other Event Handlers (of course with changed parameters) but nothing seems to be working.

image

SpaghettiCodeBoy avatar Aug 12 '22 14:08 SpaghettiCodeBoy