Skip to content
Snippets Groups Projects
Commit f63eff29 authored by Ruud Overeem's avatar Ruud Overeem
Browse files

Bug 1000: Directory cleanup and support of receiverBitMap field.

parent 54442fa2
No related branches found
No related tags found
No related merge requests found
# add your custom loggers and appenders here
#
log4cplus.rootLogger=DEBUG, STDOUT, FILE
log4cplus.logger.TRC=TRACE2
log4cplus.additivity.TRC=FALSE
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S.%q} %-5p %c{9} - %m [%.25l]%n
log4cplus.appender.STDOUT.logToStdErr=true
log4cplus.appender.FILE=log4cplus::RollingFileAppender
log4cplus.appender.FILE.File=../log/MACScheduler.log
log4cplus.appender.FILE.MaxFileSize=5MB
log4cplus.appender.FILE.MaxBackupIndex=5
log4cplus.appender.FILE.layout=log4cplus::PatternLayout
log4cplus.appender.FILE.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n
......@@ -29,19 +29,9 @@ EXTRA_DIST = $(configfiles_DATA) $(sysconf_DATA)
configfilesdir=$(bindir)
configfiles_DATA =
sysconf_DATA = MACScheduler.conf \
MACScheduler.log_prop
%.log_prop: %.log_prop.in
cp $< $@
sysconf_DATA = MACScheduler.conf
%.conf: %.conf.in
cp $< $@
%.ctl: %.ctl.in
cp $< $@
clean-local:
rm -f *.ph
include $(top_srcdir)/Makefile.common
......@@ -239,6 +239,17 @@ GCFEvent::TResult ObsClaimer::preparePVSS_state (GCFEvent& event, GCFPortInterfa
theObsPS->setValue(PN_OBS_BGL_NODE_LIST, GCFPVString (theObs.BGLNodeList), 0.0, false);
theObsPS->setValue(PN_OBS_STORAGE_NODE_LIST,GCFPVString (theObs.storageNodeList), 0.0, false);
// the receiver bitmap can be derived from the RCUset.
int nrReceivers(theObs.RCUset.size());
string rbm;
rbm.resize(nrReceivers, '0');
for (int i = 0; i < nrReceivers; i++) {
if (theObs.RCUset[i]) {
rbm[i] = '1';
}
}
theObsPS->setValue(PN_OBS_RECEIVER_BITMAP,GCFPVString (rbm), 0.0, false);
// for the beams we have to construct dyn arrays first.
GCFPValueArray subbandArr;
GCFPValueArray beamletArr;
......
......@@ -22,17 +22,4 @@ DOCHDRS = $(pkginclude_HEADERS) $(BUILT_SOURCES)
EXTRA_DIST = $(configfiles_DATA) $(sysconf_DATA)
#in case of make install these files will be copied to the bindir beside the test apps
configfilesdir=$(bindir)
configfiles_DATA =
#customPrepPVSSDB.ctl
sysconf_DATA = ObservationControl.log_prop
%.log_prop: %.log_prop.in
cp $< $@
clean-local:
rm -f *.ph
include $(top_srcdir)/Makefile.common
......@@ -239,7 +239,6 @@ GCFEvent::TResult ObservationControl::initial_state(GCFEvent& event,
LOG_INFO_STR(cmEvent.nameInAppl << " is mapped to " << cmEvent.DPname);
itsObsDPname = cmEvent.DPname;
itsTimerPort->cancelAllTimers();
// TRAN(ObservationControl::prepDB_state); // go to next state.
TRAN(ObservationControl::starting_state); // go to next state.
}
break;
......@@ -254,97 +253,6 @@ GCFEvent::TResult ObservationControl::initial_state(GCFEvent& event,
}
//
// prepDB_state(event, port)
//
// Create top datapoint of this observation in PVSS.
//
// NOTE: This state becomes obsolete for Navigator 2
//
GCFEvent::TResult ObservationControl::prepDB_state(GCFEvent& event,
GCFPortInterface& port)
{
GCFEvent::TResult status = GCFEvent::HANDLED;
#if 0
uint32 gNrStations = 0;
LOG_DEBUG_STR ("prepDB:" << eventName(event) << "@" << port.getName());
switch (event.signal) {
case F_INIT:
break;
case F_ENTRY: {
// Create 'Observation<nr>_<station>' datapoint for each station of the observation
Observation theObs(globalParameterSet());
vector<string> stations(theObs.stations);
vector<string>::iterator iter = stations.begin();
vector<string>::iterator end = stations.end();
gNrStations = stations.size();
LOG_DEBUG_STR(gNrStations << " stations are used in this Observation.");
string DPobsName(createPropertySetName(PSN_OBSERVATION, getName())+"_Core_"); // observation<nr>_
while (iter != end) {
string stationName(PVSSDatabaseName(*iter));
LOG_DEBUG_STR ("Creating PropertySet: " << DPobsName+stationName);
itsStationDPs[stationName] = new RTDBPropertySet(DPobsName+stationName,
PST_STATION,
PSAT_RW | PSAT_TMP,
this);
iter++;
}
}
break;
case DP_CREATED: {
// NOTE: thsi function may be called DURING the construction of the PropertySet.
// Always exit this event in a way that GCF can end the construction.
DPCreatedEvent dpEvent(event);
LOG_DEBUG_STR("Result of creating " << dpEvent.DPname << " = " << dpEvent.result);
gNrStations--;
if (!gNrStations) {
itsTimerPort->cancelAllTimers();
itsTimerPort->setTimer(0.0);
}
else {
LOG_DEBUG_STR("Still waiting for " << gNrStations << " stationDPs.");
itsTimerPort->setTimer(0.0);
}
}
break;
case F_TIMER: { // must be timer that PropSet has set.
// update PVSS.
LOG_TRACE_FLOW ("Station DPs created, setting station reference values");
string observationName(createPropertySetName(PSN_OBSERVATION, getName()));
map<string, RTDBPropertySet*>::iterator iter = itsStationDPs.begin();
map<string, RTDBPropertySet*>::iterator end = itsStationDPs.end();
while (iter != end) {
// write station reference in Observation DP
iter->second->setValue("__childDp", iter->first+"="+iter->first+":"+observationName);
iter++;
}
TRAN(ObservationControl::starting_state); // go to next state.
}
break;
case F_CONNECTED:
break;
case F_DISCONNECTED:
break;
default:
LOG_DEBUG_STR ("prepDB, default");
status = GCFEvent::NOT_HANDLED;
break;
}
#endif
return (status);
}
//
// starting_state(event, port)
//
......
......@@ -70,9 +70,6 @@ public:
// During this state the top DP LOFAR_ObsSW_<observation> is created
GCFEvent::TResult initial_state (GCFEvent& e, GCFPortInterface& p);
// During this state station DP's wih references to the stations are created.
GCFEvent::TResult prepDB_state (GCFEvent& e, GCFPortInterface& p);
// During this state all connections with the other programs are made.
GCFEvent::TResult starting_state (GCFEvent& e, GCFPortInterface& p);
......
# add your custom loggers and appenders here
#
log4cplus.rootLogger=DEBUG, STDOUT, FILE
log4cplus.logger.TRC=TRACE3
log4cplus.additivity.TRC=FALSE
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S.%q} %-5p %c{9} - %m [%.25l]%n
log4cplus.appender.STDOUT.logToStdErr=true
log4cplus.appender.FILE=log4cplus::RollingFileAppender
log4cplus.appender.FILE.File=../log/ObservationControl.log
log4cplus.appender.FILE.MaxFileSize=5MB
log4cplus.appender.FILE.MaxBackupIndex=5
log4cplus.appender.FILE.layout=log4cplus::PatternLayout
log4cplus.appender.FILE.layout.ConversionPattern=%D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment