Com_SerialWritingThread.h 942 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * @author Sylvain Colomer
 * @date 17/08/18.
 */

#ifndef SERIAL_PORT_WRITINGTHREAD_H
#define SERIAL_PORT_WRITINGTHREAD_H

#include <iostream>
#include <string>
#include <iostream>
#include <unistd.h>
#include <termios.h>
#include <thread>
#include <mutex>
#include <sys/time.h>

#include "Abstract_ThreadClass.h"
#include "Data_Drone.h"

#include "blc_channel.h"
#include "blc_program.h"

24
25
class Serial_Port_WritingThread : public Abstract_ThreadClass 
{
26
27
28
29
30
protected: 

    /**
     * Drone buffer
     */
31
    //std::shared_ptr<Drone> drone1;
32
33
34
35
36
37
38
39
40

    // Different buffer use for get the data
    int time_stamps;

public:

    /**
     * Default constructor of the class. Need to have the 
     */
41
    Serial_Port_WritingThread(int task_period, int task_deadline);
42
43
44
45
46
47
48
49
50
51
52
    ~Serial_Port_WritingThread();

    void run();

    /**
     * Direct writing method command
     */
    int main_loop();
};

#endif //VEHICLEWATCHER_Abstract_ThreadClass_H