Double Pendulum Simulator Shell¶
The rcp.ex.dblpend
module contains the common application code
for the double pendulum simulator scripts.
rcp.ex.dblpend¶
Python 3 GUI application module to support the 16-375 double-pendulum control exercises.
-
class
rcp.ex.dblpend.
AppWindow
(main)[source]¶ A custom main window which provides all GUI controls. This generally follows a model-view-controller convention in which this window provides the views, passing events to the application controller via callbacks.
-
apply_user_configuration
(config)[source]¶ Apply the persistent configuration values from a configparser section proxy object.
-
connect_callbacks
()[source]¶ Finish initializing the GUI by connecting all callbacks from GUI elements to application controller methods. This allows the log window to be set up early to capture any messages from the initialization of other object.
-
gather_configuration
(config)[source]¶ Update the persistent configuration values in a configparser section proxy object.
-
-
class
rcp.ex.dblpend.
MainApp
(custom_controller_class)[source]¶ Main application controller object holding any non-GUI related state.
- Parameters
custom_controller_class – a class object instanced once per double-pendulum model to create a motion controller
-
app_has_started
()[source]¶ Callback to be invoked right after the main event loop begins. This may be extended in child classes to implement startup behaviors which require a running event loop.
-
app_is_exiting
()[source]¶ Callback invoked right before the program ends, either from a keyboard interrupt window close. This may be extended in child classes to clean up external resources, e.g., close any serial ports to remove associated lock files.