本文整理汇总了C++中ArServerBase::logUsers方法的典型用法代码示例。如果您正苦于以下问题:C++ ArServerBase::logUsers方法的具体用法?C++ ArServerBase::logUsers怎么用?C++ ArServerBase::logUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArServerBase
的用法示例。
在下文中一共展示了ArServerBase::logUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv)
{
Aria::init();
//ArLog::init(ArLog::StdOut, ArLog::Verbose);
// robot
ArRobot robot;
/// our server
ArServerBase server;
// set up our parser
ArArgumentParser parser(&argc, argv);
// set up our simple connector
ArSimpleConnector simpleConnector(&parser);
// set up a gyro
ArAnalogGyro gyro(&robot);
// load the default arguments
parser.loadDefaultArguments();
// parse the command line... fail and print the help if the parsing fails
// or if the help was requested
if (!simpleConnector.parseArgs() || !parser.checkHelpAndWarnUnparsed())
{
simpleConnector.logOptions();
exit(1);
}
if (!server.loadUserInfo("userServerTest.userInfo"))
{
printf("Could not load user info, exiting\n");
exit(1);
}
server.logUsers();
// first open the server up
if (!server.open(7272))
{
printf("Could not open server port\n");
exit(1);
}
// sonar, must be added to the robot
ArSonarDevice sonarDev;
// add the sonar to the robot
robot.addRangeDevice(&sonarDev);
ArIRs irs;
robot.addRangeDevice(&irs);
ArBumpers bumpers;
robot.addRangeDevice(&bumpers);
// a laser in case one is used
ArSick sick(361, 180);
// add the laser to the robot
robot.addRangeDevice(&sick);
// attach stuff to the server
ArServerInfoRobot serverInfoRobot(&server, &robot);
ArServerInfoSensor serverInfoSensor(&server, &robot);
ArServerInfoDrawings drawings(&server);
drawings.addRobotsRangeDevices(&robot);
// ways of moving the robot
ArServerModeStop modeStop(&server, &robot);
ArServerModeDrive modeDrive(&server, &robot);
ArServerModeRatioDrive modeRatioDrive(&server, &robot);
ArServerModeWander modeWander(&server, &robot);
modeStop.addAsDefaultMode();
modeStop.activate();
// set up the simple commands
ArServerHandlerCommands commands(&server);
// add the commands for the microcontroller
ArServerSimpleComUC uCCommands(&commands, &robot);
// add the commands for logging
ArServerSimpleComMovementLogging loggingCommands(&commands, &robot);
// add the commands for the gyro
ArServerSimpleComGyro gyroCommands(&commands, &robot, &gyro);
// add the commands to enable and disable safe driving to the simple commands
modeDrive.addControlCommands(&commands);
// Forward any video if we have some to forward.. this will forward
// from SAV or ACTS, you can find both on our website
// http://robots.activmedia.com, ACTS is for color tracking and is
// charged for but SAV just does software A/V transmitting and is
// free to all our customers... just run ACTS or SAV before you
// start this program and this class here will forward video from it
// to MobileEyes
ArHybridForwarderVideo videoForwarder(&server, "localhost", 7070);
// make a camera to use in case we have video
ArPTZ *camera = NULL;
ArServerHandlerCamera *handlerCamera = NULL;
//.........这里部分代码省略.........