Lumiverse
2.5
A framework for creating lighting control applications
|
A Patch maps devices to output channels and handles the output of data to the network. More...
#include <Patch.h>
Public Member Functions | |
virtual | ~Patch () |
Virtual destructor. | |
virtual void | update (set< Device * > devices)=0 |
Grabs values from list of Devices, translates them to proper format for the given network, and outputs the values to the network if the device is patched. More... | |
virtual void | init ()=0 |
Initializes settings for the patch. More... | |
virtual void | close ()=0 |
Prepares for patch shutdown. | |
virtual JSONNode | toJSON ()=0 |
Returns a JSON node representing the patch. More... | |
virtual string | getType ()=0 |
Gets the type of the patch as a string. More... | |
virtual void | deleteDevice (string id)=0 |
Called when a device is deleted from the Rig. More... | |
A Patch maps devices to output channels and handles the output of data to the network.
Patches do not expose the internal workings of their network transport to the Rig. The user may choose to configure a Patch in a particular way, but the Rig doesn't care as long as it can pass Device objects to a Patch. The root Patch class is an abstract base class that defines the actions all implementations of a Patch must have.
|
pure virtual |
Called when a device is deleted from the Rig.
Patches should clean up information about the device in question.
Implemented in Lumiverse::SimulationPatch, Lumiverse::DMXPatch, and Lumiverse::OscPatch.
|
pure virtual |
Gets the type of the patch as a string.
This function should be hardcoded to return a string. This allows each object to be uniquely identified by a single string and allows the user to then do more detailed manipulation of the Patch.
Implemented in Lumiverse::ArnoldPatch, Lumiverse::ArnoldPatch, Lumiverse::SimulationPatch, Lumiverse::DMXPatch, Lumiverse::ArnoldAnimationPatch, and Lumiverse::OscPatch.
|
pure virtual |
Initializes settings for the patch.
This can be starting up serial interfaces, network configuration, etc.
Implemented in Lumiverse::ArnoldPatch, Lumiverse::ArnoldPatch, Lumiverse::SimulationPatch, Lumiverse::DMXPatch, Lumiverse::ArnoldAnimationPatch, and Lumiverse::OscPatch.
|
pure virtual |
Returns a JSON node representing the patch.
This is necessary for proper serialization of the Patch when the Rig is serialied. If you don't want your Patch to be serializable for some reason, you can return an empty JSONNode
Implemented in Lumiverse::ArnoldPatch, Lumiverse::ArnoldPatch, Lumiverse::SimulationPatch, Lumiverse::DMXPatch, and Lumiverse::OscPatch.
|
pure virtual |
Grabs values from list of Devices, translates them to proper format for the given network, and outputs the values to the network if the device is patched.
Each Patch will get the full list of Devices from the Rig. The Patch implementation is responsible for finding the Devices that it needs, and then transmitting the apropriate data over the network. Each Patch may do this differently depending on the needs of the network.
Implemented in Lumiverse::ArnoldPatch, Lumiverse::ArnoldAnimationPatch, Lumiverse::ArnoldPatch, Lumiverse::SimulationPatch, Lumiverse::DMXPatch, and Lumiverse::OscPatch.