KaCanOpen
 All Classes Functions Variables Typedefs Enumerations Pages
Public Member Functions | List of all members
kaco::Bridge Class Reference

This class is a bridge between a ROS network and a CanOpen network. More...

#include <bridge.h>

Public Member Functions

void run ()
 Runs the ROS spinner and blocks until shutdown (e.g. via Ctrl+c).
 
void add_publisher (std::shared_ptr< Publisher > publisher, double loop_rate=10)
 Adds a Publisher, advertises it and publishes messages repeatedly. More...
 
void add_subscriber (std::shared_ptr< Subscriber > subscriber)
 Adds a Subscriber, which can advertise itself and receive messages on its own. More...
 

Detailed Description

This class is a bridge between a ROS network and a CanOpen network.

Examples:
examples/ros/motor_and_io_bridge.cpp, and examples/ros/ros.cpp.

Definition at line 48 of file bridge.h.

Member Function Documentation

void kaco::Bridge::add_publisher ( std::shared_ptr< Publisher publisher,
double  loop_rate = 10 
)

Adds a Publisher, advertises it and publishes messages repeatedly.

Parameters
publisherThe publisher. It's a smart pointer because references to a publisher may never change after advertising it to ROS.
loop_ratePublishing rate in hertz. Default is 10 Hz.
Examples:
examples/ros/motor_and_io_bridge.cpp, and examples/ros/ros.cpp.

Definition at line 41 of file bridge.cpp.

void kaco::Bridge::add_subscriber ( std::shared_ptr< Subscriber subscriber)

Adds a Subscriber, which can advertise itself and receive messages on its own.

Parameters
subscriberThe subscriber. It's a smart pointer because references to a subscriber may never change after advertising it to ROS.
Examples:
examples/ros/motor_and_io_bridge.cpp, and examples/ros/ros.cpp.

Definition at line 55 of file bridge.cpp.


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