blob: ac33ca0bd33b4f2fcf60d7fbc9ca3a19cb9acb4d [file] [log] [blame]
Matthew Barth94b20f72017-05-11 16:35:10 -05001#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 Barth67967f92017-09-22 12:43:57 -050010#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 Barthefbe7ab2019-07-09 14:59:09 -050014# [Ordered list of required parameters for the match string function]
Matthew Barth67967f92017-09-22 12:43:57 -050015#
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 Barthefbe7ab2019-07-09 14:59:09 -050020# [Ordered list of required parameters for the signal function]
21# match: [Match string function to use in subscribing to the signal]
Matthew Barth67967f92017-09-22 12:43:57 -050022#
Matthew Barthefbe7ab2019-07-09 14:59:09 -050023#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 Barthe3bab012017-09-28 14:37:41 -050038# description: [A user description of the precondition's use]
39# parameters:
Matthew Barthefbe7ab2019-07-09 14:59:09 -050040# [Ordered list of required parameters for the precondition function]
Matthew Barthe3bab012017-09-28 14:37:41 -050041#
Matthew Barth94b20f72017-05-11 16:35:10 -050042#actions:
Matthew Barthefbe7ab2019-07-09 14:59:09 -050043# - name: [Name associated with an available action function]
Matthew Barth94b20f72017-05-11 16:35:10 -050044# 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 Barthefbe7ab2019-07-09 14:59:09 -050050# 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 Barth94b20f72017-05-11 16:35:10 -0500102
103#Example:
104#groups:
105# - name: zone0_fans
106# description: Group of fan inventory objects for zone 0
Matthew Barth9af190c2017-08-08 14:20:43 -0500107# type: /xyz/openbmc_project/inventory
Matthew Barth94b20f72017-05-11 16:35:10 -0500108# members:
109# - /system/chassis/motherboard/fan0
110# - /system/chassis/motherboard/fan1
111# - /system/chassis/motherboard/fan2
112# - /system/chassis/motherboard/fan3
Matthew Barthbe605c52017-06-29 15:12:08 -0500113# - name: zone0_ambient
114# description: Group of ambient temperature sensors for zone 0
Matthew Barth9af190c2017-08-08 14:20:43 -0500115# type: /xyz/openbmc_project/sensors
Matthew Barthbe605c52017-06-29 15:12:08 -0500116# members:
117# - /temperature/ambient
Matthew Barth9af190c2017-08-08 14:20:43 -0500118# - name: occ0_object
119# description: Dbus object containing OCC0 properties
120# type: /org/open_power/control
121# members:
122# - /occ0
Matthew Barthdd5cad62017-09-14 09:40:35 -0500123# - 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 Barth9af190c2017-08-08 14:20:43 -0500138#
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500139#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 Barth67967f92017-09-22 12:43:57 -0500151#signals:
152# - name: propertiesChanged
153# description: >
154# A property changed signal
155# parameters:
156# - object
157# - interface
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500158# match: propertiesChanged
Matthew Barth67967f92017-09-22 12:43:57 -0500159# - name: interfacesAdded
160# description: >
161# An interfaces added signal
162# parameters:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500163# - type
Matthew Barth67967f92017-09-22 12:43:57 -0500164# - object
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500165# - 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 Barth67967f92017-09-22 12:43:57 -0500183#
184#handlers:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500185# - name: setProperty
Matthew Barth67967f92017-09-22 12:43:57 -0500186# description: >
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500187# Sets a value for the givent object/interface/property
Matthew Barth67967f92017-09-22 12:43:57 -0500188# parameters:
189# - type
Matthew Barth67967f92017-09-22 12:43:57 -0500190#
Matthew Barth9af190c2017-08-08 14:20:43 -0500191#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 Barth94b20f72017-05-11 16:35:10 -0500198#
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 Barthbe605c52017-06-29 15:12:08 -0500206# - 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 Barthdd5cad62017-09-14 09:40:35 -0500210# - 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 Barth8d06a832019-10-02 14:43:39 -0500230# - name: update_default_floor
231# description: >
232# Update the default fan floor to the given speed
233# parameters:
234# - property
235# - speed
Matthew Barth94b20f72017-05-11 16:35:10 -0500236#
237#events:
238# - name: missing_before_high_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500239# groups:
240# - name: zone0_fans
241# zone_conditions:
242# - name: air_cooled_chassis
243# zones:
244# - 0
245# interface: xyz.openbmc_project.Inventory.Item
246# property:
247# name: Present
248# type: bool
249# triggers:
250# - name: init
251# method: getProperties
252# handler: setProperty
253# - name: signal
254# signal: propertiesChanged
255# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500256# actions:
257# - name: count_state_before_speed
258# count: 1
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500259# property:
260# value: false
261# type: bool
Matthew Barthdd5cad62017-09-14 09:40:35 -0500262# speed:
263# value: 10500
264# type: uint64_t
265# - name: set_air_cooled_speed_boundaries_based_on_ambient
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500266# groups:
267# - name: zone0_ambient
268# zone_conditions:
269# - name: air_cooled_chassis
270# zones:
271# - 0
272# interface: xyz.openbmc_project.Sensor.Value
273# property:
274# name: Value
275# type: int64_t
276# triggers:
277# - name: init
278# method: getProperties
279# handler: setProperty
280# - name: signal
281# signal: propertiesChanged
282# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500283# actions:
284# - name: set_floor_from_average_sensor_value
285# map:
286# value:
287# - 27000: 3500
288# - 32000: 4600
289# - 37000: 5200
290# - 40000: 5800
291# type: std::map<int64_t, uint64_t>
292# - name: set_ceiling_from_average_sensor_value
293# map:
294# value:
295# - 25000: 7200
296# - 27000: 10500
297# type: std::map<int64_t, uint64_t>
298# - name: set_water_cooled_speed_boundaries_based_on_ambient
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500299# groups:
300# - name: zone0_ambient
301# zone_conditions:
302# - name: water_and_air_cooled_chassis
303# zones:
304# - 0
305# interface: xyz.openbmc_project.Sensor.Value
306# property:
307# name: Value
308# type: int64_t
309# triggers:
310# - name: init
311# method: getProperties
312# handler: setProperty
313# - name: signal
314# signal: propertiesChanged
315# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500316# actions:
317# - name: set_floor_from_average_sensor_value
318# map:
319# value:
320# - 27000: 3000
321# - 32000: 4300
322# - 37000: 5000
323# - 40000: 5800
324# type: std::map<int64_t, uint64_t>
325# - name: set_ceiling_from_average_sensor_value
326# map:
327# value:
328# - 25000: 7200
329# - 27000: 10500
330# type: std::map<int64_t, uint64_t>
Matthew Barthdd5cad62017-09-14 09:40:35 -0500331# - name: occ_active_speed_changes
Matthew Barth9af190c2017-08-08 14:20:43 -0500332# precondition:
333# name: property_states_match
334# groups:
335# - name: occ0_object
336# interface: org.open_power.OCC.Status
337# property:
338# name: OccActive
339# type: bool
340# value: true
Matthew Barthdd5cad62017-09-14 09:40:35 -0500341# - name: occ1_object
342# interface: org.open_power.OCC.Status
343# property:
344# name: OccActive
345# type: bool
346# value: true
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500347# triggers:
348# - name: init
349# method: getProperties
350# handler: setProperty
351# - name: signal
352# signal: interfacesAdded
353# handler: setProperty
354# - name: signal
355# signal: propertiesChanged
356# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500357# events:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500358# - name: speed_control_sensors
359# groups:
360# - name: zone0_regulators
361# interface: xyz.openbmc_project.Sensor.Value
362# property:
363# name: Value
364# type: int64_t
365# - name: zone0_dimms
366# interface: xyz.openbmc_project.Sensor.Value
367# property:
368# name: Value
369# type: int64_t
370# triggers:
371# - name: init
372# method: getProperties
373# handler: setProperty
374# - name: signal
375# signal: interfacesAdded
376# handler: setProperty
377# - name: signal
378# signal: propertiesChanged
379# handler: setProperty
380# - name: signal
381# signal: interfacesRemoved
382# handler: removeInterface
383# - name: 1sec_speed_change_request_sampling
384# triggers:
385# - name: timer
386# interval: 1000000
387# type: repeating
Matthew Barthdd5cad62017-09-14 09:40:35 -0500388# actions:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500389# # Speed changes based on regulator temps
Matthew Barthdd5cad62017-09-14 09:40:35 -0500390# - name: set_net_increase_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500391# groups:
392# - name: zone0_regulators
393# interface: xyz.openbmc_project.Sensor.Value
394# property:
395# name: Value
396# type: int64_t
397# property:
398# value: 85000
399# type: int64_t
400# factor:
401# value: 1000
402# type: int64_t
403# delta:
404# value: 400
405# type: uint64_t
406# - name: set_net_decrease_speed
407# groups:
408# - name: zone0_regulators
409# interface: xyz.openbmc_project.Sensor.Value
410# property:
411# name: Value
412# type: int64_t
413# property:
414# value: 82000
415# type: int64_t
416# factor:
417# value: 1000
418# type: int64_t
419# delta:
420# value: 40
421# type: uint64_t
422# # Speed changes based on dimm temps
423# - name: set_net_increase_speed
424# groups:
425# - name: zone0_dimms
426# interface: xyz.openbmc_project.Sensor.Value
427# property:
428# name: Value
429# type: int64_t
430# property:
431# value: 64000
432# type: int64_t
Matthew Barthdd5cad62017-09-14 09:40:35 -0500433# factor:
434# value: 1000
435# type: int64_t
436# delta:
437# value: 200
438# type: uint64_t
439# - name: set_net_decrease_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500440# groups:
441# - name: zone0_dimms
442# interface: xyz.openbmc_project.Sensor.Value
443# property:
444# name: Value
445# type: int64_t
446# property:
447# value: 61000
448# type: int64_t
Matthew Barthdd5cad62017-09-14 09:40:35 -0500449# factor:
450# value: 1000
451# type: int64_t
452# delta:
453# value: 40
454# type: uint64_t