From 4041d720cf6387aa198c620cc9c6eaa86ac18cba Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 21 May 2017 10:06:07 -0400 Subject: Add conditional callbacks Enable conditional application of callbacks. Change-Id: I9d765e5f585aac40994b65da3b51ea891beae9bf Signed-off-by: Brad Bishop --- src/example/example.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/example') 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 -- cgit v1.2.1