diff --git a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp index fc83132850cfb652359c0ef7cca81d89e3ff3aac..41b48bdff28d2cdbd2e601ab7e9d6dadcdbc0e2b 100644 --- a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp +++ b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.cpp @@ -13,6 +13,13 @@ namespace armarx::plugins channelHeartbeatConfig.emplace(channel, args); } + void HeartbeatComponentPlugin::configureHeartbeatChannel(const std::string& channel, const std::string& message) + { + auto args = heartbeatArgs; + args.message = message; + configureHeartbeatChannel(channel, args); + } + void HeartbeatComponentPlugin::heartbeat() { diff --git a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.h b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.h index 80cf546726085b6ca03406a7dc1abc91e647c11c..638d2e9868b8fb25329272f5c084b6e83f4e136e 100644 --- a/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.h +++ b/source/RobotAPI/libraries/RobotAPIComponentPlugins/HeartbeatComponentPlugin.h @@ -33,6 +33,14 @@ namespace armarx::plugins public: using ComponentPlugin::ComponentPlugin; + /** + * @brief Configures a heartbeat subchannel. + * + * @param channel Identifier of the heartbeat channel + * @param args Configuration of this channel's heartbeat properties + */ + void configureHeartbeatChannel(const std::string& channel, const std::string& message); + /** * @brief Configures a heartbeat subchannel. *