Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 1 | #Example set speed events for phosphor-fan-control |
| 2 | |
| 3 | #groups: |
| 4 | # - name: [A unique name for this group] |
| 5 | # description: [A user description of what makes up the group] |
| 6 | # type: [The '/xyz/openbmc_project' path extension] |
| 7 | # members: |
| 8 | # [List of object paths under the path extension] |
| 9 | # |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 10 | #matches: |
| 11 | # - name: [The name associated with a supported match string function] |
| 12 | # description: [A user description of what this match string represents] |
| 13 | # parameters: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 14 | # [Ordered list of required parameters for the match string function] |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 15 | # |
| 16 | #signals: |
| 17 | # - name: [The name associated with a supported signal function] |
| 18 | # description: [A user description of what this signal does] |
| 19 | # parameters: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 20 | # [Ordered list of required parameters for the signal function] |
| 21 | # match: [Match string function to use in subscribing to the signal] |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 22 | # |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 23 | #methods: |
| 24 | # - name: [The name associated with a supported method function] |
| 25 | # description: [A user description of what this method does] |
| 26 | # parameters: |
| 27 | # [Ordered list of required parameteres for the method function] |
| 28 | # |
| 29 | #handlers: |
| 30 | # - name: [The name associated with a supported handler function] |
| 31 | # description: [A user descriptiion of what this handler does] |
| 32 | # parameters: |
| 33 | # [Ordered list of required parameters for the handler function] |
| 34 | # |
| 35 | #preconditions: [Preconditions are intended to load or unload events based |
| 36 | # on the precondition's resulting state] |
| 37 | # - name: [Name associated with an available precondition function] |
Matthew Barth | e3bab01 | 2017-09-28 14:37:41 -0500 | [diff] [blame] | 38 | # description: [A user description of the precondition's use] |
| 39 | # parameters: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 40 | # [Ordered list of required parameters for the precondition function] |
Matthew Barth | e3bab01 | 2017-09-28 14:37:41 -0500 | [diff] [blame] | 41 | # |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 42 | #actions: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 43 | # - name: [Name associated with an available action function] |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 44 | # description: [A user description of what this action does] |
| 45 | # parameters: |
| 46 | # [Ordered list of required parameters for the associated function] |
| 47 | # |
| 48 | #events: |
| 49 | # - name: [A unique name for this event] |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 50 | # precondition{OPTIONAL}: |
| 51 | # name: [Name of the precondition function] |
| 52 | # groups: |
| 53 | # - name: [A group name from the list of groups] |
| 54 | # zone_conditions{OPTIONAL}: |
| 55 | # - name: [The name of the zone condition] |
| 56 | # zones: |
| 57 | # - [Zone number to include this set speed event with] |
| 58 | # interface: [Dbus interface on the group members' object path] |
| 59 | # property: |
| 60 | # name: [Name of the property on the interface] |
| 61 | # type: [The property's data type] |
| 62 | # triggers: |
| 63 | # [At least 1 trigger is required per event from those available: |
| 64 | # "init" - Executes a method(with associated handler) at startup |
| 65 | # and then process the event actions |
| 66 | # "signal" - Subscribes to a signal and executes the associated |
| 67 | # handler when the signal is received and then process |
| 68 | # the event actions |
| 69 | # "timer" - Configures a type of timer over an interval that |
| 70 | # processess the event actions each time the timer |
| 71 | # expires] |
| 72 | # - name: [Name of trigger to execute the event] |
| 73 | # [Provide the required trigger parameter(s)] |
| 74 | # events: [Define the event that is to be loaded when the precondition |
| 75 | # succeeds] |
| 76 | # groups: |
| 77 | # - name: [A group name from the list of groups] |
| 78 | # zone_conditions{OPTIONAL}: |
| 79 | # - name: [The name of the zone condition] |
| 80 | # zones: |
| 81 | # - [Zone number to include this set speed event with] |
| 82 | # interface: [The Dbus interface on the group members' object path] |
| 83 | # property: |
| 84 | # name: [Name of the property on the interface] |
| 85 | # type: [The property's data type] |
| 86 | # triggers: |
| 87 | # [At least 1 trigger is required per event from those available: |
| 88 | # "init" - Executes a method(with associated handler) at startup |
| 89 | # and then process the event actions |
| 90 | # "signal" - Subscribes to a signal and executes the associated |
| 91 | # handler when the signal is received and then process |
| 92 | # the event actions |
| 93 | # "timer" - Configures a type of timer over an interval that |
| 94 | # processess the event actions each time the timer expires] |
| 95 | # - name: [Name of trigger to execute the event] |
| 96 | # [Provide the required trigger parameter(s)] |
| 97 | # actions: |
| 98 | # - name: [Name of an action from the list of actions] |
| 99 | # [Ordered list of each required action parameter with a defined |
| 100 | # type and value for this event. The 'property' parameter utilizes |
| 101 | # the same type defined under the 'property' attribute.] |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 102 | |
| 103 | #Example: |
| 104 | #groups: |
| 105 | # - name: zone0_fans |
| 106 | # description: Group of fan inventory objects for zone 0 |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 107 | # type: /xyz/openbmc_project/inventory |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 108 | # members: |
| 109 | # - /system/chassis/motherboard/fan0 |
| 110 | # - /system/chassis/motherboard/fan1 |
| 111 | # - /system/chassis/motherboard/fan2 |
| 112 | # - /system/chassis/motherboard/fan3 |
Matthew Barth | be605c5 | 2017-06-29 15:12:08 -0500 | [diff] [blame] | 113 | # - name: zone0_ambient |
| 114 | # description: Group of ambient temperature sensors for zone 0 |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 115 | # type: /xyz/openbmc_project/sensors |
Matthew Barth | be605c5 | 2017-06-29 15:12:08 -0500 | [diff] [blame] | 116 | # members: |
| 117 | # - /temperature/ambient |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 118 | # - name: occ0_object |
| 119 | # description: Dbus object containing OCC0 properties |
| 120 | # type: /org/open_power/control |
| 121 | # members: |
| 122 | # - /occ0 |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 123 | # - name: zone0_regulators |
| 124 | # description: Group of regulator temperature sensors for zone 0 |
| 125 | # type: /xyz/openbmc_project/sensors |
| 126 | # members: |
| 127 | # - /temperature/p0_vdd_temp |
| 128 | # - /temperature/p1_vdd_temp |
| 129 | # - name: zone0_dimms |
| 130 | # description: Group of dimm temperature sensors for zone 0 |
| 131 | # type: /xyz/openbmc_project/sensors |
| 132 | # members: |
| 133 | # - /temperature/dimm0_temp |
| 134 | # - /temperature/dimm1_temp |
| 135 | # - /temperature/dimm2_temp |
| 136 | # - /temperature/dimm3_temp |
| 137 | # - /temperature/dimm4_temp |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 138 | # |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 139 | #matches: |
| 140 | # - name: propertiesChanged |
| 141 | # parameters: |
| 142 | # - object |
| 143 | # - interface |
| 144 | # - name: interfacesAdded |
| 145 | # parameters: |
| 146 | # - object |
| 147 | # - name: interfacesRemoved |
| 148 | # parameters: |
| 149 | # - object |
| 150 | # |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 151 | #signals: |
| 152 | # - name: propertiesChanged |
| 153 | # description: > |
| 154 | # A property changed signal |
| 155 | # parameters: |
| 156 | # - object |
| 157 | # - interface |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 158 | # match: propertiesChanged |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 159 | # - name: interfacesAdded |
| 160 | # description: > |
| 161 | # An interfaces added signal |
| 162 | # parameters: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 163 | # - type |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 164 | # - object |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 165 | # - interface |
| 166 | # - property |
| 167 | # match: interfacesAdded |
| 168 | # - name: interfacesRemoved |
| 169 | # description: > |
| 170 | # An interfaces removed match |
| 171 | # parameters: |
| 172 | # - object |
| 173 | # - interface |
| 174 | # match: interfacesRemoved |
| 175 | # |
| 176 | #methods: |
| 177 | # - name: getProperties |
| 178 | # description: > |
| 179 | # Get the property values of the given group members |
| 180 | # by performing a `GetProperty` method call on each |
| 181 | # parameters: |
| 182 | # - type |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 183 | # |
| 184 | #handlers: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 185 | # - name: setProperty |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 186 | # description: > |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 187 | # Sets a value for the givent object/interface/property |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 188 | # parameters: |
| 189 | # - type |
Matthew Barth | 67967f9 | 2017-09-22 12:43:57 -0500 | [diff] [blame] | 190 | # |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 191 | #preconditions: |
| 192 | # - name: property_states_match |
| 193 | # description: > |
| 194 | # All defined properties must match the values given to |
| 195 | # enable a set speed event otherwise fan speeds are set to full |
| 196 | # parameters: |
| 197 | # - groups |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 198 | # |
| 199 | #actions: |
| 200 | # - name: count_state_before_speed |
| 201 | # description: Set the speed when a number of properties at a state |
| 202 | # parameters: |
| 203 | # - count |
| 204 | # - property |
| 205 | # - speed |
Matthew Barth | be605c5 | 2017-06-29 15:12:08 -0500 | [diff] [blame] | 206 | # - name: set_floor_from_average_sensor_value |
| 207 | # description: Set floor speed from first entry with average less than key |
| 208 | # parameters: |
| 209 | # - map |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 210 | # - name: set_ceiling_from_average_sensor_value |
| 211 | # description: Set ceiling speed based on key transition values with average |
| 212 | # parameters: |
| 213 | # - map |
| 214 | # - name: set_net_increase_speed |
| 215 | # description: > |
| 216 | # Set the speed increase delta based on the delta increase |
| 217 | # size times the given value and property's value difference |
| 218 | # parameters: |
| 219 | # - property |
| 220 | # - factor |
| 221 | # - delta |
| 222 | # - name: set_net_decrease_speed |
| 223 | # description: > |
| 224 | # Set the speed decrease delta based on the delta decrease |
| 225 | # size times the given value and property's value difference |
| 226 | # parameters: |
| 227 | # - property |
| 228 | # - factor |
| 229 | # - delta |
Matthew Barth | 94b20f7 | 2017-05-11 16:35:10 -0500 | [diff] [blame] | 230 | # |
| 231 | #events: |
| 232 | # - name: missing_before_high_speed |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 233 | # groups: |
| 234 | # - name: zone0_fans |
| 235 | # zone_conditions: |
| 236 | # - name: air_cooled_chassis |
| 237 | # zones: |
| 238 | # - 0 |
| 239 | # interface: xyz.openbmc_project.Inventory.Item |
| 240 | # property: |
| 241 | # name: Present |
| 242 | # type: bool |
| 243 | # triggers: |
| 244 | # - name: init |
| 245 | # method: getProperties |
| 246 | # handler: setProperty |
| 247 | # - name: signal |
| 248 | # signal: propertiesChanged |
| 249 | # handler: setProperty |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 250 | # actions: |
| 251 | # - name: count_state_before_speed |
| 252 | # count: 1 |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 253 | # property: |
| 254 | # value: false |
| 255 | # type: bool |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 256 | # speed: |
| 257 | # value: 10500 |
| 258 | # type: uint64_t |
| 259 | # - name: set_air_cooled_speed_boundaries_based_on_ambient |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 260 | # groups: |
| 261 | # - name: zone0_ambient |
| 262 | # zone_conditions: |
| 263 | # - name: air_cooled_chassis |
| 264 | # zones: |
| 265 | # - 0 |
| 266 | # interface: xyz.openbmc_project.Sensor.Value |
| 267 | # property: |
| 268 | # name: Value |
| 269 | # type: int64_t |
| 270 | # triggers: |
| 271 | # - name: init |
| 272 | # method: getProperties |
| 273 | # handler: setProperty |
| 274 | # - name: signal |
| 275 | # signal: propertiesChanged |
| 276 | # handler: setProperty |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 277 | # actions: |
| 278 | # - name: set_floor_from_average_sensor_value |
| 279 | # map: |
| 280 | # value: |
| 281 | # - 27000: 3500 |
| 282 | # - 32000: 4600 |
| 283 | # - 37000: 5200 |
| 284 | # - 40000: 5800 |
| 285 | # type: std::map<int64_t, uint64_t> |
| 286 | # - name: set_ceiling_from_average_sensor_value |
| 287 | # map: |
| 288 | # value: |
| 289 | # - 25000: 7200 |
| 290 | # - 27000: 10500 |
| 291 | # type: std::map<int64_t, uint64_t> |
| 292 | # - name: set_water_cooled_speed_boundaries_based_on_ambient |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 293 | # groups: |
| 294 | # - name: zone0_ambient |
| 295 | # zone_conditions: |
| 296 | # - name: water_and_air_cooled_chassis |
| 297 | # zones: |
| 298 | # - 0 |
| 299 | # interface: xyz.openbmc_project.Sensor.Value |
| 300 | # property: |
| 301 | # name: Value |
| 302 | # type: int64_t |
| 303 | # triggers: |
| 304 | # - name: init |
| 305 | # method: getProperties |
| 306 | # handler: setProperty |
| 307 | # - name: signal |
| 308 | # signal: propertiesChanged |
| 309 | # handler: setProperty |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 310 | # actions: |
| 311 | # - name: set_floor_from_average_sensor_value |
| 312 | # map: |
| 313 | # value: |
| 314 | # - 27000: 3000 |
| 315 | # - 32000: 4300 |
| 316 | # - 37000: 5000 |
| 317 | # - 40000: 5800 |
| 318 | # type: std::map<int64_t, uint64_t> |
| 319 | # - name: set_ceiling_from_average_sensor_value |
| 320 | # map: |
| 321 | # value: |
| 322 | # - 25000: 7200 |
| 323 | # - 27000: 10500 |
| 324 | # type: std::map<int64_t, uint64_t> |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 325 | # - name: occ_active_speed_changes |
Matthew Barth | 9af190c | 2017-08-08 14:20:43 -0500 | [diff] [blame] | 326 | # precondition: |
| 327 | # name: property_states_match |
| 328 | # groups: |
| 329 | # - name: occ0_object |
| 330 | # interface: org.open_power.OCC.Status |
| 331 | # property: |
| 332 | # name: OccActive |
| 333 | # type: bool |
| 334 | # value: true |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 335 | # - name: occ1_object |
| 336 | # interface: org.open_power.OCC.Status |
| 337 | # property: |
| 338 | # name: OccActive |
| 339 | # type: bool |
| 340 | # value: true |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 341 | # triggers: |
| 342 | # - name: init |
| 343 | # method: getProperties |
| 344 | # handler: setProperty |
| 345 | # - name: signal |
| 346 | # signal: interfacesAdded |
| 347 | # handler: setProperty |
| 348 | # - name: signal |
| 349 | # signal: propertiesChanged |
| 350 | # handler: setProperty |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 351 | # events: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 352 | # - name: speed_control_sensors |
| 353 | # groups: |
| 354 | # - name: zone0_regulators |
| 355 | # interface: xyz.openbmc_project.Sensor.Value |
| 356 | # property: |
| 357 | # name: Value |
| 358 | # type: int64_t |
| 359 | # - name: zone0_dimms |
| 360 | # interface: xyz.openbmc_project.Sensor.Value |
| 361 | # property: |
| 362 | # name: Value |
| 363 | # type: int64_t |
| 364 | # triggers: |
| 365 | # - name: init |
| 366 | # method: getProperties |
| 367 | # handler: setProperty |
| 368 | # - name: signal |
| 369 | # signal: interfacesAdded |
| 370 | # handler: setProperty |
| 371 | # - name: signal |
| 372 | # signal: propertiesChanged |
| 373 | # handler: setProperty |
| 374 | # - name: signal |
| 375 | # signal: interfacesRemoved |
| 376 | # handler: removeInterface |
| 377 | # - name: 1sec_speed_change_request_sampling |
| 378 | # triggers: |
| 379 | # - name: timer |
| 380 | # interval: 1000000 |
| 381 | # type: repeating |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 382 | # actions: |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 383 | # # Speed changes based on regulator temps |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 384 | # - name: set_net_increase_speed |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 385 | # groups: |
| 386 | # - name: zone0_regulators |
| 387 | # interface: xyz.openbmc_project.Sensor.Value |
| 388 | # property: |
| 389 | # name: Value |
| 390 | # type: int64_t |
| 391 | # property: |
| 392 | # value: 85000 |
| 393 | # type: int64_t |
| 394 | # factor: |
| 395 | # value: 1000 |
| 396 | # type: int64_t |
| 397 | # delta: |
| 398 | # value: 400 |
| 399 | # type: uint64_t |
| 400 | # - name: set_net_decrease_speed |
| 401 | # groups: |
| 402 | # - name: zone0_regulators |
| 403 | # interface: xyz.openbmc_project.Sensor.Value |
| 404 | # property: |
| 405 | # name: Value |
| 406 | # type: int64_t |
| 407 | # property: |
| 408 | # value: 82000 |
| 409 | # type: int64_t |
| 410 | # factor: |
| 411 | # value: 1000 |
| 412 | # type: int64_t |
| 413 | # delta: |
| 414 | # value: 40 |
| 415 | # type: uint64_t |
| 416 | # # Speed changes based on dimm temps |
| 417 | # - name: set_net_increase_speed |
| 418 | # groups: |
| 419 | # - name: zone0_dimms |
| 420 | # interface: xyz.openbmc_project.Sensor.Value |
| 421 | # property: |
| 422 | # name: Value |
| 423 | # type: int64_t |
| 424 | # property: |
| 425 | # value: 64000 |
| 426 | # type: int64_t |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 427 | # factor: |
| 428 | # value: 1000 |
| 429 | # type: int64_t |
| 430 | # delta: |
| 431 | # value: 200 |
| 432 | # type: uint64_t |
| 433 | # - name: set_net_decrease_speed |
Matthew Barth | efbe7ab | 2019-07-09 14:59:09 -0500 | [diff] [blame^] | 434 | # groups: |
| 435 | # - name: zone0_dimms |
| 436 | # interface: xyz.openbmc_project.Sensor.Value |
| 437 | # property: |
| 438 | # name: Value |
| 439 | # type: int64_t |
| 440 | # property: |
| 441 | # value: 61000 |
| 442 | # type: int64_t |
Matthew Barth | dd5cad6 | 2017-09-14 09:40:35 -0500 | [diff] [blame] | 443 | # factor: |
| 444 | # value: 1000 |
| 445 | # type: int64_t |
| 446 | # delta: |
| 447 | # value: 40 |
| 448 | # type: uint64_t |