You can filter PPS notifications based on the names of attributes, the
values of attributes, or a combination of the two.
To filter notifications, use the following syntax:
f=attrspec{+attrspec}...
where attrspec is an attribute specification consisting of either an attribute's name or an
expression specifying an attribute's value.
If you want to be notified when the attribute is deleted, add a minus sign (-) before its name:
f=-attr
The syntax for specifying an attribute's value is:
attroperatorvalue
where attr is the attribute's name, operator
is the operator used to determine the threshold for triggering notifications, and value is the
value to compare to.
Supported operators are:
- <, <=, >, >=,
=, ==, and != for integers. Integer values
must be in the range of a long long; otherwise they're treated as strings.
- =, ==, and != for strings. Note that =
and == are synonymous. String values can include the + character, but only by
escaping it with \.
If you specify only an attribute's name, PPS notifies you of any updates where an attribute with that name is set.
If you specify a name, operator, and value, PPS notifies you of any updates where the named attribute is set to a value
that matches the given operator and value expression.
In both full and delta modes, the file descriptor will get notifications if any of the attribute specifications match:
- In full mode, the entire object is returned.
- In delta mode, only the specified attributes are returned. Changes to
other attributes are filtered out.
In the following examples, the name of the object being opened is "objname":
- /pps/objname?delta,f=attr1+attr2 — return change notifications for
only the attributes named "attr1" and "attr2"
- /pps/objname?delta,f=attr1<37 — return change notifications for
only the attribute named "attr1" when its value is less than 37
- /pps/objname?f=attr2<0+attr2>100 — return
change notifications for the entire object when the attribute "attr2" has an
integer value less than 0 or greater than 100
- /pps/objname?delta,f=attr1=a\+b — return
change notifications only for the attribute "attr1" when it has a string
value of "a+b"
- /pps/objname?delta,f=attr1+attr2<10 — return
change notifications only for the attribute "attr1" (for any change) and attribute
"attr2" when it has an integer value less than 10.