public static boolean isValidHeartbeatCountLog(final int countLog) {
        if ((countLog >= 0x00 && countLog < 0x12) || countLog == 0xFF)
            return true;
        throw new IllegalArgumentException("Count log must be 0 to 17 or 255!");
    }
Validates heart beat count log.

@param countLog Heartbeat publication count.
@return true if valid.
@throws IllegalArgumentException if the countLog value is not a value from 0 to 17 or 255
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java