ResultPublisher.h
1 |
#pragma once
|
---|---|
2 |
|
3 |
|
4 |
#include <rsb/Factory.h> |
5 |
#include <rsc/threading/SynchronizedQueue.h> |
6 |
#include <rsb/Listener.h> |
7 |
#include <rsb/converter/Repository.h> |
8 |
#include <rsb/QueuePushHandler.h> |
9 |
#include <rsb/Informer.h> |
10 |
#include <rst/generic/ListFloat.pb.h> |
11 |
#include <rsb/converter/ProtocolBufferConverter.h> |
12 |
|
13 |
#include <rst/converters/opencv/IplImageConverter.h> // Needed for IplImageDeleter |
14 |
#include <ChessBase/ImageFixationConverter.h> |
15 |
|
16 |
//#include <ChessBase/ChessConverter.h>
|
17 |
|
18 |
|
19 |
|
20 |
#include <iostream> |
21 |
#include <cstdlib> |
22 |
|
23 |
#include <math.h> |
24 |
#include <boost/date_time/posix_time/posix_time.hpp> // for linux/windows sleep |
25 |
#include <boost/thread/thread.hpp> // for linux/windows sleep |
26 |
#include <boost/shared_ptr.hpp> |
27 |
|
28 |
#include <windows.h> // for GetModuleFileNameA |
29 |
#include <ctime> // clock |
30 |
|
31 |
|
32 |
#include <time.h> |
33 |
|
34 |
|
35 |
using namespace std; |
36 |
|
37 |
|
38 |
class ResultPublisher |
39 |
{ |
40 |
public:
|
41 |
ResultPublisher(string outScopeOccupiedFields, |
42 |
string outScopeFixatedField |
43 |
); |
44 |
~ResultPublisher(void);
|
45 |
|
46 |
int sendResultOccFields(vector<float> result); |
47 |
int sendResultFixatedField(float field); |
48 |
int setupRSB();
|
49 |
|
50 |
private:
|
51 |
string outScopeFixatedField; |
52 |
string outScopeOccupiedFields; |
53 |
bool alreadySetupRSB;
|
54 |
rsb::Informer<rst::generic::ListFloat>::Ptr occFieldsInformer; |
55 |
rsb::Informer<string>::Ptr fixatedFieldInformer; |
56 |
}; |
57 |
|
58 |
|