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

Bug 1000: Minor enhancements.

parent f57943ae
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,8 @@ GCFEvent::TResult HBAResultRead::handleack(GCFEvent& event, GCFPortInterface& /*
}
cur += HBAProtocolWrite::RESULT_DELAY_STRIDE;
}
// Copy result for other cache also.
Cache::getInstance().getFront().getHBAReadings() = Cache::getInstance().getBack().getHBAReadings();
// check result
if (!ack.hdr.isValidAck(m_hdr)) {
......
......@@ -1289,48 +1289,51 @@ bool TBBDriver::SetTbbCommand(unsigned short signal)
//
int main(int argc, char** argv)
{
LOFAR::GCF::TM::GCFTask::init(argc, argv); // initializes log system
LOFAR::GCF::TM::GCFTask::init(argc, argv, "TBBDriver"); // initializes log system
// Inform Logprocessor who we are
LOG_INFO("MACProcessScope: LOFAR_PermSW_TBBDriver");
LOG_INFO_STR("Starting up " << argv[0]);
// adopt commandline switches
LOG_DEBUG_STR("Parsing options");
parseOptions (argc, argv);
// adopt commandline switches
LOG_DEBUG_STR("Parsing options");
parseOptions (argc, argv);
// daemonize if required
if (itsDaemonize) {
// daemonize if required
if (itsDaemonize) {
LOG_DEBUG_STR("background this process");
if (daemonize(false) == 0) {
//cerr << "Failed to background this process: " << strerror(errno) << endl;
exit(EXIT_FAILURE);
}
}
LOG_DEBUG_STR("Reading configuration files");
try {
LOFAR::ConfigLocator cl;
//cerr << "Failed to background this process: " << strerror(errno) << endl;
exit(EXIT_FAILURE);
}
}
LOG_DEBUG_STR("Reading configuration files");
try {
LOFAR::ConfigLocator cl;
LOFAR::ACC::APS::globalParameterSet()->adoptFile(cl.locate("TBBDriver.conf"));
}
catch (LOFAR::Exception e) {
LOG_ERROR_STR("Failed to load configuration files: " << e.text());
exit(EXIT_FAILURE);
}
LOFAR::TBB::TBBDriver tbb("TBBDriver");
tbb.start(); // make initialsition
try {
try {
LOFAR::GCF::TM::GCFTask::run();
}
catch (LOFAR::Exception e) {
LOG_ERROR_STR("Exception: " << e.text());
exit(EXIT_FAILURE);
}
LOG_INFO("Normal termination of program");
return(0);
LOG_INFO("Normal termination of program");
return(0);
}
// Remove lines or remove comments for copy constructor and assignment.
......
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