Open Lighting Architecture  Latest Git
E131Plugin.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  * E131Plugin.h
17  * Interface for the E1.131 plugin class
18  * Copyright (C) 2007 Simon Newton
19  */
20 
21 #ifndef PLUGINS_E131_E131PLUGIN_H_
22 #define PLUGINS_E131_E131PLUGIN_H_
23 
24 #include <string>
25 #include "olad/Plugin.h"
26 #include "ola/plugin_id.h"
27 
28 namespace ola {
29 namespace plugin {
30 namespace e131 {
31 
32 class E131Device;
33 
34 class E131Plugin: public ola::Plugin {
35  public:
36  explicit E131Plugin(ola::PluginAdaptor *plugin_adaptor):
37  ola::Plugin(plugin_adaptor),
38  m_device(NULL) {}
39  ~E131Plugin() {}
40 
41  std::string Name() const { return PLUGIN_NAME; }
42  ola_plugin_id Id() const { return OLA_PLUGIN_E131; }
43  std::string Description() const;
44  std::string PluginPrefix() const { return PLUGIN_PREFIX; }
45 
46  private:
47  bool StartHook();
48  bool StopHook();
49  bool SetDefaultPreferences();
50 
51  E131Device *m_device;
52  static const char CID_KEY[];
53  static const unsigned int DEFAULT_DSCP_VALUE;
54  static const unsigned int DEFAULT_PORT_COUNT;
55  static const char DRAFT_DISCOVERY_KEY[];
56  static const char DSCP_KEY[];
57  static const char IGNORE_PREVIEW_DATA_KEY[];
58  static const char INPUT_PORT_COUNT_KEY[];
59  static const char IP_KEY[];
60  static const char OUTPUT_PORT_COUNT_KEY[];
61  static const char PLUGIN_NAME[];
62  static const char PLUGIN_PREFIX[];
63  static const char PREPEND_HOSTNAME_KEY[];
64  static const char REVISION_0_2[];
65  static const char REVISION_0_46[];
66  static const char REVISION_KEY[];
67 };
68 } // namespace e131
69 } // namespace plugin
70 } // namespace ola
71 #endif // PLUGINS_E131_E131PLUGIN_H_
ola_plugin_id Id() const
Get the plugin ID of this plugin.
Definition: E131Plugin.h:42
Definition: E131Device.h:40
std::string Description() const
Definition: E131Plugin.cpp:129
Definition: Plugin.h:118
Definition: PluginAdaptor.h:41
std::string Name() const
Get the plugin name.
Definition: E131Plugin.h:41
std::string PluginPrefix() const
The prefix to use for storing configuration files.
Definition: E131Plugin.h:44
Definition: E131Plugin.h:34
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44