Skip to content

Commit 620bd1c

Browse files
committed
Merge pull request #4 from PrometheusPi/liveVisClient
fix client command line
2 parents b0d417a + 875c3c0 commit 620bd1c

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/tools/livevis/client/main.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013-2015 Benjamin Schneider, Axel Huebl
2+
* Copyright 2013-2015 Benjamin Schneider, Axel Huebl, Richard Pausch
33
*
44
* This file is part of PIConGPU.
55
*
@@ -29,16 +29,24 @@ int main(int argc, char *argv[])
2929
std::string serverip = DEFAULT_SERVER_IP;
3030
int server_info_port = DEFAULT_SERVER_INFOPORT;
3131

32-
/// get server IP and Info Portnumber from commandline arguments
32+
/// get server IP and Info Portnumber from command line arguments
3333
for (int i = 0; i < argc; ++i)
3434
{
3535
if (strcmp("--serverip", argv[i]) == 0)
3636
{
37-
serverip = argv[i];
37+
serverip = argv[i+1];
3838
}
3939
if (strcmp("--serverinfoport", argv[i]) == 0)
4040
{
41-
serverip = argv[i];
41+
server_info_port = atoi(argv[i+1]);
42+
}
43+
if ((strcmp("--help", argv[i]) == 0) or (strcmp("-h", argv[i]) == 0))
44+
{
45+
printf("This is the client for the live visualization tool of PIConGPU.\n\n");
46+
printf("--serverip : Sets the IP address of the visualization server. [Default: %s]\n", serverip.c_str());
47+
printf("--serverinfoport : Sets the port on which to connect to the visualization server. [Default: %d]\n", server_info_port);
48+
printf("--help , -h : Show usage information.\n");
49+
return 0;
4250
}
4351
}
4452

0 commit comments

Comments
 (0)