Commit 027e7cac authored by Claes Sjofors's avatar Claes Sjofors

App, Info and InfoSuccess added to alarm list

parent 0a140e55
......@@ -23,6 +23,8 @@ public class AEv {
public PlowNodeClass alaNcBAlarm;
public PlowNodeClass alaNcCAlarm;
public PlowNodeClass alaNcDAlarm;
public PlowNodeClass alaNcInfoSuccess;
public PlowNodeClass alaNcInfo;
public PlowNodeClass eveNcAlarm;
public PlowNodeClass eveNcAAlarm;
public PlowNodeClass eveNcBAlarm;
......@@ -258,6 +260,40 @@ public class AEv {
alaNcDAlarm.insert(p2);
cmnAla.insert_nc(alaNcDAlarm);
r1 = new PlowRect(cmnAla, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
r2 = new PlowRect(cmnAla, 0.4D, 0.3D, 0.9D, 0.9D, Plow.COLOR_GREEN, Plow.COLOR_BLACK,true,true,true);
a1 = new PlowAnnot(cmnAla, 4D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnAla, 10D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
a3 = new PlowAnnot(cmnAla, 26D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 2);
p1 = new PlowAnnotPixmap(cmnAla, 2D, 0.28D, 0);
p2 = new PlowAnnotPixmap(cmnAla, 3D, 0.28D, 1);
alaNcInfoSuccess = new PlowNodeClass(cmnAla);
alaNcInfoSuccess.insert(r1);
alaNcInfoSuccess.insert(r2);
alaNcInfoSuccess.insert(a1);
alaNcInfoSuccess.insert(a2);
alaNcInfoSuccess.insert(a3);
alaNcInfoSuccess.insert(p1);
alaNcInfoSuccess.insert(p2);
cmnAla.insert_nc(alaNcInfoSuccess);
r1 = new PlowRect(cmnAla, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
r2 = new PlowRect(cmnAla, 0.4D, 0.3D, 0.9D, 0.9D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,true,true);
a1 = new PlowAnnot(cmnAla, 4D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnAla, 10D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
a3 = new PlowAnnot(cmnAla, 26D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 2);
p1 = new PlowAnnotPixmap(cmnAla, 2D, 0.28D, 0);
p2 = new PlowAnnotPixmap(cmnAla, 3D, 0.28D, 1);
alaNcInfo = new PlowNodeClass(cmnAla);
alaNcInfo.insert(r1);
alaNcInfo.insert(r2);
alaNcInfo.insert(a1);
alaNcInfo.insert(a2);
alaNcInfo.insert(a3);
alaNcInfo.insert(p1);
alaNcInfo.insert(p2);
cmnAla.insert_nc(alaNcInfo);
r1 = new PlowRect(cmnAla, 0D, 0D, 50D, 1.5D, Plow.COLOR_WHITE, Plow.COLOR_BLACK,true,false,false);
a1 = new PlowAnnot(cmnAla, 5D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.NEXT_RELATIVE_POSITION, 0);
a2 = new PlowAnnot(cmnAla, 11D, 1.1D, 12, Plow.COLOR_BLACK, 0, PlowAnnot.RELATIVE_POSITION, 1);
......
......@@ -9,6 +9,7 @@ import jpwr.app.*;
public class AEvItemAlarm extends AXttItemBase {
static double y = 10D;
public MhrEvent e;
public PlowNodeClass nc;
public AEvItemAlarm(AEv aev, MhrEvent e,
PlowNode destination, int destCode) {
......@@ -16,20 +17,39 @@ public class AEvItemAlarm extends AXttItemBase {
System.out.println("New itemalarm Status: " + e.eventStatus + " " + e.eventPrio + " " + e.eventText + " " + e.eventName);
switch ( this.e.eventPrio) {
case Mh.mh_eEventPrio_A:
node = new PlowNode(aev.cmnAla, 3D, y, aev.alaNcAAlarm);
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:
switch ( this.e.eventPrio) {
case Mh.mh_eEventPrio_A:
nc = aev.alaNcAAlarm;
break;
case Mh.mh_eEventPrio_B:
node = new PlowNode(aev.cmnAla, 3D, y, aev.alaNcBAlarm);
case Mh.mh_eEventPrio_B:
nc = aev.alaNcBAlarm;
break;
case Mh.mh_eEventPrio_C:
node = new PlowNode(aev.cmnAla, 3D, y, aev.alaNcCAlarm);
case Mh.mh_eEventPrio_C:
nc = aev.alaNcCAlarm;
break;
case Mh.mh_eEventPrio_D:
node = new PlowNode(aev.cmnAla, 3D, y, aev.alaNcDAlarm);
case Mh.mh_eEventPrio_D:
nc = aev.alaNcDAlarm;
break;
}
}
break;
case Mh.mh_eEvent_Info:
nc = aev.alaNcInfo;
break;
case Mh.mh_eEvent_InfoSuccess:
nc = aev.alaNcInfoSuccess;
break;
default:
return;
}
node = new PlowNode(aev.cmnAla, 3D, y, nc);
node.setAnnotation(0, this.e.eventTime, 1);
node.setAnnotation(1, this.e.eventText, 1);
node.setAnnotation(2, this.e.eventName, 1);
......
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