Fawkes API Fawkes Development Version
qa_shmlut.cpp
1
2/***************************************************************************
3 * qa_shmlut.h - QA for shared memory lookup table
4 *
5 * Created: Wed Nov 21 17:06:24 2007
6 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24/// @cond QA
25
26#include <fvutils/ipc/shm_lut.h>
27
28#include <iostream>
29
30using namespace std;
31using namespace firevision;
32
33int
34main(int argc, char **argv)
35{
37
38 lut = new SharedMemoryLookupTable("QA test LUT", 100, 100, 2);
39
40 if (lut->is_valid()) {
41 cout << "IS valid!" << endl;
42 } else {
43 cout << "Is NOT valid!" << endl;
44 }
45
46 sleep(100);
47
48 delete lut;
49
50 return 0;
51}
52
53/// @endcond
bool is_valid() const
Check validity of shared memory segment.
Definition: shm.cpp:811
Shared memory lookup table.
Definition: shm_lut.h:113