mpf.plugins.osc
¶
MPF plugin allows a machine to be controlled by an OSC client.
This mode requires pyOSC, https://trac.v2.nl/wiki/pyOSC It was written for pyOSC 0.3.5b build 5394, though later versions should work.
-
class
mpf.plugins.osc.
OSC
(machine)¶ OSC plugin.
Initialise OSC plugin.
-
client_send_osc_message
(category, name, data)¶ Send an OSC message to the client to update it.
Parameters: category - type of update, sw, coil, lamp, led, etc. name - the name of the object we’re updating data - the data we’re sending
-
client_update_all
()¶ Update the OSC client.
Good for when it switches to a new tab or connects a new client.
-
process_coil
(coil, data)¶ Process a coil event received from the OSC client.
-
process_config
(event, data)¶ Send config data to the OSC client.
-
process_event
(event, data)¶ Post an MPF event based on an event received from the OSC client.
-
process_flipper
(flipper, data)¶ Call the flipper’s sw_flip() or sw_release() event.
-
process_light
(light, data)¶ Process a light event received from the OSC client.
-
process_message
(addr, tags, data, client_address)¶ Receive OSC messages and act on them.
-
process_refresh
(name, data)¶ Process refresh.
-
process_switch
(switch, data)¶ Process a switch event received from the OSC client.
-
process_sync
(name, data)¶ Process sync.
-
process_wpcsync
(name, data)¶ Process wpc sync.
-
register_lights
()¶ Add handlers to all lights so the OSC client can receive updates.
-
register_switches
()¶ Add switch handlers to all switches so the OSC client can receive updates.
-
start
(**kwargs)¶ Start the OSC server.
-
stop
()¶ Stop the OSC server.
-