resolved: activating/deactivating peripherals

This commit is contained in:
2025-11-01 12:23:22 +01:00
parent cb5c5b688e
commit abcc3e0b5e
17 changed files with 559 additions and 1904 deletions

View File

@@ -5,7 +5,8 @@ import "context"
// Peripheral represents the methods used to manage a peripheral (input or output hardware)
type Peripheral interface {
Connect(context.Context) error // Connect the peripheral
Disconnect() error // Disconnect the peripheral
IsConnected() bool // Return if the peripheral is connected or not
Disconnect(context.Context) error // Disconnect the peripheral
Activate(context.Context) error // Activate the peripheral
Deactivate(context.Context) error // Deactivate the peripheral
SetSettings(map[string]interface{}) error // Set a peripheral setting
@@ -31,7 +32,7 @@ type PeripheralFinder interface {
Stop() error // Stop the detection
ForceScan() // Explicitly scans for peripherals
RegisterPeripheral(context.Context, PeripheralInfo) (string, error) // Registers a new peripheral data
UnregisterPeripheral(string) error // Unregisters an existing peripheral
UnregisterPeripheral(context.Context, string) error // Unregisters an existing peripheral
GetPeripheralSettings(string) (map[string]interface{}, error) // Gets the peripheral settings
SetPeripheralSettings(string, map[string]interface{}) error // Sets the peripheral settings
GetName() string // Get the name of the finder