7 #include "LumiverseCoreConfig.h"
12 #include "lib/oscpack/osc/OscOutboundPacketStream.h"
13 #include "lib/oscpack/osc/OscPacketListener.h"
14 #include "lib/oscpack/osc/OscReceivedElements.h"
15 #include "lib/oscpack/ip/UdpSocket.h"
28 OscPatch(
string address,
int port, OscFormat mode = PREFIXED_ADDR,
string pattern =
"lumiverse");
32 virtual void init()
override;
34 virtual void update(set<Device *> devices)
override;
36 virtual void close()
override;
38 virtual JSONNode
toJSON()
override;
42 virtual string getType() {
return "osc"; }
44 void changeAddress(
string address,
int port);
45 void changeInPort(
int port);
57 bool sync(
const set<Device *> devices);
76 virtual void ProcessMessage(
const osc::ReceivedMessage& m,
const IpEndpointName& remote);
84 UdpTransmitSocket* _t;
116 set<string> _syncParams;
Definition: OscPatch.h:25
virtual JSONNode toJSON() override
Returns a JSON node representing the patch.
Definition: OscPatch.cpp:71
OscFormat _mode
Determines how the OSC messages are sent Under PREFIXED_ADDR the OSC packet will be arranged as follo...
Definition: OscPatch.h:70
void newEosCmd()
Resets the Eos command line.
Definition: OscPatch.cpp:462
virtual void update(set< Device * > devices) override
Grabs values from list of Devices, translates them to proper format for the given network...
Definition: OscPatch.cpp:40
set< int > getEosSelection()
Returns the selected device channels from Eos.
Definition: OscPatch.cpp:230
A Patch maps devices to output channels and handles the output of data to the network.
Definition: Patch.h:24
void deviceToEos(Device *d)
Outputs a series of ETC Eos commands to update the state.
Definition: OscPatch.cpp:405
bool sync(const set< Device * > devices)
Only active in ETC_EOS mode. Synchronizes device values with what's in EOS.
Definition: OscPatch.cpp:128
virtual void deleteDevice(string id) override
Called when a device is deleted from the Rig.
Definition: OscPatch.cpp:85
virtual string getType()
Gets the type of the patch as a string.
Definition: OscPatch.h:42
void deviceToOsc(osc::OutboundPacketStream &p, Device *d)
Converts a device to OSC and places the conversion in the outbound packet stream. ...
Definition: OscPatch.cpp:358
virtual void close() override
Prepares for patch shutdown.
Definition: OscPatch.cpp:60
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2
void loadJSON(JSONNode data)
Loads a patch from JSON data.
Definition: OscPatch.cpp:470
virtual void init() override
Initializes settings for the patch.
Definition: OscPatch.cpp:23
void processSelection(string chans)
Processes an Eos selection string.
Definition: OscPatch.cpp:503
A Device in Lumiverse maintains information about a lighting device.
Definition: Device.h:55
string _pattern
In fixed mode, the pattern to which messages are sent.
Definition: OscPatch.h:73
The Patch translates Lumiverse Data to Network Data.