init commit

This commit is contained in:
Ayzen
2026-03-05 14:42:33 +03:00
commit fd4618b20d
964 changed files with 325114 additions and 0 deletions
@@ -0,0 +1,25 @@
"""Protocols for switch backend implementations."""
from __future__ import annotations
from typing import Protocol
class SwitchDriverProtocol(Protocol):
"""Required contract for all switch backends."""
def open(self) -> None:
"""Open hardware or mock resources."""
def close(self) -> None:
"""Close hardware or mock resources."""
def position_count(self) -> int:
"""Return total number of supported positions."""
def switch_to(self, position: int) -> None:
"""Switch to requested zero-based position."""
@property
def current_position(self) -> int:
"""Return currently active position."""