Add filters option to property watch class

Each property changed signal calls a defined callback, an optional set
of filters can be defined to filter out property values not intended to
be used within the callback. These filters can be setup to eliminate
property value(s) that should be ignored per property group and its
configured callback.

ex.) Handle errant sensor values that could occur from a faulty device
so these values do not cause unwanted results from a callback function.

Example config entry to throw out an ambient temperature less than 0C or
greater than 100C:

- name: watch ambient temps
  description: >
    'Filter the ambient temps, discarding any value that
    does not pass, then trigger the callback logic.'
  class: watch
  watch: property
  paths: ambient sensors
  properties: ambient temp
  callback: median temps
  filters:
    - op: '>='
      bound: 0
    - op: '<='
      bound: 100000

Tested:
    Generate a single filter function against a group of properties
    Generate multiple filter functions against a group of properties
    Property values are cleared when it fails to pass a filter
    Property values that pass all filters are updated

Change-Id: Id5126263096b4787a40befdb14cf3514038df3ed
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
6 files changed