stress_discover.cpp
Go to the documentation of this file.
00001 #include "wge100_camera/wge100lib.h"
00002 #include "wge100_camera/host_netutil.h"
00003 #include <string.h>
00004 #include <cstdio>
00005 #include <cstdlib>
00006 #include <cstring>
00007 #include <cassert>
00008 
00009 int main(int argc, char** argv)
00010 {
00011   if (argc != 2 || !strcmp(argv[1], "--help")) {
00012     fprintf(stderr, "Usage: %s <camera URL>\n", argv[0]);
00013     fprintf(stderr, "Repeatedly tries to discover the indicated camera to test robustness of discovery.\n");
00014     return 0;
00015   }
00016   char* camera_url = argv[1];
00017 
00018   // Find the camera matching the URL
00019   IpCamList camera;
00020   const char *errmsg;
00021   while (1)
00022   {
00023     wge100FindByUrl(camera_url, &camera, SEC_TO_USEC(0.001), &errmsg);
00024     printf(".");
00025     fflush(stdout);
00026   }
00027 
00028   return 0;
00029 }


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Fri Jan 3 2014 12:16:00