docs: private int encodeCounterStates() {
        byte encoded = 0;
        switch (event.getOldState()) {
           case LOWER_BOUND_REACHED:
              encoded = 0x01;
              break;
           case UPPER_BOUND_REACHED:
              encoded = 0x02;
              break;
           case VALID:
           default:
              break;
        }
        switch (event.getNewState()) {
           case LOWER_BOUND_REACHED:
              encoded |= 0x04;
              break;
           case UPPER_BOUND_REACHED:
              encoded |= 0x08;
              break;
           case VALID:
           default:
              break;
        }
        return encoded;
     }