diff --git a/CEP/BB/BBSControl/include/BBSControl/BBSKernelProcessControl.h b/CEP/BB/BBSControl/include/BBSControl/BBSKernelProcessControl.h deleted file mode 100644 index b87b93c563d91125c4b19bf374d7ce2e6edd8421..0000000000000000000000000000000000000000 --- a/CEP/BB/BBSControl/include/BBSControl/BBSKernelProcessControl.h +++ /dev/null @@ -1,112 +0,0 @@ -//# BBSKernelProcessControl.h: -//# -//# Copyright (C) 2002-2007 -//# 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 -//# -//# Note: This source is read best with tabstop 4. -//# -//# $Id$ - -#ifndef LOFAR_BBSCONTROL_BBSKERNELPROCESSCONTROL_H -#define LOFAR_BBSCONTROL_BBSKERNELPROCESSCONTROL_H - -//# Never #include <config.h> or #include <lofar_config.h> in a header file! - -//# Includes -#include <PLC/ProcessControl.h> -#include <APS/ParameterSet.h> -#include <Common/lofar_smartptr.h> -#include <BBSControl/BlobStreamableConnection.h> -#include <BBSKernel/Prediffer.h> -#include <BBSControl/BBSStructs.h> - -namespace LOFAR -{ - //# Forward declations - class BlobStreamable; - - namespace BBS - { - //# Forward declations - class BBSStep; - class BBSStrategy; - class BBSPredictStep; - class BBSSubtractStep; - class BBSCorrectStep; - class BBSSolveStep; - struct Context; - - // \addtogroup BBSControl - // @{ - - // Implementation of the ProcessControl interface for the local BBSKernel - // controller. - class BBSKernelProcessControl: public ACC::PLC::ProcessControl - { - public: - // Default constructor. - BBSKernelProcessControl(); - - // @name Implementation of PLC interface. - // @{ - virtual tribool define(); - virtual tribool init(); - virtual tribool run(); - virtual tribool pause(const string& condition); - virtual tribool quit(); - virtual tribool snapshot(const string& destination); - virtual tribool recover(const string& source); - virtual tribool reinit(const string& configID); - virtual string askInfo(const string& keylist); - // @} - - private: - bool dispatch(const BlobStreamable *message); - - bool handle(const BBSStrategy *strategy); - bool handle(const BBSStep *bs); - - // @name Implementation of handle() for the different BBSStep types. - // @{ - bool handle(const BBSPredictStep *step); - bool handle(const BBSSubtractStep *step); - bool handle(const BBSCorrectStep *step); - bool handle(const BBSSolveStep *step); - // @} - - // Parameter set for this process controller. - ACC::APS::ParameterSet itsParameterSet; - - // Prediffer - scoped_ptr<Prediffer> itsPrediffer; - - // Connections - scoped_ptr<BlobStreamableConnection> itsControllerConnection; - scoped_ptr<BlobStreamableConnection> itsSolverConnection; - - // Region of interest - vector<double> itsRegionOfInterest; - - // Work domain size - DomainSize itsWorkDomainSize; - }; - - } // namespace BBS -} // namespace LOFAR - -#endif diff --git a/CEP/BB/BBSControl/include/BBSControl/BBSProcessControl.h b/CEP/BB/BBSControl/include/BBSControl/BBSProcessControl.h deleted file mode 100644 index ab5c360ac6db16a6dfc058478aa99c0390c1d9a4..0000000000000000000000000000000000000000 --- a/CEP/BB/BBSControl/include/BBSControl/BBSProcessControl.h +++ /dev/null @@ -1,127 +0,0 @@ -//# BBSProcessControl.h: Implementation of ACC/PLC ProcessControl class. -//# -//# Copyright (C) 2006 -//# 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 LOFAR_BBSCONTROL_BBSPROCESSCONTROL_H -#define LOFAR_BBSCONTROL_BBSPROCESSCONTROL_H - -// \file -// Implementation of ACC/PLC ProcessControl class - -//# Includes -#include <PLC/ProcessControl.h> - -namespace LOFAR -{ - //# Forward Declarations. -#if 0 - class BlobStreamable; - class DH_BlobStreamable; - class TH_Socket; - class CSConnection; -#endif - - namespace BBS - { - //# Forward Declarations. - class BBSStrategy; - class BBSStep; - class CommandQueue; - - // \addtogroup BBSControl - // @{ - - // Implementation of the ProcessControl interface for the global BBS - // controller. - class BBSProcessControl : public ACC::PLC::ProcessControl - { - public: - // Default constructor. - BBSProcessControl(); - - // Destructor. - virtual ~BBSProcessControl(); - - // @name Implementation of PLC interface. - // @{ - virtual tribool define(); - virtual tribool init(); - virtual tribool run(); - virtual tribool quit(); - virtual tribool pause(const string& condition); - virtual tribool snapshot(const string& destination); - virtual tribool recover(const string& source); - virtual tribool reinit(const string& configID); - virtual string askInfo(const string& keylist); - // @} - - private: -#if 0 - // Send the strategy or one of the steps across. - bool sendObject(const BlobStreamable& bs); - - // Receive a BlobStreamable object, e.g., a BBSStatus. - BlobStreamable* recvObject(); -#endif - - // The strategy that will be executed by this controller. - BBSStrategy* itsStrategy; - - // Vector containing all the separate steps, in sequential order, that - // the strategy consists of. - vector<const BBSStep*> itsSteps; - - // Iterator for keeping track where we left while traversing the vector - // \c itsSteps. We need this iterator, because the run() method will be - // invoked several times by ACCmain. In each call to run() we must - // execute one BBSStep. - vector<const BBSStep*>::const_iterator itsStepsIterator; - -#if 0 - // DataHolder for exchanging data between global (BBS) and local - // (BBSKernel) process control. - DH_BlobStreamable* itsDataHolder; - - // TransportHolder used to exchange DataHolders. The global controller - // will open a server connection, waiting for local controllers to - // connect. - TH_Socket* itsTransportHolder; - - // Connection between the global (BBS) process control and the local - // (BBSKernel) process control. - CSConnection* itsConnection; -#endif - - // CommandQueue where strategies and steps can be "posted". - CommandQueue* itsCommandQueue; - - // Flag indicating whether we've sent \c itsStrategy. We only need to - // send it once, as the very first message. - bool itsStrategySent; - }; - - // @} - - } // namespace BBS - -} // namespace LOFAR - -#endif diff --git a/CEP/BB/BBSControl/include/BBSControl/BBSSolverProcessControl.h b/CEP/BB/BBSControl/include/BBSControl/BBSSolverProcessControl.h deleted file mode 100644 index 542fdc4efd5fc7cbb7e5e640db3041de455d2d19..0000000000000000000000000000000000000000 --- a/CEP/BB/BBSControl/include/BBSControl/BBSSolverProcessControl.h +++ /dev/null @@ -1,105 +0,0 @@ -//# BBSSolverProcessControl.h: Implementation of the ProcessControl -//# interface for the BBS solver component. -//# -//# Copyright (C) 2004 -//# 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 -//# -//# Note: This source is read best with tabstop 4. -//# -//# $Id$ - -#ifndef LOFAR_BBSCONTROL_BBSSOLVERPROCESSCONTROL_H -#define LOFAR_BBSCONTROL_BBSSOLVERPROCESSCONTROL_H - -// \file -// Implementation of the ProcessControl interface for the BBS solver component. - -//# Never #include <config.h> or #include <lofar_config.h> in a header file! - -#include <BBSControl/DomainRegistrationRequest.h> -#include <BBSControl/IterationRequest.h> -#include <BBSControl/IterationResult.h> -#include <BBSControl/BlobStreamableVector.h> -#include <BBSControl/BlobStreamableConnection.h> - -#include <Common/lofar_smartptr.h> -#include <PLC/ProcessControl.h> -#include <APS/ParameterSet.h> - -#include <scimath/Fitting/LSQFit.h> - -namespace LOFAR -{ - -namespace BBS -{ - // \addtogroup BBSControl - // @{ - - // Implementation of the ProcessControl interface for the BBS solver component. - class BBSSolverProcessControl: public ACC::PLC::ProcessControl - { - public: - // Default constructor. - BBSSolverProcessControl(); - - // @name Implementation of PLC interface. - // @{ - virtual tribool define(); - virtual tribool init(); - virtual tribool run(); - virtual tribool pause(const string& condition); - virtual tribool quit(); - virtual tribool snapshot(const string& destination); - virtual tribool recover(const string& source); - virtual tribool reinit(const string& configID); - virtual string askInfo(const string& keylist); - // @} - - private: - struct Domain - { - uint32 index; - vector<double> unknowns; - casa::LSQFit solver; - //# this attribute is only temporary, until the problems with - //# the latest version of LSQFit have been solved. - double epsilon; - }; - - bool dispatch(const BlobStreamable *message); - bool handle(const DomainRegistrationRequest *request); - bool handle(const BlobStreamableVector<DomainRegistrationRequest> *request); - bool handle(const IterationRequest *request); - bool handle(const BlobStreamableVector<IterationRequest> *request); - - bool registerDomain(const DomainRegistrationRequest *request); - IterationResult *performIteration(const IterationRequest *request); - - // Parameter set for this process controller. - ACC::APS::ParameterSet itsParameterSet; - - scoped_ptr<BlobStreamableConnection> itsKernelConnection; - - map<uint32, Domain> itsRegisteredDomains; - }; - // @} -} //# namespace BBS -} //# namespace LOFAR - -#endif