Ardour  9.0-pre0-582-g084a23a80d
libs/surfaces/us2400/led.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Ben Loftis <ben@harrisonconsoles.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_us2400_control_protocol_led_h__
20 #define __ardour_us2400_control_protocol_led_h__
21 
22 #include "controls.h"
23 #include "midi_byte_array.h"
24 #include "types.h"
25 
26 namespace ArdourSurface {
27 
28 namespace US2400 {
29 
30 class Led : public Control
31 {
32 public:
33  static const int FaderTouch;
34  static const int Timecode;
35  static const int Beats;
36  static const int RudeSolo;
37  static const int RelayClick;
38 
39  Led (int id, std::string name, Group & group)
40  : Control (id, name, group)
41  , last_state (none)
42  , llast_state (none)
43  {
44  }
45 
47 
48  Led & led() { return *this; }
50 
51  MidiByteArray zero() { return set_state (off); }
52 
53  static Control* factory (Surface&, int id, const char*, Group&);
54 
55  private:
58 };
59 
60 }
61 }
62 
63 #endif /* __ardour_us2400_control_protocol_led_h__ */
const std::string & name() const
static Control * factory(Surface &, int id, const char *, Group &)
MidiByteArray set_state(LedState)
Led(int id, std::string name, Group &group)
DebugBits US2400