Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
test
cycle_tests
stress_discover.cpp
Go to the documentation of this file.
1
#include "
wge100_camera/wge100lib.h
"
2
#include "
wge100_camera/host_netutil.h
"
3
#include <string.h>
4
#include <cstdio>
5
#include <cstdlib>
6
#include <cstring>
7
#include <cassert>
8
9
int
main
(
int
argc,
char
** argv)
10
{
11
if
(argc != 2 || !strcmp(argv[1],
"--help"
)) {
12
fprintf(stderr,
"Usage: %s <camera URL>\n"
, argv[0]);
13
fprintf(stderr,
"Repeatedly tries to discover the indicated camera to test robustness of discovery.\n"
);
14
return
0;
15
}
16
char
* camera_url = argv[1];
17
18
// Find the camera matching the URL
19
IpCamList
camera;
20
const
char
*errmsg;
21
while
(1)
22
{
23
wge100FindByUrl
(camera_url, &camera,
SEC_TO_USEC
(0.001), &errmsg);
24
printf(
"."
);
25
fflush(stdout);
26
}
27
28
return
0;
29
}
wge100lib.h
SEC_TO_USEC
#define SEC_TO_USEC(sec)
Definition:
host_netutil.h:65
wge100FindByUrl
int wge100FindByUrl(const char *url, IpCamList *camera, unsigned wait_us, const char **errmsg)
Definition:
wge100lib.c:94
host_netutil.h
main
int main(int argc, char **argv)
Definition:
stress_discover.cpp:9
IpCamList
Definition:
list.h:274
wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Mon Jun 10 2019 15:44:15