import enum
from enum import StrEnum, auto


@enum.unique
class Event(StrEnum):
    APT_CONNECTION_ERROR = auto()
    APT_POLLER_EXIT = auto()
    EXPECTED_EXCEPTION = auto()
    RX_MESSAGE_KNOWN = auto()
    RX_MESSAGE_UNKNOWN = auto()
    TX_MESSAGE_ORDERED = auto()
    TX_MESSAGE_ORDERED_EXPECT_REPLY = auto()
    TX_MESSAGE_ORDERED_NO_REPLY = auto()
    TX_MESSAGE_UNORDERED = auto()
    UNEXPECTED_EXCEPTION = auto()

    # Common events used by most device types
    DEVICE_CONNECTED = auto()
    DEVICE_NOT_CONNECTED = auto()
    DEVICE_IDENTIFY = auto()

    # Optical Switch Events
    SWITCH_BAR_STATE = auto()
    SWITCH_CROSS_STATE = auto()

    # Waveplate Events
    WAVEPLATE_HOME = auto()
    WAVEPLATE_ROTATE = auto()
