/
smarttrack.h
51 lines (40 loc) · 1.02 KB
/
smarttrack.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
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* smarttrack.h
*
* Created on: Oct 10, 2017
* Author: may
*/
#ifndef SMARTTRACK_H
#define SMARTTRACK_H
#include <tcl.h>
#include <string>
#include <boost/thread/thread.hpp>
#include <glm/mat4x4.hpp>
#include <DTrackSDK.hpp>
class SmartTrack : public DeviceBase {
private:
bool _running = false;
bool _export = false;
bool _start = false;
DTrackSDK* _dt = nullptr;
DTrack_Body_Type_d _body = { 0 };
boost::thread* _rxThread = nullptr;
boost::mutex _rxdata;
glm::vec3 _pos = glm::vec3(), _pos_ref = glm::vec3();
glm::mat3 _dcm = glm::mat3(), _dcm_ref = glm::mat3();
glm::mat4 view, proj;
struct stinfo_t {
std::string src_ip, dst_ip, ch_num;
int src_port, dst_port;
} _st;
void TaskLoop();
public:
SmartTrack();
SmartTrack(std::string &name);
int Init();
int Terminate();
int GetMVMatrix(Tcl_Interp* interp, Tcl_Obj* tcl_ret);
void Export(bool state);
void ResetCamera();
};
#endif /* _SMARTTRACK_H_ */