A device which represents a generic shot.
Accessing shots in code
The device collection which contains the shots in your machine is available via
self.machine.shots. For example, to access one called “foo”, you would use
self.machine.shots.foo. You can also access shots in dictionary form, e.g.
You can also get devices by tag or hardware number. See the DeviceCollection documentation for details.
Methods & Attributes
Shots have the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.
(id, current_position_index, next_switch)
Type: List of tuples
advance(force=False, **kwargs) → bool¶
Advance a shot profile forward.
If this profile is at the last step and configured to loop, it will roll over to the first step. If this profile is at the last step and not configured to loop, this method has no effect.
enable(**kwargs) → None¶
Return true if enabled.
Advance the currently-active shot profile.
Note that the shot must be enabled in order for this hit to be processed.
Jump to a certain state in the active shot profile.
- state – int of the state number you want to jump to. Note that states are zero-based, so the first state is 0.
- show_step – The step number that the associated light script should start playing at. Useful with rotations so this shot can pick up right where it left off. Default is 1 (the first step in the show)
Class attribute which specifies whether any monitors have been registered to track shots.
Return if enabled is persisted.
Return profile name.
raise_config_error(msg, error_no, *, context=None)¶
Raise a ConfigFileError exception.
Reset the shot profile for the passed mode back to the first state (State 0) and reset all sequences.
Return current state index.
Return current state name.