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();
Interface adapter to set thread name.
virtual bool reset()
Reset adapter.
virtual bool stop()
Stop adapter.
virtual ~ThreadNamePlexilAdapter()
Destructor.
virtual bool shutdown()
Shut adapter down.
virtual bool start()
Start adapter.
ThreadNamePlexilAdapter(PLEXIL::AdapterExecInterface &execInterface)
Constructor.
virtual bool initialize()
Initialize adapter.
static std::string current_thread_name()
Get the name of the current thread.