Lumiverse  2.5
A framework for creating lighting control applications
OLAInterface.h
Go to the documentation of this file.
1 
4 #ifndef _OLAINTERFACE_H_
5 #define _OLAINTERFACE_H_
6 
7 #pragma once
8 #include "LumiverseCoreConfig.h"
9 
10 #ifdef USE_OLA
11 
12 #include <ola/DmxBuffer.h>
13 #include <ola/Logging.h>
14 #include <ola/client/StreamingClient.h>
15 #include <lib/libjson/libjson.h>
16 
17 #include "DMXInterface.h"
18 #include "Logger.h"
19 #include <string>
20 #include <sstream>
21 #include <iostream>
22 #include <unordered_map>
23 
24 namespace Lumiverse {
32  class OLAInterface : public DMXInterface
33  {
34  public:
40  OLAInterface(string id);
41 
42  ~OLAInterface();
43 
44  virtual void init();
45 
46  virtual void sendDMX(unsigned char* data, unsigned int universe);
47 
48  virtual void closeInt();
49 
50  virtual void reset();
51 
52  virtual JSONNode toJSON();
53 
54  virtual string getInterfaceType() { return "OLAInterface"; }
55 
56  private:
63  unordered_map<unsigned int, ola::DmxBuffer> _universes;
64 
68  ola::client::StreamingClient _olaClient;
69  };
70 }
71 
72 #endif
73 
74 #endif
void init(const char *jsonPatchStr, const char *filename)
Initializes data structures.
Definition: Dumiverse.cpp:29
Contains functions for logging information to console or file.
Base class describing how DMX Interfaces should act.
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2