2008-06-02 17:41:35 -04:00
|
|
|
#ifndef ardour_powermate_h
|
|
|
|
#define ardour_powermate_h
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
#include "control_protocol/control_protocol.h"
|
|
|
|
|
|
|
|
class PowermateControlProtocol : public ARDOUR::ControlProtocol
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PowermateControlProtocol (ARDOUR::Session&);
|
|
|
|
virtual ~PowermateControlProtocol();
|
|
|
|
|
|
|
|
int set_active (bool yn);
|
|
|
|
static bool probe ();
|
|
|
|
|
|
|
|
XMLNode& get_state ();
|
2009-10-15 14:56:11 -04:00
|
|
|
int set_state (const XMLNode&, int version);
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static void* SerialThreadEntry (void* arg);
|
|
|
|
void* SerialThread ();
|
|
|
|
|
|
|
|
void ProcessEvent(struct input_event *ev);
|
|
|
|
|
|
|
|
int mPort;
|
|
|
|
pthread_t mThread;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|