Public Member Functions | Private Attributes | List of all members
swarmros::bridge::EventPublisher Class Referencefinal

A Handler implementation that publishes events from the swarm to a ROS topic. More...

#include <EventPublisher.h>

Inheritance diagram for swarmros::bridge::EventPublisher:
Inheritance graph
[legend]

Public Member Functions

virtual swarmio::data::discovery::Schema DescribeEvent (const std::string &name) override
 Describe the event based on the configuration of this instance. More...
 
 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. More...
 
virtual void EventWasTriggered (const swarmio::Node *node, const swarmio::data::event::Notification &event) override
 Publish the event in the ROS topic. More...
 
virtual ~EventPublisher () override
 Destructor. More...
 
- Public Member Functions inherited from swarmros::bridge::Pylon
virtual ~Pylon ()
 Add virtual destructor. More...
 
- Public Member Functions inherited from swarmio::services::event::Handler
virtual void EventWasTriggered (const Node *node, const data::event::Notification &event)=0
 Handlers are notified using this method when an event has been triggered. More...
 

Private Attributes

swarmio::services::event::Service_eventService
 Event service. More...
 
std::string _name
 Event name. More...
 
ros::Publisher _publisher
 Publisher. More...
 
const introspection::MessageSerializer_serializer
 Event name. More...
 

Additional Inherited Members

- Protected Member Functions inherited from swarmros::bridge::Pylon
 Pylon ()
 Mark as abstract. More...
 

Detailed Description

A Handler implementation that publishes events from the swarm to a ROS topic.

Definition at line 17 of file EventPublisher.h.

Constructor & Destructor Documentation

EventPublisher::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.

Parameters
nodeHandleNode handle
messageEvent message tyoe
eventServiceEvent service
nameEvent name

Definition at line 7 of file EventPublisher.cpp.

EventPublisher::~EventPublisher ( )
overridevirtual

Destructor.

Definition at line 67 of file EventPublisher.cpp.

Member Function Documentation

swarmio::data::discovery::Schema EventPublisher::DescribeEvent ( const std::string &  name)
overridevirtual

Describe the event based on the configuration of this instance.

Parameters
nameEvent name

Implements swarmio::services::event::Handler.

Definition at line 55 of file EventPublisher.cpp.

void EventPublisher::EventWasTriggered ( const swarmio::Node node,
const swarmio::data::event::Notification &  event 
)
overridevirtual

Publish the event in the ROS topic.

Parameters
nodeSource nodel
eventEvent

Definition at line 30 of file EventPublisher.cpp.

Member Data Documentation

swarmio::services::event::Service& swarmros::bridge::EventPublisher::_eventService
private

Event service.

Definition at line 43 of file EventPublisher.h.

std::string swarmros::bridge::EventPublisher::_name
private

Event name.

Definition at line 31 of file EventPublisher.h.

ros::Publisher swarmros::bridge::EventPublisher::_publisher
private

Publisher.

Definition at line 25 of file EventPublisher.h.

const introspection::MessageSerializer* swarmros::bridge::EventPublisher::_serializer
private

Event name.

Definition at line 37 of file EventPublisher.h.


The documentation for this class was generated from the following files:


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