@staticmethod
def control_relays(states):
    """Generate a command to control relays.

        :param     RelayStateModifier    states:    The 8 modifiers for the
                                                    relay states as a list
        :return:   The PCK command (without address header) as text
        :rtype:    str
        """
    if len(states) != 8:
        raise ValueError('Invalid states length.')
    ret = 'R8'
    for state in states:
        ret += state.value
    return ret
