stress_discover.cpp
Go to the documentation of this file.
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 }
#define SEC_TO_USEC(sec)
Definition: host_netutil.h:65
int wge100FindByUrl(const char *url, IpCamList *camera, unsigned wait_us, const char **errmsg)
Definition: wge100lib.c:94
int main(int argc, char **argv)


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Mon Jun 10 2019 15:44:15