Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
rosmon::launch::LaunchConfig Class Reference

#include <launch_config.h>

Classes

struct  YAMLResult
 

Public Types

typedef std::shared_ptr< const LaunchConfigConstPtr
 
enum  OutputAttr { OutputAttr::Obey, OutputAttr::Ignore }
 
typedef std::shared_ptr< LaunchConfigPtr
 

Public Member Functions

std::string anonName (const std::string &base)
 
const std::map< std::string, std::string > & arguments () const
 
bool disableUI () const
 
void evaluateParameters ()
 
std::string generateAnonHash ()
 
 LaunchConfig ()
 
const std::vector< Node::Ptr > & nodes () const
 
const std::map< std::string, XmlRpc::XmlRpcValue > & parameters () const
 
void parse (const std::string &filename, bool onlyArguments=false)
 
void parseString (const std::string &input, bool onlyArguments=false)
 
std::string rosmonNodeName () const
 
void setArgument (const std::string &name, const std::string &value)
 
void setDefaultCPULimit (double CPULimit)
 
void setDefaultMemoryLimit (uint64_t memoryLimit)
 
void setDefaultStopTimeout (double timeout)
 
void setOutputAttrMode (OutputAttr mode)
 
void setWarningOutput (std::ostream *warningStream)
 
std::ostream & warningOutput ()
 
std::string windowTitle () const
 

Private Types

enum  ParamContext { PARAM_GENERAL, PARAM_IN_NODE }
 
using ParameterFuture = std::future< XmlRpc::XmlRpcValue >
 
using ParameterList = std::map< std::string, XmlRpc::XmlRpcValue >
 

Private Member Functions

void loadYAMLParams (const ParseContext &ctx, const YAML::Node &n, const std::string &prefix)
 
XmlRpc::XmlRpcValue paramToXmlRpc (const ParseContext &ctx, const std::string &value, const std::string &type="")
 
void parse (TiXmlElement *element, ParseContext *ctx, bool onlyArguments=false)
 
void parseArgument (TiXmlElement *element, ParseContext &ctx)
 
void parseEnv (TiXmlElement *element, ParseContext &ctx)
 
void parseInclude (TiXmlElement *element, ParseContext ctx)
 
void parseNode (TiXmlElement *element, ParseContext &ctx)
 
void parseParam (TiXmlElement *element, ParseContext &ctx, ParamContext paramContext=PARAM_GENERAL)
 
void parseRemap (TiXmlElement *element, ParseContext &ctx)
 
void parseROSParam (TiXmlElement *element, ParseContext &ctx)
 
void parseTopLevelAttributes (TiXmlElement *element)
 

Private Attributes

std::mt19937_64 m_anonGen
 
bool m_disableUI = false
 
std::vector< Node::Ptrm_nodes
 
OutputAttr m_outputAttrMode {OutputAttr::Ignore}
 
std::map< std::string, ParameterFuturem_paramJobs
 
ParameterList m_params
 
ParseContext m_rootContext
 
std::string m_rosmonNodeName
 
std::ostream * m_warningOutput = &std::cerr
 
std::string m_windowTitle
 
std::vector< std::future< YAMLResult > > m_yamlParamJobs
 

Detailed Description

Definition at line 175 of file launch_config.h.

Member Typedef Documentation

typedef std::shared_ptr<const LaunchConfig> rosmon::launch::LaunchConfig::ConstPtr

Definition at line 179 of file launch_config.h.

Definition at line 254 of file launch_config.h.

using rosmon::launch::LaunchConfig::ParameterList = std::map<std::string, XmlRpc::XmlRpcValue>
private

Definition at line 253 of file launch_config.h.

Definition at line 178 of file launch_config.h.

Member Enumeration Documentation

Enumerator
Obey 
Ignore 

Definition at line 183 of file launch_config.h.

Enumerator
PARAM_GENERAL 

tag inside <node>

PARAM_IN_NODE 

tag everywhere else

Definition at line 228 of file launch_config.h.

Constructor & Destructor Documentation

rosmon::launch::LaunchConfig::LaunchConfig ( )

Definition at line 191 of file launch_config.cpp.

Member Function Documentation

std::string rosmon::launch::LaunchConfig::anonName ( const std::string &  base)
const std::map<std::string, std::string>& rosmon::launch::LaunchConfig::arguments ( ) const
inline

Definition at line 212 of file launch_config.h.

bool rosmon::launch::LaunchConfig::disableUI ( ) const
inline

Definition at line 225 of file launch_config.h.

void rosmon::launch::LaunchConfig::evaluateParameters ( )

Definition at line 1129 of file launch_config.cpp.

std::string rosmon::launch::LaunchConfig::generateAnonHash ( )

Definition at line 1113 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::loadYAMLParams ( const ParseContext ctx,
const YAML::Node &  n,
const std::string &  prefix 
)
private

Definition at line 938 of file launch_config.cpp.

const std::vector<Node::Ptr>& rosmon::launch::LaunchConfig::nodes ( ) const
inline

Definition at line 209 of file launch_config.h.

const std::map<std::string, XmlRpc::XmlRpcValue>& rosmon::launch::LaunchConfig::parameters ( ) const
inline

Definition at line 206 of file launch_config.h.

XmlRpc::XmlRpcValue rosmon::launch::LaunchConfig::paramToXmlRpc ( const ParseContext ctx,
const std::string &  value,
const std::string &  type = "" 
)
private

Definition at line 817 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parse ( const std::string &  filename,
bool  onlyArguments = false 
)

Definition at line 224 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parse ( TiXmlElement *  element,
ParseContext ctx,
bool  onlyArguments = false 
)
private

Definition at line 287 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseArgument ( TiXmlElement *  element,
ParseContext ctx 
)
private

Definition at line 1066 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseEnv ( TiXmlElement *  element,
ParseContext ctx 
)
private

Definition at line 1091 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseInclude ( TiXmlElement *  element,
ParseContext  ctx 
)
private

Definition at line 990 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseNode ( TiXmlElement *  element,
ParseContext ctx 
)
private

Definition at line 348 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseParam ( TiXmlElement *  element,
ParseContext ctx,
ParamContext  paramContext = PARAM_GENERAL 
)
private

Definition at line 524 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseRemap ( TiXmlElement *  element,
ParseContext ctx 
)
private

Definition at line 1102 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseROSParam ( TiXmlElement *  element,
ParseContext ctx 
)
private

Definition at line 857 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseString ( const std::string &  input,
bool  onlyArguments = false 
)

Definition at line 247 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::parseTopLevelAttributes ( TiXmlElement *  element)
private

Definition at line 272 of file launch_config.cpp.

std::string rosmon::launch::LaunchConfig::rosmonNodeName ( ) const
inline

Definition at line 217 of file launch_config.h.

void rosmon::launch::LaunchConfig::setArgument ( const std::string &  name,
const std::string &  value 
)

Definition at line 204 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::setDefaultCPULimit ( double  CPULimit)

Definition at line 214 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::setDefaultMemoryLimit ( uint64_t  memoryLimit)

Definition at line 219 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::setDefaultStopTimeout ( double  timeout)

Definition at line 209 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::setOutputAttrMode ( OutputAttr  mode)

Definition at line 1202 of file launch_config.cpp.

void rosmon::launch::LaunchConfig::setWarningOutput ( std::ostream *  warningStream)

Definition at line 1207 of file launch_config.cpp.

std::ostream& rosmon::launch::LaunchConfig::warningOutput ( )
inline

Definition at line 190 of file launch_config.h.

std::string rosmon::launch::LaunchConfig::windowTitle ( ) const
inline

Definition at line 220 of file launch_config.h.

Member Data Documentation

std::mt19937_64 rosmon::launch::LaunchConfig::m_anonGen
private

Definition at line 266 of file launch_config.h.

bool rosmon::launch::LaunchConfig::m_disableUI = false
private

Definition at line 274 of file launch_config.h.

std::vector<Node::Ptr> rosmon::launch::LaunchConfig::m_nodes
private

Definition at line 251 of file launch_config.h.

OutputAttr rosmon::launch::LaunchConfig::m_outputAttrMode {OutputAttr::Ignore}
private

Definition at line 272 of file launch_config.h.

std::map<std::string, ParameterFuture> rosmon::launch::LaunchConfig::m_paramJobs
private

Definition at line 263 of file launch_config.h.

ParameterList rosmon::launch::LaunchConfig::m_params
private

Definition at line 262 of file launch_config.h.

ParseContext rosmon::launch::LaunchConfig::m_rootContext
private

Definition at line 249 of file launch_config.h.

std::string rosmon::launch::LaunchConfig::m_rosmonNodeName
private

Definition at line 268 of file launch_config.h.

std::ostream* rosmon::launch::LaunchConfig::m_warningOutput = &std::cerr
private

Definition at line 276 of file launch_config.h.

std::string rosmon::launch::LaunchConfig::m_windowTitle
private

Definition at line 270 of file launch_config.h.

std::vector<std::future<YAMLResult> > rosmon::launch::LaunchConfig::m_yamlParamJobs
private

Definition at line 264 of file launch_config.h.


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


rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43