Newer
Older
/*
**************************************************************************
* Copyright (C) 2023 INAF
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Authors:
*
* <>Valerio Pastore INAF-OAS Bologna valerio.pastore@inaf.it
****************************************************************************
*/
/**
* @brief The BaseDAQ_Observer class is an abstract base class for DAQ system observers.
*
* This class defines the interface for observing the statistics and status of a BaseDAQ object.
* Subclasses of BaseDAQ_Observer must implement the pure virtual functions defined in this class.
*
*/
/**
* @brief Constructs a BaseDAQ_Observer object with the specified BaseDAQ object.
*
* @param dataAcquisition The BaseDAQ object to observe.
*/
BaseDAQ_Observer() {
this->dataAcquisition = nullptr;
/**
* @brief Destroys the BaseDAQ_Observer object and removes itself from the observed BaseDAQ object.
*/
virtual ~BaseDAQ_Observer() {
this->dataAcquisition->removeObserver(this);
}
/**
* @brief Updates the packet statistics of the observed BaseDAQ object.
*/
virtual void updatePacketStats() = 0;
/**
* @brief Updates the archiver statistics of the observed BaseDAQ object.
*/
virtual void updateArchiverStats() = 0;
/**
* @brief Updates the provider statistics of the observed BaseDAQ object.
*/
virtual void updateProviderStats() = 0;
/**
* @brief Updates the receiver statistics of the observed BaseDAQ object.
*/
virtual void updateReceiverStats() = 0;
/**
* @brief Updates all statistics of the observed BaseDAQ object.
*/
virtual void updateAll() = 0;
/**
* @brief Starts the observation on the BaseDAQ object.
*/
virtual void start() = 0;
/**
* @brief Stops the observation on the BaseDAQ object.
*/
virtual void stop() = 0;
/**
* @brief Set the Daq to observe:
*
* @params daq The daq to observe
*/
virtual void setDaq(inaf::oasbo::DAQ::BaseDAQ *) = 0;