Spaces:
Paused
Paused
File size: 763 Bytes
5e0b58b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """Sensor adapter contracts for simulated, digital, and physical inputs."""
from __future__ import annotations
from typing import Protocol, runtime_checkable
from .models import SensorFrame
@runtime_checkable
class SensorAdapter(Protocol):
"""Minimal sensor interface consumed by the embodiment layer."""
@property
def sensor_id(self) -> str:
"""Return the stable adapter identifier."""
...
@property
def modality(self) -> str:
"""Return the sensor modality name."""
...
@property
def active(self) -> bool:
"""Return whether the sensor is currently available."""
...
def sample(self, tick: int) -> SensorFrame:
"""Capture one sensor frame for *tick*."""
...
|