#ifndef DEVICE_HPP #define DEVICE_HPP #include #include #include #include "command.hpp" #include class Device { public: Device(); virtual ~Device(); bool start_loop(); void run_signal(char* buff); bool import_chunk(const ztd::chunkdat& ch); ztd::chunkdat 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; pid_t thread_pid; private: static void loop(Device* dev); }; extern std::vector device_list; void clean_devices(); #endif //DEVICE_HPP