Commit 0d5bcba0 authored by Claes Sjofors's avatar Claes Sjofors

js alarm and eventlist added

parent f2be704e
......@@ -1784,6 +1784,9 @@ static void gdh_TranslateSuffixToClassData (
*PwrType = pwr_eType_Float32;
*PwrSize = 4;
if (!str_NoCaseStrncmp("BIT", SuffixPtr, 3))
*(SuffixPtr + 3) = 0;
for (Index = 0, Found = FALSE; Index < XlationTblLen; Index++)
if (!str_NoCaseStrcmp(XlationTbl[Index].TypeStr,SuffixPtr))
{
......@@ -1799,6 +1802,7 @@ static void gdh_TranslateSuffixToClassData (
*PwrType = pwr_eType_String;
}
if ( Ptr != NULL && *NoOfElements > 1)
{
*PwrSize *= *NoOfElements;
......
This diff is collapsed.
This diff is collapsed.
......@@ -251,13 +251,12 @@ public class Mh
String targetId_birthTime,
int targetId_idx,
int eventType,
PwrtObjid object)
PwrtAttrRef object,
PwrtAttrRef supObject,
String moreText)
{
//System.out.println("Larm " + timeString + " " + messString + " " + nameString + " flags " + flags + " prio " + prio + " sts " +
//status + " nix " + eventId_nix + " birttime " + eventId_birthTime + " idx " + eventId_idx +
//" typ " + eventType);
//hantera det mottagna meddelandet
//System.out.println("messReceived " + eventType);
System.out.println("messReceived " + eventType);
MhrEvent evItem = new MhrEvent(messString,
nameString,
timeString,
......@@ -266,7 +265,7 @@ public class Mh
status,
eventId_nix, eventId_birthTime, eventId_idx,
targetId_nix, targetId_birthTime, targetId_idx,
eventType, object);
eventType, object, supObject, moreText);
lastMhrEvent = evItem;
newAlarmArrived = true;
......
......@@ -49,6 +49,7 @@ public class MhData
public int maxNrOfEvents;
public Vector<MhrEvent> alarmVec;
public Vector<MhrEvent> eventVec;
public int lastSyncIdx = 0;
public MhData(int maxNrOfAlarms, int maxNrOfEvents)
......@@ -119,6 +120,8 @@ public class MhData
case Mh.mh_eEvent_UserAlarm3:
case Mh.mh_eEvent_UserAlarm4:
// Add to alarm list
lastSyncIdx++;
ev.syncIdx = lastSyncIdx;
this.addMessToVectorInSortedOrder(alarmVec, ev);
// Add copy to event list
this.addMessToVectorInSortedOrder(eventVec, ev.getCopy());
......@@ -146,9 +149,20 @@ public class MhData
if((ev.eventFlags & Mh.mh_mEventFlags_Return) != 0)
{
// Add copy to event list
lastSyncIdx++;
ev.syncIdx = lastSyncIdx;
this.addMessToVectorInSortedOrder(eventVec, ev.getCopy());
}
break;
case Mh.mh_eEvent_Block:
case Mh.mh_eEvent_Reblock:
case Mh.mh_eEvent_Cancel:
case Mh.mh_eEvent_Unblock:
// Add copy to event list
lastSyncIdx++;
ev.syncIdx = lastSyncIdx;
this.addMessToVectorInSortedOrder(eventVec, ev.getCopy());
break;
case Mh.mh_eEvent_Ack:
for(int i = 0; i < alarmVec.size(); i++)
{
......@@ -169,6 +183,8 @@ public class MhData
if((ev.eventFlags & Mh.mh_mEventFlags_Ack) != 0)
{
// Add copy to event list
lastSyncIdx++;
ev.syncIdx = lastSyncIdx;
this.addMessToVectorInSortedOrder(eventVec, ev.getCopy());
}
break;
......@@ -177,6 +193,8 @@ public class MhData
// Add to alarm list
if((ev.eventFlags & Mh.mh_mEventFlags_InfoWindow) != 0)
{
lastSyncIdx++;
ev.syncIdx = lastSyncIdx;
this.addMessToVectorInSortedOrder(alarmVec, ev);
}
// Add copy to event list
......
......@@ -52,7 +52,10 @@ public class MhrEvent implements Serializable
public MhrsEventId eventId;
public MhrsEventId targetId;
public int eventType;
public PwrtObjid object;
public PwrtAttrRef object;
public PwrtAttrRef supObject;
public String eventMoreText;
public int syncIdx;
public MhrEvent(String eventText,
String eventName,
......@@ -67,7 +70,9 @@ public class MhrEvent implements Serializable
String targetId_birthTime,
int targetId_idx,
int eventType,
PwrtObjid object)
PwrtAttrRef object,
PwrtAttrRef supObject,
String eventMoreText)
{
this.eventText = eventText;
this.eventName = eventName;
......@@ -79,10 +84,12 @@ public class MhrEvent implements Serializable
this.targetId = new MhrsEventId(targetId_nix, targetId_birthTime, targetId_idx);
this.eventType = eventType;
this.object = object;
this.supObject = supObject;
this.eventMoreText = eventMoreText;
}
public MhrEvent getCopy()
{
return new MhrEvent(eventText,
MhrEvent ev = new MhrEvent(eventText,
eventName,
eventTime,
eventFlags,
......@@ -95,7 +102,11 @@ public class MhrEvent implements Serializable
targetId.birthTime,
targetId.idx,
eventType,
object);
object,
supObject,
eventMoreText);
ev.syncIdx = syncIdx;
return ev;
}
public String toString()
{
......
......@@ -42,12 +42,12 @@ local_java_sources = \
SubElement.java \
GdhServer.java \
GdhServerMonitor.java \
GdhWebSocketServer.java \
HistQuery.java \
MhrsEventId.java \
MhrEvent.java \
Mh.java \
MhData.java \
GdhWebSocketServer.java \
MhServer.java \
Hist.java \
HistServer.java
......
<!DOCTYPE html>
<html>
<head>
<title>Alarm List</title>
<link rel="stylesheet" type="text/css" href="toolbar.css">
</head>
<body>
<div class="toolbar" role="toolbar">
<div id="toolitem1" tabindex="0" class="toolbar-item" role="button"><img src="toolbar_ack.png"><img>....</div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_navigator.png"><img></div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_plc.png"><img>....</div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_graph.png"><img></div>
<div id="toolitem5" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_objectgraph.png"><img></div>
<div id="toolitem6" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_navigator.png"><img></div>
<div id="toolitem7" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_plc.png"><img></div>
<div id="toolitem8" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_history.png"><img></div>
<div id="toolitem9" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_object.png"><img></div>
<div id="toolitem10" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_crossref.png"><img></div>
<div id="toolitem11" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_help.png"><img></div>
<div id="toolitem12" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_classhelp.png"><img></div>
</div>
<!-- <div style="height:300px;overflow:auto;"> -->
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=ev.js></script>
<!-- </div> -->
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
</body>
</html>
This diff is collapsed.
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8,12 +8,13 @@
<body>
<div class="toolbar" role="toolbar">
<div id="toolitem1" tabindex="0" class="toolbar-item" role="button"><img src="toolbar_graph.png"><img></div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_plc.png"><img></div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_history.png"><img></div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_object.png"><img></div>
<div id="toolitem5" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_crossref.png"><img></div>
<div id="toolitem6" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_help.png"><img></div>
<div id="toolitem7" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_classhelp.png"><img></div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_objectgraph.png"><img></div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_plc.png"><img></div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_history.png"><img></div>
<div id="toolitem5" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_object.png"><img></div>
<div id="toolitem6" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_crossref.png"><img></div>
<div id="toolitem7" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_help.png"><img></div>
<div id="toolitem8" tabindex="-1" class="toolbar-item" role="button"><img src="toolbar_classhelp.png"><img></div>
</div>
<!-- <div style="height:300px;overflow:auto;"> -->
<canvas id="flowcanvas" width="1200" height="800"></canvas>
......
This diff is collapsed.
......@@ -295,6 +295,12 @@ pwr_tStatus mh_OutunitConnect(
l.pSelEventType = &((pwr_sClass_WebHandler*)p)->EventSelectType;
l.SelectListIsUpdated = NULL;
break;
case pwr_cClass_WebSocketServer:
type = mh_eOutunitType_Operator;
l.pSelL = (void*)&((pwr_sClass_WebSocketServer*)p)->EventSelectList[0];
l.pSelEventType = &((pwr_sClass_WebSocketServer*)p)->EventSelectType;
l.SelectListIsUpdated = NULL;
break;
case pwr_cClass_RttConfig:
type = mh_eOutunitType_Operator;
l.pSelL = (void*)&((pwr_sClass_RttConfig*)p)->EventSelectList[0];
......
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