Open Lighting Architecture  0.9.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UltraDMXProWidget.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * UltraDMXProWidget.h
17  * The DMXKing Ultra DMX Pro Widget.
18  * This is similar to the Enttec Usb Pro, but it has two output ports.
19  * Copyright (C) 2011 Simon Newton
20  */
21 
22 #ifndef PLUGINS_USBPRO_ULTRADMXPROWIDGET_H_
23 #define PLUGINS_USBPRO_ULTRADMXPROWIDGET_H_
24 
25 #include <deque>
26 #include <string>
27 #include "ola/Callback.h"
28 #include "ola/DmxBuffer.h"
29 #include "plugins/usbpro/GenericUsbProWidget.h"
30 
31 namespace ola {
32 namespace plugin {
33 namespace usbpro {
34 
35 /*
36  * An Ultra DMX Pro Widget
37  */
39  public:
40  explicit UltraDMXProWidget(ola::io::ConnectedDescriptor *descriptor);
41  ~UltraDMXProWidget() {}
42  void Stop() { GenericStop(); }
43 
44  bool SendDMX(const DmxBuffer &buffer);
45  bool SendSecondaryDMX(const DmxBuffer &buffer);
46 
47  private:
48  bool SendDMXWithLabel(uint8_t label, const DmxBuffer &data);
49 
50  static const uint8_t DMX_PRIMARY_PORT = 100;
51  static const uint8_t DMX_SECONDARY_PORT = 101;
52 };
53 } // namespace usbpro
54 } // namespace plugin
55 } // namespace ola
56 #endif // PLUGINS_USBPRO_ULTRADMXPROWIDGET_H_