Open Lighting Architecture: plugins/usbpro/UltraDMXProWidget.h Source File

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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
31namespace ola {
32namespace plugin {
33namespace usbpro {
34
35/*
36 * An Ultra DMX Pro Widget
37 */
38 class UltraDMXProWidget: public GenericUsbProWidget {
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_
Callback.h
DmxBuffer.h
A class used to hold a single universe of DMX data.
ola::DmxBuffer
Used to hold a single universe of DMX data.
Definition DmxBuffer.h:49
ola::io::ConnectedDescriptor
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition Descriptor.h:283
ola::plugin::usbpro::GenericUsbProWidget::GenericStop
void GenericStop()
Definition GenericUsbProWidget.cpp:67
ola::plugin::usbpro::UltraDMXProWidget::UltraDMXProWidget
UltraDMXProWidget(ola::io::ConnectedDescriptor *descriptor)
Definition UltraDMXProWidget.cpp:31
ola::plugin::usbpro
Code for Enttec USB Pro devices and others using the same protocol.
ola::plugin
Code for supported devices and protocols.
ola
The namespace containing all OLA symbols.
Definition Credentials.cpp:44