Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
30 namespace ola {
31 
32 class Device;
33 
34 namespace plugin {
35 namespace usbdmx {
36 
41  public:
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 
66 };
67 } // namespace usbdmx
68 } // namespace plugin
69 } // namespace ola
70 #endif // PLUGINS_USBDMX_DMXCPROJECTSNODLEU1PORT_H_
The interface for the Nodle Widgets.
Definition: DMXCProjectsNodleU1.h:43
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
Definition: Port.h:199
Definition: Device.h:95
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
A thin wrapper around a Widget so that it can operate as a Port.
Definition: DMXCProjectsNodleU1Port.h:40
Definition: PluginAdaptor.h:41
Helper macros.
DMXCProjectsNodleU1InputPort(Device *parent, unsigned int id, PluginAdaptor *plugin_adaptor, class DMXCProjectsNodleU1 *widget)
Create a new DMXCProjectsNodleU1InputPort.
Definition: DMXCProjectsNodleU1Port.cpp:30
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
std::string Description() const
Fetch the string description for a Port.
Definition: DMXCProjectsNodleU1Port.h:58