posix_thread.hpp
Go to the documentation of this file.
1 
30 #ifndef LINUXTHREAD_H
31 #define LINUXTHREAD_H
32 
33 #include "dji_log.hpp"
34 #include "dji_thread_manager.hpp"
35 #include <pthread.h>
36 #include <string>
37 
38 namespace DJI
39 {
40 namespace OSDK
41 {
42 
44 class Vehicle;
45 
52 class PosixThread : public Thread
53 {
54 public:
55  PosixThread();
56  PosixThread(Vehicle* vehicle, int type);
57  ~PosixThread()
58  {
59  }
60 
61  bool createThread();
62  int stopThread();
63 
64 private:
65  pthread_t threadID;
66  pthread_attr_t attr;
67 
68  static void* send_call(void* param);
69  static void* uart_serial_read_call(void* param);
70  static void* callback_call(void* param);
71  static void* USB_read_call(void* param);
72 };
73 
74 } // namespace DJI
75 } // namespace onboardSDK
76 
77 #endif // LINUXTHREAD_H
A top-level encapsulation of a DJI drone/FC connected to your OES.
Definition: dji_vehicle.hpp:93
POSIX-compatible threading implementation for *NIX systems.
Definition: posix_thread.hpp:52
Logging mechanism for printing status and error messages to the screen.
Definition: dji_ack.cpp:39