MRPT  2.0.0
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
mrpt::comms::Subscriber Class Reference

Detailed Description

Nodelet-like Pub/Sub communications (in #include <mrpt/comms/nodelets.h>)

Definition at line 29 of file nodelets.h.

#include <mrpt/comms/nodelets.h>

Public Types

using Ptr = std::shared_ptr< Subscriber >
 

Public Member Functions

 ~Subscriber ()
 
void pub (const std::any &a)
 

Static Public Member Functions

static Ptr create (std::function< void(const std::any &)> &&func, std::function< void()> &&cleanup)
 

Private Member Functions

 Subscriber (std::function< void(const std::any &)> &&func, std::function< void()> &&cleanup)
 

Private Attributes

std::function< void(const std::any &)> m_func
 
std::function< void()> m_cleanup
 

Member Typedef Documentation

◆ Ptr

Definition at line 37 of file nodelets.h.

Constructor & Destructor Documentation

◆ Subscriber()

Subscriber::Subscriber ( std::function< void(const std::any &)> &&  func,
std::function< void()> &&  cleanup 
)
private

Definition at line 17 of file nodelets.cpp.

Referenced by create().

Here is the caller graph for this function:

◆ ~Subscriber()

Subscriber::~Subscriber ( )

Definition at line 24 of file nodelets.cpp.

References m_cleanup.

Member Function Documentation

◆ create()

Subscriber::Ptr Subscriber::create ( std::function< void(const std::any &)> &&  func,
std::function< void()> &&  cleanup 
)
static

Definition at line 25 of file nodelets.cpp.

References Subscriber().

Referenced by mrpt::comms::Topic::createSubscriber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pub()

void Subscriber::pub ( const std::any &  a)

Definition at line 32 of file nodelets.cpp.

References m_func.

Member Data Documentation

◆ m_cleanup

std::function<void()> mrpt::comms::Subscriber::m_cleanup
private

Definition at line 48 of file nodelets.h.

Referenced by ~Subscriber().

◆ m_func

std::function<void(const std::any&)> mrpt::comms::Subscriber::m_func
private

Definition at line 47 of file nodelets.h.

Referenced by pub().




Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020