Classes | Public Types | Public Member Functions | Static Public Attributes | 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
 
typedef std::shared_ptr< LaunchConfigPtr
 

Public Member Functions

std::string anonName (const std::string &base)
 
const std::map< std::string, std::string > & arguments () const
 
void evaluateParameters ()
 
 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)
 
std::string windowTitle () const
 

Static Public Attributes

static constexpr float DEFAULT_CPU_LIMIT = 0.9f
 
static constexpr uint64_t DEFAULT_MEMORY_LIMIT = 500*1024*1024
 
static constexpr float DEFAULT_STOP_TIMEOUT = 5.0f
 

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
 
std::map< std::string, std::string > m_anonNames
 
double m_defaultCPULimit {DEFAULT_CPU_LIMIT}
 
uint64_t m_defaultMemoryLimit {DEFAULT_MEMORY_LIMIT}
 
double m_defaultStopTimeout {DEFAULT_STOP_TIMEOUT}
 
std::vector< Node::Ptrm_nodes
 
std::map< std::string, ParameterFuturem_paramJobs
 
ParameterList m_params
 
ParseContext m_rootContext
 
std::string m_rosmonNodeName
 
std::string m_windowTitle
 
std::vector< std::future< YAMLResult > > m_yamlParamJobs
 

Detailed Description

Definition at line 152 of file launch_config.h.

Member Typedef Documentation

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

Definition at line 156 of file launch_config.h.

Definition at line 218 of file launch_config.h.

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

Definition at line 217 of file launch_config.h.

Definition at line 155 of file launch_config.h.

Member Enumeration Documentation

Enumerator
PARAM_GENERAL 

tag inside <node>

PARAM_IN_NODE 

tag everywhere else

Definition at line 192 of file launch_config.h.

Constructor & Destructor Documentation

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

Definition at line 121 of file launch_config.cpp.

Member Function Documentation

std::string rosmon::launch::LaunchConfig::anonName ( const std::string &  base)

Definition at line 1008 of file launch_config.cpp.

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

Definition at line 181 of file launch_config.h.

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

Definition at line 1037 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 858 of file launch_config.cpp.

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

Definition at line 178 of file launch_config.h.

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

Definition at line 175 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 739 of file launch_config.cpp.

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

Definition at line 154 of file launch_config.cpp.

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

Definition at line 213 of file launch_config.cpp.

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

Definition at line 961 of file launch_config.cpp.

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

Definition at line 986 of file launch_config.cpp.

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

Definition at line 886 of file launch_config.cpp.

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

Definition at line 272 of file launch_config.cpp.

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

Definition at line 471 of file launch_config.cpp.

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

Definition at line 997 of file launch_config.cpp.

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

Definition at line 778 of file launch_config.cpp.

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

Definition at line 177 of file launch_config.cpp.

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

Definition at line 202 of file launch_config.cpp.

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

Definition at line 186 of file launch_config.h.

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

Definition at line 134 of file launch_config.cpp.

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

Definition at line 144 of file launch_config.cpp.

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

Definition at line 149 of file launch_config.cpp.

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

Definition at line 139 of file launch_config.cpp.

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

Definition at line 189 of file launch_config.h.

Member Data Documentation

constexpr float rosmon::launch::LaunchConfig::DEFAULT_CPU_LIMIT = 0.9f
static

Definition at line 158 of file launch_config.h.

constexpr uint64_t rosmon::launch::LaunchConfig::DEFAULT_MEMORY_LIMIT = 500*1024*1024
static

Definition at line 159 of file launch_config.h.

constexpr float rosmon::launch::LaunchConfig::DEFAULT_STOP_TIMEOUT = 5.0f
static

Definition at line 160 of file launch_config.h.

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

Definition at line 231 of file launch_config.h.

std::map<std::string, std::string> rosmon::launch::LaunchConfig::m_anonNames
private

Definition at line 230 of file launch_config.h.

double rosmon::launch::LaunchConfig::m_defaultCPULimit {DEFAULT_CPU_LIMIT}
private

Definition at line 239 of file launch_config.h.

uint64_t rosmon::launch::LaunchConfig::m_defaultMemoryLimit {DEFAULT_MEMORY_LIMIT}
private

Definition at line 238 of file launch_config.h.

double rosmon::launch::LaunchConfig::m_defaultStopTimeout {DEFAULT_STOP_TIMEOUT}
private

Definition at line 237 of file launch_config.h.

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

Definition at line 215 of file launch_config.h.

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

Definition at line 227 of file launch_config.h.

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

Definition at line 226 of file launch_config.h.

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

Definition at line 213 of file launch_config.h.

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

Definition at line 233 of file launch_config.h.

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

Definition at line 235 of file launch_config.h.

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

Definition at line 228 of file launch_config.h.


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


rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Jul 10 2019 03:10:12