Skip to main content

Module controller

Module controller 

Source
Expand description

ยงController Module

The controller module acts as the central event handler and coordinator for the R.E.K.T.A.L. GUI application.

It is responsible for:

  • Draining incoming DMX universe stream data and updating universe UI panels.
  • Dispatching global UI events (UiEvent) via channels.
  • Processing network messages (TcpServerMessage) received from the kernel server.
  • Handling UI action events and updating central application states (ConnectionState, SessionState).

Enumsยง

UiEvent
Enum describing global GUI events dispatched across the application.

Functionsยง

handle_dmx_data ๐Ÿ”’
Drains incoming DMX universe frame data from the UDP receiver channel and updates the matching Universe panels in the docking tree.
handle_events ๐Ÿ”’
Drains and processes all queued UiEvent items sent from UI interactions or network handlers.
handle_incoming_network_data ๐Ÿ”’
Drains incoming network messages (TcpServerMessage) from the TCP receiver channel and updates UI tabs or triggers connection state changes.
log_level_to_color32
Maps a common LogLevel enum variant to a corresponding egui [Color32] for UI rendering.
process_terminal_command ๐Ÿ”’
Processes a command entered into a terminal tab.
send_ui_event
Thread-safe helper to send a UiEvent into the global [UI_EVENT_SENDER] channel.