I have some SNMP sensors that retrieve an integer value that represents a bit field of possible states. I only care about one of the bits in the returned value, but can't figure out a way to monitor for that single bit to be true.
Ideally, what I would like is to be able to bit-wise AND the returned value with a mask so that the sensor stores either a 0 or a 1 (similar in function to the multiply or divide that is currently possible).
For example, if I only care about the 2nd least-significant bit in the returned value, I would like to know that any of the following return values have that bit set to a '1':
22 = 00010110 & 00000010 = 1 83 = 01010011 & 00000010 = 1 80 = 01010000 & 00000010 = 0
I hope that explains what I am trying to accomplish.