#ifndef DEVICE_HPP #define DEVICE_HPP #include #include #include #include "command.hpp" #include "Filedat.hpp" #define KILL_COMMAND_FH "kill -s INT $(pgrep -f \"aseqdump -p " #define KILL_COMMAND_SH "\")" void sh(std::string const& string); class Device { public: Device(); virtual ~Device(); bool start_loop(); void run_signal(char* buff); bool import_chunk(Chunk const& ch); Chunk export_chunk(); std::string name; int client_id; bool busy; uint32_t nb_command; std::vector noteCommands[128]; std::vector ctrlCommands[128]; std::vector pitchCommands; std::vector sysCommands; std::vector connectCommands; std::vector disconnectCommands; std::thread thread; private: static void loop(Device* dev); }; extern std::vector device_list; #endif //DEVICE_HPP