diff --git a/.gitattributes b/.gitattributes index 7817f74ff24b61d2ded4d73558ad6d48fd70f312..89af896e7f08d4f2f0fc9b43f0bb9fcfb0da9a20 100644 --- a/.gitattributes +++ b/.gitattributes @@ -361,6 +361,7 @@ MAC/GCF/_PALlight/configure.in -text svneol=native#application/octet-stream MAC/GCF/lofarconf.in -text svneol=native#application/octet-stream MAC/Navigator/colorDB/Lofar[!!-~]colors -text svneol=native#application/octet-stream MAC/Navigator/colorDB/colorDB_fw -text svneol=native#application/octet-stream +MAC/Navigator/config/config.level -text svneol=native#application/octet-stream MAC/Navigator/dplist/nav_fw/XTU_Navigator_database.dpl -text svneol=native#application/octet-stream MAC/Navigator/dplist/nav_usr/CCU/CCU_PIC_database.dpl -text svneol=native#application/octet-stream MAC/Navigator/dplist/nav_usr/MAC/MAC_Default_panelviews.dpl -text svneol=native#application/octet-stream @@ -507,6 +508,7 @@ MAC/Navigator/pictures/nav_usr/STS/nederland.bmp -text MAC/Navigator/pictures/nav_usr/STS/nederland2.bmp -text MAC/Navigator/pictures/nav_usr/STS/nederland2_gray.bmp -text MAC/Navigator/readme.doc -text +MAC/Navigator/scripts/libs/averageThroughput.ctl -text svneol=native#application/octet-stream MAC/Navigator/scripts/libs/nav_usr/STS/STS-functions.ctl -text svneol=native#application/octet-stream MAC/Navigator/source/nav_usr/STS/CEPplot1.gps -text svneol=native#application/octet-stream MAC/Navigator/source/nav_usr/STS/CEPplot2.gps -text svneol=native#application/octet-stream diff --git a/MAC/Navigator/config/config.level b/MAC/Navigator/config/config.level new file mode 100644 index 0000000000000000000000000000000000000000..00c62c96993767962edb3073a87934b3e7da6262 --- /dev/null +++ b/MAC/Navigator/config/config.level @@ -0,0 +1,21 @@ +[ctrl] +LoadCtrlLibs = "std.ctl, libCTRL.ctl, hosts.ctl, va.ctl, archiv.ctl, mp.ctl" + +[ui_extend] +LoadCtrlLibs = "para.ctl, ep.ctl, csg.ctl, ngedi.ctl, ini.ctl" + +[ui] +LoadCtrlLibs = "as.ctl, es.ctl, libCTRL.ctl, STD_Symbols.ctl, STD_ComplexSymbols.ctl, da.ctl" +LoadCtrlLibs = "login.ctl, panel.ctl, std.ctl, dist.ctl" +LoadCtrlLibs = "hosts.ctl, va.ctl, ac.ctl, dpGroups.ctl" +LoadCtrlLibs = "pager.ctl, archiv.ctl, Clk.ctl, tools.ctl, mp.ctl, ax.ctl" +LoadCtrlLibs = "pmon.ctl, userMan.ctl" +LoadCtrlLibs = "ft.ctl, pt.ctl" + +[event] +LoadCtrlLibs = "STD_Symbols.ctl" +LoadCtrlLibs = "averageThroughput.ctl" + +[ascii] +LoadCtrlLibs = "ASCIIlib.ctl, da.ctl, mp.ctl, para.ctl" + diff --git a/MAC/Navigator/scripts/libs/averageThroughput.ctl b/MAC/Navigator/scripts/libs/averageThroughput.ctl new file mode 100644 index 0000000000000000000000000000000000000000..1af944209d2e141d324b0f1c433842a2f8a7af61 --- /dev/null +++ b/MAC/Navigator/scripts/libs/averageThroughput.ctl @@ -0,0 +1,24 @@ +float averageThroughput( + int bytes, // The new value + string dp // The dp where we do something +) +{ + time timeNew; + int bytesOld; + time timeOld; + float throughput; + + dpGet(dp + ":_original.._stime",timeNew); + dpGet(dp + "Old",bytesOld); + dpGet(dp + "Old:_original.._stime",timeOld); + // write the new values + dpSetTimed(timeNew, dp + "Old",bytes); + DebugTN( "averageThroughput(): bytesOld,timeOld,bytesNew,timeNew",bytesOld,timeOld,bytes,timeNew ); + + int diffBytes = bytes - bytesOld; + float diffTime = timeNew - timeOld; + throughput = diffBytes / diffTime; + DebugTN( "averageThroughput(): diffBytes,diffTime,throughput:",diffBytes,diffTime,throughput ); + + return throughput; +}