Skip to content

radiens_core.models.ports

Port and GPIO domain models and enums.

Attributes

FlexPort module-attribute

FlexPort = Port | PortStr | int

Port that also accepts a single-letter string or int index.

Use with @validate_call::

@validate_call(config=ConfigDict(arbitrary_types_allowed=True))
def start_recording(self, *, port: FlexPort | None = None) -> None:
    p = validated(port, Port) if port is not None else None
    ...

Classes

GPIOChannelCount

Bases: BaseModel

GPIO channel count information.

Attributes:

Name Type Description
n_aux int

Number of auxiliary channels.

n_din int

Number of digital input channels.

n_dout int

Number of digital output channels.

Port

Bases: IntEnum

Hardware port identifier. Values match proto common.Port.

PortChannelCount

Bases: BaseModel

Port channel count information.

Attributes:

Name Type Description
port Port

Hardware port identifier. References Port.

channel_count int

Number of channels on the port.