From 0a6579c81fd852a3fcb4ce3447ce523a7d14d811 Mon Sep 17 00:00:00 2001 From: Ruud Overeem <overeem@astron.nl> Date: Tue, 22 Jul 2008 13:02:09 +0000 Subject: [PATCH] Bug 1189: Seems to be working now under PVSS 3.7. --- .gitattributes | 1 - .../include/APL/APLCommon/ControllerDefines.h | 3 +- MAC/APL/APLCommon/src/ChildControl.cc | 5 +- MAC/APL/APLCommon/src/ControllerDefines.cc | 10 +- MAC/APL/APLCommon/src/StationInfo.cc | 2 +- .../src/CTStartDaemon/CTStartDaemon.cc | 8 +- .../src/CTStartDaemon/CTStartDaemonMain.cc | 2 +- .../src/LoggingProcessor/LoggingProcessor.cc | 3 + MAC/APL/StationCU/configure.in | 4 +- .../StationCU/src/BeamControl/BeamControl.cc | 39 +-- .../src/BeamControl/BeamControlDefines.h | 52 --- MAC/APL/StationCU/src/BeamControl/Makefile.am | 2 +- .../PVSSDatapointDefs.h} | 163 +++++++++- .../CalibrationControl/CalibrationControl.cc | 61 ++-- .../CalibrationControlDefines.h | 50 --- .../src/CalibrationControl/Makefile.am | 2 +- .../CalibrationControl/PVSSDatapointDefs.h | 299 ++++++++++++++++++ .../DigitalBoardControl.cc | 58 ++-- .../DigitalBoardControlDefines.h | 50 --- .../DigitalBoardControlMain.cc | 2 +- .../src/DigitalBoardControl/Makefile.am | 2 +- .../DigitalBoardControl/PVSSDatapointDefs.h | 299 ++++++++++++++++++ .../StationCU/src/HardwareMonitor/Makefile.am | 2 +- .../src/HardwareMonitor/RCUConstants.h | 7 - .../src/HardwareMonitor/RSPMonitor.cc | 92 +++--- MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl | 26 -- .../src/HardwareMonitor/TBBMonitor.cc | 134 ++++---- .../StationCU/src/StationControl/ActiveObs.cc | 6 +- .../StationCU/src/StationControl/Makefile.am | 2 +- .../src/StationControl/PVSSDatapointDefs.h | 299 ++++++++++++++++++ .../src/StationControl/StationControl.cc | 32 +- .../StationControl/StationControlDefines.h | 49 --- .../src/StationControl/StationControlMain.cc | 6 +- MAC/APL/StationCU/src/TBBControl/Makefile.am | 2 +- .../StationCU/src/TBBControl/TBBControl.cc | 5 +- 35 files changed, 1287 insertions(+), 492 deletions(-) delete mode 100644 MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h rename MAC/APL/StationCU/src/{HardwareMonitor/StationPermDatapointDefs.h => BeamControl/PVSSDatapointDefs.h} (51%) delete mode 100644 MAC/APL/StationCU/src/CalibrationControl/CalibrationControlDefines.h create mode 100644 MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h delete mode 100644 MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlDefines.h create mode 100644 MAC/APL/StationCU/src/DigitalBoardControl/PVSSDatapointDefs.h delete mode 100644 MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl create mode 100644 MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h delete mode 100644 MAC/APL/StationCU/src/StationControl/StationControlDefines.h diff --git a/.gitattributes b/.gitattributes index 7e382fb52fd..53c98e66160 100644 --- a/.gitattributes +++ b/.gitattributes @@ -451,7 +451,6 @@ MAC/APL/RTDBCommon/test/tRTDButilities.h -text MAC/APL/StationCU/src/HardwareMonitor/HardwareMonitor.conf -text MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc -text MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.h -text -MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl -text MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc -text MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.h -text MAC/APL/StationCU/src/TBBControl/TBBControlDefines.h -text diff --git a/MAC/APL/APLCommon/include/APL/APLCommon/ControllerDefines.h b/MAC/APL/APLCommon/include/APL/APLCommon/ControllerDefines.h index 6a2a8d9f2c5..25ef968fb0b 100644 --- a/MAC/APL/APLCommon/include/APL/APLCommon/ControllerDefines.h +++ b/MAC/APL/APLCommon/include/APL/APLCommon/ControllerDefines.h @@ -106,7 +106,8 @@ string observationParset(int obsID); // Construct PS name solving markers line @observation@, @ring@, etc. string createPropertySetName(const string& propSetMask, - const string& controllerName); + const string& controllerName, + const string& realDPname = "REALDPNAME"); // Construct a message the matches the given CTState and send it on the port. bool sendControlResult(GCF::TM::GCFPortInterface& port, diff --git a/MAC/APL/APLCommon/src/ChildControl.cc b/MAC/APL/APLCommon/src/ChildControl.cc index ad62b767675..da1d4fc1b02 100644 --- a/MAC/APL/APLCommon/src/ChildControl.cc +++ b/MAC/APL/APLCommon/src/ChildControl.cc @@ -173,8 +173,7 @@ bool ChildControl::startChild (uint16 aCntlrType, ". Skipping creation of observation parset."); } else { - string baseSetName = formatString("%s/Observation_%d", - LOFAR_SHARE_LOCATION, anObsID); + string baseSetName(observationParset(anObsID)); LOG_DEBUG_STR ("Reading parameterfile: " << baseSetName); ParameterSet wholeSet (baseSetName); LOG_DEBUG_STR (wholeSet.size() << " elements in parameterfile"); @@ -211,9 +210,11 @@ bool ChildControl::startChild (uint16 aCntlrType, cntlrSet.add("_instanceNr", lexical_cast<string>(instanceNr)); cntlrSet.add("_moduleName", nodeName); cntlrSet.add("_treeID", lexical_cast<string>(anObsID)); + cntlrSet.add("_DPname", wholeSet.getString("_DPname")); cntlrSet.add("# moduleName", nodeName); cntlrSet.add("# pathName", prefix+position+nodeName+"."); cntlrSet.add("# treeID", lexical_cast<string>(anObsID)); + cntlrSet.add("# DPname", wholeSet.getString("_DPname")); // Finally write to subset to the file. cntlrSet.writeFile (cntlrSetName); diff --git a/MAC/APL/APLCommon/src/ControllerDefines.cc b/MAC/APL/APLCommon/src/ControllerDefines.cc index 2506d541a7c..8f3608cf137 100644 --- a/MAC/APL/APLCommon/src/ControllerDefines.cc +++ b/MAC/APL/APLCommon/src/ControllerDefines.cc @@ -1,6 +1,6 @@ //# ControllerDefines.cc: Controller(name) related utilities //# -//# Copyright (C) 2006 +//# Copyright (C) 2006-2008 //# ASTRON (Netherlands Foundation for Research in Astronomy) //# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl //# @@ -244,7 +244,8 @@ string observationParset(int obsID) // @rcu@ // string createPropertySetName(const string& propSetMask, - const string& controllerName) + const string& controllerName, + const string& realDPname) { string psName(propSetMask); // editable copy uint pos; @@ -270,9 +271,8 @@ string createPropertySetName(const string& propSetMask, psName.replace(pos, 10, ""); } } - if ((pos = psName.find("@observation@")) != string::npos) { - psName.replace(pos, 13, string("Observation") + - lexical_cast<string>(getObservationNr(controllerName))); + if ((pos = psName.find("LOFAR_ObsSW_@observation@")) != string::npos) { + psName.replace(pos, 25, realDPname); } if ((pos = psName.find("@cabinet@")) != string::npos) { diff --git a/MAC/APL/APLCommon/src/StationInfo.cc b/MAC/APL/APLCommon/src/StationInfo.cc index dcd699c8851..1ce746b441b 100644 --- a/MAC/APL/APLCommon/src/StationInfo.cc +++ b/MAC/APL/APLCommon/src/StationInfo.cc @@ -145,7 +145,7 @@ string realHostname(const string& someName) // leaves us with ABC999 and XY999 formats // when 3rd character is not a digit the name refers to a CEP machine - if (!isdigit(someName[2])) { + if (!isdigit(someName[3])) { return (someName); } diff --git a/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemon.cc b/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemon.cc index f97554b48e6..6dc834892a2 100644 --- a/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemon.cc +++ b/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemon.cc @@ -243,7 +243,7 @@ int32 CTStartDaemon::startController(uint16 cntlrType, { // not found? report problem if (cntlrType == CNTLRTYPE_NO_TYPE || cntlrType >= CNTLRTYPE_NR_TYPES) { - LOG_DEBUG_STR("No support for starting controller of the type " << cntlrType); + LOG_ERROR_STR("No support for starting controller of the type " << cntlrType); return (SD_RESULT_UNSUPPORTED_TYPE); } @@ -251,7 +251,7 @@ int32 CTStartDaemon::startController(uint16 cntlrType, ProgramLocator PL; string executable = PL.locate(getExecutable(cntlrType)); if (executable.empty()) { - LOG_DEBUG_STR("Executable '" << getExecutable(cntlrType) << "' not found."); + LOG_ERROR_STR("Executable '" << getExecutable(cntlrType) << "' not found."); return (SD_RESULT_PROGRAM_NOT_FOUND); } @@ -261,10 +261,10 @@ int32 CTStartDaemon::startController(uint16 cntlrType, cntlrName.c_str(), parentHost.c_str(), parentService.c_str()); - LOG_DEBUG_STR("About to start: " << startCmd); + LOG_INFO_STR("About to start: " << startCmd); int32 result = system (startCmd.c_str()); - LOG_DEBUG_STR ("Result of start = " << result); + LOG_INFO_STR ("Result of start = " << result); if (result == -1) { return (SD_RESULT_START_FAILED); diff --git a/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemonMain.cc b/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemonMain.cc index 6526f8d7fcd..f779071bfc6 100644 --- a/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemonMain.cc +++ b/MAC/APL/CUDaemons/src/CTStartDaemon/CTStartDaemonMain.cc @@ -31,7 +31,7 @@ int main(int argc, char* argv[]) { // signal (SIGCHLD, SIG_IGN); - GCFTask::init(argc, argv, "StartDaemon"); + GCFTask::init(argc, argv, "CTStartDaemon"); LOG_INFO("MACProcessScope: LOFAR_PermSW_Daemons_CTStartDaemon"); diff --git a/MAC/APL/CURTDBDaemons/src/LoggingProcessor/LoggingProcessor.cc b/MAC/APL/CURTDBDaemons/src/LoggingProcessor/LoggingProcessor.cc index 72be682066c..70eaba88b36 100644 --- a/MAC/APL/CURTDBDaemons/src/LoggingProcessor/LoggingProcessor.cc +++ b/MAC/APL/CURTDBDaemons/src/LoggingProcessor/LoggingProcessor.cc @@ -113,10 +113,12 @@ GCFEvent::TResult LoggingProcessor::initial(GCFEvent& event, GCFPortInterface& p case F_ENTRY: case F_TIMER: if (!itsListener->isConnected()) { + LOG_DEBUG("Trying to start the listener for log4cplus"); itsListener->open(); } else { if (!itsBackDoor->isConnected()) { + LOG_DEBUG("Trying to start the listener for the LogClients"); itsBackDoor->open(); } } @@ -131,6 +133,7 @@ GCFEvent::TResult LoggingProcessor::initial(GCFEvent& event, GCFPortInterface& p break; case F_DISCONNECTED: + LOG_DEBUG("Starting Listener failed, retry in 5 seconds"); port.setTimer(5.0); // try again after 5 second break; diff --git a/MAC/APL/StationCU/configure.in b/MAC/APL/StationCU/configure.in index c7780b9a4c8..42f7c05727c 100644 --- a/MAC/APL/StationCU/configure.in +++ b/MAC/APL/StationCU/configure.in @@ -79,10 +79,10 @@ dnl Output Makefiles dnl AC_OUTPUT( src/Makefile -src/HardwareMonitor/Makefile -src/DigitalBoardControl/Makefile src/BeamControl/Makefile src/CalibrationControl/Makefile +src/DigitalBoardControl/Makefile +src/HardwareMonitor/Makefile src/StationControl/Makefile src/TBBControl/Makefile Makefile diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc index 3aacaa38b17..8303193901d 100644 --- a/MAC/APL/StationCU/src/BeamControl/BeamControl.cc +++ b/MAC/APL/StationCU/src/BeamControl/BeamControl.cc @@ -37,7 +37,7 @@ #include <signal.h> #include "BeamControl.h" -#include "BeamControlDefines.h" +#include "PVSSDatapointDefs.h" #include "../Package__Version.h" using namespace LOFAR::GCF::TM; @@ -142,7 +142,7 @@ void BeamControl::setState(CTState::CTstateNr newState) if (itsPropertySet) { CTState cts; - itsPropertySet->setValue(PVSSNAME_FSM_CURACT, GCFPVString(cts.name(newState))); + itsPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString(cts.name(newState))); } } @@ -176,13 +176,19 @@ GCFEvent::TResult BeamControl::initial_state(GCFEvent& event, case F_INIT: { // Get access to my own propertyset. - string propSetName(createPropertySetName(PSN_BEAM_CTRL, getName())); + string propSetName(createPropertySetName(PSN_BEAM_CTRL, getName(), + globalParameterSet()->getString("_DPname"))); LOG_INFO_STR ("Activating PropertySet" << propSetName); itsPropertySet = new RTDBPropertySet(propSetName, PST_BEAM_CTRL, PSAT_RW, this); // Wait for timer that is set on DP_CREATED event + + // Instruct loggingProcessor +// LOG_INFO_STR("MACProcessScope: LOFAR.ObsSW.Observation" << treeID << ".BeamCtrl"); + LOG_INFO_STR("MACProcessScope: " << propSetName); + // NOTE: the SASgateway is not yet aware of claimMgr so the data will not be transferred to SAS. } break; @@ -200,11 +206,6 @@ GCFEvent::TResult BeamControl::initial_state(GCFEvent& event, if (!itsPropertySetInitialized) { itsPropertySetInitialized = true; - // Instruct codeloggingProcessor - // TODO - uint32 treeID = getObservationNr(getName()); - LOG_INFO_STR("MACProcessScope: LOFAR.ObsSW.Observation" << treeID << ".BeamCtrl"); - // first redirect signalHandler to our quiting state to leave PVSS // in the right state when we are going down thisBeamControl = this; @@ -214,8 +215,8 @@ GCFEvent::TResult BeamControl::initial_state(GCFEvent& event, // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); GCFPValueArray dpeValues; - itsPropertySet->setValue(PVSSNAME_FSM_CURACT, GCFPVString("initial")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("initial")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); itsPropertySet->setValue(PN_BC_CONNECTED, GCFPVBool (false)); itsPropertySet->setValue(PN_BC_SUB_ARRAY, GCFPVString("")); itsPropertySet->setValue(PN_BC_SUBBAND_LIST, GCFPVDynArr(LPT_DYNSTRING, dpeValues)); @@ -287,8 +288,8 @@ GCFEvent::TResult BeamControl::started_state(GCFEvent& event, GCFPortInterface& switch (event.signal) { case F_ENTRY: { // update PVSS -// itsPropertySet->setValue(string(PVSSNAME_FSM_CURACT),GCFPVString("started")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); +// itsPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("started")); + itsPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsPropertySet->setValue(PN_BC_CONNECTED, GCFPVBool (false)); break; } @@ -363,8 +364,8 @@ GCFEvent::TResult BeamControl::claimed_state(GCFEvent& event, GCFPortInterface& switch (event.signal) { case F_ENTRY: { // update PVSS -// itsPropertySet->setValue(string(PVSSNAME_FSM_CURACT),GCFPVString("claimed")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); +// itsPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("claimed")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); break; } @@ -455,8 +456,8 @@ GCFEvent::TResult BeamControl::active_state(GCFEvent& event, GCFPortInterface& p switch (event.signal) { case F_ENTRY: { // update PVSS -// itsPropertySet->setValue(string(PVSSNAME_FSM_CURACT),GCFPVString("active")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); +// itsPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("active")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); break; } @@ -563,8 +564,8 @@ GCFEvent::TResult BeamControl::quiting_state(GCFEvent& event, GCFPortInterface& // tell Parent task we like to go down. itsParentControl->nowInState(getName(), CTState::QUIT); -// itsPropertySet->setValue(string(PVSSNAME_FSM_CURACT),GCFPVString("quiting")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); +// itsPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("quiting")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); // disconnect from BeamServer itsBeamServer->close(); break; @@ -745,7 +746,7 @@ bool BeamControl::handleBeamFreeAck(GCFEvent& event) BSBeamfreeackEvent ack(event); if (ack.status != 0) { LOG_ERROR_STR("Beam de-allocation failed with errorcode: " << ack.status); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("De-allocation of the beam failed.")); + itsPropertySet->setValue(PN_FSM_ERROR,GCFPVString("De-allocation of the beam failed.")); return (false); } diff --git a/MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h b/MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h deleted file mode 100644 index 90906de7d31..00000000000 --- a/MAC/APL/StationCU/src/BeamControl/BeamControlDefines.h +++ /dev/null @@ -1,52 +0,0 @@ -//# BeamControlDefines.h: preprocessor definitions of various constants -//# -//# Copyright (C) 2002-2003 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef BEAMCONTROLDEFINES_H -#define BEAMCONTROLDEFINES_H - -namespace LOFAR { - namespace StationCU { - -#define BC_TASKNAME "BeamCtrl" - -#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl" -#define PST_BEAM_CTRL "BeamCtrl" -#define PN_BC_CONNECTED "connected" -#define PN_BC_SUB_ARRAY "subArray" -#define PN_BC_SUBBAND_LIST "subbandList" -#define PN_BC_BEAMLET_LIST "beamletList" -#define PN_BC_ANGLE1 "angle1" -#define PN_BC_ANGLE2 "angle2" -#define PN_BC_DIRECTION_TYPE "directionType" -#define PN_BC_BEAM_NAME "beamName" - -// next lines should be defined somewhere in Common. -#define PVSSNAME_FSM_CURACT "currentAction" -#define PVSSNAME_FSM_ERROR "error" -#define PVSSNAME_FSM_LOGMSG "logMsg" -#define PVSSNAME_FSM_STATE "state" -#define PVSSNAME_FSM_CHILDSTATE "childState" - -}; // MCU -}; // LOFAR - -#endif diff --git a/MAC/APL/StationCU/src/BeamControl/Makefile.am b/MAC/APL/StationCU/src/BeamControl/Makefile.am index 081a8be04da..bd13e3d1b0f 100644 --- a/MAC/APL/StationCU/src/BeamControl/Makefile.am +++ b/MAC/APL/StationCU/src/BeamControl/Makefile.am @@ -12,7 +12,7 @@ BeamControl_LDADD = $(LOFAR_DEPEND) BeamControl_DEPENDENCIES = $(LOFAR_DEPEND) NOINSTHDRS = BeamControl.h \ - BeamControlDefines.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/HardwareMonitor/StationPermDatapointDefs.h b/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h similarity index 51% rename from MAC/APL/StationCU/src/HardwareMonitor/StationPermDatapointDefs.h rename to MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h index fdd6241119f..6ce81b19f38 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/StationPermDatapointDefs.h +++ b/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h @@ -1,4 +1,70 @@ -// This file was generated by create_db_files v1.0 on Wed Nov 14 15:49:57 UTC 2007 +// This file was generated by create_db_files v1.0 on Mon Jun 16 14:13:40 UTC 2008 + +#ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +#define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +// process +#define PN_FSM_PROCESSID "process.processID" +#define PN_FSM_START_TIME "process.startTime" +#define PN_FSM_STOP_TIME "process.stopTime" +#define PN_FSM_LOG_MSG "process.logMsg" +#define PN_FSM_ERROR "process.error" +#define PN_FSM_CURRENT_ACTION "process.currentAction" +// object +#define PN_OBJ_STATE "object.state" +#define PN_OBJ_CHILD_STATE "object.childState" +#define PN_OBJ_MESSAGE "object.message" + +// Station +#define PSN_STATION "LOFAR_PIC_@ring@_@station@" +#define PST_STATION "Station" +#define PN_STS__CHILD_DP "__childDp" + +// MACScheduler +#define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" +#define PST_MAC_SCHEDULER "MACScheduler" +#define PN_MS_ACTIVE_OBSERVATIONS "activeObservations" +#define PN_MS_OTDB_CONNECTED "OTDB.connected" +#define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" +#define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" + +// Observation +#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_OBSERVATION "Observation" + +// ObsCtrl +#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" +#define PST_OBS_CTRL "ObsCtrl" +#define PN_OBSCTRL_CLAIM_PERIOD "claimPeriod" +#define PN_OBSCTRL_PREPARE_PERIOD "preparePeriod" +#define PN_OBSCTRL_START_TIME "startTime" +#define PN_OBSCTRL_STOP_TIME "stopTime" +#define PN_OBSCTRL_BAND_FILTER "bandFilter" +#define PN_OBSCTRL_NYQUISTZONE "nyquistzone" +#define PN_OBSCTRL_ANTENNA_ARRAY "antennaArray" +#define PN_OBSCTRL_RECEIVER_LIST "receiverList" +#define PN_OBSCTRL_SAMPLE_CLOCK "sampleClock" +#define PN_OBSCTRL_MEASUREMENT_SET "measurementSet" +#define PN_OBSCTRL_STATION_LIST "stationList" +#define PN_OBSCTRL_INPUT_NODE_LIST "inputNodeList" +#define PN_OBSCTRL_BGL_NODE_LIST "BGLNodeList" +#define PN_OBSCTRL_STORAGE_NODE_LIST "storageNodeList" +#define PN_OBSCTRL_BEAMS_ANGLE1 "Beams.angle1" +#define PN_OBSCTRL_BEAMS_ANGLE2 "Beams.angle2" +#define PN_OBSCTRL_BEAMS_DIRECTION_TYPE "Beams.directionType" +#define PN_OBSCTRL_BEAMS_BEAMLET_LIST "Beams.beamletList" +#define PN_OBSCTRL_BEAMS_SUBBAND_LIST "Beams.subbandList" + +// OnlineCtrl +#define PSN_ONLINE_CTRL "LOFAR_ObsSW_@observation@_OnlineCtrl" +#define PST_ONLINE_CTRL "OnlineCtrl" + +// Correlator +#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineCtrl_Correlator" +#define PST_CORRELATOR "Correlator" + +// StorageAppl +#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineCtrl_StorageAppl" +#define PST_STORAGE_APPL "StorageAppl" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -15,12 +81,10 @@ // SubRack #define PSN_SUB_RACK "LOFAR_PIC_@cabinet@_@subrack@" #define PST_SUB_RACK "SubRack" -#define PN_SRCK_SPU_STATE "SPU.state" #define PN_SRCK_SPU__VHBA "SPU.Vhba" #define PN_SRCK_SPU__VLBA "SPU.Vlba" #define PN_SRCK_SPU__VDIG "SPU.Vdig" #define PN_SRCK_SPU_TEMPERATURE "SPU.temperature" -#define PN_SRCK_CLOCK_BOARD_STATE "clockBoard.state" #define PN_SRCK_CLOCK_BOARD__VFSP "clockBoard.Vfsp" #define PN_SRCK_CLOCK_BOARD__VCLOCK "clockBoard.Vclock" #define PN_SRCK_CLOCK_BOARD_VERSION "clockBoard.version" @@ -37,34 +101,46 @@ #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" #define PN_RSP_ALERT "alert" -#define PN_RSP_ETHERNET_STATE "Ethernet.state" +#define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" +#define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" +#define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" #define PN_RSP_ETHERNET_PACKETS_RECEIVED "Ethernet.packetsReceived" #define PN_RSP_ETHERNET_PACKETS_ERROR "Ethernet.packetsError" #define PN_RSP_ETHERNET_LAST_ERROR "Ethernet.lastError" #define PN_RSP_MEP_SEQNR "MEP.seqnr" #define PN_RSP_MEP_ERROR "MEP.error" -#define PN_RSP_BP_STATE "BP.state" +#define PN_RSP_BP_STATUS_STATE "BP.status.state" +#define PN_RSP_BP_STATUS_CHILD_STATE "BP.status.childState" +#define PN_RSP_BP_STATUS_MESSAGE "BP.status.message" #define PN_RSP_BP_TEMPERATURE "BP.temperature" #define PN_RSP_BP_VERSION "BP.version" -#define PN_RSP_AP0_STATE "AP0.state" +#define PN_RSP_AP0_STATUS_STATE "AP0.status.state" +#define PN_RSP_AP0_STATUS_CHILD_STATE "AP0.status.childState" +#define PN_RSP_AP0_STATUS_MESSAGE "AP0.status.message" #define PN_RSP_AP0_TEMPERATURE "AP0.temperature" #define PN_RSP_AP0_VERSION "AP0.version" #define PN_RSP_AP0_SYNC_SAMPLE_COUNT "AP0.SYNC.sampleCount" #define PN_RSP_AP0_SYNC_SYNC_COUNT "AP0.SYNC.syncCount" #define PN_RSP_AP0_SYNC_ERROR_COUNT "AP0.SYNC.errorCount" -#define PN_RSP_AP1_STATE "AP1.state" +#define PN_RSP_AP1_STATUS_STATE "AP1.status.state" +#define PN_RSP_AP1_STATUS_CHILD_STATE "AP1.status.childState" +#define PN_RSP_AP1_STATUS_MESSAGE "AP1.status.message" #define PN_RSP_AP1_TEMPERATURE "AP1.temperature" #define PN_RSP_AP1_VERSION "AP1.version" #define PN_RSP_AP1_SYNC_SAMPLE_COUNT "AP1.SYNC.sampleCount" #define PN_RSP_AP1_SYNC_SYNC_COUNT "AP1.SYNC.syncCount" #define PN_RSP_AP1_SYNC_ERROR_COUNT "AP1.SYNC.errorCount" -#define PN_RSP_AP2_STATE "AP2.state" +#define PN_RSP_AP2_STATUS_STATE "AP2.status.state" +#define PN_RSP_AP2_STATUS_CHILD_STATE "AP2.status.childState" +#define PN_RSP_AP2_STATUS_MESSAGE "AP2.status.message" #define PN_RSP_AP2_TEMPERATURE "AP2.temperature" #define PN_RSP_AP2_VERSION "AP2.version" #define PN_RSP_AP2_SYNC_SAMPLE_COUNT "AP2.SYNC.sampleCount" #define PN_RSP_AP2_SYNC_SYNC_COUNT "AP2.SYNC.syncCount" #define PN_RSP_AP2_SYNC_ERROR_COUNT "AP2.SYNC.errorCount" -#define PN_RSP_AP3_STATE "AP3.state" +#define PN_RSP_AP3_STATUS_STATE "AP3.status.state" +#define PN_RSP_AP3_STATUS_CHILD_STATE "AP3.status.childState" +#define PN_RSP_AP3_STATUS_MESSAGE "AP3.status.message" #define PN_RSP_AP3_TEMPERATURE "AP3.temperature" #define PN_RSP_AP3_VERSION "AP3.version" #define PN_RSP_AP3_SYNC_SAMPLE_COUNT "AP3.SYNC.sampleCount" @@ -135,6 +211,18 @@ #define PST_STATION_CLOCK "StationClock" #define PN_SCK_CLOCK "clock" +// LogProcessor +#define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" +#define PST_LOG_PROCESSOR "LogProcessor" + +// KVLogger +#define PSN_KV_LOGGER "LOFAR_PermSW_Daemons_KVLogger" +#define PST_KV_LOGGER "KVLogger" + +// SASGateway +#define PSN_SAS_GATEWAY "LOFAR_PermSW_Daemons_SASGateway" +#define PST_SAS_GATEWAY "SASGateway" + // DigBoardCtrl #define PSN_DIG_BOARD_CTRL "LOFAR_PermSW_DigBoardCtrl" #define PST_DIG_BOARD_CTRL "DigBoardCtrl" @@ -156,11 +244,56 @@ #define PSN_HARDWARE_MONITOR "LOFAR_PermSW_HardwareMonitor" #define PST_HARDWARE_MONITOR "HardwareMonitor" #define PN_HWM_RSP_CONNECTED "RSP.connected" -#define PN_HWM_RSP_CURRENT_ACTION "RSP.process.currentAction" -#define PN_HWM_RSP_ERROR "RSP.process.error" -#define PN_HWM_RSP_LOG_MSG "RSP.process.logMsg" #define PN_HWM_TBB_CONNECTED "TBB.connected" -#define PN_HWM_TBB_CURRENT_ACTION "TBB.process.currentAction" -#define PN_HWM_TBB_ERROR "TBB.process.error" -#define PN_HWM_TBB_LOG_MSG "TBB.process.logMsg" +// SoftwareMonitor +#define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" +#define PST_SOFTWARE_MONITOR "SoftwareMonitor" + +// MACInfoServer +#define PSN_MAC_INFO_SERVER "LOFAR_PermSW_MACInfoServer" +#define PST_MAC_INFO_SERVER "MACInfoServer" + +// StnObservation +#define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_STN_OBSERVATION "StnObservation" +#define PN_OBS_NAME "name" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" + +// BeamCtrl +#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl" +#define PST_BEAM_CTRL "BeamCtrl" +#define PN_BC_CONNECTED "connected" +#define PN_BC_SUB_ARRAY "subArray" +#define PN_BC_SUBBAND_LIST "subbandList" +#define PN_BC_BEAMLET_LIST "beamletList" +#define PN_BC_ANGLE1 "angle1" +#define PN_BC_ANGLE2 "angle2" +#define PN_BC_DIRECTION_TYPE "directionType" +#define PN_BC_BEAM_NAME "beamName" + +// CalCtrl +#define PSN_CAL_CTRL "LOFAR_ObsSW_@observation@_CalCtrl" +#define PST_CAL_CTRL "CalCtrl" +#define PN_CC_CONNECTED "connected" +#define PN_CC_BEAM_NAMES "beamNames" +#define PN_CC_ANTENNA_ARRAY "antennaArray" +#define PN_CC_FILTER "filter" +#define PN_CC_NYQUISTZONE "nyquistzone" +#define PN_CC_RCUS "rcus" + +// TBBCtrl +#define PSN_TBB_CTRL "LOFAR_ObsSW_@observation@_TBBCtrl" +#define PST_TBB_CTRL "TBBCtrl" +#define PN_TBC_CONNECTED "connected" +#define PN_TBC_TRIGGER_RCU_NR "trigger.rcuNr" +#define PN_TBC_TRIGGER_SEQUENCE_NR "trigger.sequenceNr" +#define PN_TBC_TRIGGER_TIME "trigger.time" +#define PN_TBC_TRIGGER_SAMPLE_NR "trigger.sampleNr" +#define PN_TBC_TRIGGER_SUM "trigger.sum" +#define PN_TBC_TRIGGER_NR_SAMPLES "trigger.nrSamples" +#define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" +#define PN_TBC_TRIGGER_FLAGS "trigger.flags" +#define PN_TBC_TRIGGER_TABLE "trigger.table" + +#endif diff --git a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc index 8bebc4c96ef..81d9087c477 100644 --- a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc +++ b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControl.cc @@ -33,7 +33,7 @@ #include <signal.h> #include "CalibrationControl.h" -#include "CalibrationControlDefines.h" +#include "PVSSDatapointDefs.h" #include "../Package__Version.h" using namespace LOFAR::GCF::TM; @@ -136,7 +136,7 @@ void CalibrationControl::setState(CTState::CTstateNr newState) if (itsPropertySet) { CTState cts; - itsPropertySet->setValue(PVSSNAME_FSM_CURACT, GCFPVString(cts.name(newState))); + itsPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString(cts.name(newState))); } } @@ -177,13 +177,19 @@ GCFEvent::TResult CalibrationControl::initial_state(GCFEvent& event, case F_ENTRY: { // Get access to my own propertyset. - string propSetName(createPropertySetName(PSN_CAL_CTRL, getName())); + string propSetName(createPropertySetName(PSN_CAL_CTRL, getName(), + globalParameterSet()->getString("_DPname"))); LOG_INFO_STR ("Activating PropertySet" << propSetName); itsPropertySet = new RTDBPropertySet(propSetName, PST_CAL_CTRL, PSAT_RW | PSAT_TMP, this); // Wait for timer that is set on DP_CREATED event + + // Instruct loggingProcessor +// LOG_INFO_STR("MACProcessScope: LOFAR.ObsSW.Observation" << treeID << ".CalCtrl"); + LOG_INFO_STR("MACProcessScope: " << propSetName); + // NOTE: the SASgateway is not yet aware of claimMgr so the data will not be transferred to SAS. } break; @@ -201,11 +207,6 @@ GCFEvent::TResult CalibrationControl::initial_state(GCFEvent& event, if (!itsPropertySetInitialized) { itsPropertySetInitialized = true; - // Instruct CodeLoggingProcessor - // TODO - uint32 treeID = getObservationNr(getName()); - LOG_INFO_STR("MACProcessScope: LOFAR.ObsSW.Observation" << treeID << ".CalCtrl"); - // first redirect signalHandler to our finishing state to leave PVSS // in the right state when we are going down thisCalibrationControl = this; @@ -215,14 +216,14 @@ GCFEvent::TResult CalibrationControl::initial_state(GCFEvent& event, // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); GCFPValueArray beamNameArr; - itsPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString ("initial")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString ("")); - itsPropertySet->setValue(PN_CC_CONNECTED, GCFPVBool (false)); - itsPropertySet->setValue(PN_CC_BEAMNAMES, GCFPVDynArr (LPT_DYNSTRING, beamNameArr)); - itsPropertySet->setValue(PN_CC_ANTENNAARRAY,GCFPVString ("")); - itsPropertySet->setValue(PN_CC_FILTER, GCFPVString ("")); - itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(0)); - itsPropertySet->setValue(PN_CC_RCUS, GCFPVString ("")); + itsPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString ("initial")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_CONNECTED, GCFPVBool (false)); + itsPropertySet->setValue(PN_CC_BEAM_NAMES, GCFPVDynArr (LPT_DYNSTRING, beamNameArr)); + itsPropertySet->setValue(PN_CC_ANTENNA_ARRAY, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_FILTER, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(0)); + itsPropertySet->setValue(PN_CC_RCUS, GCFPVString ("")); // Start ParentControl task LOG_DEBUG ("Enabling ParentControl task and wait for my name"); @@ -286,7 +287,7 @@ GCFEvent::TResult CalibrationControl::started_state(GCFEvent& event, case F_ENTRY: // update PVSS - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsPropertySet->setValue(PN_CC_CONNECTED,GCFPVBool(false)); break; @@ -361,12 +362,12 @@ GCFEvent::TResult CalibrationControl::claimed_state(GCFEvent& event, case F_ENTRY: { // update PVSS GCFPValueArray beamNameArr; - itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString ("")); - itsPropertySet->setValue(PN_CC_BEAMNAMES, GCFPVDynArr (LPT_DYNSTRING, beamNameArr)); - itsPropertySet->setValue(PN_CC_ANTENNAARRAY, GCFPVString ("")); - itsPropertySet->setValue(PN_CC_FILTER, GCFPVString ("")); - itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(0)); - itsPropertySet->setValue(PN_CC_RCUS, GCFPVString ("")); + itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_BEAM_NAMES, GCFPVDynArr (LPT_DYNSTRING, beamNameArr)); + itsPropertySet->setValue(PN_CC_ANTENNA_ARRAY, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_FILTER, GCFPVString ("")); + itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(0)); + itsPropertySet->setValue(PN_CC_RCUS, GCFPVString ("")); break; } @@ -457,7 +458,7 @@ GCFEvent::TResult CalibrationControl::active_state(GCFEvent& event, GCFPortInter case F_ENTRY: { // update PVSS - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); break; } @@ -578,7 +579,7 @@ GCFEvent::TResult CalibrationControl::quiting_state(GCFEvent& event, // tell Parent task we like to go down. itsParentControl->nowInState(getName(), CTState::QUIT); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsCalServer->close(); break; } @@ -643,11 +644,11 @@ bool CalibrationControl::startCalibration() } // for all beams // inform operator about these values. - itsPropertySet->setValue(PN_CC_BEAMNAMES, GCFPVDynArr(LPT_DYNSTRING, beamNameArr)); - itsPropertySet->setValue(PN_CC_ANTENNAARRAY,GCFPVString(itsObsPar.antennaArray)); - itsPropertySet->setValue(PN_CC_FILTER, GCFPVString(itsObsPar.filter)); - itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(itsObsPar.nyquistZone)); - itsPropertySet->setValue(PN_CC_RCUS, GCFPVString( + itsPropertySet->setValue(PN_CC_BEAM_NAMES, GCFPVDynArr(LPT_DYNSTRING, beamNameArr)); + itsPropertySet->setValue(PN_CC_ANTENNA_ARRAY,GCFPVString(itsObsPar.antennaArray)); + itsPropertySet->setValue(PN_CC_FILTER, GCFPVString(itsObsPar.filter)); + itsPropertySet->setValue(PN_CC_NYQUISTZONE, GCFPVInteger(itsObsPar.nyquistZone)); + itsPropertySet->setValue(PN_CC_RCUS, GCFPVString( compactedArrayString(globalParameterSet()-> getString("Observation.receiverList")))); return (true); diff --git a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControlDefines.h b/MAC/APL/StationCU/src/CalibrationControl/CalibrationControlDefines.h deleted file mode 100644 index b197e73f8ad..00000000000 --- a/MAC/APL/StationCU/src/CalibrationControl/CalibrationControlDefines.h +++ /dev/null @@ -1,50 +0,0 @@ -//# CalibrationControlDefines.h: preprocessor definitions of various constants -//# -//# Copyright (C) 2002-2003 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef CALIBRATIONCONTROLDEFINES_H -#define CALIBRATIONCONTROLDEFINES_H - -namespace LOFAR { - namespace StationCU { - -#define CC_TASKNAME "CalCtrl" - -#define PSN_CAL_CTRL "LOFAR_ObsSW_@observation@_CalCtrl" -#define PST_CAL_CTRL "CalCtrl" -#define PN_CC_CONNECTED "connected" -#define PN_CC_BEAMNAMES "beamNames" -#define PN_CC_ANTENNAARRAY "antennaArray" -#define PN_CC_FILTER "filter" -#define PN_CC_NYQUISTZONE "nyquistzone" -#define PN_CC_RCUS "rcus" - -// next lines should be defined somewhere in Common. -#define PVSSNAME_FSM_CURACT "currentAction" -#define PVSSNAME_FSM_ERROR "error" -#define PVSSNAME_FSM_LOGMSG "logMsg" -#define PVSSNAME_FSM_STATE "state" -#define PVSSNAME_FSM_CHILDSTATE "childState" - -}; // MCU -}; // LOFAR - -#endif diff --git a/MAC/APL/StationCU/src/CalibrationControl/Makefile.am b/MAC/APL/StationCU/src/CalibrationControl/Makefile.am index dfb57f42eae..0253115cc30 100644 --- a/MAC/APL/StationCU/src/CalibrationControl/Makefile.am +++ b/MAC/APL/StationCU/src/CalibrationControl/Makefile.am @@ -12,7 +12,7 @@ CalibrationControl_LDADD = $(LOFAR_DEPEND) CalibrationControl_DEPENDENCIES = $(LOFAR_DEPEND) NOINSTHDRS = CalibrationControl.h \ - CalibrationControlDefines.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h new file mode 100644 index 00000000000..6ce81b19f38 --- /dev/null +++ b/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h @@ -0,0 +1,299 @@ +// This file was generated by create_db_files v1.0 on Mon Jun 16 14:13:40 UTC 2008 + +#ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +#define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +// process +#define PN_FSM_PROCESSID "process.processID" +#define PN_FSM_START_TIME "process.startTime" +#define PN_FSM_STOP_TIME "process.stopTime" +#define PN_FSM_LOG_MSG "process.logMsg" +#define PN_FSM_ERROR "process.error" +#define PN_FSM_CURRENT_ACTION "process.currentAction" +// object +#define PN_OBJ_STATE "object.state" +#define PN_OBJ_CHILD_STATE "object.childState" +#define PN_OBJ_MESSAGE "object.message" + +// Station +#define PSN_STATION "LOFAR_PIC_@ring@_@station@" +#define PST_STATION "Station" +#define PN_STS__CHILD_DP "__childDp" + +// MACScheduler +#define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" +#define PST_MAC_SCHEDULER "MACScheduler" +#define PN_MS_ACTIVE_OBSERVATIONS "activeObservations" +#define PN_MS_OTDB_CONNECTED "OTDB.connected" +#define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" +#define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" + +// Observation +#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_OBSERVATION "Observation" + +// ObsCtrl +#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" +#define PST_OBS_CTRL "ObsCtrl" +#define PN_OBSCTRL_CLAIM_PERIOD "claimPeriod" +#define PN_OBSCTRL_PREPARE_PERIOD "preparePeriod" +#define PN_OBSCTRL_START_TIME "startTime" +#define PN_OBSCTRL_STOP_TIME "stopTime" +#define PN_OBSCTRL_BAND_FILTER "bandFilter" +#define PN_OBSCTRL_NYQUISTZONE "nyquistzone" +#define PN_OBSCTRL_ANTENNA_ARRAY "antennaArray" +#define PN_OBSCTRL_RECEIVER_LIST "receiverList" +#define PN_OBSCTRL_SAMPLE_CLOCK "sampleClock" +#define PN_OBSCTRL_MEASUREMENT_SET "measurementSet" +#define PN_OBSCTRL_STATION_LIST "stationList" +#define PN_OBSCTRL_INPUT_NODE_LIST "inputNodeList" +#define PN_OBSCTRL_BGL_NODE_LIST "BGLNodeList" +#define PN_OBSCTRL_STORAGE_NODE_LIST "storageNodeList" +#define PN_OBSCTRL_BEAMS_ANGLE1 "Beams.angle1" +#define PN_OBSCTRL_BEAMS_ANGLE2 "Beams.angle2" +#define PN_OBSCTRL_BEAMS_DIRECTION_TYPE "Beams.directionType" +#define PN_OBSCTRL_BEAMS_BEAMLET_LIST "Beams.beamletList" +#define PN_OBSCTRL_BEAMS_SUBBAND_LIST "Beams.subbandList" + +// OnlineCtrl +#define PSN_ONLINE_CTRL "LOFAR_ObsSW_@observation@_OnlineCtrl" +#define PST_ONLINE_CTRL "OnlineCtrl" + +// Correlator +#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineCtrl_Correlator" +#define PST_CORRELATOR "Correlator" + +// StorageAppl +#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineCtrl_StorageAppl" +#define PST_STORAGE_APPL "StorageAppl" + +// Cabinet +#define PSN_CABINET "LOFAR_PIC_@cabinet@" +#define PST_CABINET "Cabinet" +#define PN_CAB_DOOR_OPEN "doorOpen" +#define PN_CAB_FAN "fan" +#define PN_CAB_INLET_TEMP "inletTemp" +#define PN_CAB_FRONT_TEMP "frontTemp" +#define PN_CAB_BACK_TEMP "backTemp" +#define PN_CAB_SETPOINT_TEMP "setpointTemp" +#define PN_CAB_AMBIENT_TEMP "ambientTemp" +#define PN_CAB_CONTROL_MODE "controlMode" + +// SubRack +#define PSN_SUB_RACK "LOFAR_PIC_@cabinet@_@subrack@" +#define PST_SUB_RACK "SubRack" +#define PN_SRCK_SPU__VHBA "SPU.Vhba" +#define PN_SRCK_SPU__VLBA "SPU.Vlba" +#define PN_SRCK_SPU__VDIG "SPU.Vdig" +#define PN_SRCK_SPU_TEMPERATURE "SPU.temperature" +#define PN_SRCK_CLOCK_BOARD__VFSP "clockBoard.Vfsp" +#define PN_SRCK_CLOCK_BOARD__VCLOCK "clockBoard.Vclock" +#define PN_SRCK_CLOCK_BOARD_VERSION "clockBoard.version" +#define PN_SRCK_CLOCK_BOARD_FREQ "clockBoard.freq" +#define PN_SRCK_CLOCK_BOARD_LOCK160 "clockBoard.lock160" +#define PN_SRCK_CLOCK_BOARD_LOCK200 "clockBoard.lock200" +#define PN_SRCK_CLOCK_BOARD_TEMPERATURE "clockBoard.temperature" + +// RSPBoard +#define PSN_RSP_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@" +#define PST_RSP_BOARD "RSPBoard" +#define PN_RSP_VOLTAGE12 "voltage12" +#define PN_RSP_VOLTAGE25 "voltage25" +#define PN_RSP_VOLTAGE33 "voltage33" +#define PN_RSP_VERSION "version" +#define PN_RSP_ALERT "alert" +#define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" +#define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" +#define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" +#define PN_RSP_ETHERNET_PACKETS_RECEIVED "Ethernet.packetsReceived" +#define PN_RSP_ETHERNET_PACKETS_ERROR "Ethernet.packetsError" +#define PN_RSP_ETHERNET_LAST_ERROR "Ethernet.lastError" +#define PN_RSP_MEP_SEQNR "MEP.seqnr" +#define PN_RSP_MEP_ERROR "MEP.error" +#define PN_RSP_BP_STATUS_STATE "BP.status.state" +#define PN_RSP_BP_STATUS_CHILD_STATE "BP.status.childState" +#define PN_RSP_BP_STATUS_MESSAGE "BP.status.message" +#define PN_RSP_BP_TEMPERATURE "BP.temperature" +#define PN_RSP_BP_VERSION "BP.version" +#define PN_RSP_AP0_STATUS_STATE "AP0.status.state" +#define PN_RSP_AP0_STATUS_CHILD_STATE "AP0.status.childState" +#define PN_RSP_AP0_STATUS_MESSAGE "AP0.status.message" +#define PN_RSP_AP0_TEMPERATURE "AP0.temperature" +#define PN_RSP_AP0_VERSION "AP0.version" +#define PN_RSP_AP0_SYNC_SAMPLE_COUNT "AP0.SYNC.sampleCount" +#define PN_RSP_AP0_SYNC_SYNC_COUNT "AP0.SYNC.syncCount" +#define PN_RSP_AP0_SYNC_ERROR_COUNT "AP0.SYNC.errorCount" +#define PN_RSP_AP1_STATUS_STATE "AP1.status.state" +#define PN_RSP_AP1_STATUS_CHILD_STATE "AP1.status.childState" +#define PN_RSP_AP1_STATUS_MESSAGE "AP1.status.message" +#define PN_RSP_AP1_TEMPERATURE "AP1.temperature" +#define PN_RSP_AP1_VERSION "AP1.version" +#define PN_RSP_AP1_SYNC_SAMPLE_COUNT "AP1.SYNC.sampleCount" +#define PN_RSP_AP1_SYNC_SYNC_COUNT "AP1.SYNC.syncCount" +#define PN_RSP_AP1_SYNC_ERROR_COUNT "AP1.SYNC.errorCount" +#define PN_RSP_AP2_STATUS_STATE "AP2.status.state" +#define PN_RSP_AP2_STATUS_CHILD_STATE "AP2.status.childState" +#define PN_RSP_AP2_STATUS_MESSAGE "AP2.status.message" +#define PN_RSP_AP2_TEMPERATURE "AP2.temperature" +#define PN_RSP_AP2_VERSION "AP2.version" +#define PN_RSP_AP2_SYNC_SAMPLE_COUNT "AP2.SYNC.sampleCount" +#define PN_RSP_AP2_SYNC_SYNC_COUNT "AP2.SYNC.syncCount" +#define PN_RSP_AP2_SYNC_ERROR_COUNT "AP2.SYNC.errorCount" +#define PN_RSP_AP3_STATUS_STATE "AP3.status.state" +#define PN_RSP_AP3_STATUS_CHILD_STATE "AP3.status.childState" +#define PN_RSP_AP3_STATUS_MESSAGE "AP3.status.message" +#define PN_RSP_AP3_TEMPERATURE "AP3.temperature" +#define PN_RSP_AP3_VERSION "AP3.version" +#define PN_RSP_AP3_SYNC_SAMPLE_COUNT "AP3.SYNC.sampleCount" +#define PN_RSP_AP3_SYNC_SYNC_COUNT "AP3.SYNC.syncCount" +#define PN_RSP_AP3_SYNC_ERROR_COUNT "AP3.SYNC.errorCount" + +// RCU +#define PSN_RCU "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@" +#define PST_RCU "RCU" +#define PN_RCU_DELAY "Delay" +#define PN_RCU_INPUT_ENABLE "InputEnable" +#define PN_RCU_LBL_ENABLE "LBLEnable" +#define PN_RCU_LBH_ENABLE "LBHEnable" +#define PN_RCU_HBA_ENABLE "HBAEnable" +#define PN_RCU_BAND_SEL_LBA_HBA "bandSelLbaHba" +#define PN_RCU_HBA_FILTER_SEL "HBAFilterSel" +#define PN_RCU_VL_ENABLE "VlEnable" +#define PN_RCU_VH_ENABLE "VhEnable" +#define PN_RCU_VDD_VCC_ENABLE "VddVccEnable" +#define PN_RCU_BAND_SEL_LBL_LBH "bandSelLblLbh" +#define PN_RCU_LBA_FILTER_SEL "LBAFilterSel" +#define PN_RCU_ATTENUATION "Attenuation" +#define PN_RCU_NOF_OVERFLOW "nofOverflow" +#define PN_RCU_ADC_STATISTICS_OVERFLOW "ADCStatistics.overflow" +#define PN_RCU_TBB_ERROR "TBB.error" +#define PN_RCU_TBB_MODE "TBB.mode" +#define PN_RCU_TBB_START_ADDR "TBB.startAddr" +#define PN_RCU_TBB_BUF_SIZE "TBB.bufSize" +#define PN_RCU_TRIGGER_STARTLEVEL "Trigger.startlevel" +#define PN_RCU_TRIGGER_BASELEVEL "Trigger.baselevel" +#define PN_RCU_TRIGGER_STOPLEVEL "Trigger.stoplevel" +#define PN_RCU_TRIGGER_FILTER "Trigger.filter" +#define PN_RCU_TRIGGER_WINDOW "Trigger.window" +#define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" +#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" +#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" +#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" +#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" + +// TBBoard +#define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" +#define PST_TB_BOARD "TBBoard" +#define PN_TBB_BOARDID "boardID" +#define PN_TBB_RAM_SIZE "RAMSize" +#define PN_TBB_SW_VERSION "SWVersion" +#define PN_TBB_BOARD_VERSION "boardVersion" +#define PN_TBB_TP_VERSION "TPVersion" +#define PN_TBB_MP0_VERSION "MP0Version" +#define PN_TBB_MP1_VERSION "MP1Version" +#define PN_TBB_MP2_VERSION "MP2Version" +#define PN_TBB_MP3_VERSION "MP3Version" +#define PN_TBB_VOLTAGE12 "voltage12" +#define PN_TBB_VOLTAGE25 "voltage25" +#define PN_TBB_VOLTAGE33 "voltage33" +#define PN_TBB_TEMPPCB "tempPCB" +#define PN_TBB_TEMPTP "tempTP" +#define PN_TBB_TEMPMP0 "tempMP0" +#define PN_TBB_TEMPMP1 "tempMP1" +#define PN_TBB_TEMPMP2 "tempMP2" +#define PN_TBB_TEMPMP3 "tempMP3" +#define PN_TBB_IMAGE_INFO_VERSION "imageInfo.version" +#define PN_TBB_IMAGE_INFO_WRITE_DATE "imageInfo.writeDate" +#define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" +#define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" + +// StationClock +#define PSN_STATION_CLOCK "LOFAR_PIC_StationClock" +#define PST_STATION_CLOCK "StationClock" +#define PN_SCK_CLOCK "clock" + +// LogProcessor +#define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" +#define PST_LOG_PROCESSOR "LogProcessor" + +// KVLogger +#define PSN_KV_LOGGER "LOFAR_PermSW_Daemons_KVLogger" +#define PST_KV_LOGGER "KVLogger" + +// SASGateway +#define PSN_SAS_GATEWAY "LOFAR_PermSW_Daemons_SASGateway" +#define PST_SAS_GATEWAY "SASGateway" + +// DigBoardCtrl +#define PSN_DIG_BOARD_CTRL "LOFAR_PermSW_DigBoardCtrl" +#define PST_DIG_BOARD_CTRL "DigBoardCtrl" +#define PN_DBC_CONNECTED "connected" +#define PN_DBC_CLOCK "clock" + +// StationCtrl +#define PSN_STATION_CTRL "LOFAR_PermSW_StationCtrl" +#define PST_STATION_CTRL "StationCtrl" + +// TempCtrl +#define PSN_TEMP_CTRL "LOFAR_PermSW_TempCtrl" +#define PST_TEMP_CTRL "TempCtrl" +#define PN_TC_SETPOINT "setpoint" +#define PN_TC_AMBIENT_LOWEST_TEMP "ambient.lowestTemp" +#define PN_TC_AMBIENT_HIGHEST_TEMP "ambient.highestTemp" + +// HardwareMonitor +#define PSN_HARDWARE_MONITOR "LOFAR_PermSW_HardwareMonitor" +#define PST_HARDWARE_MONITOR "HardwareMonitor" +#define PN_HWM_RSP_CONNECTED "RSP.connected" +#define PN_HWM_TBB_CONNECTED "TBB.connected" + +// SoftwareMonitor +#define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" +#define PST_SOFTWARE_MONITOR "SoftwareMonitor" + +// MACInfoServer +#define PSN_MAC_INFO_SERVER "LOFAR_PermSW_MACInfoServer" +#define PST_MAC_INFO_SERVER "MACInfoServer" + +// StnObservation +#define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_STN_OBSERVATION "StnObservation" +#define PN_OBS_NAME "name" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" + +// BeamCtrl +#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl" +#define PST_BEAM_CTRL "BeamCtrl" +#define PN_BC_CONNECTED "connected" +#define PN_BC_SUB_ARRAY "subArray" +#define PN_BC_SUBBAND_LIST "subbandList" +#define PN_BC_BEAMLET_LIST "beamletList" +#define PN_BC_ANGLE1 "angle1" +#define PN_BC_ANGLE2 "angle2" +#define PN_BC_DIRECTION_TYPE "directionType" +#define PN_BC_BEAM_NAME "beamName" + +// CalCtrl +#define PSN_CAL_CTRL "LOFAR_ObsSW_@observation@_CalCtrl" +#define PST_CAL_CTRL "CalCtrl" +#define PN_CC_CONNECTED "connected" +#define PN_CC_BEAM_NAMES "beamNames" +#define PN_CC_ANTENNA_ARRAY "antennaArray" +#define PN_CC_FILTER "filter" +#define PN_CC_NYQUISTZONE "nyquistzone" +#define PN_CC_RCUS "rcus" + +// TBBCtrl +#define PSN_TBB_CTRL "LOFAR_ObsSW_@observation@_TBBCtrl" +#define PST_TBB_CTRL "TBBCtrl" +#define PN_TBC_CONNECTED "connected" +#define PN_TBC_TRIGGER_RCU_NR "trigger.rcuNr" +#define PN_TBC_TRIGGER_SEQUENCE_NR "trigger.sequenceNr" +#define PN_TBC_TRIGGER_TIME "trigger.time" +#define PN_TBC_TRIGGER_SAMPLE_NR "trigger.sampleNr" +#define PN_TBC_TRIGGER_SUM "trigger.sum" +#define PN_TBC_TRIGGER_NR_SAMPLES "trigger.nrSamples" +#define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" +#define PN_TBC_TRIGGER_FLAGS "trigger.flags" +#define PN_TBC_TRIGGER_TABLE "trigger.table" + +#endif diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc index 6f9314b0e76..1ffce4687f1 100644 --- a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc +++ b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc @@ -35,7 +35,7 @@ #include <signal.h> #include "DigitalBoardControl.h" -#include "DigitalBoardControlDefines.h" +#include "PVSSDatapointDefs.h" #include "../Package__Version.h" using namespace LOFAR::GCF::TM; @@ -151,14 +151,14 @@ void DigitalBoardControl::_databaseEventHandler(GCFEvent& event) LOG_DEBUG_STR("_databaseEventHandler:DP_CHANGED(" << dpEvent.DPname << ")"); // don't watch state and error fields. - if ((strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_STATE) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_ERROR) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_CURACT) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_LOGMSG) != 0)) { + if ((strstr(dpEvent.DPname.c_str(), PN_OBJ_STATE) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_ERROR) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_CURRENT_ACTION) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_LOG_MSG) != 0)) { return; } - if (strstr(dpEvent.DPname.c_str(), PN_SC_CLOCK) != 0) { + if (strstr(dpEvent.DPname.c_str(), PN_SCK_CLOCK) != 0) { GCFPVInteger* clockObj = (GCFPVInteger*)dpEvent.value._pValue; int32 newClock = clockObj->getValue(); if (newClock != itsClock) { @@ -230,8 +230,8 @@ GCFEvent::TResult DigitalBoardControl::initial_state(GCFEvent& event, // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Initial")); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Initial")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); itsOwnPropertySet->setValue(PN_DBC_CONNECTED, GCFPVBool(false)); // Now connect to propertyset that dictates the clocksetting @@ -260,10 +260,10 @@ GCFEvent::TResult DigitalBoardControl::initial_state(GCFEvent& event, case DP_SUBSCRIBED: { DPSubscribedEvent dpEvent(event); string propSetName(createPropertySetName(PSN_STATION_CLOCK, getName())); - propSetName += "." PN_SC_CLOCK; + propSetName += "." PN_SCK_CLOCK; if (dpEvent.DPname.find(propSetName) != string::npos) { GCFPVInteger clockVal; - itsExtPropertySet->getValue(PN_SC_CLOCK, clockVal); + itsExtPropertySet->getValue(PN_SCK_CLOCK, clockVal); itsClock = clockVal.getValue(); LOG_DEBUG_STR("ClockSetting is " << itsClock); @@ -311,7 +311,7 @@ GCFEvent::TResult DigitalBoardControl::connect_state(GCFEvent& event, case F_ENTRY: case F_TIMER: - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT, GCFPVString("Connecting")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("Connecting")); itsOwnPropertySet->setValue(PN_DBC_CONNECTED, GCFPVBool(false)); itsSubscription = 0; itsRSPDriver->open(); // will result in F_CONN or F_DISCONN @@ -320,7 +320,7 @@ GCFEvent::TResult DigitalBoardControl::connect_state(GCFEvent& event, case F_CONNECTED: if (&port == itsRSPDriver) { LOG_DEBUG ("Connected with RSPDriver, going to subscription state"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); itsOwnPropertySet->setValue(PN_DBC_CONNECTED, GCFPVBool(true)); TRAN(DigitalBoardControl::subscribe_state); // go to next state. } @@ -331,7 +331,7 @@ GCFEvent::TResult DigitalBoardControl::connect_state(GCFEvent& event, ASSERTSTR (&port == itsRSPDriver, "F_DISCONNECTED event from port " << port.getName()); LOG_DEBUG("Connection with RSPDriver failed, retry in 2 seconds"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("connection timeout")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("connection timeout")); itsTimerPort->setTimer(2.0); break; @@ -366,7 +366,7 @@ GCFEvent::TResult DigitalBoardControl::subscribe_state(GCFEvent& event, case F_ENTRY: case F_TIMER: - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Subscribe to clock")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Subscribe to clock")); requestSubscription(); // will result in RSP_SUBCLOCKACK; break; @@ -378,7 +378,7 @@ GCFEvent::TResult DigitalBoardControl::subscribe_state(GCFEvent& event, RSPSubclockackEvent ack(event); if (ack.status != SUCCESS) { LOG_WARN ("Could not get subscribtion on clock, retry in 2 seconds"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("subscribe failed")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("subscribe failed")); itsTimerPort->setTimer(2.0); break; } @@ -386,7 +386,7 @@ GCFEvent::TResult DigitalBoardControl::subscribe_state(GCFEvent& event, itsSubscription = ack.handle; LOG_DEBUG ("Subscription successful, going to retrieve state"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(DigitalBoardControl::retrieve_state); // go to next state. } break; @@ -423,7 +423,7 @@ GCFEvent::TResult DigitalBoardControl::retrieve_state(GCFEvent& event, case F_ENTRY: case F_TIMER: - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Retrieve clock")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Retrieve clock")); requestClockSetting(); // will result in RSP_GETCLOCKACK; break; @@ -435,11 +435,11 @@ GCFEvent::TResult DigitalBoardControl::retrieve_state(GCFEvent& event, RSPGetclockackEvent ack(event); if (ack.status != SUCCESS) { LOG_WARN ("Could not retrieve clocksetting of RSPDriver, retry in 2 seconds"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("getclock failed")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("getclock failed")); itsTimerPort->setTimer(2.0); break; } - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); if (ack.clock != itsClock) { LOG_INFO_STR ("StationClock is " << ack.clock << ", required clock is " << itsClock << ", changing StationClock"); @@ -487,7 +487,7 @@ GCFEvent::TResult DigitalBoardControl::setClock_state(GCFEvent& event, case F_ENTRY: case F_TIMER: - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Set clock")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Set clock")); sendClockSetting(); // will result in RSP_SETCLOCKACK; break; @@ -500,12 +500,12 @@ GCFEvent::TResult DigitalBoardControl::setClock_state(GCFEvent& event, if (ack.status != SUCCESS) { LOG_ERROR_STR ("Clock could not be set to " << itsClock << ", retry in 5 seconds."); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("clockset error")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("clockset error")); itsTimerPort->setTimer(5.0); break; } LOG_INFO_STR ("StationClock is set to " << itsClock << ", going to operational state"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsOwnPropertySet->setValue(PN_DBC_CLOCK,GCFPVInteger(itsClock)); TRAN(DigitalBoardControl::active_state); // go to next state. break; @@ -542,8 +542,8 @@ GCFEvent::TResult DigitalBoardControl::active_state(GCFEvent& event, GCFPortInte case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Active")); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Active")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); break; } @@ -564,7 +564,7 @@ GCFEvent::TResult DigitalBoardControl::active_state(GCFEvent& event, GCFPortInte RSPUpdclockEvent updateEvent(event); if (updateEvent.status != SUCCESS || updateEvent.clock == 0) { LOG_ERROR_STR ("StationClock has stopped! Going to setClock state to try to solve the problem"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("Clock stopped")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Clock stopped")); TRAN(DigitalBoardControl::setClock_state); break; } @@ -572,7 +572,7 @@ GCFEvent::TResult DigitalBoardControl::active_state(GCFEvent& event, GCFPortInte if (updateEvent.clock != itsClock) { LOG_ERROR_STR ("CLOCK WAS CHANGED TO " << updateEvent.clock << " BY SOMEONE WHILE CLOCK SHOULD BE " << itsClock << ". CHANGING CLOCK BACK."); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("Clock unallowed changed")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Clock unallowed changed")); TRAN (DigitalBoardControl::setClock_state); } @@ -603,7 +603,7 @@ void DigitalBoardControl::_disconnectedHandler(GCFPortInterface& port) port.close(); if (&port == itsRSPDriver) { LOG_DEBUG("Connection with RSPDriver failed, going to reconnect state"); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("connection lost")); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("connection lost")); TRAN (DigitalBoardControl::connect_state); } } @@ -790,8 +790,8 @@ GCFEvent::TResult DigitalBoardControl::finishing_state(GCFEvent& event, GCFPortI itsParentControl->nowInState(getName(), CTState::QUIT); // update PVSS - itsOwnPropertySet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Finished")); - itsOwnPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Finished")); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); itsOwnPropertySet->setValue(PN_DBC_CONNECTED, GCFPVBool (false)); itsTimerPort->setTimer(1L); diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlDefines.h b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlDefines.h deleted file mode 100644 index b43572644c6..00000000000 --- a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlDefines.h +++ /dev/null @@ -1,50 +0,0 @@ -//# DigitalBoardControlDefines.h: preprocessor definitions of various constants -//# -//# Copyright (C) 2002-2003 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef DIGITALBOARDCONTROLDEFINES_H -#define DIGITALBOARDCONTROLDEFINES_H - -namespace LOFAR { - namespace StationCU { - -#define PSN_DIG_BOARD_CTRL "LOFAR_PermSW_DigBoardCtrl@instance@" -#define PST_DIG_BOARD_CTRL "DigBoardCtrl" -#define PN_DBC_CONNECTED "connected" -#define PN_DBC_CLOCK "clock" - -// next three line should be defined elsewhere because we are not the owner. -#define PSN_STATION_CLOCK "LOFAR_PIC_StationClock" -#define PST_STATION_CLOCK "StationClock" -#define PN_SC_CLOCK "clock" - -// next lines should be defined somewhere in Common. -#define PVSSNAME_FSM_CURACT "currentAction" -#define PVSSNAME_FSM_ERROR "error" -#define PVSSNAME_FSM_LOGMSG "logMsg" -#define PVSSNAME_FSM_STATE "state" -#define PVSSNAME_FSM_CHILDSTATE "childState" - - -}; // StationCU -}; // LOFAR - -#endif diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlMain.cc b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlMain.cc index 94cc5009691..f381e508a9e 100644 --- a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlMain.cc +++ b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControlMain.cc @@ -31,7 +31,7 @@ using namespace LOFAR::StationCU; int main(int argc, char* argv[]) { // args: cntlrname, parentHost, parentService - GCFTask::init(argc, argv); + GCFTask::init(argc, argv, "DigitalBoardControl"); ParentControl* pc = ParentControl::instance(); pc->start(); // make initial transition diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/Makefile.am b/MAC/APL/StationCU/src/DigitalBoardControl/Makefile.am index 713913fd62d..8009205ee1a 100644 --- a/MAC/APL/StationCU/src/DigitalBoardControl/Makefile.am +++ b/MAC/APL/StationCU/src/DigitalBoardControl/Makefile.am @@ -12,7 +12,7 @@ DigitalBoardControl_LDADD = $(LOFAR_DEPEND) DigitalBoardControl_DEPENDENCIES = $(LOFAR_DEPEND) NOINSTHDRS = DigitalBoardControl.h \ - DigitalBoardControlDefines.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/DigitalBoardControl/PVSSDatapointDefs.h new file mode 100644 index 00000000000..6ce81b19f38 --- /dev/null +++ b/MAC/APL/StationCU/src/DigitalBoardControl/PVSSDatapointDefs.h @@ -0,0 +1,299 @@ +// This file was generated by create_db_files v1.0 on Mon Jun 16 14:13:40 UTC 2008 + +#ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +#define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +// process +#define PN_FSM_PROCESSID "process.processID" +#define PN_FSM_START_TIME "process.startTime" +#define PN_FSM_STOP_TIME "process.stopTime" +#define PN_FSM_LOG_MSG "process.logMsg" +#define PN_FSM_ERROR "process.error" +#define PN_FSM_CURRENT_ACTION "process.currentAction" +// object +#define PN_OBJ_STATE "object.state" +#define PN_OBJ_CHILD_STATE "object.childState" +#define PN_OBJ_MESSAGE "object.message" + +// Station +#define PSN_STATION "LOFAR_PIC_@ring@_@station@" +#define PST_STATION "Station" +#define PN_STS__CHILD_DP "__childDp" + +// MACScheduler +#define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" +#define PST_MAC_SCHEDULER "MACScheduler" +#define PN_MS_ACTIVE_OBSERVATIONS "activeObservations" +#define PN_MS_OTDB_CONNECTED "OTDB.connected" +#define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" +#define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" + +// Observation +#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_OBSERVATION "Observation" + +// ObsCtrl +#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" +#define PST_OBS_CTRL "ObsCtrl" +#define PN_OBSCTRL_CLAIM_PERIOD "claimPeriod" +#define PN_OBSCTRL_PREPARE_PERIOD "preparePeriod" +#define PN_OBSCTRL_START_TIME "startTime" +#define PN_OBSCTRL_STOP_TIME "stopTime" +#define PN_OBSCTRL_BAND_FILTER "bandFilter" +#define PN_OBSCTRL_NYQUISTZONE "nyquistzone" +#define PN_OBSCTRL_ANTENNA_ARRAY "antennaArray" +#define PN_OBSCTRL_RECEIVER_LIST "receiverList" +#define PN_OBSCTRL_SAMPLE_CLOCK "sampleClock" +#define PN_OBSCTRL_MEASUREMENT_SET "measurementSet" +#define PN_OBSCTRL_STATION_LIST "stationList" +#define PN_OBSCTRL_INPUT_NODE_LIST "inputNodeList" +#define PN_OBSCTRL_BGL_NODE_LIST "BGLNodeList" +#define PN_OBSCTRL_STORAGE_NODE_LIST "storageNodeList" +#define PN_OBSCTRL_BEAMS_ANGLE1 "Beams.angle1" +#define PN_OBSCTRL_BEAMS_ANGLE2 "Beams.angle2" +#define PN_OBSCTRL_BEAMS_DIRECTION_TYPE "Beams.directionType" +#define PN_OBSCTRL_BEAMS_BEAMLET_LIST "Beams.beamletList" +#define PN_OBSCTRL_BEAMS_SUBBAND_LIST "Beams.subbandList" + +// OnlineCtrl +#define PSN_ONLINE_CTRL "LOFAR_ObsSW_@observation@_OnlineCtrl" +#define PST_ONLINE_CTRL "OnlineCtrl" + +// Correlator +#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineCtrl_Correlator" +#define PST_CORRELATOR "Correlator" + +// StorageAppl +#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineCtrl_StorageAppl" +#define PST_STORAGE_APPL "StorageAppl" + +// Cabinet +#define PSN_CABINET "LOFAR_PIC_@cabinet@" +#define PST_CABINET "Cabinet" +#define PN_CAB_DOOR_OPEN "doorOpen" +#define PN_CAB_FAN "fan" +#define PN_CAB_INLET_TEMP "inletTemp" +#define PN_CAB_FRONT_TEMP "frontTemp" +#define PN_CAB_BACK_TEMP "backTemp" +#define PN_CAB_SETPOINT_TEMP "setpointTemp" +#define PN_CAB_AMBIENT_TEMP "ambientTemp" +#define PN_CAB_CONTROL_MODE "controlMode" + +// SubRack +#define PSN_SUB_RACK "LOFAR_PIC_@cabinet@_@subrack@" +#define PST_SUB_RACK "SubRack" +#define PN_SRCK_SPU__VHBA "SPU.Vhba" +#define PN_SRCK_SPU__VLBA "SPU.Vlba" +#define PN_SRCK_SPU__VDIG "SPU.Vdig" +#define PN_SRCK_SPU_TEMPERATURE "SPU.temperature" +#define PN_SRCK_CLOCK_BOARD__VFSP "clockBoard.Vfsp" +#define PN_SRCK_CLOCK_BOARD__VCLOCK "clockBoard.Vclock" +#define PN_SRCK_CLOCK_BOARD_VERSION "clockBoard.version" +#define PN_SRCK_CLOCK_BOARD_FREQ "clockBoard.freq" +#define PN_SRCK_CLOCK_BOARD_LOCK160 "clockBoard.lock160" +#define PN_SRCK_CLOCK_BOARD_LOCK200 "clockBoard.lock200" +#define PN_SRCK_CLOCK_BOARD_TEMPERATURE "clockBoard.temperature" + +// RSPBoard +#define PSN_RSP_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@" +#define PST_RSP_BOARD "RSPBoard" +#define PN_RSP_VOLTAGE12 "voltage12" +#define PN_RSP_VOLTAGE25 "voltage25" +#define PN_RSP_VOLTAGE33 "voltage33" +#define PN_RSP_VERSION "version" +#define PN_RSP_ALERT "alert" +#define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" +#define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" +#define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" +#define PN_RSP_ETHERNET_PACKETS_RECEIVED "Ethernet.packetsReceived" +#define PN_RSP_ETHERNET_PACKETS_ERROR "Ethernet.packetsError" +#define PN_RSP_ETHERNET_LAST_ERROR "Ethernet.lastError" +#define PN_RSP_MEP_SEQNR "MEP.seqnr" +#define PN_RSP_MEP_ERROR "MEP.error" +#define PN_RSP_BP_STATUS_STATE "BP.status.state" +#define PN_RSP_BP_STATUS_CHILD_STATE "BP.status.childState" +#define PN_RSP_BP_STATUS_MESSAGE "BP.status.message" +#define PN_RSP_BP_TEMPERATURE "BP.temperature" +#define PN_RSP_BP_VERSION "BP.version" +#define PN_RSP_AP0_STATUS_STATE "AP0.status.state" +#define PN_RSP_AP0_STATUS_CHILD_STATE "AP0.status.childState" +#define PN_RSP_AP0_STATUS_MESSAGE "AP0.status.message" +#define PN_RSP_AP0_TEMPERATURE "AP0.temperature" +#define PN_RSP_AP0_VERSION "AP0.version" +#define PN_RSP_AP0_SYNC_SAMPLE_COUNT "AP0.SYNC.sampleCount" +#define PN_RSP_AP0_SYNC_SYNC_COUNT "AP0.SYNC.syncCount" +#define PN_RSP_AP0_SYNC_ERROR_COUNT "AP0.SYNC.errorCount" +#define PN_RSP_AP1_STATUS_STATE "AP1.status.state" +#define PN_RSP_AP1_STATUS_CHILD_STATE "AP1.status.childState" +#define PN_RSP_AP1_STATUS_MESSAGE "AP1.status.message" +#define PN_RSP_AP1_TEMPERATURE "AP1.temperature" +#define PN_RSP_AP1_VERSION "AP1.version" +#define PN_RSP_AP1_SYNC_SAMPLE_COUNT "AP1.SYNC.sampleCount" +#define PN_RSP_AP1_SYNC_SYNC_COUNT "AP1.SYNC.syncCount" +#define PN_RSP_AP1_SYNC_ERROR_COUNT "AP1.SYNC.errorCount" +#define PN_RSP_AP2_STATUS_STATE "AP2.status.state" +#define PN_RSP_AP2_STATUS_CHILD_STATE "AP2.status.childState" +#define PN_RSP_AP2_STATUS_MESSAGE "AP2.status.message" +#define PN_RSP_AP2_TEMPERATURE "AP2.temperature" +#define PN_RSP_AP2_VERSION "AP2.version" +#define PN_RSP_AP2_SYNC_SAMPLE_COUNT "AP2.SYNC.sampleCount" +#define PN_RSP_AP2_SYNC_SYNC_COUNT "AP2.SYNC.syncCount" +#define PN_RSP_AP2_SYNC_ERROR_COUNT "AP2.SYNC.errorCount" +#define PN_RSP_AP3_STATUS_STATE "AP3.status.state" +#define PN_RSP_AP3_STATUS_CHILD_STATE "AP3.status.childState" +#define PN_RSP_AP3_STATUS_MESSAGE "AP3.status.message" +#define PN_RSP_AP3_TEMPERATURE "AP3.temperature" +#define PN_RSP_AP3_VERSION "AP3.version" +#define PN_RSP_AP3_SYNC_SAMPLE_COUNT "AP3.SYNC.sampleCount" +#define PN_RSP_AP3_SYNC_SYNC_COUNT "AP3.SYNC.syncCount" +#define PN_RSP_AP3_SYNC_ERROR_COUNT "AP3.SYNC.errorCount" + +// RCU +#define PSN_RCU "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@" +#define PST_RCU "RCU" +#define PN_RCU_DELAY "Delay" +#define PN_RCU_INPUT_ENABLE "InputEnable" +#define PN_RCU_LBL_ENABLE "LBLEnable" +#define PN_RCU_LBH_ENABLE "LBHEnable" +#define PN_RCU_HBA_ENABLE "HBAEnable" +#define PN_RCU_BAND_SEL_LBA_HBA "bandSelLbaHba" +#define PN_RCU_HBA_FILTER_SEL "HBAFilterSel" +#define PN_RCU_VL_ENABLE "VlEnable" +#define PN_RCU_VH_ENABLE "VhEnable" +#define PN_RCU_VDD_VCC_ENABLE "VddVccEnable" +#define PN_RCU_BAND_SEL_LBL_LBH "bandSelLblLbh" +#define PN_RCU_LBA_FILTER_SEL "LBAFilterSel" +#define PN_RCU_ATTENUATION "Attenuation" +#define PN_RCU_NOF_OVERFLOW "nofOverflow" +#define PN_RCU_ADC_STATISTICS_OVERFLOW "ADCStatistics.overflow" +#define PN_RCU_TBB_ERROR "TBB.error" +#define PN_RCU_TBB_MODE "TBB.mode" +#define PN_RCU_TBB_START_ADDR "TBB.startAddr" +#define PN_RCU_TBB_BUF_SIZE "TBB.bufSize" +#define PN_RCU_TRIGGER_STARTLEVEL "Trigger.startlevel" +#define PN_RCU_TRIGGER_BASELEVEL "Trigger.baselevel" +#define PN_RCU_TRIGGER_STOPLEVEL "Trigger.stoplevel" +#define PN_RCU_TRIGGER_FILTER "Trigger.filter" +#define PN_RCU_TRIGGER_WINDOW "Trigger.window" +#define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" +#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" +#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" +#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" +#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" + +// TBBoard +#define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" +#define PST_TB_BOARD "TBBoard" +#define PN_TBB_BOARDID "boardID" +#define PN_TBB_RAM_SIZE "RAMSize" +#define PN_TBB_SW_VERSION "SWVersion" +#define PN_TBB_BOARD_VERSION "boardVersion" +#define PN_TBB_TP_VERSION "TPVersion" +#define PN_TBB_MP0_VERSION "MP0Version" +#define PN_TBB_MP1_VERSION "MP1Version" +#define PN_TBB_MP2_VERSION "MP2Version" +#define PN_TBB_MP3_VERSION "MP3Version" +#define PN_TBB_VOLTAGE12 "voltage12" +#define PN_TBB_VOLTAGE25 "voltage25" +#define PN_TBB_VOLTAGE33 "voltage33" +#define PN_TBB_TEMPPCB "tempPCB" +#define PN_TBB_TEMPTP "tempTP" +#define PN_TBB_TEMPMP0 "tempMP0" +#define PN_TBB_TEMPMP1 "tempMP1" +#define PN_TBB_TEMPMP2 "tempMP2" +#define PN_TBB_TEMPMP3 "tempMP3" +#define PN_TBB_IMAGE_INFO_VERSION "imageInfo.version" +#define PN_TBB_IMAGE_INFO_WRITE_DATE "imageInfo.writeDate" +#define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" +#define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" + +// StationClock +#define PSN_STATION_CLOCK "LOFAR_PIC_StationClock" +#define PST_STATION_CLOCK "StationClock" +#define PN_SCK_CLOCK "clock" + +// LogProcessor +#define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" +#define PST_LOG_PROCESSOR "LogProcessor" + +// KVLogger +#define PSN_KV_LOGGER "LOFAR_PermSW_Daemons_KVLogger" +#define PST_KV_LOGGER "KVLogger" + +// SASGateway +#define PSN_SAS_GATEWAY "LOFAR_PermSW_Daemons_SASGateway" +#define PST_SAS_GATEWAY "SASGateway" + +// DigBoardCtrl +#define PSN_DIG_BOARD_CTRL "LOFAR_PermSW_DigBoardCtrl" +#define PST_DIG_BOARD_CTRL "DigBoardCtrl" +#define PN_DBC_CONNECTED "connected" +#define PN_DBC_CLOCK "clock" + +// StationCtrl +#define PSN_STATION_CTRL "LOFAR_PermSW_StationCtrl" +#define PST_STATION_CTRL "StationCtrl" + +// TempCtrl +#define PSN_TEMP_CTRL "LOFAR_PermSW_TempCtrl" +#define PST_TEMP_CTRL "TempCtrl" +#define PN_TC_SETPOINT "setpoint" +#define PN_TC_AMBIENT_LOWEST_TEMP "ambient.lowestTemp" +#define PN_TC_AMBIENT_HIGHEST_TEMP "ambient.highestTemp" + +// HardwareMonitor +#define PSN_HARDWARE_MONITOR "LOFAR_PermSW_HardwareMonitor" +#define PST_HARDWARE_MONITOR "HardwareMonitor" +#define PN_HWM_RSP_CONNECTED "RSP.connected" +#define PN_HWM_TBB_CONNECTED "TBB.connected" + +// SoftwareMonitor +#define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" +#define PST_SOFTWARE_MONITOR "SoftwareMonitor" + +// MACInfoServer +#define PSN_MAC_INFO_SERVER "LOFAR_PermSW_MACInfoServer" +#define PST_MAC_INFO_SERVER "MACInfoServer" + +// StnObservation +#define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_STN_OBSERVATION "StnObservation" +#define PN_OBS_NAME "name" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" + +// BeamCtrl +#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl" +#define PST_BEAM_CTRL "BeamCtrl" +#define PN_BC_CONNECTED "connected" +#define PN_BC_SUB_ARRAY "subArray" +#define PN_BC_SUBBAND_LIST "subbandList" +#define PN_BC_BEAMLET_LIST "beamletList" +#define PN_BC_ANGLE1 "angle1" +#define PN_BC_ANGLE2 "angle2" +#define PN_BC_DIRECTION_TYPE "directionType" +#define PN_BC_BEAM_NAME "beamName" + +// CalCtrl +#define PSN_CAL_CTRL "LOFAR_ObsSW_@observation@_CalCtrl" +#define PST_CAL_CTRL "CalCtrl" +#define PN_CC_CONNECTED "connected" +#define PN_CC_BEAM_NAMES "beamNames" +#define PN_CC_ANTENNA_ARRAY "antennaArray" +#define PN_CC_FILTER "filter" +#define PN_CC_NYQUISTZONE "nyquistzone" +#define PN_CC_RCUS "rcus" + +// TBBCtrl +#define PSN_TBB_CTRL "LOFAR_ObsSW_@observation@_TBBCtrl" +#define PST_TBB_CTRL "TBBCtrl" +#define PN_TBC_CONNECTED "connected" +#define PN_TBC_TRIGGER_RCU_NR "trigger.rcuNr" +#define PN_TBC_TRIGGER_SEQUENCE_NR "trigger.sequenceNr" +#define PN_TBC_TRIGGER_TIME "trigger.time" +#define PN_TBC_TRIGGER_SAMPLE_NR "trigger.sampleNr" +#define PN_TBC_TRIGGER_SUM "trigger.sum" +#define PN_TBC_TRIGGER_NR_SAMPLES "trigger.nrSamples" +#define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" +#define PN_TBC_TRIGGER_FLAGS "trigger.flags" +#define PN_TBC_TRIGGER_TABLE "trigger.table" + +#endif diff --git a/MAC/APL/StationCU/src/HardwareMonitor/Makefile.am b/MAC/APL/StationCU/src/HardwareMonitor/Makefile.am index 27be1be7667..0e86cb96204 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/Makefile.am +++ b/MAC/APL/StationCU/src/HardwareMonitor/Makefile.am @@ -15,7 +15,7 @@ HardwareMonitor_DEPENDENCIES= $(LOFAR_DEPEND) NOINSTHDRS = RSPMonitor.h \ TBBMonitor.h \ RCUConstants.h \ - StationPermDatapointDefs.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/HardwareMonitor/RCUConstants.h b/MAC/APL/StationCU/src/HardwareMonitor/RCUConstants.h index 778592274dc..645bf3de1b0 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/RCUConstants.h +++ b/MAC/APL/StationCU/src/HardwareMonitor/RCUConstants.h @@ -57,13 +57,6 @@ static const uint32 NR_RCUS_PER_CABINET = (NR_RCUS_PER_SUBRACK * NR_SUBRACKS_ #define PN_RSP_AP_VERSION_MASK "AP%d.version" -// next lines should be defined somewhere in Common. -#define PVSSNAME_FSM_CURACT "currentAction" -#define PVSSNAME_FSM_ERROR "error" -#define PVSSNAME_FSM_LOGMSG "logMsg" -#define PVSSNAME_FSM_STATE "state" -#define PVSSNAME_FSM_CHILDSTATE "childState" - } // namespace StationCU } // namespace LOFAR diff --git a/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc index d7040639868..391f552b861 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc +++ b/MAC/APL/StationCU/src/HardwareMonitor/RSPMonitor.cc @@ -33,7 +33,7 @@ #include "RSPMonitor.h" #include "RCUConstants.h" -#include "StationPermDatapointDefs.h" +#include "PVSSDatapointDefs.h" namespace LOFAR { @@ -128,8 +128,8 @@ GCFEvent::TResult RSPMonitor::initial_state(GCFEvent& event, case F_TIMER: { // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION, GCFPVString("initial")); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR, GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("RSP:initial")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); LOG_DEBUG_STR("Going to connect to the RSPDriver."); TRAN (RSPMonitor::connect2RSP); @@ -166,15 +166,15 @@ GCFEvent::TResult RSPMonitor::connect2RSP(GCFEvent& event, switch (event.signal) { case F_ENTRY: // update PVSS - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION, GCFPVString("connecting")); - itsOwnPropertySet->setValue(PN_HWM_RSP_CONNECTED,GCFPVBool(false)); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("RSP:connecting")); + itsOwnPropertySet->setValue(PN_HWM_RSP_CONNECTED, GCFPVBool(false)); itsRSPDriver->open(); // will result in F_CONN or F_DISCONN break; case F_CONNECTED: if (&port == itsRSPDriver) { LOG_DEBUG ("Connected with RSPDriver, going to get the configuration"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR, GCFPVString("")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR, GCFPVString("")); itsOwnPropertySet->setValue(PN_HWM_RSP_CONNECTED,GCFPVBool(true)); TRAN(RSPMonitor::askConfiguration); // go to next state. } @@ -184,13 +184,13 @@ GCFEvent::TResult RSPMonitor::connect2RSP(GCFEvent& event, port.close(); ASSERTSTR (&port == itsRSPDriver, "F_DISCONNECTED event from port " << port.getName()); - LOG_DEBUG("Connection with RSPDriver failed, retry in 2 seconds"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR, GCFPVString("connection timeout")); - itsTimerPort->setTimer(2.0); + LOG_WARN("RSP:Connection with RSPDriver failed, retry in 10 seconds"); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("RSP:connection timeout")); + itsTimerPort->setTimer(10.0); break; case F_TIMER: - itsRSPDriver->open(); // results in F_COON or F_DISCON + itsRSPDriver->open(); // results in F_CONN or F_DISCON break; case DP_SET: @@ -222,7 +222,7 @@ GCFEvent::TResult RSPMonitor::askConfiguration(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("asking configuration")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:asking configuration")); RSPGetconfigEvent getconfig; itsRSPDriver->send(getconfig); } @@ -254,16 +254,16 @@ GCFEvent::TResult RSPMonitor::askConfiguration(GCFEvent& event, // do some checks if (itsNrRSPboards != (uint32)ack.max_rspboards) { - LOG_WARN_STR("RSPdriver only controls " << itsNrRSPboards << " of " << ack.max_rspboards + LOG_WARN_STR("RSP:RSPdriver only controls " << itsNrRSPboards << " of " << ack.max_rspboards << " RSPboards, cannot monitor full station"); } if (itsNrRSPboards * NR_RCUS_PER_RSPBOARD != itsNrRCUs) { - LOG_INFO_STR("Station not fully equiped, only " << itsNrRCUs << " of " + LOG_INFO_STR("RSP:Station not fully equiped, only " << itsNrRCUs << " of " << itsNrRSPboards * NR_RCUS_PER_RSPBOARD << "RCUs"); } LOG_DEBUG ("Going to allocate the property-sets"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); TRAN(RSPMonitor::createPropertySets); // go to next state. } break; @@ -299,7 +299,7 @@ GCFEvent::TResult RSPMonitor::createPropertySets(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("create PropertySets")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:create PropertySets")); // resize vectors. itsCabinets.resize(itsNrCabinets, 0); itsSubracks.resize(itsNrSubracks, 0); @@ -358,7 +358,7 @@ GCFEvent::TResult RSPMonitor::createPropertySets(GCFEvent& event, ASSERTSTR(itsRCUs[rcu], "Allocation of PS for rcu " << rcu << " failed."); } LOG_DEBUG_STR("Allocation of all propertySets successfull, going to operational mode"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); TRAN(RSPMonitor::askVersion); } break; @@ -398,8 +398,8 @@ GCFEvent::TResult RSPMonitor::askVersion(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("getting version info")); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:getting version info")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); RSPGetversionEvent getVersion; getVersion.timestamp.setNow(); getVersion.cache = true; @@ -410,8 +410,8 @@ GCFEvent::TResult RSPMonitor::askVersion(GCFEvent& event, case RSP_GETVERSIONACK: { RSPGetversionackEvent ack(event); if (ack.status != SUCCESS) { - LOG_ERROR_STR ("Failed to get the version information, trying other information"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("getVersion error")); + LOG_ERROR_STR ("RSP:Failed to get the version information, trying other information"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("RSP:getVersion error")); TRAN(RSPMonitor::askRSPinfo); // go to next state. break; } @@ -448,7 +448,7 @@ GCFEvent::TResult RSPMonitor::askVersion(GCFEvent& event, } LOG_DEBUG_STR ("Version information updated, going to status information"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); TRAN(RSPMonitor::askRSPinfo); // go to next state. break; } @@ -488,8 +488,8 @@ GCFEvent::TResult RSPMonitor::askRSPinfo(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("updating RSP info")); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:updating RSP info")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); RSPGetstatusEvent getStatus; getStatus.timestamp.setNow(); getStatus.cache = true; @@ -501,14 +501,9 @@ GCFEvent::TResult RSPMonitor::askRSPinfo(GCFEvent& event, case RSP_GETSTATUSACK: { RSPGetstatusackEvent ack(event); if (ack.status != SUCCESS) { - LOG_ERROR_STR ("Failed to get the status information, trying other information"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("getStatus error")); -#if 1 + LOG_ERROR_STR ("RSP:Failed to get the status information, trying other information"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("RSP:getStatus error")); TRAN(RSPMonitor::askRCUinfo); // go to next state. -#else - LOG_WARN ("SKIPPING RCU INFO FOR A MOMENT"); - TRAN(RSPMonitor::waitForNextCycle); // go to next state. -#endif break; } @@ -532,6 +527,8 @@ GCFEvent::TResult RSPMonitor::askRSPinfo(GCFEvent& event, double(ack.timestamp)); itsRSPs[rsp]->setValue(PN_RSP_ETHERNET_LAST_ERROR, GCFPVUnsigned(bStat.eth.last_error), double(ack.timestamp)); + setObjectState(getName(), itsRSPs[rsp]->getFullScope()+".Ethernet", (bStat.eth.nof_frames != 0) ? + RTDB_OBJ_STATE_OPERATIONAL : RTDB_OBJ_STATE_OFF); // MEP status itsRSPs[rsp]->setValue(PN_RSP_MEP_SEQNR, GCFPVUnsigned(bStat.mep.seqnr), @@ -584,13 +581,8 @@ GCFEvent::TResult RSPMonitor::askRSPinfo(GCFEvent& event, } // for all boards LOG_DEBUG_STR ("RSPboard information updated, going to RCU information"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); -#if 1 +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); TRAN(RSPMonitor::askRCUinfo); // go to next state. -#else - LOG_WARN ("SKIPPING RCU INFO FOR A MOMENT"); - TRAN(RSPMonitor::waitForNextCycle); // go to next state. -#endif break; } @@ -633,8 +625,8 @@ GCFEvent::TResult RSPMonitor::askRCUinfo(GCFEvent& event, GCFPortInterface& port case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("updating RSP info")); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:updating RSP info")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); longlong one(1); RSPGetrcuEvent getStatus; getStatus.timestamp.setNow(); @@ -649,12 +641,12 @@ GCFEvent::TResult RSPMonitor::askRCUinfo(GCFEvent& event, GCFPortInterface& port case RSP_GETRCUACK: { RSPGetrcuackEvent ack(event); if (ack.status != SUCCESS) { - LOG_ERROR_STR ("Failed to get the RCU information, trying other information"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("getRCU error")); + LOG_ERROR_STR ("RSP:Failed to get the RCU information, trying other information"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("RSP:getRCU error")); TRAN(RSPMonitor::waitForNextCycle); // go to next state. break; } -#if 1 + // move the information to the database. string versionStr; string DPEname; @@ -696,10 +688,12 @@ GCFEvent::TResult RSPMonitor::askRCUinfo(GCFEvent& event, GCFPortInterface& port GCFPVUnsigned(uint32((rawValue & ATT_MASK) >> ATT_OFFSET)), double(ack.timestamp), false); itsRCUs[rcu]->flush(); + setObjectState(getName(), itsRCUs[rcu]->getFullScope(), (rawValue & ADC_POWER_MASK) ? + RTDB_OBJ_STATE_OPERATIONAL : RTDB_OBJ_STATE_OFF); } // for all boards -#endif + LOG_DEBUG ("Updated all RCU information, waiting for next cycle"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("")); TRAN(RSPMonitor::waitForNextCycle); // go to next state. } break; @@ -738,14 +732,14 @@ GCFEvent::TResult RSPMonitor::waitForNextCycle(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_RSP_CURRENT_ACTION,GCFPVString("wait for next cycle")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("RSP:wait for next cycle")); int waitTime = itsPollInterval - (time(0) % itsPollInterval); if (waitTime == 0) { waitTime = itsPollInterval; } itsTimerPort->cancelAllTimers(); itsTimerPort->setTimer(double(waitTime)); - LOG_DEBUG_STR("Waiting " << waitTime << " seconds for next cycle"); + LOG_INFO_STR("RSP:Waiting " << waitTime << " seconds for next cycle"); } break; @@ -781,8 +775,8 @@ void RSPMonitor::_disconnectedHandler(GCFPortInterface& port) { port.close(); if (&port == itsRSPDriver) { - LOG_DEBUG("Connection with RSPDriver failed, going to reconnect state"); - itsOwnPropertySet->setValue(PN_HWM_RSP_ERROR,GCFPVString("connection lost")); + LOG_WARN("RSP:Connection with RSPDriver failed, going to reconnect state"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("RSP:connection lost")); TRAN (RSPMonitor::connect2RSP); } } @@ -804,8 +798,8 @@ GCFEvent::TResult RSPMonitor::finish_state(GCFEvent& event, GCFPortInterface& po case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(string(PN_HWM_RSP_CURRENT_ACTION),GCFPVString("finished")); - itsOwnPropertySet->setValue(string(PN_HWM_RSP_ERROR),GCFPVString("")); + itsOwnPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("RSP:finished")); +// itsOwnPropertySet->setValue(string(PN_HWM_RSP_ERROR),GCFPVString("")); break; } diff --git a/MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl b/MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl deleted file mode 100644 index a7b080ca62a..00000000000 --- a/MAC/APL/StationCU/src/HardwareMonitor/TBB.dpl +++ /dev/null @@ -1,26 +0,0 @@ -// TBBoard -#define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" -#define PST_TB_BOARD "TBBoard" -#define PN_TBB_BOARDID "boardID" -#define PN_TBB_RAM_SIZE "RAMsize" -#define PN_TBB_SW_VERSION "SWversion" -#define PN_TBB_BOARD_VERSION "boardVersion" -#define PN_TBB_TP_VERSION "TPversion" -#define PN_TBB_MP0VERSION "MP0version" -#define PN_TBB_MP1VERSION "MP1version" -#define PN_TBB_MP2VERSION "MP2version" -#define PN_TBB_MP3VERSION "MP3version" -#define PN_TBB_VOLTAGE12 "voltage12" -#define PN_TBB_VOLTAGE25 "voltage25" -#define PN_TBB_VOLTAGE33 "voltage33" -#define PN_TBB_TEMPPCB "tempPCB" -#define PN_TBB_TEMPTP "tempTP" -#define PN_TBB_TEMPMP0 "tempMP0" -#define PN_TBB_TEMPMP1 "tempMP1" -#define PN_TBB_TEMPMP2 "tempMP2" -#define PN_TBB_TEMPMP3 "tempMP3" -#define PN_TBB_IMAGE_INFO_VERSION "imageInfo.version" -#define PN_TBB_IMAGE_INFO_WRITE_DATE "imageInfo.writeDate" -#define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPfile" -#define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPfile" - diff --git a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc index 9f4258a2483..0d0eb945061 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc +++ b/MAC/APL/StationCU/src/HardwareMonitor/TBBMonitor.cc @@ -35,7 +35,7 @@ #include "TBBMonitor.h" #include "RCUConstants.h" -#include "StationPermDatapointDefs.h" +#include "PVSSDatapointDefs.h" namespace LOFAR { @@ -131,9 +131,10 @@ GCFEvent::TResult TBBMonitor::initial_state(GCFEvent& event, GCFPortInterface& p case F_TIMER: { // update PVSS. - LOG_TRACE_FLOW ("Updateing state to PVSS"); - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION, GCFPVString("initial")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR, GCFPVString("")); + LOG_TRACE_FLOW ("Updating state to PVSS"); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("TBB:initial")); + itsOwnPropertySet->setValue(PN_HWM_TBB_CONNECTED,GCFPVBool(false)); +// itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); LOG_DEBUG_STR("Going to connect to the TBBDriver."); TRAN (TBBMonitor::connect2TBB); @@ -169,15 +170,14 @@ GCFEvent::TResult TBBMonitor::connect2TBB(GCFEvent& event, GCFPortInterface& por switch (event.signal) { case F_ENTRY: // update PVSS - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION, GCFPVString("connecting")); - itsOwnPropertySet->setValue(PN_HWM_TBB_CONNECTED,GCFPVBool(false)); - itsTBBDriver->open(); // will result in F_CONN or F_DISCONN + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("TBB:connecting")); + itsTimerPort->setTimer(2.0); // give database some time break; case F_CONNECTED: if (&port == itsTBBDriver) { LOG_DEBUG ("Connected with TBBDriver, going to get the configuration"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR, GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); itsOwnPropertySet->setValue(PN_HWM_TBB_CONNECTED,GCFPVBool(true)); TRAN(TBBMonitor::askConfiguration); // go to next state. } @@ -187,9 +187,9 @@ GCFEvent::TResult TBBMonitor::connect2TBB(GCFEvent& event, GCFPortInterface& por port.close(); ASSERTSTR (&port == itsTBBDriver, "F_DISCONNECTED event from port " << port.getName()); - LOG_DEBUG("Connection with TBBDriver failed, retry in 2 seconds"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR, GCFPVString("connection timeout")); - itsTimerPort->setTimer(2.0); + LOG_WARN("Connection with TBBDriver failed, retry in 10 seconds"); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("TBB:connection timeout")); + itsTimerPort->setTimer(10.0); break; case F_TIMER: @@ -224,9 +224,8 @@ GCFEvent::TResult TBBMonitor::askConfiguration(GCFEvent& event, GCFPortInterface switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("asking configuration")); - TBBGetConfigEvent getconfig; - itsTBBDriver->send(getconfig); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:asking configuration")); + itsTimerPort->setTimer(2.0); // give database some time } break; @@ -235,8 +234,8 @@ GCFEvent::TResult TBBMonitor::askConfiguration(GCFEvent& event, GCFPortInterface break; case TBB_DRIVER_BUSY_ACK: - LOG_DEBUG("TBBDriver is busy, retry in 3 seconds"); - itsTimerPort->setTimer(3.0); + LOG_DEBUG("TBBDriver is busy, retry in 5 seconds"); + itsTimerPort->setTimer(5.0); break; case F_TIMER: { @@ -254,18 +253,17 @@ GCFEvent::TResult TBBMonitor::askConfiguration(GCFEvent& event, GCFPortInterface itsNrRCUs = itsNrTBboards * NR_RCUS_PER_TBBOARD; // inform user - LOG_DEBUG_STR("Active boards = " << itsBoardMask); - LOG_DEBUG(formatString("nr TBboards = %d", itsNrTBboards)); + LOG_INFO_STR("Active boards = " << itsBoardMask); + LOG_INFO(formatString("nr TBboards = %d", itsNrTBboards)); // do some checks if (itsNrTBboards != itsBoardMask.count()) { - LOG_WARN_STR("Only " << itsBoardMask.count() << " of " << itsNrTBboards + LOG_WARN_STR("TBB:Only " << itsBoardMask.count() << " of " << itsNrTBboards << " TBboards are available."); } LOG_DEBUG ("Going to allocate the property-sets"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); - TRAN (TBBMonitor::finish_state); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::createPropertySets); // go to next state. } break; @@ -300,7 +298,7 @@ GCFEvent::TResult TBBMonitor::createPropertySets(GCFEvent& event, GCFPortInterfa switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("create PropertySets")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:create PropertySets")); // resize vectors. itsTBBs.resize (itsNrTBboards, 0); itsRCUs.resize (itsNrRCUs, 0); @@ -352,8 +350,8 @@ GCFEvent::TResult TBBMonitor::createPropertySets(GCFEvent& event, GCFPortInterfa for (uint32 rcu = 0; rcu < itsNrRCUs; rcu++) { ASSERTSTR(itsRCUs[rcu], "Allocation of PS for rcu " << rcu << " failed."); } - LOG_DEBUG_STR("Allocation of all propertySets successfull, going to operational mode"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + LOG_INFO_STR("Allocation of all propertySets successfull, going to operational mode"); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askVersion); } break; @@ -392,14 +390,14 @@ GCFEvent::TResult TBBMonitor::askVersion(GCFEvent& event, GCFPortInterface& port switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("getting version info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:getting version info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsTimerPort->setTimer(0.1); } break; case TBB_DRIVER_BUSY_ACK: - LOG_DEBUG("TBBDriver is busy, retry in 3 seconds"); + LOG_INFO("TBBDriver is busy, retry in 3 seconds"); itsTimerPort->setTimer(3.0); break; @@ -442,6 +440,7 @@ GCFEvent::TResult TBBMonitor::askVersion(GCFEvent& event, GCFPortInterface& port else { // board in error set ?.? itsTBBs[tbb]->setValue(PN_TBB_BOARDID, GCFPVUnsigned(0), 0.0, false); itsTBBs[tbb]->setValue(PN_TBB_BOARD_VERSION, GCFPVString("?.?"), 0.0, false); + itsTBBs[tbb]->setValue(PN_TBB_SW_VERSION, GCFPVString("?.?"), 0.0, false); itsTBBs[tbb]->setValue(PN_TBB_TP_VERSION, GCFPVString("?.?"), 0.0, false); itsTBBs[tbb]->setValue(PN_TBB_MP0_VERSION, GCFPVString("?.?"), 0.0, false); itsTBBs[tbb]->setValue(PN_TBB_MP1_VERSION, GCFPVString("?.?"), 0.0, false); @@ -456,7 +455,7 @@ GCFEvent::TResult TBBMonitor::askVersion(GCFEvent& event, GCFPortInterface& port } LOG_DEBUG_STR ("Version information updated, going to status information"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askSizeInfo); // go to next state. break; } @@ -494,14 +493,14 @@ GCFEvent::TResult TBBMonitor::askSizeInfo(GCFEvent& event, GCFPortInterface& por switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("getting version info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:getting size info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); itsTimerPort->setTimer(0.1); } break; case TBB_DRIVER_BUSY_ACK: - LOG_DEBUG("TBBDriver is busy, retry in 3 seconds"); + LOG_INFO("TBBDriver is busy, retry in 3 seconds"); itsTimerPort->setTimer(3.0); break; @@ -519,7 +518,7 @@ GCFEvent::TResult TBBMonitor::askSizeInfo(GCFEvent& event, GCFPortInterface& por // move the information to the database. for (uint32 tbb = 0; tbb < itsNrTBboards; tbb++) { if (ack.status_mask[tbb] & TBB_SUCCESS) { - LOG_DEBUG_STR("RAMSIZE board " << tbb << ": " << ack.npages[tbb] << " pages = " << 2048.0*(double)ack.npages[tbb] << " bytes"); + LOG_INFO_STR("RAMSIZE board " << tbb << ": " << ack.npages[tbb] << " pages = " << 2048.0*(double)ack.npages[tbb] << " bytes"); itsTBBs[tbb]->setValue(PN_TBB_RAM_SIZE, GCFPVString(byteSize(2048.0*(double)ack.npages[tbb]))); } else { // board in error set ?.? @@ -528,7 +527,7 @@ GCFEvent::TResult TBBMonitor::askSizeInfo(GCFEvent& event, GCFPortInterface& por } LOG_DEBUG_STR ("Size information updated, going to status information"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askFlashInfo); // go to next state. break; } @@ -568,8 +567,8 @@ GCFEvent::TResult TBBMonitor::askFlashInfo(GCFEvent& event, GCFPortInterface& po switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("getting flash info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("getting flash info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TBBImageInfoEvent getFlash; for (uint32 tbb = 0; tbb < itsNrTBboards; tbb++) { if (itsBoardMask.test(tbb)) { @@ -593,18 +592,21 @@ GCFEvent::TResult TBBMonitor::askFlashInfo(GCFEvent& event, GCFPortInterface& po vector<GCFPValue*> writeDates; vector<GCFPValue*> TPfilenames; vector<GCFPValue*> MPfilenames; - for (int32 tbb = 0; tbb < MAX_N_IMAGES; tbb++) { - if (ack.write_date[tbb] != -1L) { - imageVersions.push_back(new GCFPVString(formatString("%d.%d", ack.image_version[tbb]/10, ack.image_version[tbb]%10))); - ptime theTime(from_time_t(ack.write_date[tbb])); + for (int32 image = 0; image < MAX_N_IMAGES; image++) { + if (ack.write_date[image] != -1L) { +LOG_DEBUG(formatString("%d:%d:%d:%16.16s", image, ack.image_version[image], ack.write_date[image], ack.tp_file_name[image])); + imageVersions.push_back(new GCFPVString(formatString("%d.%d", ack.image_version[image]/10, ack.image_version[image]%10))); + ptime theTime(from_time_t(ack.write_date[image])); writeDates.push_back(new GCFPVString(to_simple_string(theTime))); + TPfilenames.push_back (new GCFPVString(ack.tp_file_name[image])); + MPfilenames.push_back (new GCFPVString(ack.mp_file_name[image])); } else { imageVersions.push_back(new GCFPVString("free")); - writeDates.push_back(new GCFPVString("---")); + writeDates.push_back (new GCFPVString("---")); + TPfilenames.push_back (new GCFPVString("")); + MPfilenames.push_back (new GCFPVString("")); } - TPfilenames.push_back (new GCFPVString(ack.tp_file_name[tbb])); - MPfilenames.push_back (new GCFPVString(ack.mp_file_name[tbb])); } itsTBBs[ack.board]->setValue(PN_TBB_IMAGE_INFO_VERSION, GCFPVDynArr(LPT_DYNSTRING, imageVersions)); itsTBBs[ack.board]->setValue(PN_TBB_IMAGE_INFO_WRITE_DATE, GCFPVDynArr(LPT_DYNSTRING, writeDates)); @@ -612,12 +614,12 @@ GCFEvent::TResult TBBMonitor::askFlashInfo(GCFEvent& event, GCFPortInterface& po itsTBBs[ack.board]->setValue(PN_TBB_IMAGE_INFO_MP_FILE, GCFPVDynArr(LPT_DYNSTRING, MPfilenames)); } else { - LOG_WARN_STR("Flashinfo of boardnr " << ack.board << " contains errors, no update of Flash"); + LOG_WARN_STR("TBB:Flashinfo of boardnr " << ack.board << " contains errors, no update of Flash"); } if (nrOfRequests == 0) { - LOG_DEBUG_STR ("Flash information updated, going to status information"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + LOG_INFO_STR ("Flash information updated, going to status information"); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askTBBinfo); // go to next state. } } @@ -657,8 +659,8 @@ GCFEvent::TResult TBBMonitor::askTBBinfo(GCFEvent& event, GCFPortInterface& port switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("updating TBB info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:updating TBB info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TBBStatusEvent getStatus; getStatus.boardmask = itsBoardMask.to_uint32(); itsTBBDriver->send(getStatus); @@ -692,14 +694,14 @@ GCFEvent::TResult TBBMonitor::askTBBinfo(GCFEvent& event, GCFPortInterface& port } // for all boards LOG_DEBUG_STR ("TBboard information updated, going to RCU information"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askRCUinfo); // go to next state. break; } case F_TIMER: { - LOG_DEBUG_STR ("TBBDriver is not respondind, TBboard information is not available"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("TBBDriver is not respondind, TBboard information is not available")); + LOG_WARN_STR ("TBBDriver is not responding, TBboard information is not available"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("TBB:Driver is not responding, TBboard information is not available")); TRAN(TBBMonitor::askRCUinfo); // go to next state. break; } @@ -743,8 +745,8 @@ GCFEvent::TResult TBBMonitor::askRCUinfo(GCFEvent& event, GCFPortInterface& port case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("updating RCU TBB info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:updating RCU TBB info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TBBRcuInfoEvent getStatus; itsTBBDriver->send(getStatus); itsTimerPort->setTimer(2.0); @@ -768,14 +770,14 @@ GCFEvent::TResult TBBMonitor::askRCUinfo(GCFEvent& event, GCFPortInterface& port } // for all boards LOG_DEBUG ("Updated all RCU information, waiting for next cycle"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::askRCUSettings); // go to next state. } break; case F_TIMER: { - LOG_DEBUG ("TBBDriver is not responding, RCU information is not available"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("TBBDriver is not responding, RCU information is not available")); + LOG_INFO ("TBBDriver is not responding, RCU information is not available"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("TBB:Driver is not responding, RCU information is not available")); TRAN(TBBMonitor::askRCUSettings); // go to next state. } break; @@ -818,8 +820,8 @@ GCFEvent::TResult TBBMonitor::askRCUSettings(GCFEvent& event, GCFPortInterface& case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("updating RCU trigger info")); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:updating RCU trigger info")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TBBTrigSettingsEvent getSettings; itsTBBDriver->send(getSettings); itsTimerPort->setTimer(2.0); @@ -849,14 +851,14 @@ GCFEvent::TResult TBBMonitor::askRCUSettings(GCFEvent& event, GCFPortInterface& } // for all boards LOG_DEBUG ("Updated all TriggerSetting information, waiting for next cycle"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); TRAN(TBBMonitor::waitForNextCycle); // go to next state. } break; case F_TIMER: { - LOG_DEBUG ("TBBDriver is not responding, TriggerSetting are not available"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("TBBDriver is not responding, TriggerSetting are not available")); + LOG_INFO ("TBBDriver is not responding, TriggerSetting are not available"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("TBB:Driver is not responding, TriggerSetting are not available")); TRAN(TBBMonitor::waitForNextCycle); // go to next state. } break; @@ -895,14 +897,14 @@ GCFEvent::TResult TBBMonitor::waitForNextCycle(GCFEvent& event, switch (event.signal) { case F_ENTRY: { - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("wait for next cycle")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:wait for next cycle")); int waitTime = itsPollInterval - (time(0) % itsPollInterval); if (waitTime == 0) { waitTime = itsPollInterval; } itsTimerPort->cancelAllTimers(); itsTimerPort->setTimer(double(waitTime)); - LOG_DEBUG_STR("Waiting " << waitTime << " seconds for next cycle"); + LOG_INFO_STR("Waiting " << waitTime << " seconds for next cycle"); } break; @@ -938,8 +940,8 @@ void TBBMonitor::_disconnectedHandler(GCFPortInterface& port) { port.close(); if (&port == itsTBBDriver) { - LOG_DEBUG("Connection with TBBDriver failed, going to reconnect state"); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("connection lost")); + LOG_ERROR("Connection with TBBDriver failed, going to reconnect state"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("TBB:connection lost")); TRAN (TBBMonitor::connect2TBB); } } @@ -961,9 +963,9 @@ GCFEvent::TResult TBBMonitor::finish_state(GCFEvent& event, GCFPortInterface& po case F_ENTRY: { // update PVSS - itsOwnPropertySet->setValue(PN_HWM_TBB_CURRENT_ACTION,GCFPVString("finished")); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("TBB:finished")); itsOwnPropertySet->setValue(PN_HWM_TBB_CONNECTED,GCFPVBool(false)); - itsOwnPropertySet->setValue(PN_HWM_TBB_ERROR,GCFPVString("")); +// itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); break; } diff --git a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc index 5e33f2b27de..5cc9c51c113 100644 --- a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc +++ b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc @@ -37,13 +37,9 @@ #include <APL/APLCommon/Controller_Protocol.ph> #include <APL/APLCommon/StationInfo.h> #include <GCF/RTDB/DP_Protocol.ph> -#include "StationControlDefines.h" +#include "PVSSDatapointDefs.h" #include "ActiveObs.h" -// Observation -#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" -#define PST_OBSERVATION "StnObservation" - namespace LOFAR { using ACC::APS::ParameterSet; using namespace APLCommon; diff --git a/MAC/APL/StationCU/src/StationControl/Makefile.am b/MAC/APL/StationCU/src/StationControl/Makefile.am index b901a8daf60..bffcb2178d0 100644 --- a/MAC/APL/StationCU/src/StationControl/Makefile.am +++ b/MAC/APL/StationCU/src/StationControl/Makefile.am @@ -14,7 +14,7 @@ StationControl_DEPENDENCIES = $(LOFAR_DEPEND) NOINSTHDRS = StationControl.h \ ActiveObs.h \ - StationControlDefines.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h new file mode 100644 index 00000000000..6ce81b19f38 --- /dev/null +++ b/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h @@ -0,0 +1,299 @@ +// This file was generated by create_db_files v1.0 on Mon Jun 16 14:13:40 UTC 2008 + +#ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +#define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +// process +#define PN_FSM_PROCESSID "process.processID" +#define PN_FSM_START_TIME "process.startTime" +#define PN_FSM_STOP_TIME "process.stopTime" +#define PN_FSM_LOG_MSG "process.logMsg" +#define PN_FSM_ERROR "process.error" +#define PN_FSM_CURRENT_ACTION "process.currentAction" +// object +#define PN_OBJ_STATE "object.state" +#define PN_OBJ_CHILD_STATE "object.childState" +#define PN_OBJ_MESSAGE "object.message" + +// Station +#define PSN_STATION "LOFAR_PIC_@ring@_@station@" +#define PST_STATION "Station" +#define PN_STS__CHILD_DP "__childDp" + +// MACScheduler +#define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" +#define PST_MAC_SCHEDULER "MACScheduler" +#define PN_MS_ACTIVE_OBSERVATIONS "activeObservations" +#define PN_MS_OTDB_CONNECTED "OTDB.connected" +#define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" +#define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" + +// Observation +#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_OBSERVATION "Observation" + +// ObsCtrl +#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" +#define PST_OBS_CTRL "ObsCtrl" +#define PN_OBSCTRL_CLAIM_PERIOD "claimPeriod" +#define PN_OBSCTRL_PREPARE_PERIOD "preparePeriod" +#define PN_OBSCTRL_START_TIME "startTime" +#define PN_OBSCTRL_STOP_TIME "stopTime" +#define PN_OBSCTRL_BAND_FILTER "bandFilter" +#define PN_OBSCTRL_NYQUISTZONE "nyquistzone" +#define PN_OBSCTRL_ANTENNA_ARRAY "antennaArray" +#define PN_OBSCTRL_RECEIVER_LIST "receiverList" +#define PN_OBSCTRL_SAMPLE_CLOCK "sampleClock" +#define PN_OBSCTRL_MEASUREMENT_SET "measurementSet" +#define PN_OBSCTRL_STATION_LIST "stationList" +#define PN_OBSCTRL_INPUT_NODE_LIST "inputNodeList" +#define PN_OBSCTRL_BGL_NODE_LIST "BGLNodeList" +#define PN_OBSCTRL_STORAGE_NODE_LIST "storageNodeList" +#define PN_OBSCTRL_BEAMS_ANGLE1 "Beams.angle1" +#define PN_OBSCTRL_BEAMS_ANGLE2 "Beams.angle2" +#define PN_OBSCTRL_BEAMS_DIRECTION_TYPE "Beams.directionType" +#define PN_OBSCTRL_BEAMS_BEAMLET_LIST "Beams.beamletList" +#define PN_OBSCTRL_BEAMS_SUBBAND_LIST "Beams.subbandList" + +// OnlineCtrl +#define PSN_ONLINE_CTRL "LOFAR_ObsSW_@observation@_OnlineCtrl" +#define PST_ONLINE_CTRL "OnlineCtrl" + +// Correlator +#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineCtrl_Correlator" +#define PST_CORRELATOR "Correlator" + +// StorageAppl +#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineCtrl_StorageAppl" +#define PST_STORAGE_APPL "StorageAppl" + +// Cabinet +#define PSN_CABINET "LOFAR_PIC_@cabinet@" +#define PST_CABINET "Cabinet" +#define PN_CAB_DOOR_OPEN "doorOpen" +#define PN_CAB_FAN "fan" +#define PN_CAB_INLET_TEMP "inletTemp" +#define PN_CAB_FRONT_TEMP "frontTemp" +#define PN_CAB_BACK_TEMP "backTemp" +#define PN_CAB_SETPOINT_TEMP "setpointTemp" +#define PN_CAB_AMBIENT_TEMP "ambientTemp" +#define PN_CAB_CONTROL_MODE "controlMode" + +// SubRack +#define PSN_SUB_RACK "LOFAR_PIC_@cabinet@_@subrack@" +#define PST_SUB_RACK "SubRack" +#define PN_SRCK_SPU__VHBA "SPU.Vhba" +#define PN_SRCK_SPU__VLBA "SPU.Vlba" +#define PN_SRCK_SPU__VDIG "SPU.Vdig" +#define PN_SRCK_SPU_TEMPERATURE "SPU.temperature" +#define PN_SRCK_CLOCK_BOARD__VFSP "clockBoard.Vfsp" +#define PN_SRCK_CLOCK_BOARD__VCLOCK "clockBoard.Vclock" +#define PN_SRCK_CLOCK_BOARD_VERSION "clockBoard.version" +#define PN_SRCK_CLOCK_BOARD_FREQ "clockBoard.freq" +#define PN_SRCK_CLOCK_BOARD_LOCK160 "clockBoard.lock160" +#define PN_SRCK_CLOCK_BOARD_LOCK200 "clockBoard.lock200" +#define PN_SRCK_CLOCK_BOARD_TEMPERATURE "clockBoard.temperature" + +// RSPBoard +#define PSN_RSP_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@" +#define PST_RSP_BOARD "RSPBoard" +#define PN_RSP_VOLTAGE12 "voltage12" +#define PN_RSP_VOLTAGE25 "voltage25" +#define PN_RSP_VOLTAGE33 "voltage33" +#define PN_RSP_VERSION "version" +#define PN_RSP_ALERT "alert" +#define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" +#define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" +#define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" +#define PN_RSP_ETHERNET_PACKETS_RECEIVED "Ethernet.packetsReceived" +#define PN_RSP_ETHERNET_PACKETS_ERROR "Ethernet.packetsError" +#define PN_RSP_ETHERNET_LAST_ERROR "Ethernet.lastError" +#define PN_RSP_MEP_SEQNR "MEP.seqnr" +#define PN_RSP_MEP_ERROR "MEP.error" +#define PN_RSP_BP_STATUS_STATE "BP.status.state" +#define PN_RSP_BP_STATUS_CHILD_STATE "BP.status.childState" +#define PN_RSP_BP_STATUS_MESSAGE "BP.status.message" +#define PN_RSP_BP_TEMPERATURE "BP.temperature" +#define PN_RSP_BP_VERSION "BP.version" +#define PN_RSP_AP0_STATUS_STATE "AP0.status.state" +#define PN_RSP_AP0_STATUS_CHILD_STATE "AP0.status.childState" +#define PN_RSP_AP0_STATUS_MESSAGE "AP0.status.message" +#define PN_RSP_AP0_TEMPERATURE "AP0.temperature" +#define PN_RSP_AP0_VERSION "AP0.version" +#define PN_RSP_AP0_SYNC_SAMPLE_COUNT "AP0.SYNC.sampleCount" +#define PN_RSP_AP0_SYNC_SYNC_COUNT "AP0.SYNC.syncCount" +#define PN_RSP_AP0_SYNC_ERROR_COUNT "AP0.SYNC.errorCount" +#define PN_RSP_AP1_STATUS_STATE "AP1.status.state" +#define PN_RSP_AP1_STATUS_CHILD_STATE "AP1.status.childState" +#define PN_RSP_AP1_STATUS_MESSAGE "AP1.status.message" +#define PN_RSP_AP1_TEMPERATURE "AP1.temperature" +#define PN_RSP_AP1_VERSION "AP1.version" +#define PN_RSP_AP1_SYNC_SAMPLE_COUNT "AP1.SYNC.sampleCount" +#define PN_RSP_AP1_SYNC_SYNC_COUNT "AP1.SYNC.syncCount" +#define PN_RSP_AP1_SYNC_ERROR_COUNT "AP1.SYNC.errorCount" +#define PN_RSP_AP2_STATUS_STATE "AP2.status.state" +#define PN_RSP_AP2_STATUS_CHILD_STATE "AP2.status.childState" +#define PN_RSP_AP2_STATUS_MESSAGE "AP2.status.message" +#define PN_RSP_AP2_TEMPERATURE "AP2.temperature" +#define PN_RSP_AP2_VERSION "AP2.version" +#define PN_RSP_AP2_SYNC_SAMPLE_COUNT "AP2.SYNC.sampleCount" +#define PN_RSP_AP2_SYNC_SYNC_COUNT "AP2.SYNC.syncCount" +#define PN_RSP_AP2_SYNC_ERROR_COUNT "AP2.SYNC.errorCount" +#define PN_RSP_AP3_STATUS_STATE "AP3.status.state" +#define PN_RSP_AP3_STATUS_CHILD_STATE "AP3.status.childState" +#define PN_RSP_AP3_STATUS_MESSAGE "AP3.status.message" +#define PN_RSP_AP3_TEMPERATURE "AP3.temperature" +#define PN_RSP_AP3_VERSION "AP3.version" +#define PN_RSP_AP3_SYNC_SAMPLE_COUNT "AP3.SYNC.sampleCount" +#define PN_RSP_AP3_SYNC_SYNC_COUNT "AP3.SYNC.syncCount" +#define PN_RSP_AP3_SYNC_ERROR_COUNT "AP3.SYNC.errorCount" + +// RCU +#define PSN_RCU "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@" +#define PST_RCU "RCU" +#define PN_RCU_DELAY "Delay" +#define PN_RCU_INPUT_ENABLE "InputEnable" +#define PN_RCU_LBL_ENABLE "LBLEnable" +#define PN_RCU_LBH_ENABLE "LBHEnable" +#define PN_RCU_HBA_ENABLE "HBAEnable" +#define PN_RCU_BAND_SEL_LBA_HBA "bandSelLbaHba" +#define PN_RCU_HBA_FILTER_SEL "HBAFilterSel" +#define PN_RCU_VL_ENABLE "VlEnable" +#define PN_RCU_VH_ENABLE "VhEnable" +#define PN_RCU_VDD_VCC_ENABLE "VddVccEnable" +#define PN_RCU_BAND_SEL_LBL_LBH "bandSelLblLbh" +#define PN_RCU_LBA_FILTER_SEL "LBAFilterSel" +#define PN_RCU_ATTENUATION "Attenuation" +#define PN_RCU_NOF_OVERFLOW "nofOverflow" +#define PN_RCU_ADC_STATISTICS_OVERFLOW "ADCStatistics.overflow" +#define PN_RCU_TBB_ERROR "TBB.error" +#define PN_RCU_TBB_MODE "TBB.mode" +#define PN_RCU_TBB_START_ADDR "TBB.startAddr" +#define PN_RCU_TBB_BUF_SIZE "TBB.bufSize" +#define PN_RCU_TRIGGER_STARTLEVEL "Trigger.startlevel" +#define PN_RCU_TRIGGER_BASELEVEL "Trigger.baselevel" +#define PN_RCU_TRIGGER_STOPLEVEL "Trigger.stoplevel" +#define PN_RCU_TRIGGER_FILTER "Trigger.filter" +#define PN_RCU_TRIGGER_WINDOW "Trigger.window" +#define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" +#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" +#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" +#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" +#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" + +// TBBoard +#define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" +#define PST_TB_BOARD "TBBoard" +#define PN_TBB_BOARDID "boardID" +#define PN_TBB_RAM_SIZE "RAMSize" +#define PN_TBB_SW_VERSION "SWVersion" +#define PN_TBB_BOARD_VERSION "boardVersion" +#define PN_TBB_TP_VERSION "TPVersion" +#define PN_TBB_MP0_VERSION "MP0Version" +#define PN_TBB_MP1_VERSION "MP1Version" +#define PN_TBB_MP2_VERSION "MP2Version" +#define PN_TBB_MP3_VERSION "MP3Version" +#define PN_TBB_VOLTAGE12 "voltage12" +#define PN_TBB_VOLTAGE25 "voltage25" +#define PN_TBB_VOLTAGE33 "voltage33" +#define PN_TBB_TEMPPCB "tempPCB" +#define PN_TBB_TEMPTP "tempTP" +#define PN_TBB_TEMPMP0 "tempMP0" +#define PN_TBB_TEMPMP1 "tempMP1" +#define PN_TBB_TEMPMP2 "tempMP2" +#define PN_TBB_TEMPMP3 "tempMP3" +#define PN_TBB_IMAGE_INFO_VERSION "imageInfo.version" +#define PN_TBB_IMAGE_INFO_WRITE_DATE "imageInfo.writeDate" +#define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" +#define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" + +// StationClock +#define PSN_STATION_CLOCK "LOFAR_PIC_StationClock" +#define PST_STATION_CLOCK "StationClock" +#define PN_SCK_CLOCK "clock" + +// LogProcessor +#define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" +#define PST_LOG_PROCESSOR "LogProcessor" + +// KVLogger +#define PSN_KV_LOGGER "LOFAR_PermSW_Daemons_KVLogger" +#define PST_KV_LOGGER "KVLogger" + +// SASGateway +#define PSN_SAS_GATEWAY "LOFAR_PermSW_Daemons_SASGateway" +#define PST_SAS_GATEWAY "SASGateway" + +// DigBoardCtrl +#define PSN_DIG_BOARD_CTRL "LOFAR_PermSW_DigBoardCtrl" +#define PST_DIG_BOARD_CTRL "DigBoardCtrl" +#define PN_DBC_CONNECTED "connected" +#define PN_DBC_CLOCK "clock" + +// StationCtrl +#define PSN_STATION_CTRL "LOFAR_PermSW_StationCtrl" +#define PST_STATION_CTRL "StationCtrl" + +// TempCtrl +#define PSN_TEMP_CTRL "LOFAR_PermSW_TempCtrl" +#define PST_TEMP_CTRL "TempCtrl" +#define PN_TC_SETPOINT "setpoint" +#define PN_TC_AMBIENT_LOWEST_TEMP "ambient.lowestTemp" +#define PN_TC_AMBIENT_HIGHEST_TEMP "ambient.highestTemp" + +// HardwareMonitor +#define PSN_HARDWARE_MONITOR "LOFAR_PermSW_HardwareMonitor" +#define PST_HARDWARE_MONITOR "HardwareMonitor" +#define PN_HWM_RSP_CONNECTED "RSP.connected" +#define PN_HWM_TBB_CONNECTED "TBB.connected" + +// SoftwareMonitor +#define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" +#define PST_SOFTWARE_MONITOR "SoftwareMonitor" + +// MACInfoServer +#define PSN_MAC_INFO_SERVER "LOFAR_PermSW_MACInfoServer" +#define PST_MAC_INFO_SERVER "MACInfoServer" + +// StnObservation +#define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_STN_OBSERVATION "StnObservation" +#define PN_OBS_NAME "name" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" + +// BeamCtrl +#define PSN_BEAM_CTRL "LOFAR_ObsSW_@observation@_BeamCtrl" +#define PST_BEAM_CTRL "BeamCtrl" +#define PN_BC_CONNECTED "connected" +#define PN_BC_SUB_ARRAY "subArray" +#define PN_BC_SUBBAND_LIST "subbandList" +#define PN_BC_BEAMLET_LIST "beamletList" +#define PN_BC_ANGLE1 "angle1" +#define PN_BC_ANGLE2 "angle2" +#define PN_BC_DIRECTION_TYPE "directionType" +#define PN_BC_BEAM_NAME "beamName" + +// CalCtrl +#define PSN_CAL_CTRL "LOFAR_ObsSW_@observation@_CalCtrl" +#define PST_CAL_CTRL "CalCtrl" +#define PN_CC_CONNECTED "connected" +#define PN_CC_BEAM_NAMES "beamNames" +#define PN_CC_ANTENNA_ARRAY "antennaArray" +#define PN_CC_FILTER "filter" +#define PN_CC_NYQUISTZONE "nyquistzone" +#define PN_CC_RCUS "rcus" + +// TBBCtrl +#define PSN_TBB_CTRL "LOFAR_ObsSW_@observation@_TBBCtrl" +#define PST_TBB_CTRL "TBBCtrl" +#define PN_TBC_CONNECTED "connected" +#define PN_TBC_TRIGGER_RCU_NR "trigger.rcuNr" +#define PN_TBC_TRIGGER_SEQUENCE_NR "trigger.sequenceNr" +#define PN_TBC_TRIGGER_TIME "trigger.time" +#define PN_TBC_TRIGGER_SAMPLE_NR "trigger.sampleNr" +#define PN_TBC_TRIGGER_SUM "trigger.sum" +#define PN_TBC_TRIGGER_NR_SAMPLES "trigger.nrSamples" +#define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" +#define PN_TBC_TRIGGER_FLAGS "trigger.flags" +#define PN_TBC_TRIGGER_TABLE "trigger.table" + +#endif diff --git a/MAC/APL/StationCU/src/StationControl/StationControl.cc b/MAC/APL/StationCU/src/StationControl/StationControl.cc index 35c4fff05a9..abffcd78dfd 100644 --- a/MAC/APL/StationCU/src/StationControl/StationControl.cc +++ b/MAC/APL/StationCU/src/StationControl/StationControl.cc @@ -1,6 +1,6 @@ // StationControl.cc: Implementation of the StationControl task // -// Copyright (C) 2006 +// Copyright (C) 2006-2008 // ASTRON (Netherlands Foundation for Research in Astronomy) // P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl // @@ -41,7 +41,7 @@ #include "ActiveObs.h" #include "StationControl.h" -#include "StationControlDefines.h" +#include "PVSSDatapointDefs.h" #include "../Package__Version.h" using namespace LOFAR::GCF::TM; @@ -146,17 +146,17 @@ void StationControl::_databaseEventHandler(GCFEvent& event) switch(event.signal) { case DP_CHANGED: { DPChangedEvent dpEvent(event); - if (strstr(dpEvent.DPname.c_str(), PN_SC_CLOCK) != 0) { + if (strstr(dpEvent.DPname.c_str(), PN_SCK_CLOCK) != 0) { itsClock = ((GCFPVInteger*)(dpEvent.value._pValue))->getValue(); LOG_DEBUG_STR("Received clock change from PVSS, clock is now " << itsClock); break; } // don't watch state and error fields. - if ((strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_STATE) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_ERROR) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_CURACT) != 0) || - (strstr(dpEvent.DPname.c_str(), PVSSNAME_FSM_LOGMSG) != 0)) { + if ((strstr(dpEvent.DPname.c_str(), PN_OBJ_STATE) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_ERROR) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_CURRENT_ACTION) != 0) || + (strstr(dpEvent.DPname.c_str(), PN_FSM_LOG_MSG) != 0)) { return; } @@ -226,8 +226,8 @@ GCFEvent::TResult StationControl::initial_state(GCFEvent& event, // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); - itsOwnPropSet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Initial")); - itsOwnPropSet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsOwnPropSet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Initial")); + itsOwnPropSet->setValue(PN_FSM_ERROR,GCFPVString("")); // enable clock propertyset. string clkPropSetName(createPropertySetName(PSN_STATION_CLOCK, getName())); @@ -242,7 +242,7 @@ GCFEvent::TResult StationControl::initial_state(GCFEvent& event, LOG_DEBUG ("Attached to external propertySets"); GCFPVInteger clockVal; - itsClockPropSet->getValue(PN_SC_CLOCK, clockVal); + itsClockPropSet->getValue(PN_SCK_CLOCK, clockVal); itsClock = clockVal.getValue(); LOG_DEBUG_STR("Clock in PVSS has value: " << itsClock); @@ -286,7 +286,7 @@ GCFEvent::TResult StationControl::connect_state(GCFEvent& event, break; case F_ENTRY: { - itsOwnPropSet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Connected")); + itsOwnPropSet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Connected")); // start DigitalBoardController LOG_DEBUG_STR("Starting DigitalBoardController"); @@ -375,8 +375,8 @@ GCFEvent::TResult StationControl::operational_state(GCFEvent& event, GCFPortInte case F_ENTRY: { // update PVSS - itsOwnPropSet->setValue(PVSSNAME_FSM_CURACT,GCFPVString("Active")); - itsOwnPropSet->setValue(PVSSNAME_FSM_ERROR,GCFPVString("")); + itsOwnPropSet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Active")); + itsOwnPropSet->setValue(PN_FSM_ERROR,GCFPVString("")); } break; @@ -472,7 +472,7 @@ GCFEvent::TResult StationControl::operational_state(GCFEvent& event, GCFPortInte itsClock != theObs->second->obsPar()->sampleClock) { itsClock = theObs->second->obsPar()->sampleClock; LOG_DEBUG_STR ("Changing clock to " << itsClock); - itsClockPropSet->setValue(PN_SC_CLOCK,GCFPVInteger(itsClock)); + itsClockPropSet->setValue(PN_SCK_CLOCK,GCFPVInteger(itsClock)); // TODO: give clock 5 seconds to stabelize } @@ -576,8 +576,8 @@ GCFEvent::TResult StationControl::finishing_state(GCFEvent& event, GCFPortInterf itsParentPort->send(msg); // update PVSS - itsOwnPropSet->setValue(string(PVSSNAME_FSM_CURACT),GCFPVString("Finished")); - itsOwnPropSet->setValue(string(PVSSNAME_FSM_ERROR),GCFPVString("")); + itsOwnPropSet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("Finished")); + itsOwnPropSet->setValue(PN_FSM_ERROR, GCFPVString("")); itsTimerPort->setTimer(1L); break; diff --git a/MAC/APL/StationCU/src/StationControl/StationControlDefines.h b/MAC/APL/StationCU/src/StationControl/StationControlDefines.h deleted file mode 100644 index 2fb0249a0f1..00000000000 --- a/MAC/APL/StationCU/src/StationControl/StationControlDefines.h +++ /dev/null @@ -1,49 +0,0 @@ -//# StationControlDefines.h: preprocessor definitions of various constants -//# -//# Copyright (C) 2002-2003 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef STATIONCONTROLDEFINES_H -#define STATIONCONTROLDEFINES_H - -namespace LOFAR { - namespace StationCU { - -// next three line should be defined elsewhere because we are not the owner. -#define PSN_STATION_CLOCK "LOFAR_PIC_StationClock" -#define PST_STATION_CLOCK "StationClock" -#define PN_SC_CLOCK "clock" - -// StationCtrl -#define PSN_STATION_CTRL "LOFAR_PermSW_StationCtrl" -#define PST_STATION_CTRL "StationCtrl" - -// next lines should be defined somewhere in Common. -#define PVSSNAME_FSM_CURACT "currentAction" -#define PVSSNAME_FSM_ERROR "error" -#define PVSSNAME_FSM_LOGMSG "logMsg" -#define PVSSNAME_FSM_STATE "state" -#define PVSSNAME_FSM_CHILDSTATE "childState" - - -}; // StationCU -}; // LOFAR - -#endif diff --git a/MAC/APL/StationCU/src/StationControl/StationControlMain.cc b/MAC/APL/StationCU/src/StationControl/StationControlMain.cc index 7bfa7208869..95d75499776 100644 --- a/MAC/APL/StationCU/src/StationControl/StationControlMain.cc +++ b/MAC/APL/StationCU/src/StationControl/StationControlMain.cc @@ -34,7 +34,7 @@ using namespace LOFAR::StationCU; int main(int argc, char* argv[]) { // args: cntlrname, parentHost, parentService - GCFTask::init(argc, argv); + GCFTask::init(argc, argv, "StationControl"); ParentControl* pc = ParentControl::instance(); pc->start(); // make initial transition @@ -42,8 +42,8 @@ int main(int argc, char* argv[]) ChildControl* cc = ChildControl::instance(); cc->start(); // make initial transition - StationControl dbc(argv[1]); - dbc.start(); // make initial transition + StationControl sc(argv[1]); + sc.start(); // make initial transition GCFTask::run(); diff --git a/MAC/APL/StationCU/src/TBBControl/Makefile.am b/MAC/APL/StationCU/src/TBBControl/Makefile.am index 0dfaf06c01c..67dbc5a5758 100644 --- a/MAC/APL/StationCU/src/TBBControl/Makefile.am +++ b/MAC/APL/StationCU/src/TBBControl/Makefile.am @@ -19,7 +19,7 @@ NOINSTHDRS = TBBControl.h \ TBBReadCmd.h \ VHECRTask.h \ TBBObservation.h \ - TBBControlDefines.h + PVSSDatapointDefs.h INSTHDRS = diff --git a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc index 3a6449721b6..d8681aaeb2b 100644 --- a/MAC/APL/StationCU/src/TBBControl/TBBControl.cc +++ b/MAC/APL/StationCU/src/TBBControl/TBBControl.cc @@ -41,7 +41,7 @@ //# local includes #include "TBBControl.h" -#include "TBBControlDefines.h" +#include "PVSSDatapointDefs.h" #include "TBBObservation.h" #include "TBBTrigger.h" #include "TBBReadCmd.h" @@ -188,7 +188,8 @@ GCFEvent::TResult TBBControl::initial_state(GCFEvent& event, case F_INIT: { // Get access to my own propertyset. - string propSetName(createPropertySetName(PSN_TBB_CTRL, getName())); + string propSetName(createPropertySetName(PSN_TBB_CTRL, getName(), + globalParameterSet()->getString("_DPname"))); LOG_INFO_STR ("Activating PropertySet" << propSetName); itsPropertySet = new RTDBPropertySet(propSetName, PST_TBB_CTRL, -- GitLab