1# Internal Design 2 3## Key classes 4 5- PowerInterface 6 - Defines the `org.openbmc.control.Power` D-Bus interface. 7 - The `state` property is set to power the chassis on or off. This contains 8 the desired power state. 9 - The `pgood` property contains the actual power state of the chassis. 10- PowerControl 11 - Created in `main()`. Handles the event loop. 12 - Sub-class of PowerInterface that provides a concrete implementation of the 13 `org.openbmc.control.Power` D-Bus interface. 14 - Finds and loads the JSON configuration file. 15 - Finds power sequencer device information. 16 - Creates a sub-class of PowerSequencerDevice that matches power sequencer 17 device information. 18 - Powers the chassis on and off using the `power-chassis-control` named GPIO. 19 - Monitors the chassis pgood status every 3 seconds using the 20 `power-chassis-good` named GPIO. 21 - Enforces a minimum power off time of 15 seconds from cold start and 25 22 seconds from power off. 23- DeviceFinder 24 - Finds power sequencer device information on D-Bus published by 25 EntityManager. 26- Rail 27 - A voltage rail that is enabled or monitored by the power sequencer device. 28- PowerSequencerDevice 29 - Abstract base class for a power sequencer device. 30 - Defines virtual methods that must be implemented by all child classes. 31- StandardDevice 32 - Sub-class of PowerSequencerDevice that implements the standard pgood fault 33 detection algorithm. 34- PMBusDriverDevice 35 - Sub-class of StandardDevice for power sequencer devices that are bound to a 36 PMBus device driver. 37- UCD90xDevice 38 - Sub-class of PMBusDriverDevice for the UCD90X family of power sequencer 39 devices. 40- UCD90160Device 41 - Sub-class of UCD90xDevice representing a UCD90160 power sequencer device. 42- UCD90320Device 43 - Sub-class of UCD90xDevice representing a UCD90320 power sequencer device. 44- Services 45 - Abstract base class that provides an interface to system services like error 46 logging and the journal. 47- BMCServices 48 - Sub-class of Services with real implementation of methods. 49- MockServices 50 - Sub-class of Services with mock implementation of methods for automated 51 testing. 52