1 ## 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 "anyof.hpp"
9 #include "fallback.hpp"
10 #include "fan.hpp"
11 #include "gpio.hpp"
12 #include "tach.hpp"
13 
14 using namespace std::string_literals;
15 
16 namespace phosphor
17 {
18 namespace fan
19 {
20 namespace presence
21 {
22 
23 struct ConfigPolicy;
24 
25 struct ConfigSensors
26 {
27     using Sensors = std::array<std::unique_ptr<PresenceSensor>, ${len(sensors)}>;
28 
29     static auto& get()
30     {
31         static const Sensors sensors =
32         {
33 % for s in sensors:
34             ${s.construct(loader, indent=indent +3)},
35 % endfor
36         };
37         return sensors;
38     }
39 };
40 
41 struct ConfigFans
42 {
43     using Fans = std::array<Fan, ${len(fans)}>;
44 
45     static auto& get()
46     {
47         static const Fans fans =
48         {
49             {
50 % for f in fans:
51                 Fans::value_type{
52                     "${f.name}"s,
53                     "${f.path}"s,
54                 },
55 % endfor
56             }
57         };
58         return fans;
59     }
60 };
61 
62 struct ConfigPolicy
63 {
64     using Policies = std::array<std::unique_ptr<RedundancyPolicy>, ${len(policies)}>;
65 
66     static auto& get()
67     {
68         static const Policies policies =
69         {
70 % for p in policies:
71             ${p.construct(loader, indent=indent +3)},
72 % endfor
73         };
74         return policies;
75     }
76 };
77 } // namespace presence
78 } // namespace fan
79 } // namespace phosphor
80