Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
bebop_driver::util::ASyncSub< T > Class Template Reference

Public Member Functions

 ASyncSub (ros::NodeHandle &nh, const std::string &topic, const std::size_t queue_size, callback_t user_callback=0)
 
void Deactivate ()
 
void DeactivateIfOlderThan (const double seconds)
 
const ros::Duration GetFreshness () const
 
const ros::Time GetLastUpdated () const
 
const boost::shared_ptr< T const > & GetMsgConstPtr () const
 
GetMsgCopy () const
 
bool IsActive () const
 
const boost::shared_ptr< T const > & operator() () const
 

Private Types

typedef boost::function< void(const boost::shared_ptr< T const > &data)> callback_t
 

Private Member Functions

void cb (const boost::shared_ptr< T const > &msg_cptr)
 

Private Attributes

bool active_
 
ros::Time last_updated_
 
boost::shared_ptr< T const > msg_cptr_
 
boost::mutex mutex_
 
ros::NodeHandle nh
 
std::size_t queue_size_
 
ros::Subscriber sub_
 
std::string topic_
 
callback_t user_callback_
 

Detailed Description

template<typename T>
class bebop_driver::util::ASyncSub< T >

Definition at line 73 of file bebop_itl_test.cpp.

Member Typedef Documentation

template<typename T >
typedef boost::function<void (const boost::shared_ptr<T const>& data)> bebop_driver::util::ASyncSub< T >::callback_t
private

Definition at line 76 of file bebop_itl_test.cpp.

Constructor & Destructor Documentation

template<typename T >
bebop_driver::util::ASyncSub< T >::ASyncSub ( ros::NodeHandle nh,
const std::string &  topic,
const std::size_t  queue_size,
callback_t  user_callback = 0 
)
inline

Definition at line 98 of file bebop_itl_test.cpp.

Member Function Documentation

template<typename T >
void bebop_driver::util::ASyncSub< T >::cb ( const boost::shared_ptr< T const > &  msg_cptr)
inlineprivate

Definition at line 88 of file bebop_itl_test.cpp.

template<typename T >
void bebop_driver::util::ASyncSub< T >::Deactivate ( )
inline

Definition at line 127 of file bebop_itl_test.cpp.

template<typename T >
void bebop_driver::util::ASyncSub< T >::DeactivateIfOlderThan ( const double  seconds)
inline

Definition at line 133 of file bebop_itl_test.cpp.

template<typename T >
const ros::Duration bebop_driver::util::ASyncSub< T >::GetFreshness ( ) const
inline

Definition at line 155 of file bebop_itl_test.cpp.

template<typename T >
const ros::Time bebop_driver::util::ASyncSub< T >::GetLastUpdated ( ) const
inline

Definition at line 149 of file bebop_itl_test.cpp.

template<typename T >
const boost::shared_ptr<T const>& bebop_driver::util::ASyncSub< T >::GetMsgConstPtr ( ) const
inline

Definition at line 113 of file bebop_itl_test.cpp.

template<typename T >
T bebop_driver::util::ASyncSub< T >::GetMsgCopy ( ) const
inline

Definition at line 107 of file bebop_itl_test.cpp.

template<typename T >
bool bebop_driver::util::ASyncSub< T >::IsActive ( ) const
inline

Definition at line 143 of file bebop_itl_test.cpp.

template<typename T >
const boost::shared_ptr<T const>& bebop_driver::util::ASyncSub< T >::operator() ( ) const
inline

Definition at line 121 of file bebop_itl_test.cpp.

Member Data Documentation

template<typename T >
bool bebop_driver::util::ASyncSub< T >::active_
private

Definition at line 79 of file bebop_itl_test.cpp.

template<typename T >
ros::Time bebop_driver::util::ASyncSub< T >::last_updated_
private

Definition at line 80 of file bebop_itl_test.cpp.

template<typename T >
boost::shared_ptr<T const> bebop_driver::util::ASyncSub< T >::msg_cptr_
private

Definition at line 85 of file bebop_itl_test.cpp.

template<typename T >
boost::mutex bebop_driver::util::ASyncSub< T >::mutex_
mutableprivate

Definition at line 86 of file bebop_itl_test.cpp.

template<typename T >
ros::NodeHandle bebop_driver::util::ASyncSub< T >::nh
private

Definition at line 78 of file bebop_itl_test.cpp.

template<typename T >
std::size_t bebop_driver::util::ASyncSub< T >::queue_size_
private

Definition at line 82 of file bebop_itl_test.cpp.

template<typename T >
ros::Subscriber bebop_driver::util::ASyncSub< T >::sub_
private

Definition at line 84 of file bebop_itl_test.cpp.

template<typename T >
std::string bebop_driver::util::ASyncSub< T >::topic_
private

Definition at line 81 of file bebop_itl_test.cpp.

template<typename T >
callback_t bebop_driver::util::ASyncSub< T >::user_callback_
private

Definition at line 83 of file bebop_itl_test.cpp.


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


bebop_driver
Author(s): Mani Monajjemi
autogenerated on Mon Jun 10 2019 12:58:57