示例#1
0
        private void Do_Notify_AlarmOrEvent(AdapterAlarmOrEvent eventInfo, Adapter adapter)
        {
            var ae = new AlarmOrEventInfo()
            {
                Time            = eventInfo.Time,
                Severity        = eventInfo.Severity,
                Type            = eventInfo.Type,
                Message         = adapter.Name + ": " + eventInfo.Message,
                Details         = eventInfo.Details,
                AffectedObjects = eventInfo.AffectedDataItems.Select(di => ObjectRef.Make(moduleID, di)).ToArray(),
                Initiator       = null
            };

            notifier.Notify_AlarmOrEvent(ae);
        }
 public void Notify_AlarmOrEvent(AdapterAlarmOrEvent eventInfo)
 {
     connector.SendEvent(AdapterMsg.ID_Event_AlarmOrEvent, s => StdJson.ObjectToStream(eventInfo, s));
 }
示例#3
0
 // This will be called from a different Thread, therefore post it to the main thread!
 public void Notify_AlarmOrEvent(AdapterAlarmOrEvent eventInfo, Adapter adapter)
 {
     moduleThread.Post(Do_Notify_AlarmOrEvent, eventInfo, adapter);
 }
示例#4
0
 public void Notify_AlarmOrEvent(AdapterAlarmOrEvent eventInfo)
 {
     m.Notify_AlarmOrEvent(eventInfo, a);
 }