Newer
Older
/**
* @brief The BaseProvider class is an abstract base class for providers in the DAQ system.
*
* This class defines the common interface for providers that write packets to a destination.
* Derived classes must implement the pure virtual functions defined in this class.
*/
std::string dest; /**< The destination where packets are written to. */
/**
* @brief Writes a packet to the destination.
*
* @param packet The packet to be written.
* @return int Returns an integer indicating the success or failure of the write operation.
*/
virtual int write(PacketLib::BasePacket &packet) = 0;
/**
* @brief Writes a packet to a specified destination.
*
* @param packet The packet to be written.
* @param dest The destination where the packet should be written to.
* @return int Returns an integer indicating the success or failure of the write operation.
*/
virtual int write(PacketLib::BasePacket &packet, std::string dest) = 0;
/**
* @brief Opens the provider.
*
* @return int Returns an integer indicating the success or failure of the open operation.
*/
virtual int open() = 0;
/**
* @brief Closes the provider.
*
* @return int Returns an integer indicating the success or failure of the close operation.
*/
virtual int close() = 0;
/**
* @brief Checks if the provider is open.
*
* @return bool Returns true if the provider is open, false otherwise.
*/
/**
* @brief Sets the destination where packets should be written to.
*
* @param dest The destination to be set.
*/
/**
* @brief Gets the current destination where packets are written to.
*
* @return std::string Returns the current destination.
*/