Public Member Functions | Protected Attributes | Private Attributes | List of all members
ROSaicNodeBase Class Reference

This class is the base class for abstraction. More...

#include <typedefs.hpp>

Inheritance diagram for ROSaicNodeBase:
Inheritance graph
[legend]

Public Member Functions

Timestamp getTime ()
 Gets current timestamp. More...
 
bool getUint32Param (const std::string &name, uint32_t &val, uint32_t defaultVal)
 Gets an integer or unsigned integer value from the parameter server. More...
 
void log (LogLevel logLevel, const std::string &s)
 Log function to provide abstraction of ROS loggers. More...
 
template<typename T >
bool param (const std::string &name, T &val, const T &defaultVal)
 Gets parameter of type T from the parameter server. More...
 
template<typename M >
void publishMessage (const std::string &topic, const M &msg)
 Publishing function. More...
 
void publishTf (const LocalizationUtmMsg &loc)
 Publishing function for tf. More...
 
 ROSaicNodeBase ()
 
virtual ~ROSaicNodeBase ()
 

Protected Attributes

std::shared_ptr< ros::NodeHandlepNh_
 Node handle pointer. More...
 

Private Attributes

uint32_t queueSize_ = 1
 Publisher queue size. More...
 
tf2_ros::TransformBroadcaster tf2Publisher_
 Transform publisher. More...
 
std::unordered_map< std::string, ros::PublishertopicMap_
 Map of topics and publishers. More...
 

Detailed Description

This class is the base class for abstraction.

Definition at line 160 of file typedefs.hpp.

Constructor & Destructor Documentation

◆ ROSaicNodeBase()

ROSaicNodeBase::ROSaicNodeBase ( )
inline

Definition at line 163 of file typedefs.hpp.

◆ ~ROSaicNodeBase()

virtual ROSaicNodeBase::~ROSaicNodeBase ( )
inlinevirtual

Definition at line 167 of file typedefs.hpp.

Member Function Documentation

◆ getTime()

Timestamp ROSaicNodeBase::getTime ( )
inline

Gets current timestamp.

Returns
Timestamp

Definition at line 236 of file typedefs.hpp.

◆ getUint32Param()

bool ROSaicNodeBase::getUint32Param ( const std::string &  name,
uint32_t &  val,
uint32_t  defaultVal 
)
inline

Gets an integer or unsigned integer value from the parameter server.

Parameters
[in]nameThe key to be used in the parameter server's dictionary
[out]valStorage for the retrieved value, of type U, which can be either unsigned int or int
[in]defaultValValue to use if the server doesn't contain this parameter

Definition at line 177 of file typedefs.hpp.

◆ log()

void ROSaicNodeBase::log ( LogLevel  logLevel,
const std::string &  s 
)
inline

Log function to provide abstraction of ROS loggers.

Parameters
[in]logLevelLog level
[in]sString to log

Definition at line 208 of file typedefs.hpp.

◆ param()

template<typename T >
bool ROSaicNodeBase::param ( const std::string &  name,
T &  val,
const T &  defaultVal 
)
inline

Gets parameter of type T from the parameter server.

Parameters
[in]nameThe key to be used in the parameter server's dictionary
[out]valStorage for the retrieved value, of type T
[in]defaultValValue to use if the server doesn't contain this parameter
Returns
True if it could be retrieved, false if not

Definition at line 198 of file typedefs.hpp.

◆ publishMessage()

template<typename M >
void ROSaicNodeBase::publishMessage ( const std::string &  topic,
const M &  msg 
)
inline

Publishing function.

Parameters
[in]topicString of topic
[in]msgROS message to be published

Definition at line 247 of file typedefs.hpp.

◆ publishTf()

void ROSaicNodeBase::publishTf ( const LocalizationUtmMsg loc)
inline

Publishing function for tf.

Parameters
[in]msgROS localization message to be converted to tf

Definition at line 266 of file typedefs.hpp.

Member Data Documentation

◆ pNh_

std::shared_ptr<ros::NodeHandle> ROSaicNodeBase::pNh_
protected

Node handle pointer.

Definition at line 287 of file typedefs.hpp.

◆ queueSize_

uint32_t ROSaicNodeBase::queueSize_ = 1
private

Publisher queue size.

Definition at line 293 of file typedefs.hpp.

◆ tf2Publisher_

tf2_ros::TransformBroadcaster ROSaicNodeBase::tf2Publisher_
private

Transform publisher.

Definition at line 295 of file typedefs.hpp.

◆ topicMap_

std::unordered_map<std::string, ros::Publisher> ROSaicNodeBase::topicMap_
private

Map of topics and publishers.

Definition at line 291 of file typedefs.hpp.


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


septentrio_gnss_driver
Author(s): Tibor Dome
autogenerated on Thu Jun 23 2022 02:11:38