def trans_delay(val):
    """
    Given ESM value, return transfer delay (ms).
    Please refer to 10.5.6.5, TS24.008 for more details.

    :param val: the value encoded in the ESM NAS message
    """
    if val <= 15:
        return val * 10
    elif val <= 31:
        return 200 + (val - 16) * 50
    elif val <= 62:
        return 1000 + (val - 32) * 100
    else:
        return None