self.machine.hardware_platforms['virtual']¶
-
class
mpf.platforms.virtual.
HardwarePlatform
(machine)¶ Bases:
mpf.core.platform.AccelerometerPlatform
,mpf.core.platform.I2cPlatform
,mpf.core.platform.ServoPlatform
,mpf.core.platform.MatrixLightsPlatform
,mpf.core.platform.GiPlatform
,mpf.core.platform.LedPlatform
,mpf.core.platform.SwitchPlatform
,mpf.core.platform.DriverPlatform
,mpf.core.platform.DmdPlatform
,mpf.core.platform.RgbDmdPlatform
Base class for the virtual hardware platform.
Accessing the virtual platform via code
Hardware platforms are stored in the
self.machine.hardware_platforms
dictionary, so the virtual platform is available viaself.machine.hardware_platforms['virtual']
.Methods & Attributes
The virtual platform has the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.
-
clear_hw_rule
(switch, coil)¶ Clear hw rule.
-
configure_accelerometer
(config, callback)¶ Configure accelerometer.
-
configure_dmd
()¶ Configure DMD.
-
configure_driver
(config)¶ Configure driver.
-
configure_gi
(config)¶ Configure GI.
-
configure_led
(config, channels)¶ Configure led.
-
configure_matrixlight
(config)¶ Configure matrix light.
-
configure_rgb_dmd
()¶ Configure DMD.
-
configure_servo
(config)¶ Configure a servo device in paltform.
-
configure_switch
(config)¶ Configure switch.
-
get_hw_switch_states
()¶ Return hw switch states.
-
i2c_read16
(address, register)¶ Read I2C.
-
i2c_read8
(address, register)¶ Read I2C.
-
i2c_write8
(address, register, value)¶ Write to I2C.
-
initialize
()¶ Initialise platform.
-
set_pulse_on_hit_and_enable_and_release_and_disable_rule
(enable_switch, disable_switch, coil)¶ Set rule.
-
set_pulse_on_hit_and_enable_and_release_rule
(enable_switch, coil)¶ Set rule.
-
set_pulse_on_hit_and_release_rule
(enable_switch, coil)¶ Set rule.
-
set_pulse_on_hit_rule
(enable_switch, coil)¶ Set rule.
-
stop
()¶ Stop platform.
-
validate_coil_overwrite_section
(driver, config_overwrite)¶ Validate coil overwrite sections.
-
validate_coil_section
(driver, config)¶ Validate coil sections.
-
validate_switch_overwrite_section
(switch, config_overwrite)¶ Validate switch overwrite sections.
-
validate_switch_section
(switch, config)¶ Validate switch sections.
-