Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
bota_node::Nodewrap< NodeImpl > Class Template Reference

#include <Nodewrap.hpp>

Public Member Functions

void cleanup ()
 
bool execute ()
 
NodeImpl * getImplPtr ()
 
bool init ()
 
 Nodewrap ()=delete
 
 Nodewrap (int argc, char **argv, const std::string &nodeName, int numSpinners=-1, const bool installSignalHandler=true)
 
void run ()
 
void signalHandler (const int signum)
 INTERNAL FUNCTIONS. More...
 
void stop ()
 
virtual ~Nodewrap ()=default
 

Static Public Member Functions

static void checkSteadyClock ()
 

Protected Attributes

std::condition_variable cvRunning_
 
std::unique_ptr< NodeImpl > impl_
 
std::mutex mutexRunning_
 
std::shared_ptr< ros::NodeHandlenh_
 
std::atomic< bool > running_
 
bool signalHandlerInstalled_
 
std::unique_ptr< ros::AsyncSpinnerspinner_
 

Detailed Description

template<class NodeImpl>
class bota_node::Nodewrap< NodeImpl >

Definition at line 22 of file Nodewrap.hpp.

Constructor & Destructor Documentation

template<class NodeImpl >
bota_node::Nodewrap< NodeImpl >::Nodewrap ( )
delete
template<class NodeImpl >
bota_node::Nodewrap< NodeImpl >::Nodewrap ( int  argc,
char **  argv,
const std::string &  nodeName,
int  numSpinners = -1,
const bool  installSignalHandler = true 
)
inline
Parameters
argc
argv
nodeNamename of the node
numSpinnersnumber of async ros spinners. Set to -1 to get value from ros params. A value of 0 means to use the number of processor cores.
installSignalHandlerset to False to use the ros internal signal handler instead

Definition at line 35 of file Nodewrap.hpp.

template<class NodeImpl >
virtual bota_node::Nodewrap< NodeImpl >::~Nodewrap ( )
virtualdefault

Member Function Documentation

template<class NodeImpl >
static void bota_node::Nodewrap< NodeImpl >::checkSteadyClock ( )
inlinestatic

Definition at line 160 of file Nodewrap.hpp.

template<class NodeImpl >
void bota_node::Nodewrap< NodeImpl >::cleanup ( )
inline

Stops the workers, ros spinners and calls cleanup of the underlying instance of bota_node::Node

Definition at line 124 of file Nodewrap.hpp.

template<class NodeImpl >
bool bota_node::Nodewrap< NodeImpl >::execute ( )
inline

blocking call, executes init, run (if init() was successful) and cleanup (independent of the success of init()).

Definition at line 79 of file Nodewrap.hpp.

template<class NodeImpl >
NodeImpl* bota_node::Nodewrap< NodeImpl >::getImplPtr ( )
inline

Definition at line 172 of file Nodewrap.hpp.

template<class NodeImpl >
bool bota_node::Nodewrap< NodeImpl >::init ( )
inline

Initializes the node

Definition at line 93 of file Nodewrap.hpp.

template<class NodeImpl >
void bota_node::Nodewrap< NodeImpl >::run ( )
inline

blocking call, returns when the program should shut down

Definition at line 114 of file Nodewrap.hpp.

template<class NodeImpl >
void bota_node::Nodewrap< NodeImpl >::signalHandler ( const int  signum)
inline

INTERNAL FUNCTIONS.

Definition at line 148 of file Nodewrap.hpp.

template<class NodeImpl >
void bota_node::Nodewrap< NodeImpl >::stop ( )
inline

Stops execution of the run(..) function.

Definition at line 140 of file Nodewrap.hpp.

Member Data Documentation

template<class NodeImpl >
std::condition_variable bota_node::Nodewrap< NodeImpl >::cvRunning_
protected

Definition at line 185 of file Nodewrap.hpp.

template<class NodeImpl >
std::unique_ptr<NodeImpl> bota_node::Nodewrap< NodeImpl >::impl_
protected

Definition at line 180 of file Nodewrap.hpp.

template<class NodeImpl >
std::mutex bota_node::Nodewrap< NodeImpl >::mutexRunning_
protected

Definition at line 186 of file Nodewrap.hpp.

template<class NodeImpl >
std::shared_ptr<ros::NodeHandle> bota_node::Nodewrap< NodeImpl >::nh_
protected

Definition at line 178 of file Nodewrap.hpp.

template<class NodeImpl >
std::atomic<bool> bota_node::Nodewrap< NodeImpl >::running_
protected

Definition at line 184 of file Nodewrap.hpp.

template<class NodeImpl >
bool bota_node::Nodewrap< NodeImpl >::signalHandlerInstalled_
protected

Definition at line 182 of file Nodewrap.hpp.

template<class NodeImpl >
std::unique_ptr<ros::AsyncSpinner> bota_node::Nodewrap< NodeImpl >::spinner_
protected

Definition at line 179 of file Nodewrap.hpp.


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


bota_node
Author(s):
autogenerated on Wed Mar 3 2021 03:09:11