Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 1 | description: > |
Brad Bishop | 56907e3 | 2017-01-31 14:43:04 -0500 | [diff] [blame] | 2 | The sample events below serve to illustrate PIM features |
| 3 | and are also used by the PIM test suite. |
Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 4 | |
| 5 | events: |
Brad Bishop | 56907e3 | 2017-01-31 14:43:04 -0500 | [diff] [blame] | 6 | - name: setProperty + propertyChangedTo example |
Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 7 | description: > |
Brad Bishop | 22ecacc | 2016-12-01 08:38:06 -0500 | [diff] [blame] | 8 | Sets the value of ExampleProperty1 on /changeme |
| 9 | when the value of ExampleProperty2 on |
Brad Bishop | 8f86850 | 2017-01-23 13:13:58 -0500 | [diff] [blame] | 10 | /testing/trigger2 changes to yyyxxx. |
Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 11 | type: match |
Brad Bishop | 22cfbe6 | 2016-11-30 13:25:10 -0500 | [diff] [blame] | 12 | signatures: |
| 13 | - type: signal |
| 14 | interface: org.freedesktop.DBus.Properties |
Brad Bishop | 8f86850 | 2017-01-23 13:13:58 -0500 | [diff] [blame] | 15 | path: /testing/trigger2 |
Brad Bishop | 22cfbe6 | 2016-11-30 13:25:10 -0500 | [diff] [blame] | 16 | member: PropertiesChanged |
Brad Bishop | 22ecacc | 2016-12-01 08:38:06 -0500 | [diff] [blame] | 17 | filters: |
| 18 | - name: propertyChangedTo |
Brad Bishop | c93bcc9 | 2017-01-21 16:23:39 -0500 | [diff] [blame] | 19 | interface: xyz.openbmc_project.Example.Iface2 |
| 20 | property: ExampleProperty2 |
| 21 | value: |
| 22 | type: string |
| 23 | value: yyyxxx |
Brad Bishop | 22cfbe6 | 2016-11-30 13:25:10 -0500 | [diff] [blame] | 24 | actions: |
Brad Bishop | e2e402f | 2016-11-30 18:00:17 -0500 | [diff] [blame] | 25 | - name: setProperty |
Brad Bishop | c93bcc9 | 2017-01-21 16:23:39 -0500 | [diff] [blame] | 26 | interface: xyz.openbmc_project.Example.Iface1 |
| 27 | property: ExampleProperty1 |
Brad Bishop | 02ca021 | 2017-01-28 23:25:58 -0500 | [diff] [blame] | 28 | paths: |
| 29 | - /changeme |
Brad Bishop | c93bcc9 | 2017-01-21 16:23:39 -0500 | [diff] [blame] | 30 | value: |
| 31 | type: string |
| 32 | value: changed |
Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 33 | |
Brad Bishop | 56907e3 | 2017-01-31 14:43:04 -0500 | [diff] [blame] | 34 | - name: createObjects + propertyChangedTo example |
Brad Bishop | eb68a68 | 2017-01-22 00:58:54 -0500 | [diff] [blame] | 35 | description: > |
| 36 | Create /createme1 and /createme2 when the value of |
| 37 | ExampleProperty2 on /testing/trigger5 changes to abc123. |
| 38 | type: match |
| 39 | signatures: |
| 40 | - type: signal |
| 41 | interface: org.freedesktop.DBus.Properties |
| 42 | path: /testing/trigger5 |
| 43 | member: PropertiesChanged |
| 44 | filters: |
| 45 | - name: propertyChangedTo |
| 46 | interface: xyz.openbmc_project.Example.Iface2 |
| 47 | property: ExampleProperty2 |
| 48 | value: |
| 49 | type: string |
| 50 | value: abc123 |
| 51 | actions: |
| 52 | - name: createObjects |
| 53 | objs: |
| 54 | /createme1: |
| 55 | xyz.openbmc_project.Example.Iface1: |
| 56 | ExampleProperty1: |
| 57 | value: foo |
| 58 | type: string |
| 59 | xyz.openbmc_project.Example.Iface2: |
| 60 | ExampleProperty2: |
| 61 | value: bar |
| 62 | type: string |
| 63 | ExampleProperty3: |
| 64 | value: 999 |
| 65 | type: int64 |
| 66 | /createme2: |
| 67 | xyz.openbmc_project.Example.Iface1: |
| 68 | ExampleProperty1: |
| 69 | value: bar |
| 70 | type: string |
| 71 | xyz.openbmc_project.Example.Iface2: |
| 72 | ExampleProperty2: |
| 73 | value: foo |
| 74 | type: string |
| 75 | ExampleProperty3: |
| 76 | value: 888 |
| 77 | type: int64 |
| 78 | |
Brad Bishop | 3e4a19a | 2017-01-21 22:17:09 -0500 | [diff] [blame] | 79 | - name: startup event example |
| 80 | description: > |
Matthew Barth | 979eb59 | 2018-10-05 15:29:26 -0500 | [diff] [blame] | 81 | Create /createme3 at startup if ExampleProperty1 on /changeme |
| 82 | equals changed. |
Brad Bishop | 3e4a19a | 2017-01-21 22:17:09 -0500 | [diff] [blame] | 83 | type: startup |
Matthew Barth | 979eb59 | 2018-10-05 15:29:26 -0500 | [diff] [blame] | 84 | filters: |
| 85 | - name: propertyIs |
| 86 | path: /changeme |
| 87 | interface: xyz.openbmc_project.Example.Iface1 |
| 88 | property: ExampleProperty1 |
| 89 | value: |
| 90 | value: changed |
| 91 | type: string |
| 92 | dbusMember: "sdbusplus::xyz::openbmc_project::Example::\ |
| 93 | server::Iface1" |
Brad Bishop | 3e4a19a | 2017-01-21 22:17:09 -0500 | [diff] [blame] | 94 | actions: |
| 95 | - name: createObjects |
| 96 | objs: |
| 97 | /createme3: |
| 98 | xyz.openbmc_project.Example.Iface1: |
| 99 | ExampleProperty1: |
| 100 | value: foo |
| 101 | type: string |
| 102 | |
Brad Bishop | d0f48ad | 2017-01-30 08:52:26 -0500 | [diff] [blame] | 103 | - name: conditional setProperty example |
| 104 | description: > |
| 105 | Sets the ExampleProperty1 on the /changeme object when |
| 106 | the value of ExampleProperty3 on /testing/trigger7 |
| 107 | changes to 10 and the value of the ExampleProperty3 |
| 108 | value on /changeme is 22. |
| 109 | type: match |
| 110 | signatures: |
| 111 | - type: signal |
| 112 | path: /testing/trigger7 |
| 113 | interface: org.freedesktop.DBus.Properties |
| 114 | member: PropertiesChanged |
| 115 | filters: |
| 116 | - name: propertyChangedTo |
| 117 | interface: xyz.openbmc_project.Example.Iface2 |
| 118 | property: ExampleProperty3 |
| 119 | value: |
| 120 | value: 10 |
| 121 | type: int64 |
| 122 | actions: |
| 123 | - name: setProperty |
| 124 | interface: xyz.openbmc_project.Example.Iface1 |
| 125 | property: ExampleProperty1 |
| 126 | paths: |
| 127 | - /changeme |
| 128 | value: |
| 129 | type: string |
| 130 | value: changed |
| 131 | conditions: |
| 132 | - name: propertyIs |
| 133 | interface: xyz.openbmc_project.Example.Iface2 |
| 134 | property: ExampleProperty3 |
| 135 | value: |
| 136 | value: 22 |
| 137 | type: int64 |
| 138 | |
| 139 | |
Brad Bishop | bf066a6 | 2016-10-19 08:09:44 -0400 | [diff] [blame] | 140 | # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |