def generateDeviceNames(prefix, first, last, minimal=False):
    """ generates device names

    :param prefix: device name prefix
    :type prefix: :obj:`str`
    :param first: first device index
    :type first: :obj:`int`
    :param last: last device index
    :type last: :obj:`int`
    :returns: device names
    :rtype: :obj:`list` <:obj:`str`>
    """
    names = []
    if prefix.strip():
        for i in range(first, last + 1):
            if not minimal:
                names.append(prefix + ('0' if len(str(i)) == 1 else '') +
                    str(i))
            else:
                names.append(prefix + str(i))
    return names
