22 #include "thread_adapter.h" 24 #include <core/threading/thread.h> 26 #include <AdapterConfiguration.hh> 27 #include <AdapterExecInterface.hh> 28 #include <AdapterFactory.hh> 40 : InterfaceAdapter(execInterface)
50 pugi::xml_node
const xml)
51 : InterfaceAdapter(execInterface, xml)
77 pugi::xml_node config = getXml();
78 pugi::xml_attribute xml_attr = config.attribute(
"name");
80 name = xml_attr.value();
82 for (
const auto &c : config.children()) {
83 if (strcmp(c.name(),
"Parameter") == 0) {
84 pugi::xml_attribute xml_key_attr = c.attribute(
"key");
85 if (xml_key_attr && strcmp(xml_key_attr.value(),
"name") == 0) {
86 name = c.text().get();
static std::string current_thread_name()
Get the name of the current thread.
virtual bool stop()
Stop adapter.
ThreadNamePlexilAdapter(PLEXIL::AdapterExecInterface &execInterface)
Constructor.
virtual bool initialize()
Initialize adapter.
virtual bool shutdown()
Shut adapter down.
Interface adapter to set thread name.
virtual ~ThreadNamePlexilAdapter()
Destructor.
virtual bool start()
Start adapter.
virtual bool reset()
Reset adapter.