Definition at line 272 of file mainDataClient.cpp. References Impala::CmdOptions::AddOption(), ExampleReadRaw(), ExampleRgbDataSrc(), Impala::Util::ChannelPool::Get(), Impala::CmdOptions::GetArg(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), gNrIter, ILOG_ERROR, ILOG_VAR, Impala::CmdOptions::Initialise(), Impala::Util::ChannelPool::Instance(), Impala::CmdOptions::ParseArgs(), TestBandwidth(), TestMpg(), and Impala::Util::Channel::Valid(). Referenced by main(). 00273 { 00274 CmdOptions& options = CmdOptions::GetInstance(); 00275 options.Initialise(true, false, true); 00276 options.AddOption(0, "file", "name", ""); 00277 options.AddOption(0, "iter", "number", "1000"); 00278 options.AddOption(0, "skip", "nrFrames", "0"); 00279 String usageStr = "machine:port cmd = \n\n"; 00280 usageStr += " raw [trui.raw]\n"; 00281 usageStr += " src [bike.mpg]\n"; 00282 usageStr += " test [352] [288]\n"; 00283 usageStr += " mpg [ANNA4.MPEG]\n"; 00284 if (! options.ParseArgs(argc, argv, usageStr, 2)) 00285 return 1; 00286 00287 ILOG_VAR(Impala.Application.Client.mainClient); 00288 00289 String server = options.GetArg(0); 00290 if (server.empty()) 00291 { 00292 ILOG_ERROR("need dataServer"); 00293 return 1; 00294 } 00295 String passwordFile = options.GetString("passwordFile"); 00296 Util::Channel* chanP = Util::ChannelPool::Instance().Get(server, 00297 passwordFile); 00298 if (!chanP || !chanP->Valid()) 00299 { 00300 ILOG_ERROR("No Channel"); 00301 return 1; 00302 } 00303 00304 gNrIter = options.GetInt("iter"); 00305 00306 String cmd = options.GetArg(1); 00307 00308 if (cmd == "raw") 00309 ExampleReadRaw(chanP); 00310 else if (cmd == "src") 00311 ExampleRgbDataSrc(chanP); 00312 else if (cmd == "test") 00313 TestBandwidth(chanP); 00314 else if (cmd == "mpg") 00315 TestMpg(chanP); 00316 00317 return 0; 00318 }
Here is the call graph for this function:
|