Documentation ¶
Overview ¶
Package plugging conceptualises the act of plugging devices into the VCS ports. This includes the panel in addition to the various peripherals that plug into the player ports (ie. controllers, savekey, etc.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitorable ¶
type Monitorable interface {
AttachPlugMonitor(m PlugMonitor)
}
Monitorable implementations are capable of having a PlugMonitor attached to it. The VCS Ports themselves are monitorable but we also use this mechanism in the "auto" controller type and in the future, devices like the Quadtari will be implemented similarly.
It is expected that such implementations will call PlugMonitor.Plugged() as required. Note that PlugMonitor.Plugged() should not be called on the event of AttachPlugMonitor except in the special case of the ports.Ports type
Implementations of Monitorable should also test peripherals that are daisy-chained and call AttachPlusMonitor() as appropriate.
if a, ok := periph.daisychain.(pluggin.Monitorable); ok { a.AttachPlugMonitor(m) }
type PeripheralID ¶ added in v0.14.0
type PeripheralID string
PeripheralID identifies the class of device a Peripheral implemenation represents.
const ( PeriphNone PeripheralID = "None" PeriphPanel PeripheralID = "Panel" PeriphStick PeripheralID = "Stick" PeriphGamepad PeripheralID = "Gamepad" PeriphPaddle PeripheralID = "Paddle" PeriphKeypad PeripheralID = "Keypad" PeriphSavekey PeripheralID = "Savekey" PeriphAtariVox PeripheralID = "AtariVox" )
List of valid PeripheralID values.
type PlugMonitor ¶
type PlugMonitor interface {
Plugged(port PortID, peripheral PeripheralID)
}
PlugMonitor interface implementations will be notified of newly plugged peripherals.