EventPublisher.h
Go to the documentation of this file.
1 #pragma once
2 
8 #include <ros/ros.h>
9 
10 namespace swarmros::bridge
11 {
18  {
19  private:
20 
26 
31  std::string _name;
32 
38 
44 
45  public:
46 
55  EventPublisher(ros::NodeHandle& nodeHandle, const std::string& suffix, const std::string& message, swarmio::services::event::Service& eventService, const std::string& name);
56 
63  virtual void EventWasTriggered(const swarmio::Node* node, const swarmio::data::event::Notification& event) override;
64 
70  virtual swarmio::data::discovery::Schema DescribeEvent(const std::string& name) override;
71 
76  virtual ~EventPublisher() override;
77  };
78 }
79 
Base class for all bridging services.
Definition: Pylon.h:9
The Event service is responsible for triggering, handling and monitoring events.
Definition: event/Service.h:18
virtual swarmio::data::discovery::Schema DescribeEvent(const std::string &name) override
Describe the event based on the configuration of this instance.
std::string _name
Event name.
virtual void EventWasTriggered(const swarmio::Node *node, const swarmio::data::event::Notification &event) override
Publish the event in the ROS topic.
Serializer for full-fledged message types.
const introspection::MessageSerializer * _serializer
Event name.
EventPublisher(ros::NodeHandle &nodeHandle, const std::string &suffix, const std::string &message, swarmio::services::event::Service &eventService, const std::string &name)
Construct a new EventPublisher object.
virtual ~EventPublisher() override
Destructor.
ros::Publisher _publisher
Publisher.
A Handler implementation that publishes events from the swarm to a ROS topic.
Abstract base class for Event handlers.
Definition: Handler.h:13
Represents a Node the Endpoint knows about and can send messages to.
swarmio::services::event::Service & _eventService
Event service.


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48