blob: c5b41880ebb943e04933ede95aa0415107e7bc2f [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 Barth799cdf72019-10-08 15:00:10 -0500236# - name: use_events_on_state
237# description: >
238# Use a set of events when all the group properties are at a given
239# state, otherwise remove the events
240# parameters:
241# - property
242# - events
Matthew Barth94b20f72017-05-11 16:35:10 -0500243#
244#events:
245# - name: missing_before_high_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500246# groups:
247# - name: zone0_fans
248# zone_conditions:
249# - name: air_cooled_chassis
250# zones:
251# - 0
252# interface: xyz.openbmc_project.Inventory.Item
253# property:
254# name: Present
255# type: bool
256# triggers:
257# - name: init
258# method: getProperties
259# handler: setProperty
260# - name: signal
261# signal: propertiesChanged
262# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500263# actions:
264# - name: count_state_before_speed
265# count: 1
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500266# property:
267# value: false
268# type: bool
Matthew Barthdd5cad62017-09-14 09:40:35 -0500269# speed:
270# value: 10500
271# type: uint64_t
272# - name: set_air_cooled_speed_boundaries_based_on_ambient
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500273# groups:
274# - name: zone0_ambient
275# zone_conditions:
276# - name: air_cooled_chassis
277# zones:
278# - 0
279# interface: xyz.openbmc_project.Sensor.Value
280# property:
281# name: Value
282# type: int64_t
283# triggers:
284# - name: init
285# method: getProperties
286# handler: setProperty
287# - name: signal
288# signal: propertiesChanged
289# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500290# actions:
291# - name: set_floor_from_average_sensor_value
292# map:
293# value:
294# - 27000: 3500
295# - 32000: 4600
296# - 37000: 5200
297# - 40000: 5800
298# type: std::map<int64_t, uint64_t>
299# - name: set_ceiling_from_average_sensor_value
300# map:
301# value:
302# - 25000: 7200
303# - 27000: 10500
304# type: std::map<int64_t, uint64_t>
305# - name: set_water_cooled_speed_boundaries_based_on_ambient
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500306# groups:
307# - name: zone0_ambient
308# zone_conditions:
309# - name: water_and_air_cooled_chassis
310# zones:
311# - 0
312# interface: xyz.openbmc_project.Sensor.Value
313# property:
314# name: Value
315# type: int64_t
316# triggers:
317# - name: init
318# method: getProperties
319# handler: setProperty
320# - name: signal
321# signal: propertiesChanged
322# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500323# actions:
324# - name: set_floor_from_average_sensor_value
325# map:
326# value:
327# - 27000: 3000
328# - 32000: 4300
329# - 37000: 5000
330# - 40000: 5800
331# type: std::map<int64_t, uint64_t>
332# - name: set_ceiling_from_average_sensor_value
333# map:
334# value:
335# - 25000: 7200
336# - 27000: 10500
337# type: std::map<int64_t, uint64_t>
Matthew Barthdd5cad62017-09-14 09:40:35 -0500338# - name: occ_active_speed_changes
Matthew Barth9af190c2017-08-08 14:20:43 -0500339# precondition:
340# name: property_states_match
341# groups:
342# - name: occ0_object
343# interface: org.open_power.OCC.Status
344# property:
345# name: OccActive
346# type: bool
347# value: true
Matthew Barthdd5cad62017-09-14 09:40:35 -0500348# - name: occ1_object
349# interface: org.open_power.OCC.Status
350# property:
351# name: OccActive
352# type: bool
353# value: true
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500354# triggers:
355# - name: init
356# method: getProperties
357# handler: setProperty
358# - name: signal
359# signal: interfacesAdded
360# handler: setProperty
361# - name: signal
362# signal: propertiesChanged
363# handler: setProperty
Matthew Barthdd5cad62017-09-14 09:40:35 -0500364# events:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500365# - name: speed_control_sensors
366# groups:
367# - name: zone0_regulators
368# interface: xyz.openbmc_project.Sensor.Value
369# property:
370# name: Value
371# type: int64_t
372# - name: zone0_dimms
373# interface: xyz.openbmc_project.Sensor.Value
374# property:
375# name: Value
376# type: int64_t
377# triggers:
378# - name: init
379# method: getProperties
380# handler: setProperty
381# - name: signal
382# signal: interfacesAdded
383# handler: setProperty
384# - name: signal
385# signal: propertiesChanged
386# handler: setProperty
387# - name: signal
388# signal: interfacesRemoved
389# handler: removeInterface
390# - name: 1sec_speed_change_request_sampling
391# triggers:
392# - name: timer
393# interval: 1000000
394# type: repeating
Matthew Barthdd5cad62017-09-14 09:40:35 -0500395# actions:
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500396# # Speed changes based on regulator temps
Matthew Barthdd5cad62017-09-14 09:40:35 -0500397# - name: set_net_increase_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500398# groups:
399# - name: zone0_regulators
400# interface: xyz.openbmc_project.Sensor.Value
401# property:
402# name: Value
403# type: int64_t
404# property:
405# value: 85000
406# type: int64_t
407# factor:
408# value: 1000
409# type: int64_t
410# delta:
411# value: 400
412# type: uint64_t
413# - name: set_net_decrease_speed
414# groups:
415# - name: zone0_regulators
416# interface: xyz.openbmc_project.Sensor.Value
417# property:
418# name: Value
419# type: int64_t
420# property:
421# value: 82000
422# type: int64_t
423# factor:
424# value: 1000
425# type: int64_t
426# delta:
427# value: 40
428# type: uint64_t
429# # Speed changes based on dimm temps
430# - name: set_net_increase_speed
431# groups:
432# - name: zone0_dimms
433# interface: xyz.openbmc_project.Sensor.Value
434# property:
435# name: Value
436# type: int64_t
437# property:
438# value: 64000
439# type: int64_t
Matthew Barthdd5cad62017-09-14 09:40:35 -0500440# factor:
441# value: 1000
442# type: int64_t
443# delta:
444# value: 200
445# type: uint64_t
446# - name: set_net_decrease_speed
Matthew Barthefbe7ab2019-07-09 14:59:09 -0500447# groups:
448# - name: zone0_dimms
449# interface: xyz.openbmc_project.Sensor.Value
450# property:
451# name: Value
452# type: int64_t
453# property:
454# value: 61000
455# type: int64_t
Matthew Barthdd5cad62017-09-14 09:40:35 -0500456# factor:
457# value: 1000
458# type: int64_t
459# delta:
460# value: 40
461# type: uint64_t