|
From: <mor...@us...> - 2008-03-27 00:38:49
|
Revision: 43
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=43&view=rev
Author: morgan_quigley
Date: 2008-03-26 17:38:55 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
cleaning up test programs in axis_cam
Modified Paths:
--------------
pkg/trunk/axis_cam/test/test_wget/Makefile
Added Paths:
-----------
pkg/trunk/axis_cam/test/test_wget/test_get.cpp
Removed Paths:
-------------
pkg/trunk/axis_cam/test/test_wget/test_wget.cpp
Modified: pkg/trunk/axis_cam/test/test_wget/Makefile
===================================================================
--- pkg/trunk/axis_cam/test/test_wget/Makefile 2008-03-27 00:35:00 UTC (rev 42)
+++ pkg/trunk/axis_cam/test/test_wget/Makefile 2008-03-27 00:38:55 UTC (rev 43)
@@ -1,5 +1,5 @@
-SRC = test_wget.cpp
-OUT = test_wget
-LFLAGS = -L../../lib -laxis_cam
+SRC = test_get.cpp
+OUT = test_get
+LFLAGS = -L../../lib -laxis_cam -lcurl
PKG = axis_cam
include $(shell $(ROS_ROOT)/rospack find roscpp)/make_include/node_just_libros.mk
Copied: pkg/trunk/axis_cam/test/test_wget/test_get.cpp (from rev 38, pkg/trunk/axis_cam/test/test_wget/test_wget.cpp)
===================================================================
--- pkg/trunk/axis_cam/test/test_wget/test_get.cpp (rev 0)
+++ pkg/trunk/axis_cam/test/test_wget/test_get.cpp 2008-03-27 00:38:55 UTC (rev 43)
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+// The axis_cam package provides a library that talks to Axis IP-based cameras
+// as well as ROS nodes which use these libraries
+//
+// Copyright (C) 2008, Morgan Quigley
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+#include <cstdio>
+#include "axis_cam/axis_cam.h"
+
+AxisCam *axis;
+
+bool tryit()
+{
+ uint8_t *jpeg;
+ uint32_t jpeg_size;
+ bool ok = axis->get_jpeg(&jpeg, &jpeg_size);
+ if (ok)
+ {
+ printf("caller jpeg size = %d\n", jpeg_size);
+ FILE *f = fopen("saved.jpg", "wb");
+ fwrite(jpeg, 1, jpeg_size, f);
+ fclose(f);
+ return true;
+ }
+ else
+ {
+ printf("not ok\n");
+ return false;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ printf("construct AxisCam object...\n");
+ axis = new AxisCam("192.168.1.90");
+
+ tryit();
+
+ printf("delete AxisCam...\n");
+ delete axis;
+ return 0;
+}
+
Deleted: pkg/trunk/axis_cam/test/test_wget/test_wget.cpp
===================================================================
--- pkg/trunk/axis_cam/test/test_wget/test_wget.cpp 2008-03-27 00:35:00 UTC (rev 42)
+++ pkg/trunk/axis_cam/test/test_wget/test_wget.cpp 2008-03-27 00:38:55 UTC (rev 43)
@@ -1,66 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// The axis_cam package provides a library that talks to Axis IP-based cameras
-// as well as ROS nodes which use these libraries
-//
-// Copyright (C) 2008, Morgan Quigley
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// * Neither the name of Stanford University nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-#include <cstdio>
-#include "axis_cam/axis_cam.h"
-
-AxisCam *axis;
-
-bool tryit()
-{
- uint8_t *jpeg;
- uint32_t jpeg_size;
- bool ok = axis->wget_jpeg(&jpeg, &jpeg_size);
- if (ok)
- {
- printf("caller jpeg size = %d\n", jpeg_size);
- FILE *f = fopen("resaved.jpg", "wb");
- fwrite(jpeg, 1, jpeg_size, f);
- fclose(f);
- return true;
- }
- else
- {
- printf("not ok\n");
- return false;
- }
-}
-
-int main(int argc, char **argv)
-{
- printf("construct AxisCam object...\n");
- axis = new AxisCam("192.168.1.90");
-
- tryit();
-
- printf("delete AxisCam...\n");
- delete axis;
- return 0;
-}
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|