Lumiverse  2.5
A framework for creating lighting control applications
Patch.h
Go to the documentation of this file.
1 
4 #ifndef _PATCH_H_
5 #define _PATCH_H_
6 
7 #pragma once
8 
9 #include "Device.h"
10 #include <set>
11 
12 using namespace std;
13 
14 namespace Lumiverse {
24  class Patch
25  {
26  public:
28  virtual ~Patch() { };
29 
39  virtual void update(set<Device *> devices) = 0;
40 
47  virtual void init() = 0;
48 
52  virtual void close() = 0;
53 
63  virtual JSONNode toJSON() = 0;
64 
73  virtual string getType() = 0;
74 
80  virtual void deleteDevice(string id) = 0;
81 
82  // Gets a mapping of device parameters to addresses for the patch type.
83  // This is the full patch map.
84  // Entries should look something like "deviceId.paramName -> 1 / 25" (DMX example)
85  // virtual map<string, string> getPatchParams() = 0;
86 
87  // Maps Device IDs to starting addresses.
88  // This is a more concise view of the patch map compared to getPatchParams()
89  // virtual map<string, string> getPatchIDs() = 0;
90 
91  // Gets a map of patch data with implementation-defined options.
92  // Allows flexible querying of patches with implementation-specific details.
93  // virtual map<string, string> getPatchInfo(string opts) = 0;
94  };
95 }
96 
97 #endif
Represents a physical lighting Device in Lumiverse.
void close()
Close the connection to node.
Definition: Dumiverse.cpp:37
void init(const char *jsonPatchStr, const char *filename)
Initializes data structures.
Definition: Dumiverse.cpp:29
Definition: Layer.h:437
A Patch maps devices to output channels and handles the output of data to the network.
Definition: Patch.h:24
virtual ~Patch()
Virtual destructor.
Definition: Patch.h:28
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2