blob: 3afd29f5415b1ed6487164adac1ce2acdd7563c4 [file] [log] [blame]
Brad Bishop55935602017-06-13 13:31:24 -04001## This file is a template, the comment below is emitted into the generated file
2/* This is an auto generated file. Do not edit. */
3#pragma once
4
5#include <array>
6#include <memory>
7#include <string>
8#include "fallback.hpp"
9#include "fan.hpp"
10#include "gpio.hpp"
11#include "tach.hpp"
12
13using namespace std::string_literals;
14
15namespace phosphor
16{
17namespace fan
18{
19namespace presence
20{
21
22struct ConfigPolicy;
23
24struct ConfigSensors
25{
26 using Sensors = std::array<std::unique_ptr<PresenceSensor>, ${len(sensors)}>;
27
28 static auto& get()
29 {
30 static const Sensors sensors =
31 {
32% for s in sensors:
33 ${s.construct(loader, indent=indent +3)},
34% endfor
35 };
36 return sensors;
37 }
38};
39
40struct ConfigFans
41{
42 using Fans = std::array<Fan, ${len(fans)}>;
43
44 static auto& get()
45 {
46 static const Fans fans =
47 {
48 {
49% for f in fans:
50 Fans::value_type{
51 "${f.name}"s,
52 "${f.path}"s,
53 },
54% endfor
55 }
56 };
57 return fans;
58 }
59};
60
61struct ConfigPolicy
62{
63 using Policies = std::array<std::unique_ptr<RedundancyPolicy>, ${len(policies)}>;
64
65 static auto& get()
66 {
67 static const Policies policies =
68 {
69% for p in policies:
70 ${p.construct(loader, indent=indent +3)},
71% endfor
72 };
73 return policies;
74 }
75};
76} // namespace presence
77} // namespace fan
78} // namespace phosphor