Open Lighting Architecture
0.9.6
Main Page
Modules
Related Pages
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
plugins
usbdmx
JaRuleWidget.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
* JaRuleWidget.h
17
* A Ja Rule widget.
18
* Copyright (C) 2015 Simon Newton
19
*/
20
21
#ifndef PLUGINS_USBDMX_JARULEWIDGET_H_
22
#define PLUGINS_USBDMX_JARULEWIDGET_H_
23
24
#include <libusb.h>
25
26
#include <ola/io/SelectServerInterface.h>
27
#include <
ola/rdm/QueueingRDMController.h
>
28
#include <
ola/rdm/RDMCommand.h
>
29
#include <
ola/rdm/RDMControllerInterface.h
>
30
#include <
ola/rdm/UID.h
>
31
32
#include <memory>
33
34
#include "plugins/usbdmx/LibUsbAdaptor.h"
35
#include "plugins/usbdmx/Widget.h"
36
37
namespace
ola {
38
namespace
plugin {
39
namespace
usbdmx {
40
44
class
JaRuleWidget
:
public
Widget
,
45
public
ola::rdm::DiscoverableRDMControllerInterface
{
46
public
:
57
JaRuleWidget
(
ola::io::SelectServerInterface
*ss,
58
AsyncronousLibUsbAdaptor
*adaptor,
59
libusb_device *device,
60
const
ola::rdm::UID
&controller_uid);
61
62
bool
Init
();
63
64
void
SendRDMRequest
(
ola::rdm::RDMRequest
*request,
65
ola::rdm::RDMCallback
*on_complete);
66
void
RunFullDiscovery
(
ola::rdm::RDMDiscoveryCallback
*callback);
67
void
RunIncrementalDiscovery
(
ola::rdm::RDMDiscoveryCallback
*callback);
68
69
bool
SendDMX
(
const
DmxBuffer
&buffer);
70
74
void
ResetDevice
();
75
76
private
:
77
std::auto_ptr<class JaRuleWidgetImpl> m_widget_impl;
78
ola::rdm::DiscoverableQueueingRDMController
m_queueing_controller;
79
80
static
const
unsigned
int
RDM_QUEUE_SIZE = 50;
81
82
DISALLOW_COPY_AND_ASSIGN(
JaRuleWidget
);
83
};
84
}
// namespace usbdmx
85
}
// namespace plugin
86
}
// namespace ola
87
#endif // PLUGINS_USBDMX_JARULEWIDGET_H_
Generated on Fri Jul 3 2015 15:58:45 for Open Lighting Architecture by
1.8.1.2