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