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. This creates an instance of the 15 System class. 16 - Powers the chassis on and off using the `power-chassis-control` named GPIO. 17 - Monitors the chassis pgood status every 3 seconds using the 18 `power-chassis-good` named GPIO. 19 - Enforces a minimum power off time of 15 seconds from cold start and 25 20 seconds from power off. 21- System 22 - The computer system being controlled and monitored by the BMC. 23- Chassis 24 - A chassis within the system. Chassis are typically a physical enclosure that 25 contains system components such as CPUs, fans, power supplies, and PCIe 26 cards. 27- Rail 28 - A voltage rail that is enabled or monitored by the power sequencer device. 29- PowerSequencerDevice 30 - Abstract base class for a power sequencer device. 31 - Defines virtual methods that must be implemented by all child classes. 32- StandardDevice 33 - Sub-class of PowerSequencerDevice that implements the standard pgood fault 34 detection algorithm. 35- PMBusDriverDevice 36 - Sub-class of StandardDevice for power sequencer devices that are bound to a 37 PMBus device driver. 38- UCD90xDevice 39 - Sub-class of PMBusDriverDevice for the UCD90X family of power sequencer 40 devices. 41- UCD90160Device 42 - Sub-class of UCD90xDevice representing a UCD90160 power sequencer device. 43- UCD90320Device 44 - Sub-class of UCD90xDevice representing a UCD90320 power sequencer device. 45- Services 46 - Abstract base class that provides an interface to system services like error 47 logging and the journal. 48- BMCServices 49 - Sub-class of Services with real implementation of methods. 50- MockServices 51 - Sub-class of Services with mock implementation of methods for automated 52 testing. 53