SubscribeOptions Class Reference

Options for a subscription. More...

#include <transport/transport.hh>

Public Member Functions

 SubscribeOptions ()
 Constructor. More...
 
bool GetLatching () const
 Are we latching? More...
 
std::string GetMsgType () const
 Get the type of the topic we're subscribed to. More...
 
NodePtr GetNode () const
 Get the node we're subscribed to. More...
 
std::string GetTopic () const
 Get the topic we're subscribed to. More...
 
template<class M >
void Init (const std::string &_topic, NodePtr _node, bool _latching)
 Initialize the options. More...
 
void Init (const std::string &_topic, NodePtr _node, bool _latching)
 Initialize the options. More...
 

Detailed Description

Options for a subscription.

Constructor & Destructor Documentation

◆ SubscribeOptions()

SubscribeOptions ( )
inline

Constructor.

Member Function Documentation

◆ GetLatching()

bool GetLatching ( ) const
inline

Are we latching?

Returns
true if we're latching the latest message, false otherwise

◆ GetMsgType()

std::string GetMsgType ( ) const
inline

Get the type of the topic we're subscribed to.

Returns
The type of the topic we're subscribed to

◆ GetNode()

NodePtr GetNode ( ) const
inline

Get the node we're subscribed to.

Returns
The associated node

◆ GetTopic()

std::string GetTopic ( ) const
inline

Get the topic we're subscribed to.

Returns
The topic we're subscribed to

◆ Init() [1/2]

void Init ( const std::string &  _topic,
NodePtr  _node,
bool  _latching 
)
inline

Initialize the options.

Parameters
[in]_topicTopic we're subscribing to
[in,out]_nodeThe associated node
[in]_latchingIf true, latch the latest message; if false, don't latch

References gzthrow, and NULL.

Referenced by Node::Subscribe().

◆ Init() [2/2]

void Init ( const std::string &  _topic,
NodePtr  _node,
bool  _latching 
)
inline

Initialize the options.

This version of init is only used when creating subscribers of raw data.

Parameters
[in]_topicTopic we're subscribing to
[in,out]_nodeThe associated node
[in]_latchingIf true, latch the latest message; if false, don't latch

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