Open Lighting Architecture: plugins/usbdmx/DMXCProjectsNodleU1Port.h Source File

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
DMXCProjectsNodleU1Port.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 * DMXCProjectsNodleU1Port.h
17 * Output and input ports that use a widget and give the serial as description.
18 * Copyright (C) 2015 Stefan Krupop
19 */
20
21#ifndef PLUGINS_USBDMX_DMXCPROJECTSNODLEU1PORT_H_
22#define PLUGINS_USBDMX_DMXCPROJECTSNODLEU1PORT_H_
23
24#include <string>
25#include <iostream>
26#include "ola/base/Macro.h"
27#include "olad/Port.h"
28#include "plugins/usbdmx/DMXCProjectsNodleU1.h"
29
30namespace ola {
31
32class Device;
33
34namespace plugin {
35namespace usbdmx {
36
40 class DMXCProjectsNodleU1InputPort: public BasicInputPort {
41 public:
49 DMXCProjectsNodleU1InputPort(Device *parent,
50 unsigned int id,
51 PluginAdaptor *plugin_adaptor,
52 class DMXCProjectsNodleU1 *widget);
53
54 const DmxBuffer &ReadDMX() const {
55 return m_widget->GetDmxInBuffer();
56 }
57
58 std::string Description() const {
59 return "";
60 }
61
62 private:
63 class DMXCProjectsNodleU1* const m_widget;
64
65 DMXCProjectsNodleU1InputPort(const DMXCProjectsNodleU1InputPort &) = delete;
66 const DMXCProjectsNodleU1InputPort &operator=(const DMXCProjectsNodleU1InputPort &) = delete;
67};
68} // namespace usbdmx
69} // namespace plugin
70} // namespace ola
71#endif // PLUGINS_USBDMX_DMXCPROJECTSNODLEU1PORT_H_
Macro.h
Helper macros.
ola::BasicInputPort::BasicInputPort
BasicInputPort(AbstractDevice *parent, unsigned int port_id, const PluginAdaptor *plugin_adaptor, bool supports_rdm=false)
Create a new basic input port.
Definition Port.cpp:38
ola::Device
Definition Device.h:89
ola::DmxBuffer
Used to hold a single universe of DMX data.
Definition DmxBuffer.h:49
ola::PluginAdaptor
Definition PluginAdaptor.h:41
ola::plugin::usbdmx::DMXCProjectsNodleU1
The interface for the Nodle Widgets.
Definition DMXCProjectsNodleU1.h:43
ola::plugin::usbdmx::DMXCProjectsNodleU1InputPort
A thin wrapper around a Widget so that it can operate as a Port.
Definition DMXCProjectsNodleU1Port.h:40
ola::plugin::usbdmx::DMXCProjectsNodleU1InputPort::DMXCProjectsNodleU1InputPort
DMXCProjectsNodleU1InputPort(Device *parent, unsigned int id, PluginAdaptor *plugin_adaptor, class DMXCProjectsNodleU1 *widget)
Create a new DMXCProjectsNodleU1InputPort.
Definition DMXCProjectsNodleU1Port.cpp:30
ola::plugin::usbdmx::DMXCProjectsNodleU1InputPort::Description
std::string Description() const
Fetch the string description for a Port.
Definition DMXCProjectsNodleU1Port.h:58
ola::plugin::usbdmx
The plugin for hardware using libusb.
ola::plugin
Code for supported devices and protocols.
ola
The namespace containing all OLA symbols.
Definition Credentials.cpp:44