STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
combined_fsw_gui.CombinedFSWMainWindow Class Reference
Inheritance diagram for combined_fsw_gui.CombinedFSWMainWindow:
[legend]
Collaboration diagram for combined_fsw_gui.CombinedFSWMainWindow:
[legend]

Public Member Functions

 __init__ (self, str elodin_host="127.0.0.1", int elodin_port=2240, str actuator_ip=None, int actuator_port=None, int receive_port=None, str bind_address=None)
 init_ui (self, str actuator_ip=None, int actuator_port=None)
 on_state_transition (self, str target_state)
 on_abort (self)
 on_emergency_abort (self)
 on_navigation (self, str view_name)
 update_state_from_elodin (self)
 update_top_bar (self)
 closeEvent (self, event)

Public Attributes

 elodin_client = ElodinClient(elodin_host, elodin_port)
 elodin_connected = self.elodin_client.connect()
 receiver = UDPReceiver(receive_port, bind_address)
 current_state = SystemState.IDLE
 state_timer = QtCore.QTimer(self)
 update_state_from_elodin
 top_bar = TopBarWidget(self)
 on_navigation
 on_abort
 on_emergency_abort
 stack = QtWidgets.QStackedWidget()
 state_machine_widget = StateMachineWidget(self)
 sensor_widget
 actuator_widget
 top_bar_timer = QtCore.QTimer(self)
 update_top_bar

Protected Member Functions

 _set_actuators_for_state (self, str state)
 _load_state_actuator_map (self)
Optional[int] _abbrev_to_actuator_id (self, str abbrev)
int _gui_state_to_hardware (self, str abbrev, str gui_state)

Protected Attributes

dict _state_actuator_map = {}

Detailed Description

Main window combining all widgets

Definition at line 1480 of file combined_fsw_gui.py.

Constructor & Destructor Documentation

◆ __init__()

combined_fsw_gui.CombinedFSWMainWindow.__init__ ( self,
str elodin_host = "127.0.0.1",
int elodin_port = 2240,
str actuator_ip = None,
int actuator_port = None,
int receive_port = None,
str bind_address = None )

Definition at line 1483 of file combined_fsw_gui.py.

Member Function Documentation

◆ _abbrev_to_actuator_id()

Optional[int] combined_fsw_gui.CombinedFSWMainWindow._abbrev_to_actuator_id ( self,
str abbrev )
protected
Map actuator abbreviation to actuator ID from config.toml

Definition at line 1696 of file combined_fsw_gui.py.

◆ _gui_state_to_hardware()

int combined_fsw_gui.CombinedFSWMainWindow._gui_state_to_hardware ( self,
str abbrev,
str gui_state )
protected
Convert GUI state (OPEN/CLOSED) to hardware state (0/1) accounting for NC/NO

Definition at line 1727 of file combined_fsw_gui.py.

◆ _load_state_actuator_map()

combined_fsw_gui.CombinedFSWMainWindow._load_state_actuator_map ( self)
protected
Load state machine actuator mapping from CSV

Definition at line 1628 of file combined_fsw_gui.py.

◆ _set_actuators_for_state()

combined_fsw_gui.CombinedFSWMainWindow._set_actuators_for_state ( self,
str state )
protected
Set actuator states based on state machine CSV

Definition at line 1592 of file combined_fsw_gui.py.

◆ closeEvent()

combined_fsw_gui.CombinedFSWMainWindow.closeEvent ( self,
event )
Handle window close

Definition at line 1788 of file combined_fsw_gui.py.

◆ init_ui()

combined_fsw_gui.CombinedFSWMainWindow.init_ui ( self,
str actuator_ip = None,
int actuator_port = None )
Initialize UI

Definition at line 1516 of file combined_fsw_gui.py.

◆ on_abort()

combined_fsw_gui.CombinedFSWMainWindow.on_abort ( self)
Handle abort

Definition at line 1749 of file combined_fsw_gui.py.

◆ on_emergency_abort()

combined_fsw_gui.CombinedFSWMainWindow.on_emergency_abort ( self)
Handle emergency abort

Definition at line 1753 of file combined_fsw_gui.py.

◆ on_navigation()

combined_fsw_gui.CombinedFSWMainWindow.on_navigation ( self,
str view_name )
Handle navigation

Definition at line 1758 of file combined_fsw_gui.py.

◆ on_state_transition()

combined_fsw_gui.CombinedFSWMainWindow.on_state_transition ( self,
str target_state )
Handle state transition request and set actuators accordingly

Definition at line 1580 of file combined_fsw_gui.py.

◆ update_state_from_elodin()

combined_fsw_gui.CombinedFSWMainWindow.update_state_from_elodin ( self)
Query current state from Elodin

Definition at line 1766 of file combined_fsw_gui.py.

◆ update_top_bar()

combined_fsw_gui.CombinedFSWMainWindow.update_top_bar ( self)
Update top bar pressure gauges

Definition at line 1773 of file combined_fsw_gui.py.

Member Data Documentation

◆ _state_actuator_map

dict combined_fsw_gui.CombinedFSWMainWindow._state_actuator_map = {}
protected

Definition at line 1635 of file combined_fsw_gui.py.

◆ actuator_widget

combined_fsw_gui.CombinedFSWMainWindow.actuator_widget
Initial value:
= ActuatorControlWidget(
self.receiver, self.elodin_client, actuator_ip, actuator_port, self
)

Definition at line 1561 of file combined_fsw_gui.py.

◆ current_state

combined_fsw_gui.CombinedFSWMainWindow.current_state = SystemState.IDLE

Definition at line 1504 of file combined_fsw_gui.py.

◆ elodin_client

combined_fsw_gui.CombinedFSWMainWindow.elodin_client = ElodinClient(elodin_host, elodin_port)

Definition at line 1495 of file combined_fsw_gui.py.

◆ elodin_connected

combined_fsw_gui.CombinedFSWMainWindow.elodin_connected = self.elodin_client.connect()

Definition at line 1496 of file combined_fsw_gui.py.

◆ on_abort

combined_fsw_gui.CombinedFSWMainWindow.on_abort

Definition at line 1531 of file combined_fsw_gui.py.

◆ on_emergency_abort

combined_fsw_gui.CombinedFSWMainWindow.on_emergency_abort

Definition at line 1532 of file combined_fsw_gui.py.

◆ on_navigation

combined_fsw_gui.CombinedFSWMainWindow.on_navigation

Definition at line 1530 of file combined_fsw_gui.py.

◆ receiver

combined_fsw_gui.CombinedFSWMainWindow.receiver = UDPReceiver(receive_port, bind_address)

Definition at line 1501 of file combined_fsw_gui.py.

◆ sensor_widget

combined_fsw_gui.CombinedFSWMainWindow.sensor_widget
Initial value:
= SensorPlotWidget(
self.receiver,
self.elodin_client,
CONFIG.config["network"]["bind_address"],
self,
)

Definition at line 1553 of file combined_fsw_gui.py.

◆ stack

combined_fsw_gui.CombinedFSWMainWindow.stack = QtWidgets.QStackedWidget()

Definition at line 1536 of file combined_fsw_gui.py.

◆ state_machine_widget

combined_fsw_gui.CombinedFSWMainWindow.state_machine_widget = StateMachineWidget(self)

Definition at line 1543 of file combined_fsw_gui.py.

◆ state_timer

combined_fsw_gui.CombinedFSWMainWindow.state_timer = QtCore.QTimer(self)

Definition at line 1512 of file combined_fsw_gui.py.

◆ top_bar

combined_fsw_gui.CombinedFSWMainWindow.top_bar = TopBarWidget(self)

Definition at line 1529 of file combined_fsw_gui.py.

◆ top_bar_timer

combined_fsw_gui.CombinedFSWMainWindow.top_bar_timer = QtCore.QTimer(self)

Definition at line 1576 of file combined_fsw_gui.py.

◆ update_state_from_elodin

combined_fsw_gui.CombinedFSWMainWindow.update_state_from_elodin

Definition at line 1513 of file combined_fsw_gui.py.

◆ update_top_bar

combined_fsw_gui.CombinedFSWMainWindow.update_top_bar

Definition at line 1577 of file combined_fsw_gui.py.


The documentation for this class was generated from the following file: