A common API for different hardware realizations of a DALI interface.
- Lunatone 241 389 23DO
- BEGA 71024
- Serial based SevenLab Hardware
The interface classes implement the following API functions.
Transmits a DALI frame on the bus. All 8 bit frames are treated as backward frames.
def transmit(self, frame: DaliFrame, block: bool = False) -> None:
Parameters
frame
(DaliFrame): frame to transmitblock
(bool, optional): wait for the end of transmission. Defaults to False.
Get the next DALI frame from the input queue.
def get(self, timeout: float | None = None) -> DaliFrame:
Parameters
timeout
(float | None, optional): time in seconds before the call returns. Defaults to None (wait until halted).
Returns
DaliFrame
: time out is indicated in the frame status
Transmit a DALI frame that is requesting a reply. Wait for either the replied data, or indicate a timeout.
def query_reply(self, request: DaliFrame) -> DaliFrame:
Parameters
request
(DaliFrame): DALI frame to transmit
Returns
DaliFrame
: the received reply, if no reply was received a frame withDaliStatus:TIMEOUT
is returned
Class definition for DALI frames
Class definition for status of DALI frames