diff --git a/MAC/GCF/DEPENDENCIES b/MAC/GCF/DEPENDENCIES index 4399bc10736a8a66eb2bb420e931a6ee171829f8..f87dc8d94c9f061712f902ced4cae8147b282781 100644 --- a/MAC/GCF/DEPENDENCIES +++ b/MAC/GCF/DEPENDENCIES @@ -31,5 +31,5 @@ xerces-c These error have to be fixed first. MAC/Tools/LofarLogger -log4cplus (see LofarLogger +log4cplus (see LofarLogger) LCS/Common diff --git a/MAC/GCF/_CoreComps/TM/src/GCF_Fsm.cc b/MAC/GCF/_CoreComps/TM/src/GCF_Fsm.cc index 0e392c24d00579e0479b264398e2aadb4a1f4e2c..faf3e998048b7e16f791165f4b8762e931b7c346 100644 --- a/MAC/GCF/_CoreComps/TM/src/GCF_Fsm.cc +++ b/MAC/GCF/_CoreComps/TM/src/GCF_Fsm.cc @@ -40,15 +40,15 @@ void GCFFsm::initFsm() void GCFFsm::tran(State target, const char* from, const char* to) { + GCFEvent e; + e.signal = F_EXIT_SIG; + (void)(this->*_state)(e, _gcfPort); // exit signal + LOFAR_LOG_TRACE(TM_STDOUT_LOGGER, ( "State transition to %s <<== %s", to, from)); - GCFEvent e; - e.signal = F_EXIT_SIG; - (void)(this->*_state)(e, _gcfPort); // exit signal - _state = target; // state transition e.signal = F_ENTRY_SIG; diff --git a/MAC/GCF/configure.in b/MAC/GCF/configure.in index 0689b5b99d9885c7cb428cc5f1ff4a4403604f2d..6235b2f0e56c1824c6d6bc272d3beb6b3547068b 100644 --- a/MAC/GCF/configure.in +++ b/MAC/GCF/configure.in @@ -56,8 +56,10 @@ lofar_QATOOLS lofar_DOCXX lofar_MPI(0) lofar_PVSS(1) -lofar_PACKAGE(MAC/Tools/LofarLogger) +lofar_EXTERNAL(common,1,Common/LofarTypes.h,,~/workspace3/LOFAR/installed/gnu_debug) +lofar_EXTERNAL(lofarlogger,1,LofarLogger/LofarLogger.h,,~/workspace3/LOFAR/installed/gnu_debug) lofar_EXTERNAL(xercesc,1,xercesc/sax2/SAX2XMLReader.hpp,xerces-c,) +lofar_EXTERNAL(log4cplus,1,log4cplus/logger.h,,) dnl dnl Output Makefiles diff --git a/MAC/Test/GCF/DEPENDENCIES b/MAC/Test/GCF/DEPENDENCIES index fb44ee82e7a6cdac67f519d18e5b031a59355b08..f0f4df43eb9bd56ad222e8a41daefa71b1028e0f 100644 --- a/MAC/Test/GCF/DEPENDENCIES +++ b/MAC/Test/GCF/DEPENDENCIES @@ -8,4 +8,4 @@ PVSS II 2.12.1 (see MAC/GCF) LCS/Common MAC/Tools/LofarLogger MAC/GCF -log4cplus \ No newline at end of file +log4cplus (see LofarLogger) \ No newline at end of file diff --git a/MAC/Test/GCF/configure.in b/MAC/Test/GCF/configure.in index 44baf1b74c78dd80a3a65405adb337e875a7c652..40f6b4ceae0cb086bf65f4eac19d9be7d1f8b7b5 100644 --- a/MAC/Test/GCF/configure.in +++ b/MAC/Test/GCF/configure.in @@ -56,7 +56,8 @@ lofar_QATOOLS lofar_DOCXX lofar_MPI(0) lofar_PVSS(1) -lofar_PACKAGE(MAC/Tools/LofarLogger) +lofar_EXTERNAL(lofarlogger,1,LofarLogger/LofarLogger.h,,~/workspace3/LOFAR/installed/gnu_debug) +lofar_EXTERNAL(common,1,Common/LofarTypes.h,,~/workspace3/LOFAR/installed/gnu_debug) lofar_EXTERNAL(gcf,1,GCF/GCF_Task.h,,~/workspace3/LOFAR/installed/gnu_debug) dnl diff --git a/MAC/Test/GCF/src/Application1.cc b/MAC/Test/GCF/src/Application1.cc index ed572f42d8911cb502bed16679ea457d2bf9725a..4c65c19e60a012925ffbb782b301818a06bac726 100644 --- a/MAC/Test/GCF/src/Application1.cc +++ b/MAC/Test/GCF/src/Application1.cc @@ -6,6 +6,7 @@ #include <GCF/GCF_Property.h> #include <GCF/GCF_MyProperty.h> #include <math.h> +#include <stdio.h> #define DECLARE_SIGNAL_NAMES #include "TST_Protocol.ph" @@ -1485,7 +1486,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& /*p*/) if (propertyACP1.subscribe() != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; @@ -1500,13 +1501,13 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& /*p*/) if (_supTask1.getProxy().setPropValue("A_K_P1", iv) != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } } else { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; } @@ -1530,12 +1531,12 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& /*p*/) if (nrOfSucceded == 1000) { passed(306); - TRAN(Application::test403); + TRAN(Application::finished); } else if (nrOfSucceded + nrOfFaults == 1000) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } else { @@ -1543,7 +1544,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& /*p*/) if (_supTask1.getProxy().setPropValue("A_K_P1", iv) != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } } break; @@ -1678,13 +1679,14 @@ GCFEvent::TResult Application::test402(GCFEvent& e, GCFPortInterface& p) return status; } -GCFEvent::TResult Application::test403(GCFEvent& e, GCFPortInterface& /*p*/) +GCFEvent::TResult Application::finished(GCFEvent& e, GCFPortInterface& /*p*/) { GCFEvent::TResult status = GCFEvent::HANDLED; switch (e.signal) { case F_ENTRY_SIG: + fprintf(stderr, "Ready with tests: passed %d, failed %d\n", _passed, _failed); GCFTask::stop(); break; diff --git a/MAC/Test/GCF/src/Application1.h b/MAC/Test/GCF/src/Application1.h index 9773b78d111b3259dbe10b8beee7c0f0af92a68a..a5d5a7c797c381ee8feebd5927b10463810740f8 100644 --- a/MAC/Test/GCF/src/Application1.h +++ b/MAC/Test/GCF/src/Application1.h @@ -39,7 +39,7 @@ class Application : public GCFTask GCFEvent::TResult test306(GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult test401(GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult test402(GCFEvent& e, GCFPortInterface& p); - GCFEvent::TResult test403(GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult finished(GCFEvent& e, GCFPortInterface& p); void passed(unsigned int passedTest) { diff --git a/MAC/Test/GCF/src/Application2.cc b/MAC/Test/GCF/src/Application2.cc index 1938e268be01242bab31cde3db78050f4c9e0515..89b3c2702f88a1e2a574040f5c9b06f26df9e5c2 100644 --- a/MAC/Test/GCF/src/Application2.cc +++ b/MAC/Test/GCF/src/Application2.cc @@ -4,6 +4,7 @@ #include <GCF/GCF_PVDouble.h> #include <GCF/GCF_Property.h> #include <math.h> +#include <stdio.h> #define DECLARE_SIGNAL_NAMES #include "TST_Protocol.ph" @@ -1366,7 +1367,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) if (_propertySetB4.load() != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; @@ -1381,7 +1382,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) if (_apcT1K.load(false) != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } else _counter = 1; @@ -1389,7 +1390,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) else { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; } @@ -1405,13 +1406,13 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) if (_supTask3.getProxy().subscribeProp("A_K_P1") != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } } else { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; } @@ -1456,7 +1457,7 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) if (_supTask3.getProxy().setPropValue("A_C_P1", iv) != GCF_NO_ERROR) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; } @@ -1470,12 +1471,12 @@ GCFEvent::TResult Application::test306(GCFEvent& e, GCFPortInterface& p) if (nrOfSucceded == 1000) { passed(306); - TRAN(Application::test403); + TRAN(Application::finished); } else if (nrOfSucceded + nrOfFaults == 1000) { failed(306); - TRAN(Application::test403); + TRAN(Application::finished); } break; } @@ -1616,13 +1617,14 @@ GCFEvent::TResult Application::test402(GCFEvent& e, GCFPortInterface& p) return status; } -GCFEvent::TResult Application::test403(GCFEvent& e, GCFPortInterface& /*p*/) +GCFEvent::TResult Application::finished(GCFEvent& e, GCFPortInterface& /*p*/) { GCFEvent::TResult status = GCFEvent::HANDLED; switch (e.signal) { case F_ENTRY_SIG: + fprintf(stderr, "Ready with tests: passed %d, failed %d\n", _passed, _failed); GCFTask::stop(); break; diff --git a/MAC/Test/GCF/src/Application2.h b/MAC/Test/GCF/src/Application2.h index a98fc469239f9c79ab68733b1bd16d1fb8e1b3cd..64308ddbd0f4ecb547ac2665e2ecc0c4987f59c7 100644 --- a/MAC/Test/GCF/src/Application2.h +++ b/MAC/Test/GCF/src/Application2.h @@ -39,7 +39,7 @@ class Application : public GCFTask GCFEvent::TResult test306(GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult test401(GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult test402(GCFEvent& e, GCFPortInterface& p); - GCFEvent::TResult test403(GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult finished(GCFEvent& e, GCFPortInterface& p); void passed(unsigned int passedTest) { diff --git a/MAC/Tools/LofarLogger/DEPENDENCIES b/MAC/Tools/LofarLogger/DEPENDENCIES index fc17bd5448addb168baa78f73918c72a0f31b680..582c61d52f1e37ea8b7190951898f7e87dd26c69 100644 --- a/MAC/Tools/LofarLogger/DEPENDENCIES +++ b/MAC/Tools/LofarLogger/DEPENDENCIES @@ -12,5 +12,4 @@ log4cplus-1.0 - ignore compiler erros during compiling the 'test''s - ignore compiler error during installing the 'test's -LOFAR PACKAGES: LCS/Common diff --git a/MAC/Tools/LofarLogger/configure.in b/MAC/Tools/LofarLogger/configure.in index 5e549b141a0e6fd337df47f57716f9b8a57788d4..3b0eabcce371645df5625523eeb6eac0a05c784c 100644 --- a/MAC/Tools/LofarLogger/configure.in +++ b/MAC/Tools/LofarLogger/configure.in @@ -5,7 +5,7 @@ AC_INIT(src/LofarLogger.h) dnl AC_CONFIG_AUX_DIR(config) dnl AM_CONFIG_HEADER(config/config.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(LOFARLOGGER, 0.1) +AM_INIT_AUTOMAKE(LofarLogger, 0.1) dnl Initialize for LOFAR (may set compilers) lofar_INIT @@ -55,8 +55,8 @@ lofar_DEBUG_OPTIMIZE lofar_QATOOLS lofar_DOCXX lofar_MPI(0) -lofar_PACKAGE(LCS/Common) -lofar_EXTERNAL(log4cplus,1,log4cplus/logger.h,log4cplus,) +lofar_EXTERNAL(common,1,Common/LofarTypes.h,,~/workspace3/LOFAR/installed/gnu_debug) +lofar_EXTERNAL(log4cplus,1,log4cplus/logger.h,,) dnl dnl Output Makefiles diff --git a/MAC/Tools/LofarLogger/src/Makefile.am b/MAC/Tools/LofarLogger/src/Makefile.am index 100e18bbdb558a7317c561c94985083516be9a29..07d3e8696e9c88e2dee4d19ee18273f4fff21bb1 100644 --- a/MAC/Tools/LofarLogger/src/Makefile.am +++ b/MAC/Tools/LofarLogger/src/Makefile.am @@ -1,7 +1,10 @@ -DOCHDRS = \ +pkginclude_HEADERS = \ LofarLogger.h \ LofarLoggerNames.h +DOCHDRS = \ + $(pkginclude_HEADERS) + lib_LTLIBRARIES = liblofarlogger.la liblofarlogger_la_SOURCES= $(DOCHDRS) \