private void Cpu_Error(object sender, PviEventArgs e) { String ipAddress = String.Empty; if (sender is Cpu cpu) { ipAddress = cpu.Connection.TcpIp.DestinationIpAddress; } var pviEventMsg = Utils.FormatPviEventMessage($"ServiceWrapper.Cpu_Error. IpAddress={ipAddress} ", e); _eventNotifier.OnCpuError(sender, new PviApplicationEventArgs() { Message = pviEventMsg }); }