This is a mess in the server and not easy to fix, and I'm not sure how to fix this at the moment.
As a workaround, a client can do the following to address the issue:
If a client needs a NegativeTransition alarm events for a threshold T, it can create _two_ alarms. One for a negative transition on T with the event mask set, and one for a positive transition on T with the event mask not set.
This way, if the negative transition bracket is not set (see comment 0), the positive one is set. And once that fires, the brackets will be recalculated and the negative transition alarm will be re-set. Since the event mask is clear for the positive alarm, no event is sent, so the client doesn't need any further adjustments.
The same should work for a client needing a positive transition alarm, with the obvious changes.
This is a mess in the server and not easy to fix, and I'm not sure how to fix this at the moment.
As a workaround, a client can do the following to address the issue:
If a client needs a NegativeTransition alarm events for a threshold T, it can create _two_ alarms. One for a negative transition on T with the event mask set, and one for a positive transition on T with the event mask not set.
This way, if the negative transition bracket is not set (see comment 0), the positive one is set. And once that fires, the brackets will be recalculated and the negative transition alarm will be re-set. Since the event mask is clear for the positive alarm, no event is sent, so the client doesn't need any further adjustments.
The same should work for a client needing a positive transition alarm, with the obvious changes.