Lumiverse
2.5
A framework for creating lighting control applications
|
Public Member Functions | |
OscPatch (string address, int port, OscFormat mode=PREFIXED_ADDR, string pattern="lumiverse") | |
OscPatch (JSONNode data) | |
virtual void | init () override |
Initializes settings for the patch. More... | |
virtual void | update (set< Device * > devices) override |
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 | close () override |
Prepares for patch shutdown. | |
virtual JSONNode | toJSON () override |
Returns a JSON node representing the patch. More... | |
virtual void | deleteDevice (string id) override |
Called when a device is deleted from the Rig. More... | |
virtual string | getType () |
Gets the type of the patch as a string. More... | |
void | changeAddress (string address, int port) |
void | changeInPort (int port) |
string | getAddress () |
int | getPort () |
int | getInPort () |
bool | isRunning () |
bool | sync (const set< Device * > devices) |
Only active in ETC_EOS mode. Synchronizes device values with what's in EOS. More... | |
set< int > | getEosSelection () |
Returns the selected device channels from Eos. | |
![]() | |
virtual | ~Patch () |
Virtual destructor. | |
Public Attributes | |
OscFormat | _mode |
Determines how the OSC messages are sent Under PREFIXED_ADDR the OSC packet will be arranged as follows: /[pattern]/[id] {params} Under PER_DEVICE_ADDR the OSC packet will be arranged as follows: /[id] {params} User ETC_EOS the OSC packet will send Eos commands to the corresponding channel number. | |
string | _pattern |
In fixed mode, the pattern to which messages are sent. | |
Protected Member Functions | |
virtual void | ProcessMessage (const osc::ReceivedMessage &m, const IpEndpointName &remote) |
Private Member Functions | |
void | deviceToOsc (osc::OutboundPacketStream &p, Device *d) |
Converts a device to OSC and places the conversion in the outbound packet stream. | |
void | deviceToEos (Device *d) |
Outputs a series of ETC Eos commands to update the state. More... | |
void | newEosCmd () |
Resets the Eos command line. | |
void | loadJSON (JSONNode data) |
Loads a patch from JSON data. | |
void | processSelection (string chans) |
Processes an Eos selection string. | |
Private Attributes | |
string | _address |
int | _port |
int | _inPort |
bool | _running |
UdpTransmitSocket * | _t |
Device * | _syncDevice |
bool | _syncReady |
set< string > | _syncParams |
set< int > | _syncChan |
|
overridevirtual |
Called when a device is deleted from the Rig.
Patches should clean up information about the device in question.
Implements Lumiverse::Patch.
|
private |
Outputs a series of ETC Eos commands to update the state.
Note that this function operates on specified device paramter names. If the paramter names don't match, nothing will be transmitted.
|
inlinevirtual |
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.
Implements Lumiverse::Patch.
|
overridevirtual |
Initializes settings for the patch.
This can be starting up serial interfaces, network configuration, etc.
Implements Lumiverse::Patch.
bool Lumiverse::OscPatch::sync | ( | const set< Device * > | devices | ) |
Only active in ETC_EOS mode. Synchronizes device values with what's in EOS.
Requires starting up an OSC receiver
|
overridevirtual |
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
Implements Lumiverse::Patch.
|
overridevirtual |
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.
Implements Lumiverse::Patch.