Fawkes API
Fawkes Development Version
qa_fuse.cpp
1
2
/***************************************************************************
3
* qa_fuse.h - QA for FUSE
4
*
5
* Created: Wed Nov 14 17:13:14 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/net/fuse_server.h>
27
#include <fvutils/net/fuse_client.h>
28
// include <fvutils/net/fuse_message.h>
29
30
//#include <cstdlib>
31
#include <cstdio>
32
#include <unistd.h>
33
34
using namespace
firevision
;
35
36
int
37
main(
int
argc,
char
**argv)
38
{
39
40
FuseServer
*fs =
new
FuseServer
(5000);
41
FuseClient
*fc =
new
FuseClient
(
"127.0.0.1"
, 5000, NULL);
42
43
fc->
connect
();
44
fc->
start
();
45
46
usleep(5000);
47
48
printf(
"Cancel and join\n"
);
49
fc->
cancel
();
50
fc->
join
();
51
52
printf(
"Delete\n"
);
53
delete
fc;
54
delete
fs;
55
56
return
0;
57
}
58
59
60
61
/// @endcond
firevision::FuseServer
FireVision FUSE protocol server.
Definition:
fuse_server.h:46
firevision::FuseClient::connect
void connect()
Connect.
Definition:
fuse_client.cpp:119
firevision
Definition:
vision_master.h:32
fawkes::Thread::cancel
void cancel()
Cancel a thread.
Definition:
thread.cpp:651
fawkes::Thread::join
void join()
Join the thread.
Definition:
thread.cpp:610
firevision::FuseClient
FUSE client.
Definition:
fuse_client.h:45
fawkes::Thread::start
void start(bool wait=true)
Call this method to start the thread.
Definition:
thread.cpp:511
src
libs
fvutils
qa
qa_fuse.cpp
Generated by
1.8.13