blob: e86a0961478dd4352407df2eafe691bc929ba6ac [file] [log] [blame]
Shawn McCarney068f8072025-10-31 10:44:11 -05001/**
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
24namespace 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 */
34class System
35{
36 public:
Shawn McCarney068f8072025-10-31 10:44:11 -050037 System() = delete;
38 System(const System&) = delete;
39 System(System&&) = delete;
40 System& operator=(const System&) = delete;
41 System& operator=(System&&) = delete;
42 ~System() = default;
43
44 /**
45 * Constructor.
46 *
47 * @param chassis Chassis in the system
48 */
49 explicit System(std::vector<std::unique_ptr<Chassis>> chassis) :
50 chassis{std::move(chassis)}
51 {}
52
53 /**
54 * Returns the chassis in the system.
55 *
56 * @return chassis
57 */
58 const std::vector<std::unique_ptr<Chassis>>& getChassis() const
59 {
60 return chassis;
61 }
62
63 private:
64 /**
65 * Chassis in the system.
66 */
67 std::vector<std::unique_ptr<Chassis>> chassis{};
68};
69
70} // namespace phosphor::power::sequencer