1*068f8073SShawn McCarney /** 2*068f8073SShawn McCarney * Copyright © 2025 IBM Corporation 3*068f8073SShawn McCarney * 4*068f8073SShawn McCarney * Licensed under the Apache License, Version 2.0 (the "License"); 5*068f8073SShawn McCarney * you may not use this file except in compliance with the License. 6*068f8073SShawn McCarney * You may obtain a copy of the License at 7*068f8073SShawn McCarney * 8*068f8073SShawn McCarney * http://www.apache.org/licenses/LICENSE-2.0 9*068f8073SShawn McCarney * 10*068f8073SShawn McCarney * Unless required by applicable law or agreed to in writing, software 11*068f8073SShawn McCarney * distributed under the License is distributed on an "AS IS" BASIS, 12*068f8073SShawn McCarney * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*068f8073SShawn McCarney * See the License for the specific language governing permissions and 14*068f8073SShawn McCarney * limitations under the License. 15*068f8073SShawn McCarney */ 16*068f8073SShawn McCarney #pragma once 17*068f8073SShawn McCarney 18*068f8073SShawn McCarney #include "chassis.hpp" 19*068f8073SShawn McCarney 20*068f8073SShawn McCarney #include <memory> 21*068f8073SShawn McCarney #include <utility> 22*068f8073SShawn McCarney #include <vector> 23*068f8073SShawn McCarney 24*068f8073SShawn McCarney namespace phosphor::power::sequencer 25*068f8073SShawn McCarney { 26*068f8073SShawn McCarney 27*068f8073SShawn McCarney /** 28*068f8073SShawn McCarney * @class System 29*068f8073SShawn McCarney * 30*068f8073SShawn McCarney * The computer system being controlled and monitored by the BMC. 31*068f8073SShawn McCarney * 32*068f8073SShawn McCarney * The system contains one or more chassis. 33*068f8073SShawn McCarney */ 34*068f8073SShawn McCarney class System 35*068f8073SShawn McCarney { 36*068f8073SShawn McCarney public: 37*068f8073SShawn McCarney // Specify which compiler-generated methods we want 38*068f8073SShawn McCarney System() = delete; 39*068f8073SShawn McCarney System(const System&) = delete; 40*068f8073SShawn McCarney System(System&&) = delete; 41*068f8073SShawn McCarney System& operator=(const System&) = delete; 42*068f8073SShawn McCarney System& operator=(System&&) = delete; 43*068f8073SShawn McCarney ~System() = default; 44*068f8073SShawn McCarney 45*068f8073SShawn McCarney /** 46*068f8073SShawn McCarney * Constructor. 47*068f8073SShawn McCarney * 48*068f8073SShawn McCarney * @param chassis Chassis in the system 49*068f8073SShawn McCarney */ 50*068f8073SShawn McCarney explicit System(std::vector<std::unique_ptr<Chassis>> chassis) : 51*068f8073SShawn McCarney chassis{std::move(chassis)} 52*068f8073SShawn McCarney {} 53*068f8073SShawn McCarney 54*068f8073SShawn McCarney /** 55*068f8073SShawn McCarney * Returns the chassis in the system. 56*068f8073SShawn McCarney * 57*068f8073SShawn McCarney * @return chassis 58*068f8073SShawn McCarney */ 59*068f8073SShawn McCarney const std::vector<std::unique_ptr<Chassis>>& getChassis() const 60*068f8073SShawn McCarney { 61*068f8073SShawn McCarney return chassis; 62*068f8073SShawn McCarney } 63*068f8073SShawn McCarney 64*068f8073SShawn McCarney private: 65*068f8073SShawn McCarney /** 66*068f8073SShawn McCarney * Chassis in the system. 67*068f8073SShawn McCarney */ 68*068f8073SShawn McCarney std::vector<std::unique_ptr<Chassis>> chassis{}; 69*068f8073SShawn McCarney }; 70*068f8073SShawn McCarney 71*068f8073SShawn McCarney } // namespace phosphor::power::sequencer 72