@classmethod
def getHidFields(cls, report_ID, logical, physical, application, collection,
    value, usage_page, usages, usage_min, usage_max, logical_min,
    logical_max, item_size, count):
    """
        This is a function to be called by a HID report descriptor parser.

        Given the current parser state and the various arguments, create the
        required number of :class:`HidField` objects.

        :returns: a list of :class:`HidField` objects
        """
    usage = usage_min
    if len(usages) > 0:
        usage = usages[0]
    item = cls(report_ID, logical, physical, application, collection, value,
        usage_page, usage, logical_min, logical_max, item_size, 1)
    items = []
    if value & 1 << 0:
        item.size *= count
        return [item]
    elif value & 1 << 1:
        if usage_min and usage_max:
            usage = usage_min
            for i in range(count):
                item = item.copy()
                item.usage = usage
                items.append(item)
                if usage < usage_max:
                    usage += 1
        else:
            for i in range(count):
                if i < len(usages):
                    usage = usages[i]
                else:
                    usage = usages[-1]
                item = item.copy()
                item.usage = usage
                items.append(item)
    else:
        if usage_min and usage_max:
            usages = list(range(usage_min, usage_max + 1))
        item.usages = usages
        item.count = count
        return [item]
    return items
