本文整理汇总了C++中ArgumentParser::getUsage方法的典型用法代码示例。如果您正苦于以下问题:C++ ArgumentParser::getUsage方法的具体用法?C++ ArgumentParser::getUsage怎么用?C++ ArgumentParser::getUsage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArgumentParser
的用法示例。
在下文中一共展示了ArgumentParser::getUsage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
ArgumentParser argParser;
if(!argParser.parseArgs(argc, argv))
{
Logger::ERROR("Invalid arguments provided!");
Logger::ERROR(argParser.getUsage());
return 1;
}
Config* config = Config::getConfig();
config->testnodePrioritySwitcher = new PrioritySwitcher(0, config->fifoScheduling);
if(!setProcessPriority())
{
Logger::ERROR("Couldn't set priority appropriately, maybe not running as root?");
return 1;
}
ros::init(argc, argv, "oneshot_timer_tests");
config->nodeHandle = new ros::NodeHandle;
Logger::INFO("Performing ROS Timer latency measurements...");
OneShotLatencyMeasurer* measurer;
if(config->busyMode)
{
Logger::INFO("Running in busy mode");
measurer = new BusyOneShotLatencyMeasurer();
} else {
Logger::INFO("Running in default mode");
measurer = new IdleOneShotLatencyMeasurer();
}
measurer->measure();
measurer->printMeasurementResults();
measurer->saveMeasuredLatencyGnuplotData();
return 0;
}