Open Lighting Architecture  Latest Git
DMXCProjectsNodleU1Device.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  * DMXCProjectsNodleU1Device.h
17  * A DMXCProjectsNodleU1 device that creates an input and an output port.
18  * Copyright (C) 2015 Stefan Krupop
19  */
20 
21 #ifndef PLUGINS_USBDMX_DMXCPROJECTSNODLEU1DEVICE_H_
22 #define PLUGINS_USBDMX_DMXCPROJECTSNODLEU1DEVICE_H_
23 
24 #include <memory>
25 #include <string>
26 #include "ola/base/Macro.h"
27 #include "olad/Device.h"
28 #include "plugins/usbdmx/DMXCProjectsNodleU1.h"
29 
30 namespace ola {
31 namespace plugin {
32 namespace usbdmx {
33 
40  public:
50  class DMXCProjectsNodleU1 *widget,
51  const std::string &device_name,
52  const std::string &device_id,
53  PluginAdaptor *plugin_adaptor);
54 
55  std::string DeviceId() const {
56  return m_device_id;
57  }
58 
59  protected:
60  bool StartHook();
61 
62  private:
63  const std::string m_device_id;
64  std::auto_ptr<class GenericOutputPort> m_out_port;
65  std::auto_ptr<class DMXCProjectsNodleU1InputPort> m_in_port;
66 
67  DISALLOW_COPY_AND_ASSIGN(DMXCProjectsNodleU1Device);
68 };
69 } // namespace usbdmx
70 } // namespace plugin
71 } // namespace ola
72 #endif // PLUGINS_USBDMX_DMXCPROJECTSNODLEU1DEVICE_H_
The interface for the Nodle Widgets.
Definition: DMXCProjectsNodleU1.h:43
DMXCProjectsNodleU1Device(ola::AbstractPlugin *owner, class DMXCProjectsNodleU1 *widget, const std::string &device_name, const std::string &device_id, PluginAdaptor *plugin_adaptor)
Create a new DMXCProjectsNodleU1Device.
Definition: DMXCProjectsNodleU1Device.cpp:31
Definition: Device.h:95
std::string DeviceId() const
The device ID.
Definition: DMXCProjectsNodleU1Device.h:55
Definition: PluginAdaptor.h:41
A DMXCProjectsNodleU1 device.
Definition: DMXCProjectsNodleU1Device.h:39
Helper macros.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: Plugin.h:38
bool StartHook()
Called during Start().
Definition: DMXCProjectsNodleU1Device.cpp:53