Commit 8dea9c42 authored by Claes Sjofors's avatar Claes Sjofors

Mh, added event type Info and renamed Info to InfoSuccess. Only Info messages...

Mh, added event type Info and renamed Info to InfoSuccess. Only Info messages with InfoWindow is displayed in operator window
parent e7445d1f
......@@ -28,6 +28,7 @@ public class AEv {
public PlowNodeClass eveNcBAlarm;
public PlowNodeClass eveNcCAlarm;
public PlowNodeClass eveNcDAlarm;
public PlowNodeClass eveNcInfoSuccess;
public PlowNodeClass eveNcInfo;
public PlowPixmapData iconEventAlarm;
public PlowPixmapData iconEventAcked;
......@@ -70,6 +71,12 @@ public class AEv {
public void newMess(MhrEvent ev) {
switch (ev.eventType) {
case Mh.mh_eEvent_Alarm:
case Mh.mh_eEvent_MaintenanceAlarm:
case Mh.mh_eEvent_SystemAlarm:
case Mh.mh_eEvent_UserAlarm1:
case Mh.mh_eEvent_UserAlarm2:
case Mh.mh_eEvent_UserAlarm3:
case Mh.mh_eEvent_UserAlarm4:
// Add to alarm and event list
new AEvItemAlarm(aev, ev, null, Plow.DEST_AFTER);
cmnAla.configure();
......@@ -125,6 +132,7 @@ public class AEv {
}
break;
case Mh.mh_eEvent_Info:
case Mh.mh_eEvent_InfoSuccess:
// Add to alarm list
if((ev.eventFlags & Mh.mh_mEventFlags_InfoWindow) != 0) {
new AEvItemAlarm(aev, ev, null, Plow.DEST_AFTER);
......@@ -327,7 +335,7 @@ public class AEv {
cmnEve.insert_nc(eveNcDAlarm);
r1 = new PlowRect(cmnEve, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
r2 = new PlowRect(cmnEve, 0.4D, 0.3D, 0.9D, 0.9D, Plow.COLOR_GREEN, Plow.COLOR_BLACK,true,true,true);
r2 = new PlowRect(cmnEve, 0.4D, 0.3D, 0.9D, 0.9D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,true,true);
a1 = new PlowAnnot(cmnEve, 4D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnEve, 10D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
a3 = new PlowAnnot(cmnEve, 26D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 2);
......@@ -341,6 +349,21 @@ public class AEv {
eveNcInfo.insert(p1);
cmnEve.insert_nc(eveNcInfo);
r1 = new PlowRect(cmnEve, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
r2 = new PlowRect(cmnEve, 0.4D, 0.3D, 0.9D, 0.9D, Plow.COLOR_GREEN, Plow.COLOR_BLACK,true,true,true);
a1 = new PlowAnnot(cmnEve, 4D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnEve, 10D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
a3 = new PlowAnnot(cmnEve, 26D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 2);
p1 = new PlowAnnotPixmap(cmnEve, 2D, 0.28D, 0);
eveNcInfoSuccess = new PlowNodeClass(cmnEve);
eveNcInfoSuccess.insert(r1);
eveNcInfoSuccess.insert(r2);
eveNcInfoSuccess.insert(a1);
eveNcInfoSuccess.insert(a2);
eveNcInfoSuccess.insert(a3);
eveNcInfoSuccess.insert(p1);
cmnEve.insert_nc(eveNcInfoSuccess);
r1 = new PlowRect(cmnEve, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
a1 = new PlowAnnot(cmnEve, 4D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnEve, 10D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
......
......@@ -19,7 +19,16 @@ System.out.println("New itemevent: " + e.eventPrio + " " + e.eventText + " " + e
case Mh.mh_eEvent_Info:
nc = aev.eveNcInfo;
break;
case Mh.mh_eEvent_InfoSuccess:
nc = aev.eveNcInfoSuccess;
break;
case Mh.mh_eEvent_Alarm:
case Mh.mh_eEvent_MaintenanceAlarm:
case Mh.mh_eEvent_SystemAlarm:
case Mh.mh_eEvent_UserAlarm1:
case Mh.mh_eEvent_UserAlarm2:
case Mh.mh_eEvent_UserAlarm3:
case Mh.mh_eEvent_UserAlarm4:
switch ( this.e.eventPrio) {
case Mh.mh_eEventPrio_A:
nc = aev.eveNcAAlarm;
......@@ -45,6 +54,12 @@ System.out.println("New itemevent: " + e.eventPrio + " " + e.eventText + " " + e
switch(this.e.eventType) {
case Mh.mh_eEvent_Alarm:
case Mh.mh_eEvent_MaintenanceAlarm:
case Mh.mh_eEvent_SystemAlarm:
case Mh.mh_eEvent_UserAlarm1:
case Mh.mh_eEvent_UserAlarm2:
case Mh.mh_eEvent_UserAlarm3:
case Mh.mh_eEvent_UserAlarm4:
node.setAnnotPixmap(0, aev.iconEventAlarm);
break;
case Mh.mh_eEvent_Ack:
......
......@@ -31,7 +31,7 @@ public class Mh {
public static final int mh_eEvent_Reblock = 6;
public static final int mh_eEvent_Return = 7;
public static final int mh_eEvent_Unblock = 8;
public static final int mh_eEvent_Info = 32;
public static final int mh_eEvent_InfoSuccess = 32;
public static final int mh_eEvent_Alarm = 64;
public static final int mh_eEvent_MaintenanceAlarm = 128;
public static final int mh_eEvent_SystemAlarm = 256;
......@@ -39,7 +39,8 @@ public class Mh {
public static final int mh_eEvent_UserAlarm2 = 1024;
public static final int mh_eEvent_UserAlarm3 = 2048;
public static final int mh_eEvent_UserAlarm4 = 4096;
public static final int mh_eEvent_ = 4097;
public static final int mh_eEvent_Info = 8192;
public static final int mh_eEvent_ = 8193;
public static final int EventType_ClearAlarmList = 66;
}
......@@ -97,6 +97,7 @@ typedef struct HistQueryStruct
bool eventType_UserAlarm3;
bool eventType_UserAlarm4;
bool eventType_Info;
bool eventType_InfoSuccess;
bool eventType_Return;
bool eventType_Cancel;
bool eventType_Block;
......@@ -138,7 +139,7 @@ JNIEXPORT void JNICALL Java_jpwr_rt_Hist_initHistIDs
* Signature: (Ljava/lang/String;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/String;)[Ljpwr/rt/MhrEvent;
*/
JNIEXPORT jobjectArray JNICALL Java_jpwr_rt_Hist_getHistList
(JNIEnv *env, jclass obj, jstring jstartTime, jstring jstopTime, jboolean jtypeInfo, jboolean jtypeAlarm, jboolean jtypeMaintenanceAlarm, jboolean jtypeSystemAlarm, jboolean jtypeUserAlarm1, jboolean jtypeUserAlarm2, jboolean jtypeUserAlarm3, jboolean jtypeUserAlarm4, jboolean jtypeReturn, jboolean jtypeAck, jboolean jprioA, jboolean jprioB, jboolean jprioC, jboolean jprioD, jstring jname, jstring jtext)
(JNIEnv *env, jclass obj, jstring jstartTime, jstring jstopTime, jboolean jtypeInfo, jboolean jtypeInfoSuccess, jboolean jtypeAlarm, jboolean jtypeMaintenanceAlarm, jboolean jtypeSystemAlarm, jboolean jtypeUserAlarm1, jboolean jtypeUserAlarm2, jboolean jtypeUserAlarm3, jboolean jtypeUserAlarm4, jboolean jtypeReturn, jboolean jtypeAck, jboolean jprioA, jboolean jprioB, jboolean jprioC, jboolean jprioD, jstring jname, jstring jtext)
{
#ifdef PWRE_CONF_LIBDB_CXX
const char *str;
......@@ -205,6 +206,7 @@ JNIEXPORT jobjectArray JNICALL Java_jpwr_rt_Hist_getHistList
query.eventType_UserAlarm4 = jtypeUserAlarm4;
query.eventType_Return = jtypeReturn;
query.eventType_Info = jtypeInfo;
query.eventType_InfoSuccess = jtypeInfoSuccess;
query.eventPrio_A = jprioA;
query.eventPrio_B = jprioB;
query.eventPrio_C = jprioC;
......@@ -316,6 +318,7 @@ JNIEXPORT jobjectArray JNICALL Java_jpwr_rt_Hist_getHistList
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
env->SetObjectArrayElement(jobjectArr, i, convertAlarmOrInfoToMhrEvent( (mh_sMessage *)(&(ev.Mess) ) ) );
//printMess(sp, outFile);
break;
......@@ -391,6 +394,7 @@ int check_conditions(sEvent *evp, HistQuery *query)
query->eventType_UserAlarm3 ||
query->eventType_UserAlarm4 ||
query->eventType_Info ||
query->eventType_InfoSuccess ||
query->eventType_Return ||
query->eventType_Cancel ||
query->eventType_Block ||
......@@ -432,6 +436,10 @@ int check_conditions(sEvent *evp, HistQuery *query)
if(!query->eventType_Info)
ret = true;
break;
case mh_eEvent_InfoSuccess:
if(!query->eventType_InfoSuccess)
ret = true;
break;
case mh_eEvent_Ack:
if(!query->eventType_Ack)
ret = true;
......@@ -483,6 +491,7 @@ int check_conditions(sEvent *evp, HistQuery *query)
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
msgInfop = &(evp->Mess.message.Info);
mp = &(evp->Mess.message);
event_name_p = evp->Mess.message.EventName;
......
......@@ -80,7 +80,7 @@ JNIEXPORT void JNICALL Java_jpwr_rt_Hist_initHistIDs
* Signature: (Ljava/lang/String;Ljava/lang/String;ZZZZZZZZLjava/lang/String;Ljava/lang/String;)[Ljpwr/rt/MhrEvent;
*/
JNIEXPORT jobjectArray JNICALL Java_jpwr_rt_Hist_getHistList
(JNIEnv *, jclass, jstring, jstring, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jstring, jstring);
(JNIEnv *, jclass, jstring, jstring, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jboolean, jstring, jstring);
#ifdef __cplusplus
}
......
......@@ -106,7 +106,8 @@ import jpwr.rt.MhrEvent;
MhrEvent ev = mhData.getEvent(row);//(MhrEvent)eventData.get(row);
if (col == 0) {
//System.out.println("col == 0 i eventTable.getValueAt()");
if ( ev.eventType == Mh.mh_eEvent_Info)
if ( ev.eventType == Mh.mh_eEvent_Info ||
ev.eventType == Mh.mh_eEvent_InfoSuccess)
return "";
if(ev.eventPrio == Mh.mh_eEventPrio_A)
return "A";
......@@ -170,6 +171,9 @@ import jpwr.rt.MhrEvent;
case Mh.mh_eEvent_Info:
returnString = "Info";
break;
case Mh.mh_eEvent_InfoSuccess:
returnString = "InfoSuccess";
break;
case Mh.mh_eEvent_:
returnString = "?";
break;
......
......@@ -103,6 +103,7 @@ public class HistSearch extends JFrame implements ActionListener, GdhApplIfc {
// type is an array of radiobuttons, one for each type of event
JCheckBox[] type = new JCheckBox[10];
String[] nameType = {JopLang.transl("Info"),
JopLang.transl("InfoSuccess"),
JopLang.transl("Alarm"),
JopLang.transl("MaintenanceAlarm"),
JopLang.transl("SystemAlarm"),
......@@ -635,6 +636,7 @@ public class HistSearch extends JFrame implements ActionListener, GdhApplIfc {
//Useful words in english and swedish.
String[] words ={JopLang.transl("All "),
JopLang.transl(" Info"),
JopLang.transl(" InfoSuccess"),
JopLang.transl(" Alarm"),
JopLang.transl(" MaintenanceAlarm"),
JopLang.transl(" SystemAlarm"),
......@@ -655,7 +657,7 @@ public class HistSearch extends JFrame implements ActionListener, GdhApplIfc {
String eval="<html>" + words[0];
String temp="";
boolean[] noCheck ={true,true};
boolean[] typeSelected = {false,false,false,false,false,false,false,false,false,false};
boolean[] typeSelected = {false,false,false,false,false,false,false,false,false,false,false};
boolean[] prioSelected = {false,false,false,false};
for ( int i = 0; i < 10; i++){
......@@ -664,7 +666,7 @@ public class HistSearch extends JFrame implements ActionListener, GdhApplIfc {
if (noCheck[0])
noCheck[0] = false;
else
eval=eval+words[18];
eval=eval+words[19];
eval=eval + "<b>" +words[i+1] + "</b>";
}
}
......@@ -674,20 +676,20 @@ public class HistSearch extends JFrame implements ActionListener, GdhApplIfc {
if (noCheck[1])
noCheck[1]=false;
else
temp=temp+words[18];
temp=temp+words[19];
int charA =(int)'A';
charA=charA+i;
temp=temp + " <b>" + (char) charA + "</b>";
}
}
eval= eval + words[11] + " ";
eval= eval + words[12] + " ";
if (temp.length()>0) {
eval=eval+ words[12] + temp + words[13] ;
eval=eval+ words[13] + temp + words[14] ;
}
eval=eval+"<br>"+words[12]+words[14]+" <b>"+txName.getText() +"</b><br>";
eval=eval+words[12]+words[15]+" <b>"+txText.getText() +"</b><br>";
eval=eval + words[16] + "<b>"+ dateText(calStart)+ "</b>" + words[17] + "<b>" + dateText(calStop)+"</b> </html>";
eval=eval+"<br>"+words[13]+words[15]+" <b>"+txName.getText() +"</b><br>";
eval=eval+words[13]+words[16]+" <b>"+txText.getText() +"</b><br>";
eval=eval + words[17] + "<b>"+ dateText(calStart)+ "</b>" + words[18] + "<b>" + dateText(calStop)+"</b> </html>";
String nameFormatted= txName.getText().replace('"','*');
String textFormatted= txText.getText().replace('"','*');
......
......@@ -100,6 +100,7 @@ public class MhTable extends JPanel
Color CLarmColor = new Color(135,206,235); // Color.blue;
Color DLarmColor = new Color(177,156,217); // Color.cyan;
Color InfoColor = Color.green;
Color InfoSuccessColor = Color.white;
/**
* Constructor for the MhTable object
*
......@@ -720,6 +721,9 @@ public class MhTable extends JPanel
case Mh.mh_eEvent_Info:
returnString = JopLang.transl("Info");
break;
case Mh.mh_eEvent_InfoSuccess:
returnString = JopLang.transl("InfoSuccess");
break;
case Mh.mh_eEvent_:
returnString = "?";
break;
......@@ -1062,7 +1066,8 @@ public class MhTable extends JPanel
}
boolean setColor = false;
if( ev.eventType == Mh.mh_eEvent_Alarm || ev.eventType == Mh.mh_eEvent_Info ||
if( ev.eventType == Mh.mh_eEvent_Alarm ||
ev.eventType == Mh.mh_eEvent_Info || ev.eventType == Mh.mh_eEvent_InfoSuccess ||
ev.eventType == Mh.mh_eEvent_MaintenanceAlarm || ev.eventType == Mh.mh_eEvent_SystemAlarm ||
ev.eventType == Mh.mh_eEvent_UserAlarm1 || ev.eventType == Mh.mh_eEvent_UserAlarm2 ||
ev.eventType == Mh.mh_eEvent_UserAlarm3 || ev.eventType == Mh.mh_eEvent_UserAlarm4)
......@@ -1106,7 +1111,10 @@ public class MhTable extends JPanel
{
if(setColor)
{
if ( ev.eventType == Mh.mh_eEvent_InfoSuccess)
this.setBackground(InfoColor);
else
this.setBackground(InfoSuccessColor);
}
this.setText(" ");
}
......
......@@ -77,6 +77,7 @@ public class Hist
public native static MhrEvent[] getHistList(String startTime,
String stopTime,
boolean typeInfo,
boolean typeInfoSuccess,
boolean typeAlarm,
boolean typeMaintenanceAlarm,
boolean typeSystemAlarm,
......
......@@ -57,7 +57,7 @@ public class HistServer {
public final static int __IO_EXCEPTION = 2000;
static boolean ignoreHandler = false;
static boolean log = false;
static boolean log = true;
static boolean logStatistics = false;
static boolean test = false;
boolean keepRunning = true;
......@@ -100,8 +100,8 @@ public class HistServer {
ServerSocket serverSocket = null;
if(test) {
boolean[] type = new boolean[10];
for ( int i = 0; i < 10; i++)
boolean[] type = new boolean[11];
for ( int i = 0; i < 11; i++)
type[i] = false;
type[0] = true;
boolean[] prio = new boolean[4];
......@@ -119,6 +119,7 @@ public class HistServer {
query.type[7],
query.type[8],
query.type[9],
query.type[10],
query.priority[0],
query.priority[1],
query.priority[2],
......@@ -223,10 +224,12 @@ public class HistServer {
in = new ObjectInputStream(socket.getInputStream());
//wait for the question
HistQuery query = (HistQuery)in.readObject();
System.out.println( "Query.type.length: " + query.type.length);
if ( log) {
System.out.println("Recieved a query");
System.out.println("query: Prio(ABCD): " + query.priority[0] + query.priority[1] + query.priority[2] + query.priority[3]);
System.out.println(" type(Info Ala Mnt Sys Usr1 2 3 4 Ack Ret): " + query.type[0] + query.type[1] + query.type[2] + query.type[3] + query.type[4] + query.type[5] + query.type[6] + query.type[7] + query.type[8] + query.type[9] + query.type[10]);
System.out.println(" type(Info Succ Ala Mnt Sys Usr1 2 3 4 Ack Ret): " + query.type[0] + query.type[1] + query.type[2] + query.type[3] + query.type[4] + query.type[5] + query.type[6] + query.type[7] + query.type[8] + query.type[9] + query.type[10] );
System.out.println(" startTime: " + query.startTime);
System.out.println(" stopTime: " + query.stopTime);
System.out.println(" name: " + query.name);
......@@ -245,6 +248,7 @@ public class HistServer {
query.type[7],
query.type[8],
query.type[9],
query.type[10],
query.priority[0],
query.priority[1],
query.priority[2],
......
......@@ -90,7 +90,7 @@ public class Mh
public static final int mh_eEvent_Reblock = 6;
public static final int mh_eEvent_Return = 7;
public static final int mh_eEvent_Unblock = 8;
public static final int mh_eEvent_Info = 32;
public static final int mh_eEvent_InfoSuccess = 32;
public static final int mh_eEvent_Alarm = 64;
public static final int mh_eEvent_MaintenanceAlarm = 128;
public static final int mh_eEvent_SystemAlarm = 256;
......@@ -98,7 +98,8 @@ public class Mh
public static final int mh_eEvent_UserAlarm2 = 1024;
public static final int mh_eEvent_UserAlarm3 = 2048;
public static final int mh_eEvent_UserAlarm4 = 4096;
public static final int mh_eEvent_ = 4097;
public static final int mh_eEvent_Info = 8192;
public static final int mh_eEvent_ = 8193;
public static final int EventType_ClearAlarmList = 66;
//public static final int EventType_Return = 1;
......
......@@ -173,6 +173,7 @@ public class MhData
}
break;
case Mh.mh_eEvent_Info:
case Mh.mh_eEvent_InfoSuccess:
// Add to alarm list
if((ev.eventFlags & Mh.mh_mEventFlags_InfoWindow) != 0)
{
......
......@@ -455,6 +455,7 @@ CopyEvent (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
sp->Mess.message = *mp;
break;
case mh_eEvent_Ack:
......
......@@ -717,6 +717,7 @@ activeListInsert (
++l.emon->BlockCount;
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
break;
default:
errh_Error("activeListInsert, program error, event: %d", ap->event);
......@@ -764,6 +765,7 @@ activeListRemove (
--l.emon->BlockCount;
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
break;
default:
errh_Error("activeListRemove, program error, event: %d", ap->event);
......@@ -986,7 +988,7 @@ applMessage (
aap->message = *ip;
if (ip->EventType == mh_eEvent_Info &&
if ((ip->EventType == mh_eEvent_Info || ip->EventType == mh_eEvent_InfoSuccess) &&
!(ip->EventFlags & mh_mEventFlags_InfoWindow)
) {
ep = eventListInsert(ip->EventType, NULL, (sActive*) aap);
......@@ -1119,6 +1121,7 @@ applReturn (
updateAlarm(ap, ep);
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
if (aap->link.eventFlags & mh_mEventFlags_InfoWindow)
updateAlarm(ap, ep);
break;
......@@ -1272,6 +1275,7 @@ sendAlarmStatus( sOutunit *op)
switch (ap->detect_etp->event) {
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
case mh_eEvent_Alarm:
case mh_eEvent_MaintenanceAlarm:
case mh_eEvent_SystemAlarm:
......@@ -1282,7 +1286,7 @@ sendAlarmStatus( sOutunit *op)
ep = ap->detect_etp->ep;
if ( ap->detect_etp->event == mh_eEvent_Info) {
if ( ap->detect_etp->event == mh_eEvent_Info || ap->detect_etp->event == mh_eEvent_InfoSuccess) {
if ( !(ep->msg.info.EventFlags & mh_mEventFlags_InfoWindow))
break;
if ( ep->msg.info.EventFlags & mh_mEventFlags_InfoWindow &&
......@@ -1315,6 +1319,7 @@ sendAlarmStatus( sOutunit *op)
switch (ap->detect_etp->event) {
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
case mh_eEvent_Alarm:
case mh_eEvent_MaintenanceAlarm:
case mh_eEvent_SystemAlarm:
......@@ -1325,7 +1330,7 @@ sendAlarmStatus( sOutunit *op)
ep = ap->detect_etp->ep;
if ( ap->detect_etp->event == mh_eEvent_Info) {
if ( ap->detect_etp->event == mh_eEvent_Info || ap->detect_etp->event == mh_eEvent_InfoSuccess) {
if ( !(ep->msg.info.EventFlags & mh_mEventFlags_InfoWindow))
break;
if ( ep->msg.info.EventFlags & mh_mEventFlags_InfoWindow &&
......@@ -1604,7 +1609,7 @@ eventListInsert (
}
ep->etp = etp = tree_Insert(&sts, l.eventTab, &idx);
if (ap->event != mh_eEvent_Info || (ap->eventFlags & mh_mEventFlags_InfoWindow) != 0)
if ((ap->event != mh_eEvent_Info && ap->event != mh_eEvent_InfoSuccess) || (ap->eventFlags & mh_mEventFlags_InfoWindow) != 0)
etp->ap = ap;
else
etp->ap = NULL;
......@@ -1613,6 +1618,7 @@ eventListInsert (
switch (event) {
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
case mh_eEvent_Alarm:
case mh_eEvent_MaintenanceAlarm:
case mh_eEvent_SystemAlarm:
......@@ -1706,6 +1712,7 @@ formatApplEvent (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
mp = &up->message;
ip->Id.Idx = aap->link.idx;
ip->EventTime = net_TimeToNetTime( &aap->message.EventTime);
......@@ -1839,6 +1846,7 @@ formatSupEvent (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
mp = &up->message;
ip->Id.Idx = sp->link.idx;
ip->EventTime = net_TimeToNetTime( &sup->DetectTime);
......@@ -2495,7 +2503,7 @@ handleInfo (
sp->link.eventFlags |= mh_mEventFlags_Return;
}
ep = eventListInsert(mh_eEvent_Info, NULL, (sActive*) sp);
ep = eventListInsert(sp->link.eventType, NULL, (sActive*) sp);
if (sp->link.eventFlags & mh_mEventFlags_InfoWindow) {
activeListInsert((sActive *) sp, ep, mh_eSource_Scanner);
updateAlarm((sActive *) sp, ep);
......@@ -2560,6 +2568,7 @@ handleReturn (
updateAlarm((sActive *) sp, ep);
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
if (sp->link.eventFlags & mh_mEventFlags_InfoWindow) {
ep = eventListInsert(mh_eEvent_Return, NULL, (sActive*) sp);
updateAlarm((sActive *) sp, ep);
......@@ -2614,6 +2623,7 @@ handlerEvent (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
hp = handlerListAlloc( event);
break;
case mh_eEvent_Return:
......@@ -2640,6 +2650,7 @@ handlerEvent (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
ip = &hp->message;
ip->EventFlags = ssup->EventFlags;
......@@ -3564,6 +3575,7 @@ outunitAck (
updateAlarm(ap, ep);
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
if ((ap->eventFlags & mh_mEventFlags_InfoWindow) != 0)
updateAlarm(ap, ep);
break;
......@@ -4071,6 +4083,7 @@ reSendEventToOutunit (
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
event.message.Status = Status;
break;
default:
......@@ -4161,6 +4174,7 @@ scanSupList ()
switch (sp->link.event) {
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
handleInfo(sp);
break;
case mh_eEvent_Alarm:
......@@ -4563,6 +4577,7 @@ updateAlarm (
ep->msg.message.Status = ap->status.All;
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
ap->status.Event.Status = mh_mEventStatus_NotRet |
mh_mEventStatus_NotAck;
if (ap->source == mh_eSource_Scanner) {
......@@ -4746,7 +4761,8 @@ static void msgToV3( mh_eEvent type, uEvent *up)
{
switch ( type) {
case mh_eEvent_Alarm:
case mh_eEvent_Info: {
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess: {
mh_sMessage *mp = &up->message;
mp->Info.Object_V3 = mp->Object.Objid;
......
......@@ -177,8 +177,15 @@ xdrEvent (
return MH__XDRFAILED;
break;
case mh_eEvent_Alarm:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
case mh_eEvent_Alarm:
case mh_eEvent_MaintenanceAlarm:
case mh_eEvent_SystemAlarm:
case mh_eEvent_UserAlarm1:
case mh_eEvent_UserAlarm2:
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
if (!xdr_mh_sMessage(xdrs, (mh_sMessage *)mp))
return MH__XDRFAILED;
break;
......
......@@ -75,7 +75,7 @@ enum mh_eEvent {
mh_eEvent_Reblock = 6,
mh_eEvent_Return = 7,
mh_eEvent_Unblock = 8,
mh_eEvent_Info = 32,
mh_eEvent_InfoSuccess = 32,
mh_eEvent_Alarm = 64,
mh_eEvent_MaintenanceAlarm = 128,
mh_eEvent_SystemAlarm = 256,
......@@ -83,7 +83,8 @@ enum mh_eEvent {
mh_eEvent_UserAlarm2 = 1024,
mh_eEvent_UserAlarm3 = 2048,
mh_eEvent_UserAlarm4 = 4096,
mh_eEvent_ = 4097
mh_eEvent_Info = 8192,
mh_eEvent_ = 8193
};
%/**
......
......@@ -947,6 +947,7 @@ handlerEvent (
sts = l.cbCancel(cp);
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
if (l.cbInfo != NULL)
sts = l.cbInfo((mh_sMessage*) mp);
break;
......
......@@ -58,6 +58,20 @@ SObject pwrb:Type
Body SysBody
Attr PgmName = "Info"
Attr Text = "Info"
Attr Value = 8192
EndBody
EndObject
!/**
! Type InfoSuccess.
! If the message requires acknowledgement is
! it sent to the info part of the alarm
! window and the event list, otherwise only
! to the event list.
!*/
Object InfoSuccess $Value
Body SysBody
Attr PgmName = "InfoSuccess"
Attr Text = "InfoSuccess"
Attr Value = 32
EndBody
EndObject
......
......@@ -55,6 +55,16 @@ SObject pwrb:Type
Body SysBody
Attr PgmName = "Info"
Attr Text = "Info"
Attr Value = 8192
EndBody
EndObject
!/**
! Type InfoSuccess.
!*/
Object InfoSuccess $Bit
Body SysBody
Attr PgmName = "InfoSuccess"
Attr Text = "InfoSuccess"
Attr Value = 32
EndBody
EndObject
......
......@@ -322,6 +322,8 @@ HistGtk::HistGtk( void *hist_parent_ctx,
info_toggle_w = gtk_check_button_new_with_label( CoWowGtk::translate_utf8("Info"));
gtk_widget_set_size_request( info_toggle_w, 120, -1);
infosuccess_toggle_w = gtk_check_button_new_with_label( CoWowGtk::translate_utf8("InfoSuccess"));
gtk_widget_set_size_request( infosuccess_toggle_w, 120, -1);
alarm_toggle_w = gtk_check_button_new_with_label( CoWowGtk::translate_utf8("Alarm"));
gtk_widget_set_size_request( alarm_toggle_w, 120, -1);
mnt_alarm_toggle_w = gtk_check_button_new_with_label( CoWowGtk::translate_utf8("MaintenanceAlarm"));
......@@ -344,6 +346,7 @@ HistGtk::HistGtk( void *hist_parent_ctx,
GtkWidget *sea_typebox = gtk_hbox_new( FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), sea_type_label, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), info_toggle_w, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), infosuccess_toggle_w, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), alarm_toggle_w, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), mnt_alarm_toggle_w, FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(sea_typebox), sys_alarm_toggle_w, FALSE, FALSE, 0);
......@@ -555,6 +558,8 @@ void HistGtk::ok_btn( GtkWidget *w, gpointer data)
brow_DeleteAll(histOP->hist->brow->ctx);
histOP->eventType_Info = (bool)gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( ((HistGtk *)histOP)->info_toggle_w));
histOP->eventType_InfoSuccess = (bool)gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( ((HistGtk *)histOP)->infosuccess_toggle_w));
histOP->eventType_Alarm = (bool)gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(((HistGtk *)histOP)->alarm_toggle_w));
histOP->eventType_MaintenanceAlarm = (bool)gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( ((HistGtk *)histOP)->mnt_alarm_toggle_w));
......
......@@ -66,6 +66,7 @@ class HistGtk : public Hist {
GtkWidget *event_name_entry_w;
GtkWidget *alarm_toggle_w;
GtkWidget *info_toggle_w;
GtkWidget *infosuccess_toggle_w;
GtkWidget *mnt_alarm_toggle_w;
GtkWidget *sys_alarm_toggle_w;
GtkWidget *user_alarm1_toggle_w;
......
......@@ -124,6 +124,7 @@ OpGtk::OpGtk( void *op_parent_ctx,
gdk_color_parse( "Green", &green_color);
gdk_color_parse( "Gray", &gray_color);
gdk_color_parse( "Black", &black_color);
gdk_color_parse( "White", &white_color);
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
......@@ -1061,7 +1062,7 @@ void OpGtk::update_alarm_info()
else if ( info.i_alarm_exist[0])
{
balarm_type = evlist_eEventType_Info;
balarm_type = info.i_alarm_eventtype[0];
strcpy( b_alarm_moretext, info.i_alarm_moretext[0]);
cnv_pango_text( info.i_alarm_text[0], ctext, sizeof(ctext));
if ( show_time) {
......@@ -1076,7 +1077,10 @@ void OpGtk::update_alarm_info()
snprintf( text, sizeof(text), "<span size=\"%d\">%s %s</span>",
fsize, info.i_alarm_alias[0], ctext);
gtk_label_set_markup( GTK_LABEL(balarm_label), CoWowGtk::convert_utf8(text));
if ( balarm_type == evlist_eEventType_InfoSuccess)
gtk_widget_modify_bg( balarm_ebox, GTK_STATE_NORMAL, &green_color);
else
gtk_widget_modify_bg( balarm_ebox, GTK_STATE_NORMAL, &white_color);
g_object_set( balarm_box, "visible", TRUE, NULL);
gtk_label_set_text( GTK_LABEL(balarm_mark), "I");
......
......@@ -98,6 +98,7 @@ class OpGtk : public Op {
GdkColor yellow_color;
GdkColor green_color;
GdkColor gray_color;
GdkColor white_color;
int a_height;
int a_exist[5];
int a_active[5];
......
......@@ -554,7 +554,7 @@ void EvListBrow::create_nodeclasses()
// Nodeclass for Info
brow_CreateNodeClass( ctx, "Info",
flow_eNodeGroup_Common, &nc_info);
brow_AddFilledRect( nc_info, 0.05, 0.05, 0.6, 0.6, flow_eDrawType_Green);
// brow_AddFilledRect( nc_info, 0.05, 0.05, 0.6, 0.6, flow_eDrawType_Green);
brow_AddRect( nc_info, 0.05, 0.05, 0.6, 0.6, flow_eDrawType_Line, 0, 0);
brow_AddAnnot( nc_info, 0.8, 0.6, 0,
flow_eDrawType_TextHelveticaBold, 2, flow_eAnnotType_OneLine, 0);
......@@ -571,6 +571,26 @@ void EvListBrow::create_nodeclasses()
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine, 1);
brow_AddFrame( nc_info, 0, 0, 35, 0.83, flow_eDrawType_LineGray, -1, 1);
// Nodeclass for InfoSuccess
brow_CreateNodeClass( ctx, "InfoSuccess",
flow_eNodeGroup_Common, &nc_infosuccess);
brow_AddFilledRect( nc_infosuccess, 0.05, 0.05, 0.6, 0.6, flow_eDrawType_Green);
brow_AddRect( nc_infosuccess, 0.05, 0.05, 0.6, 0.6, flow_eDrawType_Line, 0, 0);
brow_AddAnnot( nc_infosuccess, 0.8, 0.6, 0,
flow_eDrawType_TextHelveticaBold, 2, flow_eAnnotType_OneLine, 0);
brow_AddAnnotPixmap( nc_infosuccess, 0, 1.6, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddAnnotPixmap( nc_infosuccess, 1, 2.2, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddAnnotPixmapButton( nc_infosuccess, 2, 3.0, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddAnnot( nc_infosuccess, 4.8, 0.6, 1,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine, 0);
brow_AddAnnot( nc_infosuccess, 11.5, 0.6, 2,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine, 0);
brow_AddAnnot( nc_infosuccess, 13.5, 0.6, 3,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine, 1);
brow_AddAnnot( nc_infosuccess, 29.5, 0.6, 4,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine, 1);
brow_AddFrame( nc_infosuccess, 0, 0, 35, 0.83, flow_eDrawType_LineGray, -1, 1);
// Nodeclass for Category
brow_CreateNodeClass( ctx, "Category",
flow_eNodeGroup_Common, &nc_category);
......@@ -874,13 +894,25 @@ void EvList::event_info( mh_sMessage *msg)
dest_node = NULL;
}
evlist_eEventType eventtype;
switch( event->Msg.Info.EventType) {
case mh_eEvent_Info:
eventtype = evlist_eEventType_Info;
break;
case mh_eEvent_InfoSuccess:
eventtype = evlist_eEventType_InfoSuccess;
break;
default:
return;
}
new ItemAlarm( this, "Alarm",
net_NetTimeToTime( &event->Info.EventTime), event->Msg.EventText,
event->Msg.EventName, event->Info.EventType, event->Info.EventFlags,
event->Info.EventPrio, event->Info.Id,
&event->Msg.Object, &event->Msg.EventSound,
event->Msg.EventMoreText, msg->Status,
evlist_eEventType_Info, &event->Msg.SupObject, dest_node, dest_code, &sts);
eventtype, &event->Msg.SupObject, dest_node, dest_code, &sts);
if ( EVEN(sts)) return;
size++;
}
......@@ -1155,6 +1187,7 @@ void EvList::event_ack( mh_sAck *msg)
}
break;
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
if ( item->eventflags & mh_mEventFlags_InfoWindow) {
if ( item->status & mh_mEventStatus_NotRet) {
item->status &= ~mh_mEventStatus_NotAck;
......@@ -1863,6 +1896,9 @@ ItemAlarm::ItemAlarm( EvList *item_evlist, const char *item_name, pwr_tTime item
case evlist_eEventType_Info:
nc = evlist->browbase->nc_info;
break;
case evlist_eEventType_InfoSuccess:
nc = evlist->browbase->nc_infosuccess;
break;
default:
nc = evlist->browbase->nc_event;
break;
......@@ -1938,6 +1974,7 @@ void ItemAlarm::update_text( int use_treenode)
brow_SetAnnotPixmap( n, 0, evlist->browbase->pixmap_eventacked);
break;
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
case evlist_eEventType_Alarm:
brow_SetAnnotPixmap( n, 0, evlist->browbase->pixmap_eventalarm);
break;
......@@ -1951,6 +1988,7 @@ void ItemAlarm::update_text( int use_treenode)
switch ( event_type)
{
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
strcpy( type_str, "I");
brow_SetAnnotation( n, 1, type_str, strlen(type_str));
break;
......@@ -1987,6 +2025,7 @@ void ItemAlarm::update_text( int use_treenode)
switch ( event_type)
{
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
case evlist_eEventType_Alarm:
case evlist_eEventType_Return:
case evlist_eEventType_Block:
......@@ -2072,7 +2111,8 @@ void ItemCategory::configure( EvList *evlist)
ODD(sts);
sts = brow_GetNextSibling( evlist->brow->ctx, next, &next)) {
brow_GetUserData( next, (void **)&item);
if ( item->event_type == evlist_eEventType_Info) {
if ( item->event_type == evlist_eEventType_Info ||
item->event_type == evlist_eEventType_InfoSuccess) {
if ( 1 > child_prio)
child_prio = 1;
}
......@@ -2091,14 +2131,16 @@ void ItemCategory::configure( EvList *evlist)
switch( item->type) {
case evlist_eItemType_Alarm: {
for ( int j = 0; j < member_cnt; j++) {
if ( item->eventtype != mh_eEvent_Info && select_priority != 0 && !(select_priority & prio_enum_to_mask( item->eventprio)))
if ( item->eventtype != mh_eEvent_Info && item->eventtype != mh_eEvent_InfoSuccess &&
select_priority != 0 && !(select_priority & prio_enum_to_mask( item->eventprio)))
continue;
if ( select_eventtype != 0 && !(select_eventtype & item->eventtype))
continue;
if ( strncmp( members[j], item->eventname, strlen(members[j])) == 0) {
// Presupmtive child
if ( item->event_type == evlist_eEventType_Info) {
if ( item->event_type == evlist_eEventType_Info ||
item->event_type == evlist_eEventType_InfoSuccess) {
if ( 1 > child_prio)
child_prio = 1;
}
......@@ -2185,6 +2227,9 @@ void ItemCategory::alarm( EvList *evlist, ItemAlarm *item)
case evlist_eEventType_Info:
nc = evlist->brow->nc_info;
break;
case evlist_eEventType_InfoSuccess:
nc = evlist->brow->nc_infosuccess;
break;
default:
nc = evlist->brow->nc_event;
break;
......@@ -2257,7 +2302,8 @@ int ItemCategory::open_children( EvList *evlist, double x, double y)
case evlist_eItemType_Alarm: {
if ( item->tree_node)
continue;
if ( item->eventtype != mh_eEvent_Info && select_priority != 0 && !(select_priority & prio_enum_to_mask( item->eventprio)))
if ( item->eventtype != mh_eEvent_Info && item->eventtype != mh_eEvent_InfoSuccess &&
select_priority != 0 && !(select_priority & prio_enum_to_mask( item->eventprio)))
continue;
if ( select_eventtype != 0 && !(select_eventtype & item->eventtype))
continue;
......@@ -2282,6 +2328,9 @@ int ItemCategory::open_children( EvList *evlist, double x, double y)
case evlist_eEventType_Info:
nc = evlist->brow->nc_info;
break;
case evlist_eEventType_InfoSuccess:
nc = evlist->brow->nc_infosuccess;
break;
default:
nc = evlist->brow->nc_event;
break;
......@@ -2469,6 +2518,7 @@ int EvList::get_last_not_acked_beep( mh_sEventId **id)
}
break;
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
*id = &object_item->eventid;
prio = 1;
found = 1;
......@@ -2510,6 +2560,7 @@ int EvList::get_last_not_acked_prio( mh_sEventId **id, unsigned long type,
}
break;
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
if ( object_item->status & mh_mEventStatus_NotAck &&
object_item->event_type == (evlist_eEventType) type)
{
......@@ -2638,6 +2689,7 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
}
break;
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
if ( object_item->eventflags & mh_mEventFlags_InfoWindow &&
object_item->status & mh_mEventStatus_NotAck)
{
......@@ -2652,6 +2704,7 @@ int EvList::get_alarm_info( evlist_sAlarmInfo *info)
info->i_alarm_time[i_cnt] = object_item->time;
info->i_alarm_active[i_cnt] = object_item->status & mh_mEventStatus_NotRet;
info->i_alarm_exist[i_cnt] = 1;
info->i_alarm_eventtype[i_cnt] = object_item->event_type;
i_cnt++;
}
break;
......@@ -3124,8 +3177,11 @@ void EvList::fill_alarm_tables()
skip = 0;
switch ( item->event_type) {
case evlist_eEventType_Info:
case evlist_eEventType_InfoSuccess:
if ( alarm_tables[j]->EventType & pwr_mEventTypeMask_Info)
eventtype = pwr_eEventTypeEnum_Info;
else if ( alarm_tables[j]->EventType & pwr_mEventTypeMask_InfoSuccess)
eventtype = pwr_eEventTypeEnum_InfoSuccess;
else
skip = 1;
break;
......
......@@ -72,6 +72,33 @@ class ItemAlarm;
#define ALARM_TABLE_SIZE 10
typedef pwr_tAName ev_sAlarmTableMembers[200];
typedef enum {
ev_eType_AlarmList,
ev_eType_EventList,
ev_eType_HistList,
ev_eType_BlockList
} ev_eType;
typedef enum {
evlist_eEventType_Info,
evlist_eEventType_InfoSuccess,
evlist_eEventType_Return,
evlist_eEventType_Ack,
evlist_eEventType_Alarm,
evlist_eEventType_Block,
evlist_eEventType_Cancel
} evlist_eEventType;
typedef enum {
evlist_eItemType_Alarm,
evlist_eItemType_Category
} evlist_eItemType;
typedef enum {
evlist_mOpen_All = ~0,
evlist_mOpen_Children = 1 << 0
} evlist_mOpen;
#define ALARM_INFO_A_SIZE 5
#define ALARM_INFO_B_SIZE 2
#define ALARM_INFO_C_SIZE 2
......@@ -108,36 +135,11 @@ typedef struct {
pwr_tTime i_alarm_time[ALARM_INFO_I_SIZE];
int i_alarm_active[ALARM_INFO_I_SIZE];
int i_alarm_exist[ALARM_INFO_I_SIZE];
evlist_eEventType i_alarm_eventtype[ALARM_INFO_I_SIZE];
int alarms_total;
int alarms_notacked;
} evlist_sAlarmInfo;
typedef enum {
ev_eType_AlarmList,
ev_eType_EventList,
ev_eType_HistList,
ev_eType_BlockList
} ev_eType;
typedef enum {
evlist_eEventType_Info,
evlist_eEventType_Return,
evlist_eEventType_Ack,
evlist_eEventType_Alarm,
evlist_eEventType_Block,
evlist_eEventType_Cancel
} evlist_eEventType;
typedef enum {
evlist_eItemType_Alarm,
evlist_eItemType_Category
} evlist_eItemType;
typedef enum {
evlist_mOpen_All = ~0,
evlist_mOpen_Children = 1 << 0
} evlist_mOpen;
class EvListBrow {
public:
EvListBrow( BrowCtx *brow_ctx, void *evl) : ctx(brow_ctx), evlist(evl) {};
......@@ -149,6 +151,7 @@ class EvListBrow {
brow_tNodeClass nc_a_alarm;
brow_tNodeClass nc_b_alarm;
brow_tNodeClass nc_info;
brow_tNodeClass nc_infosuccess;
brow_tNodeClass nc_category;
brow_tNodeClass nc_category_a;
brow_tNodeClass nc_category_b;
......
......@@ -92,7 +92,7 @@ Hist::Hist( void *hist_parent_ctx,
help_cb(NULL), hist(NULL), minTime_str(NULL), maxTime_str(NULL),
eventName_str(NULL), eventText_str(NULL), eventPrio_A(false),
eventPrio_B(false), eventPrio_C(false), eventPrio_D(false),
eventType_Ack(false), eventType_Alarm(false), eventType_Info(false),
eventType_Ack(false), eventType_Alarm(false), eventType_Info(false), eventType_InfoSuccess(false),
eventType_Return(false), eventType_Cancel(false), eventType_Block(false),
eventType_Unblock(false), eventType_Reblock(false),
eventType_CancelBlock(false)
......@@ -425,6 +425,7 @@ void Hist::get_hist_list()
hist_add_alarm_mess( &(it->Mess.message) );
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
hist_add_info_mess( &(it->Mess.message) );
break;
case mh_eEvent_Ack:
......@@ -585,6 +586,7 @@ void Hist::stat()
hist_add_alarm_mess( &evv[i].event.Mess.message);
break;
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
hist_add_info_mess( &evv[i].event.Mess.message);
break;
default: ;
......@@ -632,7 +634,7 @@ int Hist::check_conditions(sEvent *evp)
//then we compare the EventType if nothing is selected everything is selected
if(eventType_Ack || eventType_Alarm || eventType_MaintenanceAlarm || eventType_SystemAlarm ||
eventType_UserAlarm1 || eventType_UserAlarm2 || eventType_UserAlarm3 || eventType_UserAlarm4 ||
eventType_Info || eventType_Return || eventType_Cancel || eventType_Block ||
eventType_Info || eventType_InfoSuccess || eventType_Return || eventType_Cancel || eventType_Block ||
eventType_Unblock || eventType_Reblock || eventType_CancelBlock)
{
switch(evp->EventType)
......@@ -669,6 +671,10 @@ int Hist::check_conditions(sEvent *evp)
if(!eventType_Info)
ret = true;
break;
case mh_eEvent_InfoSuccess:
if(!eventType_InfoSuccess)
ret = true;
break;
case mh_eEvent_Ack:
if(!eventType_Ack)
ret = true;
......@@ -720,6 +726,7 @@ int Hist::check_conditions(sEvent *evp)
case mh_eEvent_UserAlarm3:
case mh_eEvent_UserAlarm4:
case mh_eEvent_Info:
case mh_eEvent_InfoSuccess:
msgInfop = &(evp->Mess.message.Info);
eventNamep = evp->Mess.message.EventName;
mp = &(evp->Mess.message);
......@@ -871,7 +878,7 @@ void Hist::printSearchStr()
searchStr[i] += "D";
addAnd = true;
}
if(eventType_Ack || eventType_Alarm || eventType_Info || eventType_Return)
if(eventType_Ack || eventType_Alarm || eventType_Info || eventType_InfoSuccess || eventType_Return)
{
if(addAnd) searchStr[i] += Lng::translate(" and");
if(!prioPrinted)
......@@ -889,6 +896,10 @@ void Hist::printSearchStr()
searchStr[i] += Lng::translate("Info");
searchStr[i] += " ";;
}
if(eventType_InfoSuccess) {
searchStr[i] += Lng::translate("InfoSuccess");
searchStr[i] += " ";;
}
if(eventType_Return)
searchStr[i] += Lng::translate("Return");
addAnd = true;
......
......@@ -94,6 +94,7 @@ class Hist {
bool eventType_Ack;
bool eventType_Alarm;
bool eventType_Info;
bool eventType_InfoSuccess;
bool eventType_MaintenanceAlarm;
bool eventType_SystemAlarm;
bool eventType_UserAlarm1;
......
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