summaryrefslogtreecommitdiffstats
path: root/src/example
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-21 10:06:07 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-19 16:26:47 -0400
commit4041d720cf6387aa198c620cc9c6eaa86ac18cba (patch)
treeda24ecea922de6ea3cd83276ded0c148cbeddeba /src/example
parent731171a12c6d52ead2d93303867b6d731d4d6728 (diff)
downloadphosphor-dbus-monitor-4041d720cf6387aa198c620cc9c6eaa86ac18cba.tar.gz
phosphor-dbus-monitor-4041d720cf6387aa198c620cc9c6eaa86ac18cba.zip
Add conditional callbacks
Enable conditional application of callbacks. Change-Id: I9d765e5f585aac40994b65da3b51ea891beae9bf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/example')
-rw-r--r--src/example/example.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/example/example.yaml b/src/example/example.yaml
index 0f286dc..65f6537 100644
--- a/src/example/example.yaml
+++ b/src/example/example.yaml
@@ -93,3 +93,30 @@
callback: group
members:
- example journal callback
+
+- name: example count condition
+ description: >
+ 'Conditions or conditional callbacks apply a test prior to invoking
+ the callback function.
+
+ All conditional callbacks must specify the callback to issue if
+ the condition evaulates.
+
+ The count condition applies the op comparison operator to the value of each
+ property in the specified groups. It then counts the number of properties
+ that pass the comparison, and applies another comparison on the result
+ against the specified bound.
+
+ For example, a callback that requires at least three temperature sensors
+ in the group to be higher than 115 degrees might use a count condition
+ with an op of >, a count op of >=, a bound of 115, and a countbound of 3.'
+
+ class: condition
+ condition: count
+ paths: example path group
+ properties: example property group
+ callback: example callback group
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115
OpenPOWER on IntegriCloud