xref: /openbmc/phosphor-power/phosphor-regulators/docs/internal_design.md (revision 8b38b177315d40f1f9bc1e4d0784d45ea17cbd5c)
180689db1SShawn McCarney# Internal Design
280689db1SShawn McCarney
380689db1SShawn McCarney## Key classes
480689db1SShawn McCarney
580689db1SShawn McCarney- Manager
680689db1SShawn McCarney  - Top level class created in `main()`.
780689db1SShawn McCarney  - Loads the JSON configuration file.
880689db1SShawn McCarney  - Implements the D-Bus `configure` and `monitor` methods.
980689db1SShawn McCarney  - Contains a System object.
1080689db1SShawn McCarney- System
1180689db1SShawn McCarney  - Represents the computer system being controlled and monitored by the BMC.
1280689db1SShawn McCarney  - Contains one or more Chassis objects.
1380689db1SShawn McCarney- Chassis
14*8b38b177SShawn McCarney  - Represents a physical enclosure that can be powered on and off by the BMC.
1580689db1SShawn McCarney  - Small and mid-sized systems may contain a single Chassis.
1680689db1SShawn McCarney  - In a large rack-mounted system, each drawer may correspond to a Chassis.
1780689db1SShawn McCarney  - Contains one or more Device objects.
1880689db1SShawn McCarney- Device
1980689db1SShawn McCarney  - Represents a hardware device, such as a voltage regulator or I/O expander.
2080689db1SShawn McCarney  - Contains zero or more Rail objects.
2180689db1SShawn McCarney- Rail
2280689db1SShawn McCarney  - Represents a voltage rail produced by a voltage regulator, such as 1.1V.
2380689db1SShawn McCarney- Services
2480689db1SShawn McCarney  - Abstract base class that provides access to a collection of system services
2580689db1SShawn McCarney    like error logging, journal, vpd, and hardware presence.
2680689db1SShawn McCarney  - The BMCServices child class provides the real implementation.
2780689db1SShawn McCarney  - The MockServices child class provides a mock implementation that can be used
2880689db1SShawn McCarney    in gtest test cases.
29