@staticmethod
def generate_address_header(addr, local_seg_id, wants_ack):
    """Generate a PCK command address header.

        :param    addr:   The module's/group's address
        :type     addr:   :class:`~LcnAddrMod` or :class:`~LcnAddrGrp`
        :param    int     local_seg_id:    The local segment id
        :param    bool    wants_ack:      Is an acknowledge requested.

        :return:    The PCK address header string.
        :rtype:     str
        """
    return '>{:s}{:03d}{:03d}{:s}'.format('G' if addr.is_group() else 'M',
        addr.get_physical_seg_id(local_seg_id), addr.get_id(), '!' if
        wants_ack else '.')
