This documentation is for an unreleased version of MPF!
This is the developer documentation for MPF 0.51, which is the “dev” (next) release of MPF that is a work-in-progress. Use the “Read the Docs” link in the lower left corner to view the developer docs for the version of MPF you’re using.
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.