Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/DAQInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>& responses, const unsigned int timeout=default_timeout);
Expand Down
3 changes: 2 additions & 1 deletion src/DAQInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<<configuration_file<<std::endl;
}

if(!vars.Get("device_name",m_name)) m_name = "unnamed";
if(device_name!=nullptr) m_name=device_name;
vars.Set("service_name",m_name);

boost::uuids::uuid m_UUID;
Expand Down
Loading