kitt_platform
 All Classes Files Functions Variables Pages
Public Member Functions | Private Attributes | List of all members
RosParamHelper Class Reference

Class to help simplify access to ros parameters. More...

#include <RosParamHelper.h>

Public Member Functions

 RosParamHelper (ros::NodeHandle nh)
 
bool getParam (const char *name, int *param)
 Retrieves int parameter from ros and sets it into the param. More...
 
bool getParam (const char *name, int *param, int defaultValue)
 Retrieves int parameter from ros and sets it into the param. If the parameter is not found, then the defaultValue is set into the param. More...
 
int getParam (const char *name, int defaultValue)
 Retrieves int parameter from ros and returns it. If the parameter is not found, then the defaultValue is returned. More...
 
bool getParam (const char *name, float *param)
 Retrieves float parameter from ros and sets it into the param. More...
 
bool getParam (const char *name, float *param, float defaultValue)
 Retrieves float parameter from ros and sets it into the param. If the parameter is not found, then the default is set into the param. More...
 
float getParam (const char *name, float defaultValue)
 Retrieves floag parameter from ros and returns it. If the parameter is not found, then the defaultValue is returned. More...
 
bool getParam (const char *name, char **param)
 Retrieves char* parameter from ros and sets it into the param. More...
 
bool getParam (const char *name, char **param, char *defaultValue)
 Retrieves char* parameter from ros and sets it into the param. If the parameter is not found, then the default is set into the param. More...
 

Private Attributes

ros::NodeHandle nh_
 

Detailed Description

Class to help simplify access to ros parameters.

Constructor & Destructor Documentation

RosParamHelper::RosParamHelper ( ros::NodeHandle  nh)

Member Function Documentation

bool RosParamHelper::getParam ( const char *  name,
int *  param 
)

Retrieves int parameter from ros and sets it into the param.

Parameters
nameThe name of the parameter.
[out]paramPointer to where to store the parameter value if found in ros.
Returns
True if parameter was found in ros.
bool RosParamHelper::getParam ( const char *  name,
int *  param,
int  defaultValue 
)

Retrieves int parameter from ros and sets it into the param. If the parameter is not found, then the defaultValue is set into the param.

Parameters
nameThe name of the parameter.
defaultValueThe value to return if parameter not found in ros.
[out]paramPointer to where to store the value.
Returns
True if parameter was found in ros.
int RosParamHelper::getParam ( const char *  name,
int  defaultValue 
)

Retrieves int parameter from ros and returns it. If the parameter is not found, then the defaultValue is returned.

Parameters
nameThe name of the parameter.
defaultValueThe value to return if parameter not found in ros.
Returns
Either the value found in ros or the default value if parameter not found.
bool RosParamHelper::getParam ( const char *  name,
float *  param 
)

Retrieves float parameter from ros and sets it into the param.

Parameters
nameThe name of the parameter.
[out]paramPointer to where to store the parameter value if found in ros.
Returns
True if parameter was found in ros.
bool RosParamHelper::getParam ( const char *  name,
float *  param,
float  defaultValue 
)

Retrieves float parameter from ros and sets it into the param. If the parameter is not found, then the default is set into the param.

Parameters
nameThe name of the parameter.
defaultValueThe value to return if parameter not found in ros.
[out]paramPointer to where to store the value.
Returns
True if parameter was found in ros.
float RosParamHelper::getParam ( const char *  name,
float  defaultValue 
)

Retrieves floag parameter from ros and returns it. If the parameter is not found, then the defaultValue is returned.

Parameters
nameThe name of the parameter.
defaultValueThe value to return if parameter not found in ros.
Returns
Either the value found in ros or the default value if parameter not found.
bool RosParamHelper::getParam ( const char *  name,
char **  param 
)

Retrieves char* parameter from ros and sets it into the param.

Parameters
nameThe name of the parameter.
[out]paramPointer to where to store the parameter value if found in ros.
Returns
True if parameter was found in ros.
bool RosParamHelper::getParam ( const char *  name,
char **  param,
char *  defaultValue 
)

Retrieves char* parameter from ros and sets it into the param. If the parameter is not found, then the default is set into the param.

Parameters
nameThe name of the parameter.
defaultValueThe value to return if parameter not found in ros.
[out]paramPointer to where to store the value.
Returns
True if parameter was found in ros.

Member Data Documentation

ros::NodeHandle RosParamHelper::nh_
private

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