Cockpit is implemented in the Python programming language. The code consists of four main components: devices, handlers, interfaces, and the GUI. Devices represent the individual physical devices, handlers represent control components of the devices, handlers from single or multiple devices are aggregated into interfaces, and the GUI component provides the user interaction to the different interfaces and handlers.
The Cockpit program starts in
cockpit.main() which reads the
configuration files and constructs an
CockpitApp instance constructs a
cockpit.depot.DeviceDepot and initialises all the devices
declared on the depot configuration. Each device constructs their
associated handlers are initialised which are then collected by the
device depot. Once devices and handlers are initialised, interfaces
are initialised. Finally, the multiple GUI windows are created based
on the different handlers and interfaces available. Once
initialisation is completed, we simply enter the event loop (provided
by the wxPython library) and wait for the user to do something.
Consider using sphin-apidoc to generate the rest of this page.