Manages all the devices in MPF.
Accessing the device_manager in code
There is only one instance of the device_manager in MPF, and it’s accessible via
Methods & Attributes
The device_manager has the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.
Create devices for a collection.
Create machine wide control events.
Scan a config dictionary for control_events.Yields events, methods, delays, and devices for all the devices and control_events in that config.
Parameters: config – An MPF config dictionary (either machine-wide or mode- specific). Returns:
- The event name
- The callback method of the device
- The delay in ms
- The device object
Return type: A generator of 4-item tuples
Return all devices which are registered as monitorable.
Load all devices.
notify_device_changes(device, notify, old, value)¶
Notify subscribers about changes in a registered device.
- device – The device that changed.
- notify –
- old – The old value.
- value – The new value.
Register a monitorable device.
Parameters: device – The device to register.
Stop all devices in the machine.