xref: /openbmc/phosphor-power/phosphor-regulators/docs/internal_design.md (revision 8b38b177315d40f1f9bc1e4d0784d45ea17cbd5c)
1# Internal Design
2
3## Key classes
4
5- Manager
6  - Top level class created in `main()`.
7  - Loads the JSON configuration file.
8  - Implements the D-Bus `configure` and `monitor` methods.
9  - Contains a System object.
10- System
11  - Represents the computer system being controlled and monitored by the BMC.
12  - Contains one or more Chassis objects.
13- Chassis
14  - Represents a physical enclosure that can be powered on and off by the BMC.
15  - Small and mid-sized systems may contain a single Chassis.
16  - In a large rack-mounted system, each drawer may correspond to a Chassis.
17  - Contains one or more Device objects.
18- Device
19  - Represents a hardware device, such as a voltage regulator or I/O expander.
20  - Contains zero or more Rail objects.
21- Rail
22  - Represents a voltage rail produced by a voltage regulator, such as 1.1V.
23- Services
24  - Abstract base class that provides access to a collection of system services
25    like error logging, journal, vpd, and hardware presence.
26  - The BMCServices child class provides the real implementation.
27  - The MockServices child class provides a mock implementation that can be used
28    in gtest test cases.
29