@staticmethod
def dim_ouput(output_id, percent, ramp):
    """Generate a dim command for a single output-port.

        :param    int    output_it:    Output id 0..3
        :param    int    percent:      Brightness in percent 0..100
        :param    int    ramp:         Ramp value
        :return:    The PCK command (without address header) as text
        :rtype:    str
        """
    if output_id < 0 or output_id > 3:
        raise ValueError('Invalid output_id.')
    percent_round = int(round(percent * 2))
    ramp = int(ramp)
    if percent_round % 2 == 0:
        pck = 'A{:d}DI{:03d}{:03d}'.format(output_id + 1, percent_round // 
            2, ramp)
    else:
        pck = 'O{:d}DI{:03d}{:03d}'.format(output_id + 1, percent_round, ramp)
    return pck
