30template <
typename EventType>
36template <
typename EventType>
39 auto ev =
new EventType();
43template <
typename TComponent>
45 TComponent *& requiredComponentStorage,
bool throwExceptionIfNotExist)
48 requiredComponentStorage,
52template <
typename TComponent>
54 std::string name, TComponent *& requiredComponentStorage,
bool throwExceptionIfNotExist)
57 name, requiredComponentStorage,
61template <
typename TComponent>
70 this->
getLogger(), std::string(
"Required component ") +
72 " not found. Available components:");
74 std::vector<std::shared_ptr<ISmaccComponent>> components;
77 for (
auto c : components)
79 RCLCPP_DEBUG(this->
getLogger(),
"- Component %s", c->getName().c_str());
82 throw std::runtime_error(
83 std::string(
"Component ") +
demangleSymbol(
typeid(TComponent).name()) +
" not found");
87template <
typename TComponent>
96 this->
getLogger(), std::string(
"Required component with name: '") + name +
"'" +
98 " not found. Available components:");
100 std::vector<std::shared_ptr<ISmaccComponent>> components;
103 for (
auto c : components)
105 RCLCPP_DEBUG(this->
getLogger(),
" - Component %s", c->getName().c_str());
108 throw std::runtime_error(
109 std::string(
"Component ") +
demangleSymbol(
typeid(TComponent).name()) +
110 std::string(
" not found"));
114template <
typename TClient>
120template <
typename SmaccComponentType,
typename TOrthogonal,
typename TClient,
typename... TArgs>
126template <
typename SmaccComponentType,
typename TOrthogonal,
typename TClient,
typename... TArgs>
133template <
typename TOrthogonal,
typename TClient>
SmaccComponentType * createNamedComponent(std::string name, TArgs... targs)
SmaccComponentType * createComponent(TArgs... targs)
void requiresClient(SmaccClientType *&storage)
void getComponents(std::vector< std::shared_ptr< ISmaccComponent > > &components)
TComponent * getComponent()
void requiresClient(TClient *&requiredClientStorage)
SmaccComponentType * createSiblingComponent(TArgs... targs)
SmaccComponentType * createSiblingNamedComponent(std::string name, TArgs... targs)
rclcpp::Logger getLogger() const
void onComponentInitialization()
ISmaccStateMachine * stateMachine_
void requiresComponent(TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist)
void postEvent(EventType *ev, EventLifeTime evlifetime=EventLifeTime::ABSOLUTE)
std::string demangleSymbol()