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

Represents a collection of standard services that can be used to bridge a ROS based member to the swarm. More...

#include <Node.h>

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

Public Member Functions

void BridgeParameter (const std::string &name, const std::string &parameter, bool isWritable)
 Bridge a parameter between the ROS parameter server and the swarm. More...
 
void ForwardEvent (const std::string &source, const std::string &message)
 Forward events from a topic to the swarm. More...
 
void ForwardTelemetry (const std::string &source, const std::string &message, const std::string &name, bool includeInStatus)
 Forward telemetry data to the swarm. More...
 
ros::NodeHandleGetNodeHandle ()
 Get ROS node handle. More...
 
 Node (swarmio::Endpoint *endpoint)
 Construct a new Node object. More...
 
virtual void NodeDidJoin (const swarmio::Node *node) noexceptoverride
 Called when a new Node has joined the group. More...
 
virtual void NodeWasDiscovered (const swarmio::Node *node) noexceptoverride
 Called when a new Node has been discovered. More...
 
virtual void NodeWillLeave (const swarmio::Node *node) noexceptoverride
 Called when a Node signals that it will leave. More...
 
void PublishEvent (const std::string &suffix, const std::string &message, const std::string &name)
 Forward events from the swarm to a ROS topic. More...
 
void PublishParameter (const std::string &suffix, const std::string &message, const std::string &name, const std::string &parameter, bool isWritable)
 Bridge and publish a parameter between ROS and the swarm. More...
 

Private Member Functions

void PublishUpdateForNode (const swarmio::Node *node)
 Publish a generic info update for a node. More...
 
- Private Member Functions inherited from swarmio::profiles::MemberProfile
swarmio::services::event::ServiceGetEventService ()
 Get a reference for the Event service. More...
 
swarmio::services::keyvalue::ServiceGetKeyValueService ()
 Get a reference for the Key-Value service. More...
 
 MemberProfile (Endpoint *endpoint)
 Construct a new MemberProfile. More...
 
virtual ~MemberProfile ()
 Destroy the MemberProfile object. More...
 
- Private Member Functions inherited from swarmio::profiles::Profile
swarmio::services::discovery::ServiceGetDiscoveryService ()
 Get a reference for the Discovery service. More...
 
swarmio::services::ping::ServiceGetPingService ()
 Get a reference for the Ping service. More...
 
swarmio::services::telemetry::ServiceGetTelemetryService ()
 Get a reference for the Telemetry service. More...
 
virtual ~Profile ()
 Destroy the Profile object. More...
 
 Profile (Endpoint *endpoint, bool performActiveDiscovery)
 Construct a new Profile. More...
 
- Private Member Functions inherited from swarmio::Mailbox
virtual void Disconnect ()
 Disconnect this Mailbox from the Endpoint. More...
 
EndpointGetEndpoint ()
 Get the associated Endpoint. More...
 
 Mailbox (const Mailbox &)=delete
 Remove copy constructor. More...
 
virtual void MailboxWasConnected () noexcept
 Called when the mailbox is attached to an already running endpoint or if the attached endpoint has just started. More...
 
virtual void MailboxWillBeDisconnected () noexcept
 Called right before the mailbox is disconnected from its endpoint or if the attached endpoint is about to stop. More...
 
Mailboxoperator= (const Mailbox &)=delete
 Remove assignment operator. More...
 
virtual bool ReceiveMessage (const Node *sender, const data::Message *message)
 Delivery point of all messages. More...
 
virtual ~Mailbox ()
 Destroy the Mailbox object. More...
 
void FinishConstruction ()
 Called when the last constructor has finished its job. More...
 
void FinishMovingTo (Mailbox *other)
 Called when message handling should be passed onto the new instance. More...
 
 Mailbox ()
 Construct a disconnected Mailbox. More...
 
 Mailbox (Endpoint *endpoint)
 Construct a new Mailbox object. More...
 
 Mailbox (Mailbox &&other)
 Move a Mailbox object. More...
 

Private Attributes

ros::NodeHandle _nodeHandle
 Node handle. More...
 
ros::Publisher _nodesPublisher
 The publisher for the nodes topic. More...
 
std::list< std::unique_ptr< Pylon > > _pylons
 Active bridging services. More...
 
ros::Publisher _uuidPublisher
 The publisher for the uuid topic. More...
 
- Private Attributes inherited from swarmio::profiles::MemberProfile
swarmio::services::event::Service _eventService
 Event service. More...
 
swarmio::services::keyvalue::Service _keyvalueService
 Key-Value service. More...
 
- Private Attributes inherited from swarmio::profiles::Profile
swarmio::services::discovery::Service _discoveryService
 Discovery service. More...
 
swarmio::services::ping::Service _pingService
 Ping service. More...
 
swarmio::services::telemetry::Service _telemetryService
 Telemetry service. More...
 

Detailed Description

Represents a collection of standard services that can be used to bridge a ROS based member to the swarm.

Definition at line 18 of file swarmros/include/swarmros/bridge/Node.h.

Constructor & Destructor Documentation

Node::Node ( swarmio::Endpoint endpoint)

Construct a new Node object.

Parameters
endpointEndpoint to use

Definition at line 13 of file bridge/Node.cpp.

Member Function Documentation

void Node::BridgeParameter ( const std::string &  name,
const std::string &  parameter,
bool  isWritable 
)

Bridge a parameter between the ROS parameter server and the swarm.

Parameters
nameGlobal parameter name
parameterROS parameter name
isWritableTrue if set requests are accepted

Definition at line 76 of file bridge/Node.cpp.

void Node::ForwardEvent ( const std::string &  source,
const std::string &  message 
)

Forward events from a topic to the swarm.

Parameters
sourceSource ROS topic
messageROS message type

Definition at line 61 of file bridge/Node.cpp.

void Node::ForwardTelemetry ( const std::string &  source,
const std::string &  message,
const std::string &  name,
bool  includeInStatus 
)

Forward telemetry data to the swarm.

Parameters
sourceSource ROS topic
messageROS message type
nameTelemetry name
includeInStatusInclude in status broadcast

Definition at line 56 of file bridge/Node.cpp.

ros::NodeHandle& swarmros::bridge::Node::GetNodeHandle ( )
inline

Get ROS node handle.

Returns
ros::NodeHandle& Node handle

Definition at line 68 of file swarmros/include/swarmros/bridge/Node.h.

void Node::NodeDidJoin ( const swarmio::Node node)
overridevirtualnoexcept

Called when a new Node has joined the group.

Parameters
nodeThe node that has been discovered

Reimplemented from swarmio::Mailbox.

Definition at line 46 of file bridge/Node.cpp.

void Node::NodeWasDiscovered ( const swarmio::Node node)
overridevirtualnoexcept

Called when a new Node has been discovered.

Parameters
nodeThe node that has been discovered

Reimplemented from swarmio::Mailbox.

Definition at line 41 of file bridge/Node.cpp.

void Node::NodeWillLeave ( const swarmio::Node node)
overridevirtualnoexcept

Called when a Node signals that it will leave.

Parameters
nodeThe node that has left

Reimplemented from swarmio::Mailbox.

Definition at line 51 of file bridge/Node.cpp.

void Node::PublishEvent ( const std::string &  suffix,
const std::string &  message,
const std::string &  name 
)

Forward events from the swarm to a ROS topic.

Parameters
suffixLocal topic suffix
messageROS message type
nameGlobal event name

Definition at line 66 of file bridge/Node.cpp.

void Node::PublishParameter ( const std::string &  suffix,
const std::string &  message,
const std::string &  name,
const std::string &  parameter,
bool  isWritable 
)

Bridge and publish a parameter between ROS and the swarm.

Parameters
suffixLocal topic suffix
messageROS message type
nameGlobal parameter name
parameterROS parameter name
isWritableTrue if set requests are accepted

Definition at line 71 of file bridge/Node.cpp.

void Node::PublishUpdateForNode ( const swarmio::Node node)
private

Publish a generic info update for a node.

Parameters
nodeNode

Definition at line 31 of file bridge/Node.cpp.

Member Data Documentation

ros::NodeHandle swarmros::bridge::Node::_nodeHandle
private

Node handle.

Definition at line 32 of file swarmros/include/swarmros/bridge/Node.h.

ros::Publisher swarmros::bridge::Node::_nodesPublisher
private

The publisher for the nodes topic.

Definition at line 39 of file swarmros/include/swarmros/bridge/Node.h.

std::list<std::unique_ptr<Pylon> > swarmros::bridge::Node::_pylons
private

Active bridging services.

Definition at line 26 of file swarmros/include/swarmros/bridge/Node.h.

ros::Publisher swarmros::bridge::Node::_uuidPublisher
private

The publisher for the uuid topic.

Definition at line 45 of file swarmros/include/swarmros/bridge/Node.h.


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


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