diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc index 76918e2fb528df4e69b35ab2f2ad72bc58fb32e4..9c78c3f8dda7c9b9d42dab4fae8872bdea979fde 100644 --- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc +++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc @@ -30,6 +30,7 @@ #include <GCF/GCF_ServiceInfo.h> #include <GCF/Protocols/PA_Protocol.ph> #include <APL/APLCommon/APL_Defines.h> +#include <APL/APLCommon/APLUtilities.h> #include <APL/APLCommon/APLCommonExceptions.h> #include <APL/APLCommon/Controller_Protocol.ph> #include <APL/APLCommon/StationInfo.h> @@ -345,13 +346,44 @@ GCFEvent::TResult ObservationControl::starting_state(GCFEvent& event, case F_TIMER: { // must be timer that PropSet has set. // update PVSS. LOG_TRACE_FLOW ("Updateing state to PVSS"); - itsPropertySet->setValue(PVSSNAME_FSM_STATE,GCFPVString ("initial")); - itsPropertySet->setValue(PVSSNAME_FSM_ERROR,GCFPVString ("")); - itsPropertySet->setValue(PN_OC_CLAIM_PERIOD,GCFPVInteger (itsClaimPeriod)); + itsPropertySet->setValue(PVSSNAME_FSM_STATE, GCFPVString("initial")); + itsPropertySet->setValue(PVSSNAME_FSM_ERROR, GCFPVString("")); + itsPropertySet->setValue(PN_OC_CLAIM_PERIOD, GCFPVInteger(itsClaimPeriod)); itsPropertySet->setValue(PN_OC_PREPARE_PERIOD,GCFPVInteger(itsPreparePeriod)); - itsPropertySet->setValue(PN_OC_START_TIME,GCFPVString(to_simple_string(itsStartTime))); - itsPropertySet->setValue(PN_OC_STOP_TIME, GCFPVString(to_simple_string(itsStopTime))); - + itsPropertySet->setValue(PN_OC_START_TIME, GCFPVString(to_simple_string(itsStartTime))); + itsPropertySet->setValue(PN_OC_STOP_TIME, GCFPVString(to_simple_string(itsStopTime))); + itsPropertySet->setValue(PN_OC_SUBBAND_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.subbandList")))); + itsPropertySet->setValue(PN_OC_BEAMLET_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.beamletList")))); + itsPropertySet->setValue(PN_OC_BAND_FILTER, GCFPVString( + globalParameterSet()->getString("Observation.bandFilter"))); + itsPropertySet->setValue(PN_OC_NYQUISTZONE, GCFPVInteger( + globalParameterSet()->getInt32("Observation.nyquistzone"))); + itsPropertySet->setValue(PN_OC_ANTENNA_ARRAY, GCFPVString( + globalParameterSet()->getString("Observation.antennaArray"))); + itsPropertySet->setValue(PN_OC_RECEIVER_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.receiverList")))); + itsPropertySet->setValue(PN_OC_SAMPLE_CLOCK, GCFPVInteger( + globalParameterSet()->getUint32("Observation.sampleClock"))); + itsPropertySet->setValue(PN_OC_MEASUREMENT_SET, GCFPVString( + globalParameterSet()->getString("Observation.measurementSet"))); + itsPropertySet->setValue(PN_OC_STATION_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.stationList")))); + itsPropertySet->setValue(PN_OC_INPUT_NODE_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.inputNodeList")))); + itsPropertySet->setValue(PN_OC_BGL_NODE_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.BGLNodeList")))); + itsPropertySet->setValue(PN_OC_STORAGE_NODE_LIST, GCFPVString( + APLUtilities::compactedArrayString(globalParameterSet()-> + getString("Observation.storageNodeList")))); + // Start ChildControl task LOG_DEBUG ("Enabling ChildControl task"); itsChildControl->openService(MAC_SVCMASK_OBSERVATIONCTRL, itsInstanceNr); diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControlDefines.h b/MAC/APL/MainCU/src/ObservationControl/ObservationControlDefines.h index 3938c5e0f4820508f4f351b29bd9ad310a60bbb6..52656c50bd4a77ccf1e0f5ba93e3dc8430f03053 100644 --- a/MAC/APL/MainCU/src/ObservationControl/ObservationControlDefines.h +++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControlDefines.h @@ -30,12 +30,24 @@ namespace LOFAR { #define OC_OBSERVATIONSTATE "observationState" // ObsCtrl -#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" -#define PST_OBS_CTRL "ObsCtrl" -#define PN_OC_CLAIM_PERIOD "claimPeriod" +#define PSN_OBS_CTRL "LOFAR_ObsSW_@observation@_ObsCtrl" +#define PST_OBS_CTRL "ObsCtrl" +#define PN_OC_CLAIM_PERIOD "claimPeriod" #define PN_OC_PREPARE_PERIOD "preparePeriod" -#define PN_OC_START_TIME "startTime" -#define PN_OC_STOP_TIME "stopTime" +#define PN_OC_START_TIME "startTime" +#define PN_OC_STOP_TIME "stopTime" +#define PN_OC_SUBBAND_LIST "subbandList" +#define PN_OC_BEAMLET_LIST "beamletList" +#define PN_OC_BAND_FILTER "bandFilter" +#define PN_OC_NYQUISTZONE "nyquistzone" +#define PN_OC_ANTENNA_ARRAY "antennaArray" +#define PN_OC_RECEIVER_LIST "receiverList" +#define PN_OC_SAMPLE_CLOCK "sampleClock" +#define PN_OC_MEASUREMENT_SET "measurementSet" +#define PN_OC_STATION_LIST "stationList" +#define PN_OC_INPUT_NODE_LIST "inputNodeList" +#define PN_OC_BGL_NODE_LIST "BGLNodeList" +#define PN_OC_STORAGE_NODE_LIST "storageNodeList" // next lines should be defined somewhere in Common.