001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package org.wpilib.opmode; 006 007import java.lang.annotation.Documented; 008import java.lang.annotation.ElementType; 009import java.lang.annotation.Retention; 010import java.lang.annotation.RetentionPolicy; 011import java.lang.annotation.Target; 012 013/** Annotation for automatic registration of autonomous opmode classes. */ 014@Retention(RetentionPolicy.RUNTIME) 015@Target(ElementType.TYPE) 016@Documented 017public @interface Autonomous { 018 /** 019 * Name. This is shown as the selection name in the Driver Station, and must be unique across all 020 * autonomous opmodes in the project. If not specified, defaults to the name of the class. 021 * 022 * @return Name 023 */ 024 String name() default ""; 025 026 /** 027 * Group. All opmodes with the same group are grouped together for selection. If not specified, 028 * defaults to ungrouped. 029 * 030 * @return Group 031 */ 032 String group() default ""; 033 034 /** 035 * Extended description. Optional. 036 * 037 * @return Description 038 */ 039 String description() default ""; 040 041 /** 042 * Text color. Optional. Supports all formats supported by {@link 043 * org.wpilib.util.Color#fromString(String)}. 044 * 045 * @return Text color 046 */ 047 String textColor() default ""; 048 049 /** 050 * Text background color. Optional. Supports all formats supported by {@link 051 * org.wpilib.util.Color#fromString(String)}. 052 * 053 * @return Text background color 054 */ 055 String backgroundColor() default ""; 056}