forked from andybarry/flight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStereoHandler.h
39 lines (27 loc) · 953 Bytes
/
StereoHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef STEREO_HANDLER_H
#define STEREO_HANDLER_H
#include "StatusHandler.h"
#include "../../LCM/lcmt_stereo_monitor.hpp"
#include <boost/format.hpp>
class StereoHandler : public StatusHandler
{
public:
StereoHandler() : StatusHandler("Vision: ") {
}
~StereoHandler() {}
void handleMessage(const lcm::ReceiveBuffer* rbuf,
const std::string& chan,
const lcmt_stereo_monitor* msg) {
boost::format formatter = boost::format(" (%02d -- %d)") % msg->video_number % msg->frame_number;
if (msg->frame_number > 0) {
SetStatus(true, msg->timestamp);
SetOnlineString(formatter.str());
SetOfflineString(formatter.str());
} else {
SetStatus(false, msg->timestamp);
SetOfflineString(formatter.str());
}
}
private:
};
#endif