Commit 74208f57 authored by Claes Sjofors's avatar Claes Sjofors

Emon, info messages without eventype ack is not displayed in arlarm list, and...

Emon, info messages without eventype ack is not displayed in arlarm list, and without return, return message is not displayed in eventlist
parent 668c6b0e
...@@ -1281,6 +1281,10 @@ sendAlarmStatus( sOutunit *op) ...@@ -1281,6 +1281,10 @@ sendAlarmStatus( sOutunit *op)
case mh_eEvent_UserAlarm4: case mh_eEvent_UserAlarm4:
ep = ap->detect_etp->ep; ep = ap->detect_etp->ep;
if ( ap->detect_etp->event == mh_eEvent_Info && !(ep->msg.info.EventFlags & mh_mEventFlags_Ack))
break;
if ( ep) if ( ep)
is_for_outunit = isForOutunit(op, ep->outunit, ep->object.Objid, ep->objName, ep->msg.info.EventFlags, is_for_outunit = isForOutunit(op, ep->outunit, ep->object.Objid, ep->objName, ep->msg.info.EventFlags,
ep->eventType, ep->local); ep->eventType, ep->local);
...@@ -1315,6 +1319,9 @@ sendAlarmStatus( sOutunit *op) ...@@ -1315,6 +1319,9 @@ sendAlarmStatus( sOutunit *op)
ep = ap->detect_etp->ep; ep = ap->detect_etp->ep;
if ( ap->detect_etp->event == mh_eEvent_Info && !(ep->msg.info.EventFlags & mh_mEventFlags_Ack))
break;
if ( ep) if ( ep)
is_for_outunit = isForOutunit(op, ep->outunit, ep->object.Objid, ep->objName, ep->msg.info.EventFlags, is_for_outunit = isForOutunit(op, ep->outunit, ep->object.Objid, ep->objName, ep->msg.info.EventFlags,
ep->eventType, ep->local); ep->eventType, ep->local);
...@@ -2524,6 +2531,28 @@ handleReturn ( ...@@ -2524,6 +2531,28 @@ handleReturn (
{ {
sEvent *ep; sEvent *ep;
if ( sp->link.event == mh_eEvent_Info &&
!(sp->link.eventFlags & mh_mEventFlags_Ack) &&
!(sp->link.eventFlags & mh_mEventFlags_Return)) {
/* Remove without adding event */
sActive *ap = (sActive *)sp;
ap->status.All = 0;
updateAlarmInfo(ap);
if (ap->source == mh_eSource_Scanner) {
sp->sup->DetectCheck = TRUE; /* Activate detection */
sp->sup->AlarmCheck = TRUE; /* Activate alarm supervision */
sp->sup->AlarmStatus.All = ap->status.All;
if (sp->supType == mh_eSupType_Cycle) {
pwr_sClass_CycleSup *cp = (pwr_sClass_CycleSup *) sp->op;
cp->DelayNoted = FALSE;
cp->Delayed = FALSE;
}
}
activeListRemove(ap);
return;
}
ep = eventListInsert(mh_eEvent_Return, NULL, (sActive*) sp); ep = eventListInsert(mh_eEvent_Return, NULL, (sActive*) sp);
switch (sp->link.event) { switch (sp->link.event) {
...@@ -4527,13 +4556,13 @@ updateAlarm ( ...@@ -4527,13 +4556,13 @@ updateAlarm (
if (ap->source == mh_eSource_Scanner) { if (ap->source == mh_eSource_Scanner) {
ap->status.Event.Prio = sp->sup->EventPriority; ap->status.Event.Prio = sp->sup->EventPriority;
if (sp->sup->EventFlags & mh_mEventFlags_Returned) if (sp->sup->EventFlags & mh_mEventFlags_Returned)
ap->status.Event.Status &= ~mh_mEventStatus_NotRet; ap->status.Event.Status &= ~mh_mEventStatus_NotRet;
} else { } else {
ap->status.Event.Prio = aap->message.EventPrio; ap->status.Event.Prio = aap->message.EventPrio;
if (aap->message.EventFlags & mh_mEventFlags_Returned) if (aap->message.EventFlags & mh_mEventFlags_Returned)
ap->status.Event.Status &= ~mh_mEventStatus_NotRet; ap->status.Event.Status &= ~mh_mEventStatus_NotRet;
} }
ep->msg.message.Status = ap->status.All; ep->msg.message.Status = ap->status.All;
break; break;
case mh_eEvent_Info: case mh_eEvent_Info:
...@@ -4542,11 +4571,11 @@ updateAlarm ( ...@@ -4542,11 +4571,11 @@ updateAlarm (
if (ap->source == mh_eSource_Scanner) { if (ap->source == mh_eSource_Scanner) {
ap->status.Event.Prio = 0; ap->status.Event.Prio = 0;
if (sp->sup->EventFlags & mh_mEventFlags_Returned) if (sp->sup->EventFlags & mh_mEventFlags_Returned)
ap->status.Event.Status &= ~mh_mEventStatus_NotRet; ap->status.Event.Status &= ~mh_mEventStatus_NotRet;
} else { } else {
ap->status.Event.Prio = 0; ap->status.Event.Prio = 0;
if (aap->message.EventFlags & mh_mEventFlags_Returned) if (aap->message.EventFlags & mh_mEventFlags_Returned)
ap->status.Event.Status &= ~mh_mEventStatus_NotRet; ap->status.Event.Status &= ~mh_mEventStatus_NotRet;
} }
ep->msg.message.Status = ap->status.All; ep->msg.message.Status = ap->status.All;
break; break;
...@@ -4557,7 +4586,7 @@ updateAlarm ( ...@@ -4557,7 +4586,7 @@ updateAlarm (
if (ap->idx >= l.event_l->oldIdx) { if (ap->idx >= l.event_l->oldIdx) {
/* Alarm message still in event list, update status */ /* Alarm message still in event list, update status */
l.event_l->list[ap->idx % l.event_l->size].msg.message.Status = l.event_l->list[ap->idx % l.event_l->size].msg.message.Status =
ap->status.All; ap->status.All;
} }
break; break;
case mh_eEvent_Return: case mh_eEvent_Return:
...@@ -4565,16 +4594,18 @@ updateAlarm ( ...@@ -4565,16 +4594,18 @@ updateAlarm (
if (ap->idx >= l.event_l->oldIdx) { if (ap->idx >= l.event_l->oldIdx) {
/* Alarm message still in event list, update status */ /* Alarm message still in event list, update status */
l.event_l->list[ap->idx % l.event_l->size].msg.message.Status = l.event_l->list[ap->idx % l.event_l->size].msg.message.Status =
ap->status.All; ap->status.All;
} }
break; break;
default: default:
break; break;
} }
if ((ap->status.Event.Status & if (((ap->status.Event.Status &
(mh_mEventStatus_NotRet | mh_mEventStatus_NotAck)) == 0 (mh_mEventStatus_NotRet | mh_mEventStatus_NotAck)) == 0) ||
) { /* The alarm is acked and unactive, remove it from alarm list */ (ap->event == mh_eEvent_Info && ep->event == mh_eEvent_Return &&
!(aap->message.EventFlags & mh_mEventFlags_Ack))
) { /* The alarm is acked and unactive, remove it from alarm list */
ap->status.All = 0; ap->status.All = 0;
updateAlarmInfo(ap); updateAlarmInfo(ap);
if (ap->source == mh_eSource_Scanner) { if (ap->source == mh_eSource_Scanner) {
......
...@@ -849,6 +849,10 @@ void EvList::event_info( mh_sMessage *msg) ...@@ -849,6 +849,10 @@ void EvList::event_info( mh_sMessage *msg)
flow_eDest dest_code; flow_eDest dest_code;
brow_tNode dest_node; brow_tNode dest_node;
if ( type == ev_eType_AlarmList &&
!(event->Info.EventFlags & mh_mEventFlags_Ack))
return;
if ( type == ev_eType_AlarmList && if ( type == ev_eType_AlarmList &&
!( msg->Status & mh_mEventStatus_NotAck || !( msg->Status & mh_mEventStatus_NotAck ||
msg->Status & mh_mEventStatus_NotRet)) msg->Status & mh_mEventStatus_NotRet))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment