Пример #1
0
//        private void FireBvtDirectEvent(DeviceState State, Types.BVT.TestResults Result, bool IsUdsmUrsm)
//        {
//            var message = string.Format("BVT direct test state {0}", State);
//
//            if (State == DeviceState.Success)
//                message = string.Format($"BVT {(IsUdsmUrsm ? "UdsmUrsm" : "")} direct test result {0} V, {1} mA", Result.VDRM, Result.IDRM);
//
//            SystemHost.Journal.AppendLog(ComplexParts.BVT, LogMessageType.Info, message);
//            m_Communication.PostBVTDirectEvent(State, Result);
//        }
//
//        private void FireBvtReverseEvent(DeviceState State, Types.BVT.TestResults Result, bool IsUdsmUrsm)
//        {
//            var message = string.Format("BVT reverse test state {0}", State);
//
//            if (State == DeviceState.Success)
//                message = string.Format($"BVT {(IsUdsmUrsm ? "UdsmUrsm" : "")}  reverse test result {0} V, {1} mA", Result.VRRM, Result.IRRM);
//
//            SystemHost.Journal.AppendLog(ComplexParts.BVT, LogMessageType.Info, message);
//            m_Communication.PostBVTReverseEvent(State, Result);
//        }

        private void FireNotificationEvent(Types.BVT.HWProblemReason Problem, Types.BVT.HWWarningReason Warning,
                                           Types.BVT.HWFaultReason Fault, Types.BVT.HWDisableReason Disable)
        {
            SystemHost.Journal.AppendLog(ComplexParts.BVT, LogMessageType.Warning,
                                         string.Format(
                                             "BVT device notification: problem {0}, warning {1}, fault {2}, disable {3}",
                                             Problem, Warning, Fault, Disable));

            m_Communication.PostBVTNotificationEvent(Problem, Warning, Fault, Disable);
        }
Пример #2
0
 public void PostBVTNotificationEvent(Types.BVT.HWProblemReason Problem, Types.BVT.HWWarningReason Warning,
                                      Types.BVT.HWFaultReason Fault, Types.BVT.HWDisableReason Disable)
 {
     EnumerateClients(Client => Client.BVTNotificationHandler(Problem, Warning, Fault, Disable));
 }