private static void HandleAnyEvent(object sender, PlcNotifications.PlcDeviceConnectionEventArgs e)
        {
            // The passed event data (e) does provide the instance affected by the event.
            PlcDeviceConnection connection = e.Connection;

            Console.WriteLine(
                "1. Way: State of connection to '{0}': {1}",
                connection.Device.EndPoint,
                connection.State);
        }
Beispiel #2
0
 private static void HandleConnectionCreated(object sender, PlcNotifications.PlcDeviceConnectionEventArgs e)
 {
     e.Connection.StateChanged   += Program.HandleStateChanged;
     e.Connection.Status.Changed += Program.HandleConnectionStatusChanged;
 }