From d61f8fa7e894b18c7223c23abbcf3c16a597d6ce Mon Sep 17 00:00:00 2001 From: Marcus O'Flaherty Date: Wed, 30 Sep 2026 13:59:34 +0100 Subject: [PATCH] add device name as optional constructor arg. overrides name in config if given. --- include/DAQInterface.h | 2 +- src/DAQInterface.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/DAQInterface.h b/include/DAQInterface.h index 1dc7e874..11ffd9e7 100644 --- a/include/DAQInterface.h +++ b/include/DAQInterface.h @@ -26,7 +26,7 @@ namespace ToolFramework { public: - DAQInterface(std::string configuration_file, zmq::context_t* context=0); + DAQInterface(std::string configuration_file, zmq::context_t* context=0, const char* device_name=nullptr); ~DAQInterface(); bool SQLQuery(const std::string& query, std::vector& responses, const unsigned int timeout=default_timeout); diff --git a/src/DAQInterface.cpp b/src/DAQInterface.cpp index 75d9d195..24e78550 100644 --- a/src/DAQInterface.cpp +++ b/src/DAQInterface.cpp @@ -3,13 +3,14 @@ using namespace ToolFramework; -DAQInterface::DAQInterface(std::string configuration_file, zmq::context_t* context){ +DAQInterface::DAQInterface(std::string configuration_file, zmq::context_t* context, const char* device_name){ if(!vars.Initialise(configuration_file)){ std::clog<<"Error invalid configuration file given to DAQ Interface: "<