def generate_enums_info(enums, msgs):
    for enum in enums:
        enum.swift_name = camel_case_from_underscores(enum.name)
        enum.raw_value_type = get_enum_raw_type(enum, msgs)
        enum.formatted_description = ""
        if enum.description:
            enum.description = " ".join(enum.description.split())
            enum.formatted_description = "\n/**\n    %s\n*/\n" % enum.description
        all_entities = []
        entities_info = []
        for entry in enum.entry:
            name = entry.name.replace(enum.name + '_', '')
            if name[0].isdigit():
                name = "MAV_" + name
            entry.swift_name = camel_case_from_underscores(name)
            entry.formatted_description = ""
            if entry.description:
                entry.description = " ".join(entry.description.split())
                entry.formatted_description = "\n\t/// " + entry.description + "\n"
            all_entities.append(entry.swift_name)
            entities_info.append('("%s", "%s")' % (entry.name, entry.description.replace('"','\\"')))
        enum.all_entities = ", ".join(all_entities)
        enum.entities_info = ", ".join(entities_info)
        enum.entity_description = enum.description.replace('"','\\"')
    enums.sort(key = lambda enum : enum.swift_name)