Skip to content

Commit

Permalink
expose m_name to inherited classes
Browse files Browse the repository at this point in the history
  • Loading branch information
plasorak committed Sep 17, 2024
1 parent 968928d commit 9a53e6a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions include/cmdlib/CommandFacility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{ \
return std::unique_ptr<dunedaq::cmdlib::CommandFacility>(new klass()); \
} \
}
}

namespace dunedaq::cmdlib {

Expand All @@ -51,7 +51,7 @@ class CommandFacility
public:
explicit CommandFacility(std::string /*uri*/) {}
virtual ~CommandFacility();
CommandFacility(const CommandFacility&) =
CommandFacility(const CommandFacility&) =
delete; ///< CommandFacility is not copy-constructible
CommandFacility& operator=(const CommandFacility&) =
delete; ///< CommandFacility is not copy-assignable
Expand All @@ -71,7 +71,10 @@ class CommandFacility

protected:
//! Must be implemented to handling the results of the commands
virtual void completion_callback(const cmdobj_t& cmd, cmd::CommandReply& meta) = 0;
virtual void completion_callback(const cmdobj_t& cmd, cmd::CommandReply& meta) = 0;

//! name of the commanded object
std::string m_name;

private:

Expand All @@ -83,8 +86,6 @@ class CommandFacility
//! Commanded Object to run execute with received commands as parameters
mutable CommandedObject* m_commanded_object = nullptr;

//! name of the commanded object
std::string m_name;

//! Completion queue for reqistered tasks
typedef tbb::concurrent_queue<std::future<void>> CompletionQueue;
Expand All @@ -94,7 +95,7 @@ class CommandFacility
typedef std::function<void(const cmdobj_t&, cmd::CommandReply)> CommandCallback;
CommandCallback m_command_callback = nullptr;

//! Single thrad is responsible to trigger tasks
//! Single thrad is responsible to trigger tasks
std::atomic<bool> m_active;

std::thread m_executor;
Expand Down

0 comments on commit 9a53e6a

Please sign in to comment.