42 using namespace testclient;
48 int main(
int argc,
char* argv[]) {
49 std::string defFile =
"";
50 std::string outFileName =
"testclient_out.txt";
52 std::string host =
"localhost";
55 if ((argc == 1) || (argc % 2 == 0)) {
56 std::cout <<
"Usage: TraciTestClient -def <definition_file> -p <remote port>"
57 <<
"[-h <remote host>] [-o <outputfile name>]" << std::endl;
61 for (
int i = 1; i < argc; i++) {
62 std::string arg = argv[i];
63 if (arg.compare(
"-def") == 0) {
64 defFile = argv[i + 1];
66 }
else if (arg.compare(
"-o") == 0) {
67 outFileName = argv[i + 1];
69 }
else if (arg.compare(
"-p") == 0) {
70 port = atoi(argv[i + 1]);
72 }
else if (arg.compare(
"-h") == 0) {
76 std::cout <<
"unknown parameter: " << argv[i] << std::endl;
82 std::cout <<
"Missing port" << std::endl;
85 if (defFile.compare(
"") == 0) {
86 std::cout <<
"Missing definition file" << std::endl;
91 bool success = client->
run(defFile, port, host);