-
Notifications
You must be signed in to change notification settings - Fork 0
/
InputData.h
executable file
·57 lines (45 loc) · 1.29 KB
/
InputData.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
52
53
54
55
56
57
/*
* File: inputData.h
* Author: greg
*
* Created on May 3, 2012, 10:43 AM
*/
#ifndef INPUTDATA_H
#define INPUTDATA_H
#include "stdio.h"
#include <fcntl.h> /* File control definitions */
#include <termios.h> /* POSIX terminal control definitions */
#include <pthread.h>
#include "Point.h"
#include <errno.h> /* Error number definitions */
//#include "defines.h"
#include <stdio.h> /* Standard input/output definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <queue>
#include "ScreenInterpreter.h"
#include <stdlib.h> /* Needed for the exit() function */
#include "PalmRejection.h"
using namespace std;
class InputData
{
public:
InputData(ScreenInterpreter *);
~InputData();
void run();
void stop();
void endReader();
private:
void initialise_port(int fd);
int open_port();
Point * read_data_from_file(int fd);
ScreenInterpreter * scribbleAreaAccess;
queue<Point* > *mPointsQueue;
int fd;
volatile bool stop_request;
//int fd;
//Should this be here or inside the read_data_from_file function?
//Reasoning: read_data_from_file is called very often and this would reduce the recreation of those variable
int column, row, uX, lX, uY, lY;
PalmRejection palm;
};
#endif /* INPUTDATA_H */