1#include "modulo_core/communication/SubscriptionHandler.hpp"
8std::function<void(
const std::shared_ptr<std_msgs::msg::Bool>)>
9SubscriptionHandler<std_msgs::msg::Bool>::get_translated_callback() {
10 return [
this](
const std::shared_ptr<std_msgs::msg::Bool> message) {
12 this->get_message_pair()->template read<std_msgs::msg::Bool, bool>(*message);
13 this->user_callback_();
15 this->handle_callback_exceptions();
21std::function<void(
const std::shared_ptr<std_msgs::msg::Float64>)>
22SubscriptionHandler<std_msgs::msg::Float64>::get_translated_callback() {
23 return [
this](
const std::shared_ptr<std_msgs::msg::Float64> message) {
25 this->get_message_pair()->template read<std_msgs::msg::Float64, double>(*message);
26 this->user_callback_();
28 this->handle_callback_exceptions();
34std::function<void(
const std::shared_ptr<std_msgs::msg::Float64MultiArray>)>
35SubscriptionHandler<std_msgs::msg::Float64MultiArray>::get_translated_callback() {
36 return [
this](
const std::shared_ptr<std_msgs::msg::Float64MultiArray> message) {
38 this->get_message_pair()->template read<std_msgs::msg::Float64MultiArray, std::vector<double>>(*message);
39 this->user_callback_();
41 this->handle_callback_exceptions();
47std::function<void(
const std::shared_ptr<std_msgs::msg::Int32>)>
48SubscriptionHandler<std_msgs::msg::Int32>::get_translated_callback() {
49 return [
this](
const std::shared_ptr<std_msgs::msg::Int32> message) {
51 this->get_message_pair()->template read<std_msgs::msg::Int32, int>(*message);
52 this->user_callback_();
54 this->handle_callback_exceptions();
60std::function<void(
const std::shared_ptr<std_msgs::msg::String>)>
61SubscriptionHandler<std_msgs::msg::String>::get_translated_callback() {
62 return [
this](
const std::shared_ptr<std_msgs::msg::String> message) {
64 this->get_message_pair()->template read<std_msgs::msg::String, std::string>(*message);
65 this->user_callback_();
67 this->handle_callback_exceptions();
73std::function<void(
const std::shared_ptr<EncodedState>)> SubscriptionHandler<EncodedState>::get_translated_callback() {
74 return [
this](
const std::shared_ptr<EncodedState> message) {
76 this->get_message_pair()->template read<EncodedState, state_representation::State>(*message);
77 this->user_callback_();
79 this->handle_callback_exceptions();
Modulo Core communication module for handling messages on publication and subscription interfaces.