blob: c67bb2907feee2d3f4ca28b6fd9c75ca95283c99 [file] [log] [blame]
Potin Lai07615362022-01-04 14:04:06 +08001[
Patrick Williamsb6cf0942022-04-29 14:17:33 -05002 {
3 "Desc": {
4 "Name": "Virtual_CFM_Sensor",
5 "SensorType": "airflow"
Potin Lai07615362022-01-04 14:04:06 +08006 },
Patrick Williamsb6cf0942022-04-29 14:17:33 -05007 "Params": {
8 "DbusParam": [
Potin Lai07615362022-01-04 14:04:06 +08009 {
Patrick Williamsb6cf0942022-04-29 14:17:33 -050010 "ParamName": "fan0",
11 "Desc": {
12 "Name": "FAN0_TACH_IL",
13 "SensorType": "fan_tach"
14 }
15 },
16 {
17 "ParamName": "fan1",
18 "Desc": {
19 "Name": "FAN1_TACH_IL",
20 "SensorType": "fan_tach"
21 }
22 },
23 {
24 "ParamName": "fan2",
25 "Desc": {
26 "Name": "FAN2_TACH_IL",
27 "SensorType": "fan_tach"
28 }
29 },
30 {
31 "ParamName": "fan3",
32 "Desc": {
33 "Name": "FAN3_TACH_IL",
34 "SensorType": "fan_tach"
35 }
36 }
37 ]
38 },
Potin Laief0304f2022-07-04 13:59:40 +080039 "Expression": "max(0, (avg(fan0, fan1, fan2, fan3) * 0.0448) - 9.5042)"
Patrick Williamsb6cf0942022-04-29 14:17:33 -050040 },
41 {
42 "Desc": {
43 "Name": "Virtual_Inlet_Temp",
44 "SensorType": "temperature"
45 },
46 "Threshold": {
47 "CriticalHigh": 40,
48 "CriticalLow": 0
49 },
50 "Params": {
51 "DbusParam": [
52 {
53 "ParamName": "inlet_temp",
54 "Desc": {
55 "Name": "FRONT_PANEL_TEMP",
Potin Lai07615362022-01-04 14:04:06 +080056 "SensorType": "temperature"
Patrick Williamsb6cf0942022-04-29 14:17:33 -050057 }
Potin Lai07615362022-01-04 14:04:06 +080058 },
Potin Lai07615362022-01-04 14:04:06 +080059 {
Patrick Williamsb6cf0942022-04-29 14:17:33 -050060 "ParamName": "fan0",
61 "Desc": {
62 "Name": "FAN0_TACH_IL",
63 "SensorType": "fan_tach"
64 }
Potin Lai07615362022-01-04 14:04:06 +080065 },
Patrick Williamsb6cf0942022-04-29 14:17:33 -050066 {
67 "ParamName": "fan1",
68 "Desc": {
69 "Name": "FAN1_TACH_IL",
70 "SensorType": "fan_tach"
71 }
72 },
73 {
74 "ParamName": "fan2",
75 "Desc": {
76 "Name": "FAN2_TACH_IL",
77 "SensorType": "fan_tach"
78 }
79 },
80 {
81 "ParamName": "fan3",
82 "Desc": {
83 "Name": "FAN3_TACH_IL",
84 "SensorType": "fan_tach"
85 }
86 }
87 ]
Allen.Wangb5ff70e2022-02-21 16:12:46 +080088 },
Patrick Williamsb6cf0942022-04-29 14:17:33 -050089 "Expression": [
90 "if(",
91 " avg(fan0, fan1, fan2, fan3) > 0,",
Potin Lai09fec312022-08-09 10:06:38 +000092 " inlet_temp - (((avg(fan0, fan1, fan2, fan3)^2) * (9e-8)) -",
93 " (avg(fan0, fan1, fan2, fan3) * (8e-4)) + 2.37),",
Patrick Williamsb6cf0942022-04-29 14:17:33 -050094 " inlet_temp)"
95 ]
96 },
97 {
98 "Desc": {
99 "Name": "Virtual_P12V_AUX_HSC_Input_Power",
100 "SensorType": "power"
101 },
102 "Params": {
103 "DbusParam": [
Allen.Wangb5ff70e2022-02-21 16:12:46 +0800104 {
Patrick Williamsb6cf0942022-04-29 14:17:33 -0500105 "ParamName": "HSC_PWR",
106 "Desc": {
107 "Name": "P12V_AUX_HSC_Input_Power",
Allen.Wangb5ff70e2022-02-21 16:12:46 +0800108 "SensorType": "power"
Patrick Williamsb6cf0942022-04-29 14:17:33 -0500109 }
110 }
111 ]
112 },
113 "Expression": [
114 "var PWR[9]:={",
115 " 68.082, 131.899, 194.753, 256.391, 316.721, 376.108, 433.569,",
116 " 490.850, 546.187 };",
117 "var ERR[9]:={",
118 " 0.0425, 0.0497, 0.0537, 0.0555, 0.0565, 0.0577, 0.0587, 0.0597,",
119 " 0.0603 };",
120 "switch {",
121 " case HSC_PWR<PWR[0]:",
122 " HSC_PWR/(1+ERR[0]);",
123 " case inrange(PWR[0],HSC_PWR,PWR[1]):",
124 " HSC_PWR/(1+ERR[0]+(HSC_PWR-PWR[0])*(ERR[1]-ERR[0])/(PWR[1]-PWR[0]));",
125 " case inrange(PWR[1],HSC_PWR,PWR[2]):",
126 " HSC_PWR/(1+ERR[1]+(HSC_PWR-PWR[1])*(ERR[2]-ERR[1])/(PWR[2]-PWR[1]));",
127 " case inrange(PWR[2],HSC_PWR,PWR[3]):",
128 " HSC_PWR/(1+ERR[2]+(HSC_PWR-PWR[2])*(ERR[3]-ERR[2])/(PWR[3]-PWR[2]));",
129 " case inrange(PWR[3],HSC_PWR,PWR[4]):",
130 " HSC_PWR/(1+ERR[3]+(HSC_PWR-PWR[3])*(ERR[4]-ERR[3])/(PWR[4]-PWR[3]));",
131 " case inrange(PWR[4],HSC_PWR,PWR[5]):",
132 " HSC_PWR/(1+ERR[4]+(HSC_PWR-PWR[4])*(ERR[5]-ERR[4])/(PWR[5]-PWR[4]));",
133 " case inrange(PWR[5],HSC_PWR,PWR[6]):",
134 " HSC_PWR/(1+ERR[5]+(HSC_PWR-PWR[5])*(ERR[6]-ERR[5])/(PWR[6]-PWR[5]));",
135 " case inrange(PWR[6],HSC_PWR,PWR[7]):",
136 " HSC_PWR/(1+ERR[6]+(HSC_PWR-PWR[6])*(ERR[7]-ERR[6])/(PWR[7]-PWR[6]));",
137 " case inrange(PWR[7],HSC_PWR,PWR[8]):",
138 " HSC_PWR/(1+ERR[7]+(HSC_PWR-PWR[7])*(ERR[8]-ERR[7])/(PWR[8]-PWR[7]));",
139 " default : HSC_PWR/(1+ERR[8]);",
140 "}"
141 ]
142 }
Potin Lai07615362022-01-04 14:04:06 +0800143]