ExportEventParameters.java

package client.teavm.common.parameter.event;

import client.teavm.common.autoplay.KeyEventType;
import client.teavm.common.parameter.usage.EventUsageFormatter;
import com.beust.jcommander.*;
import com.beust.jcommander.internal.Console;
import com.beust.jcommander.internal.DefaultConsole;
import libsidplay.common.*;
import libsidplay.components.c1530.Datasette.Control;
import libsidplay.components.c1541.FloppyType;
import libsidplay.components.keyboard.KeyTableEntry;
import libsidplay.components.printer.PrinterConnection;
import libsidplay.components.printer.PrinterModel;
import server.restful.common.parameter.UsageParameter;
import server.restful.common.validator.JoystickNumberValidator;
import server.restful.common.validator.JoystickValueValidator;
import sidplay.ini.IniDefaults;
import sidplay.ini.converter.NegatedBooleanConverter;
import sidplay.ini.converter.ParameterTimeConverter;
import sidplay.ini.validator.FilterNameValidator.AnyFilterNameValidator;
import sidplay.ini.validator.VerboseValidator;

import java.util.function.Function;

import static java.lang.Integer.MAX_VALUE;
import static libsidplay.config.IAudioSection.AUDIO_SECTION_BUNDLE;
import static libsidplay.config.IC1541Section.C1541_SECTION_BUNDLE;
import static libsidplay.config.IEmulationSection.EMULATION_SECTION_BUNDLE;
import static libsidplay.config.IPrinterSection.PRINTER_SECTION_BUNDLE;
import static libsidplay.config.ISidPlay2Section.SIDPLAY2_SECTION_BUNDLE;
import static libsidplay.config.IWhatsSidSection.WHATS_SID_SECTION_BUNDLE;
import static server.restful.common.IServletSystemProperties.StaticServlet.SLEEP_TIME;

/**
 * Exported events to control the emulator (JavaScript calls WebWorker functions)
 * <p>
 * Purpose is to generate a documentation and a JSON schema for validation of the JavaScript API on the client side.
 */
@SuppressWarnings({"unused", "FieldMayBeFinal"})
@Parameters(resourceBundle = ExportEventParameters.BUNDLE)
public class ExportEventParameters extends UsageParameter implements IniDefaults {

    public static final String BUNDLE = "client.teavm.common.parameter.event.ExportEventParameters";

    @Parameters(commandNames = "INITIALISE", commandDescriptionKey = "INITIALISE", resourceBundle = BUNDLE)
    private static class InitialiseEvent {

        @Parameter(names = "verbose", validateWith = VerboseValidator.class, descriptionKey = "INITIALISE_VERBOSE", order = 0)
        private int verbose;

        @Parameter(names = "quiet", descriptionKey = "INITIALISE_QUIET", order = 1)
        private boolean quiet;

        @Parameter(names = "debug", descriptionKey = "INITIALISE_DEBUG", order = 2)
        private boolean debug;

        @Parameter(descriptionKey = "INITIALISE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "OPEN", commandDescriptionKey = "OPEN", resourceBundle = BUNDLE)
    private static class OpenEvent {

        @Parameter(names = "contents", descriptionKey = "OPEN_CONTENTS", order = 0)
        private byte[] contents;

        @Parameter(names = "tuneName", descriptionKey = "OPEN_TUNE_NAME", order = 1)
        private String tuneName;

        @Parameter(names = "startSong", required = true, descriptionKey = "OPEN_START_SONG", order = 2)
        private int startSong;

        @Parameter(names = "nthFrame", required = true, descriptionKey = "OPEN_NTH_FRAME", order = 3)
        private int nthFrame;

        @Parameter(names = "sidWrites", required = true, descriptionKey = "OPEN_SID_WRITES", order = 4)
        private boolean sidWrites;

        @Parameter(names = "cartContents", descriptionKey = "OPEN_CART_CONTENTS", order = 5)
        private byte[] cartContents;

        @Parameter(names = "cartName", descriptionKey = "OPEN_CART_NAME", order = 6)
        private String cartName;

        @Parameter(names = "command", descriptionKey = "OPEN_COMMAND", order = 7)
        private String command;

        @Parameter(names = "songLength", descriptionKey = "OPEN_SONG_LENGTH", order = 8)
        private double songLength;

        @Parameter(names = "sfxSoundExpander", required = true, descriptionKey = "OPEN_SFX_SOUND_EXPANDER", order = 9)
        private boolean sfxSoundExpander;

        @Parameter(names = "sfxSoundExpanderType", required = true, descriptionKey = "OPEN_SFX_SOUND_EXPANDER_TYPE", order = 10)
        int sfxSoundExpanderType = 1;

        @Parameter(names = "sidWriteBatch", descriptionKey = "OPEN_SID_WRITE_BATCH", order = 11)
        private boolean sidWriteBatch;

        @Parameter(names = "companionContents", descriptionKey = "OPEN_COMPANION_CONTENTS", order = 12)
        private byte[] companionContents;

        @Parameter(names = "companionName", descriptionKey = "OPEN_COMPANION_NAME", order = 13)
        private String companionName;

        @Parameter(descriptionKey = "OPEN_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "CLOCK", commandDescriptionKey = "CLOCK", resourceBundle = BUNDLE)
    private static class ClockEvent {

        @Parameter(descriptionKey = "CLOCK_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "IDLE", commandDescriptionKey = "IDLE", resourceBundle = BUNDLE)
    private static class IdleEvent {

        @Parameter(names = "sleepTime", required = true, descriptionKey = "IDLE_SLEEP_TIME", order = 0)
        private int sleepTime = SLEEP_TIME;

        @Parameter(descriptionKey = "IDLE_FIRES_EVENT")
        private String firesEvent;

    }

    //
    // ISidplay2Section methods
    //

    @Parameters(commandNames = "SET_DEFAULT_PLAY_LENGTH", commandDescriptionKey = "SET_DEFAULT_PLAY_LENGTH", resourceBundle = BUNDLE)
    public static class DefaultPlayLengthEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class DefaultPlayLengthParameters {

            @Parameter(names = "defaultPlayLength", converter = ParameterTimeConverter.class, required = true, descriptionKey = "DEFAULT_LENGTH", order = 0)
            private double defaultPlayLength = DEFAULT_PLAY_LENGTH;

        }

        @Parameter(descriptionKey = "SET_DEFAULT_PLAY_LENGTH_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private DefaultPlayLengthParameters defaultPlayLengthParameters = new DefaultPlayLengthParameters();

    }

    @Parameters(commandNames = "SET_LOOP", commandDescriptionKey = "SET_LOOP", resourceBundle = BUNDLE)
    public static class SetLoopEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetLoopParameters {

            @Parameter(names = "loop", required = true, descriptionKey = "LOOP", order = 0)
            private boolean loop = DEFAULT_LOOP;
        }

        @Parameter(descriptionKey = "SET_LOOP_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetLoopParameters setLoopParameters = new SetLoopParameters();

    }

    @Parameters(commandNames = "SET_SINGLE", commandDescriptionKey = "SET_SINGLE", resourceBundle = BUNDLE)
    public static class SetSingleEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetSingleParameters {

            @Parameter(names = "single", required = true, descriptionKey = "SINGLE", order = 0)
            private boolean single = DEFAULT_SINGLE_TRACK;
        }

        @Parameter(descriptionKey = "SET_SINGLE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetSingleParameters setSingleParameters = new SetSingleParameters();

    }

    @Parameters(commandNames = "SET_PAL_EMULATION_ENABLE", commandDescriptionKey = "SET_PAL_EMULATION_ENABLE", resourceBundle = BUNDLE)
    public static class SetPalEmulationEnableEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetPalEmulationEnableParameters {

            @Parameter(names = "palEmulationEnable", required = true, descriptionKey = "PAL_EMULATION", order = 0)
            private boolean palEmulationEnable = DEFAULT_PAL_EMULATION;

            @Parameter(names = "palEmulationMode", descriptionKey = "PAL_EMULATION_MODE", order = 1)
            private PalEmulationMode palEmulationMode;
        }

        @Parameter(descriptionKey = "SET_PAL_EMULATION_ENABLE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetPalEmulationEnableParameters setPalEmulationEnableParameters = new SetPalEmulationEnableParameters();

    }

    @Parameters(commandNames = "SET_TURBO_TAPE", commandDescriptionKey = "SET_TURBO_TAPE", resourceBundle = BUNDLE)
    public static class SetTurboTapeEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetTurboTapeParameters {

            @Parameter(names = "turboTape", required = true, descriptionKey = "TURBO_TAPE", order = 0)
            private boolean turboTape = DEFAULT_TURBO_TAPE;
        }

        @Parameter(descriptionKey = "SET_TURBO_TAPE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetTurboTapeParameters setTurboTapeParameters = new SetTurboTapeParameters();

    }

    @Parameters(commandNames = "SET_STARTUP_WARP", commandDescriptionKey = "SET_STARTUP_WARP", resourceBundle = BUNDLE)
    public static class SetStartupWarpEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetStartupWarpParameters {

            @Parameter(names = "warpOnStartup", required = true, descriptionKey = "WARP_ON_STARTUP", order = 0)
            private boolean warpOnStartup = DEFAULT_WARP_ON_STARTUP;

            @Parameter(names = "warpStartupTimeout", required = true, descriptionKey = "WARP_STARTUP_TIMEOUT", order = 1)
            private int warpStartupTimeout = DEFAULT_WARP_STARTUP_TIMEOUT;
        }

        @Parameter(descriptionKey = "SET_STARTUP_WARP_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetStartupWarpParameters setStartupWarpParameters = new SetStartupWarpParameters();

    }

    @Parameters(commandNames = "SET_FADE_TIME", commandDescriptionKey = "SET_FADE_TIME", resourceBundle = BUNDLE)
    public static class SetFadeTimeEvent {

        @Parameters(resourceBundle = SIDPLAY2_SECTION_BUNDLE)
        private static class SetFadeTimeParameters {

            @Parameter(names = "fadeInTime", required = true, converter = ParameterTimeConverter.class, descriptionKey = "FADE_IN", order = 0)
            private double fadeInTime = DEFAULT_FADE_IN_TIME;

            @Parameter(names = "fadeOutTime", required = true, converter = ParameterTimeConverter.class, descriptionKey = "FADE_OUT", order = 1)
            private double fadeOutTime = DEFAULT_FADE_OUT_TIME;

        }

        @Parameter(descriptionKey = "SET_FADE_TIME_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetFadeTimeParameters setFadeTimeParameters = new SetFadeTimeParameters();

    }

    //
    // IAudioSection methods
    //

    @Parameters(commandNames = "SET_SAMPLING_RATE", commandDescriptionKey = "SET_SAMPLING_RATE", resourceBundle = BUNDLE)
    public static class SetSamplingRateEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetSamplingRateParameters {

            @Parameter(names = "samplingRate", required = true, descriptionKey = "FREQUENCY", order = 0)
            private SamplingRate samplingRate = DEFAULT_SAMPLING_RATE;

        }

        @Parameter(descriptionKey = "SET_SAMPLING_RATE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetSamplingRateParameters setSamplingRateParameters = new SetSamplingRateParameters();

    }

    @Parameters(commandNames = "SET_SAMPLING", commandDescriptionKey = "SET_SAMPLING", resourceBundle = BUNDLE)
    public static class SetSamplingEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetSamplingParameters {

            @Parameter(names = "sampling", required = true, descriptionKey = "SAMPLING", order = 0)
            private SamplingMethod sampling = DEFAULT_SAMPLING;

        }

        @Parameter(descriptionKey = "SET_SAMPLING_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetSamplingParameters setSamplingParameters = new SetSamplingParameters();

    }

    @Parameters(commandNames = "SET_VOLUME_LEVELS", commandDescriptionKey = "SET_VOLUME_LEVELS", resourceBundle = BUNDLE)
    public static class SetVolumeLevelsEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetVolumeLevelsParameters {

            @Parameter(names = "mainVolume", required = true, descriptionKey = "MAIN_VOLUME", order = 0)
            private float mainVolume = DEFAULT_MAIN_VOLUME;

            @Parameter(names = "secondVolume", required = true, descriptionKey = "SECOND_VOLUME", order = 1)
            private float secondVolume = DEFAULT_SECOND_VOLUME;

            @Parameter(names = "thirdVolume", required = true, descriptionKey = "THIRD_VOLUME", order = 2)
            private float thirdVolume = DEFAULT_THIRD_VOLUME;

            @Parameter(names = "mainBalance", required = true, descriptionKey = "MAIN_BALANCE", order = 3)
            private float mainBalance = DEFAULT_MAIN_BALANCE;

            @Parameter(names = "secondBalance", required = true, descriptionKey = "SECOND_BALANCE", order = 4)
            private float secondBalance = DEFAULT_SECOND_BALANCE;

            @Parameter(names = "thirdBalance", required = true, descriptionKey = "THIRD_BALANCE", order = 5)
            private float thirdBalance = DEFAULT_THIRD_BALANCE;

            @Parameter(names = "mainDelay", required = true, descriptionKey = "MAIN_DELAY", order = 6)
            private float mainDelay = DEFAULT_MAIN_DELAY;

            @Parameter(names = "secondDelay", required = true, descriptionKey = "SECOND_DELAY", order = 7)
            private float secondDelay = DEFAULT_SECOND_DELAY;

            @Parameter(names = "thirdDelay", required = true, descriptionKey = "THIRD_DELAY", order = 8)
            private float thirdDelay = DEFAULT_THIRD_DELAY;

        }

        @Parameter(descriptionKey = "SET_VOLUME_LEVELS_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetVolumeLevelsParameters setVolumeLevelsParameters = new SetVolumeLevelsParameters();

    }

    @Parameters(commandNames = "SET_BUFFER_SIZE", commandDescriptionKey = "SET_BUFFER_SIZE", resourceBundle = BUNDLE)
    public static class SetBufferSizeEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetBufferSizeParameters {

            @Parameter(names = "bufferSize", required = true, descriptionKey = "BUFFER_SIZE", order = 0)
            private int bufferSize = DEFAULT_BUFFER_SIZE;

        }

        @Parameter(descriptionKey = "SET_BUFFER_SIZE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetBufferSizeParameters setBufferSizeParameters = new SetBufferSizeParameters();

    }

    @Parameters(commandNames = "SET_AUDIO_BUFFER_SIZE", commandDescriptionKey = "SET_AUDIO_BUFFER_SIZE", resourceBundle = BUNDLE)
    public static class SetAudioBufferSizeEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetAudioBufferSizeParameters {

            @Parameter(names = "audioBufferSize", required = true, descriptionKey = "AUDIO_BUFFER_SIZE", order = 0)
            private int audioBufferSize = DEFAULT_AUDIO_BUFFER_SIZE;

        }

        @Parameter(descriptionKey = "SET_AUDIO_BUFFER_SIZE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetAudioBufferSizeParameters setAudioBufferSizeParameters = new SetAudioBufferSizeParameters();

    }

    @Parameters(commandNames = "SET_DELAY", commandDescriptionKey = "SET_DELAY", resourceBundle = BUNDLE)
    public static class SetDelayEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetDelayParameters {

            @Parameter(names = "delayBypass", required = true, descriptionKey = "DELAY_BYPASS", order = 0)
            private boolean delayBypass = DEFAULT_DELAY_BYPASS;

            @Parameter(names = "delay", required = true, descriptionKey = "DELAY", order = 1)
            private int delay = DEFAULT_DELAY;

            @Parameter(names = "delayWetLevel", required = true, descriptionKey = "DELAY_WET_LEVEL", order = 2)
            private int delayWetLevel = DEFAULT_DELAY_WET_LEVEL;

            @Parameter(names = "delayDryLevel", required = true, descriptionKey = "DELAY_DRY_LEVEL", order = 3)
            private int delayDryLevel = DEFAULT_DELAY_DRY_LEVEL;

            @Parameter(names = "delayFeedbackLevel", required = true, descriptionKey = "DELAY_FEEDBACK_LEVEL", order = 4)
            private int delayFeedbackLevel = DEFAULT_DELAY_FEEDBACK_LEVEL;

        }

        @Parameter(descriptionKey = "SET_DELAY_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDelayParameters setDelayParameters = new SetDelayParameters();

    }

    @Parameters(commandNames = "SET_REVERB", commandDescriptionKey = "SET_REVERB", resourceBundle = BUNDLE)
    public static class SetReverbEvent {

        @Parameters(resourceBundle = AUDIO_SECTION_BUNDLE)
        private static class SetReverbParameters {

            @Parameter(names = "reverbBypass", required = true, descriptionKey = "REVERB_BYPASS", order = 0)
            private boolean reverbBypass = DEFAULT_REVERB_BYPASS;

            @Parameter(names = "reverbComb1Delay", required = true, descriptionKey = "REVERB_COMB1_DELAY", order = 1)
            private float reverbComb1Delay = DEFAULT_REVERB_COMB1_DELAY;

            @Parameter(names = "reverbComb2Delay", required = true, descriptionKey = "REVERB_COMB2_DELAY", order = 2)
            private float reverbComb2Delay = DEFAULT_REVERB_COMB2_DELAY;

            @Parameter(names = "reverbComb3Delay", required = true, descriptionKey = "REVERB_COMB3_DELAY", order = 3)
            private float reverbComb3Delay = DEFAULT_REVERB_COMB3_DELAY;

            @Parameter(names = "reverbComb4Delay", required = true, descriptionKey = "REVERB_COMB4_DELAY", order = 4)
            private float reverbComb4Delay = DEFAULT_REVERB_COMB4_DELAY;

            @Parameter(names = "reverbAllPass1Delay", required = true, descriptionKey = "REVERB_ALL_PASS1_DELAY", order = 5)
            private float reverbAllPass1Delay = DEFAULT_REVERB_ALL_PASS1_DELAY;

            @Parameter(names = "reverbAllPass2Delay", required = true, descriptionKey = "REVERB_ALL_PASS2_DELAY", order = 6)
            private float reverbAllPass2Delay = DEFAULT_REVERB_ALL_PASS2_DELAY;

            @Parameter(names = "reverbSustainDelay", required = true, descriptionKey = "REVERB_SUSTAIN_DELAY", order = 7)
            private float reverbSustainDelay = DEFAULT_REVERB_SUSTAIN_DELAY;

            @Parameter(names = "reverbDryWetMix", required = true, descriptionKey = "REVERB_DRY_WET_MIX", order = 8)
            private float reverbDryWetMix = DEFAULT_REVERB_DRY_WET_MIX;

        }

        @Parameter(descriptionKey = "SET_REVERB_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetReverbParameters setReverbParameters = new SetReverbParameters();

    }

    //
    // IEmulationSection methods
    //

    @Parameters(commandNames = "SET_ENGINE", commandDescriptionKey = "SET_ENGINE", resourceBundle = BUNDLE)
    public static class SetEngineEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetEngineParameters {

            @Parameter(names = "engine", required = true, descriptionKey = "ENGINE", order = 0)
            private Engine engine = DEFAULT_ENGINE;

        }

        @Parameter(descriptionKey = "SET_ENGINE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetEngineParameters setEngineParameters = new SetEngineParameters();

    }

    @Parameters(commandNames = "SET_DEFAULT_EMULATION", commandDescriptionKey = "SET_DEFAULT_EMULATION", resourceBundle = BUNDLE)
    public static class SetDefaultEmulationEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetDefaultEmulationParameters {

            @Parameter(names = "defaultEmulation", required = true, descriptionKey = "DEFAULT_EMULATION", order = 0)
            private Emulation defaultEmulation = DEFAULT_EMULATION;

        }

        @Parameter(descriptionKey = "SET_DEFAULT_EMULATION_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDefaultEmulationParameters setDefaultEmulationParameters = new SetDefaultEmulationParameters();

    }

    @Parameters(commandNames = "SET_USER_EMULATION", commandDescriptionKey = "SET_USER_EMULATION", resourceBundle = BUNDLE)
    public static class SetUserEmulationEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetUserEmulationParameters {

            @Parameter(names = "userEmulation", required = true, descriptionKey = "FORCE_EMULATION", order = 0)
            private Emulation userEmulation = DEFAULT_USER_EMULATION;

            @Parameter(names = "stereoEmulation", required = true, descriptionKey = "FORCE_STEREO_EMULATION", order = 1)
            private Emulation stereoEmulation = DEFAULT_STEREO_EMULATION;

            @Parameter(names = "thirdEmulation", required = true, descriptionKey = "FORCE_THIRD_EMULATION", order = 2)
            private Emulation thirdEmulation = DEFAULT_3SID_EMULATION;

        }

        @Parameter(descriptionKey = "SET_USER_EMULATION_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetUserEmulationParameters setUserEmulationParameters = new SetUserEmulationParameters();

    }

    @Parameters(commandNames = "SET_DEFAULT_CLOCK_SPEED", commandDescriptionKey = "SET_DEFAULT_CLOCK_SPEED", resourceBundle = BUNDLE)
    public static class SetDefaultClockSpeedEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetDefaultClockSpeedParameters {

            @Parameter(names = "defaultClockSpeed", required = true, descriptionKey = "DEFAULT_CLOCK", order = 0)
            private CPUClock defaultClockSpeed = DEFAULT_CLOCK_SPEED;

        }

        @Parameter(descriptionKey = "SET_DEFAULT_CLOCK_SPEED_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDefaultClockSpeedParameters setDefaultClockSpeedParameters = new SetDefaultClockSpeedParameters();

    }

    @Parameters(commandNames = "SET_USER_CLOCK_SPEED", commandDescriptionKey = "SET_USER_CLOCK_SPEED", resourceBundle = BUNDLE)
    public static class SetUserClockSpeedEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetUserClockSpeedParameters {

            @Parameter(names = "userClockSpeed", required = true, descriptionKey = "FORCE_CLOCK", order = 0)
            private CPUClock userClockSpeed = DEFAULT_USER_CLOCK_SPEED;

        }

        @Parameter(descriptionKey = "SET_USER_CLOCK_SPEED_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetUserClockSpeedParameters setUserClockSpeedParameters = new SetUserClockSpeedParameters();

    }

    @Parameters(commandNames = "SET_DEFAULT_CHIP_MODEL", commandDescriptionKey = "SET_DEFAULT_CHIP_MODEL", resourceBundle = BUNDLE)
    public static class SetDefaultChipModelEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetDefaultChipModelParameters {

            @Parameter(names = "defaultSidModel", required = true, descriptionKey = "DEFAULT_MODEL", order = 0)
            private ChipModel defaultSidModel = DEFAULT_SID_MODEL;

        }

        @Parameter(descriptionKey = "SET_DEFAULT_CHIP_MODEL_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDefaultChipModelParameters setDefaultChipModelParameters = new SetDefaultChipModelParameters();

    }

    @Parameters(commandNames = "SET_USER_CHIP_MODEL", commandDescriptionKey = "SET_USER_CHIP_MODEL", resourceBundle = BUNDLE)
    public static class SetUserChipModelEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetUserChipModelParameters {

            @Parameter(names = "userSidModel", required = true, descriptionKey = "FORCE_MODEL", order = 0)
            private ChipModel userSidModel = DEFAULT_USER_MODEL;

            @Parameter(names = "stereoSidModel", required = true, descriptionKey = "FORCE_STEREO_MODEL", order = 1)
            private ChipModel stereoSidModel = DEFAULT_STEREO_MODEL;

            @Parameter(names = "thirdSIDModel", required = true, descriptionKey = "FORCE_THIRD_MODEL", order = 2)
            private ChipModel thirdSIDModel = DEFAULT_3SID_MODEL;

        }

        @Parameter(descriptionKey = "SET_USER_CHIP_MODEL_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetUserChipModelParameters setUserChipModelParameters = new SetUserChipModelParameters();

    }

    @Parameters(commandNames = "SET_OVERRIDE_CHIP_MODEL", commandDescriptionKey = "SET_OVERRIDE_CHIP_MODEL", resourceBundle = BUNDLE)
    public static class SetOverrideChipModelEvent {

        @Parameter(names = "chipModel", required = true, descriptionKey = "OVERRIDE_CHIP_MODEL_CHIP_MODEL", order = 0)
        private ChipModel chipModel;

        @Parameter(descriptionKey = "SET_OVERRIDE_CHIP_MODEL_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "HARDSID_MAPPING", commandDescriptionKey = "HARDSID_MAPPING", resourceBundle = BUNDLE)
    public static class HardSidMappingEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class HardSidMappingParameters {

            @Parameter(names = "hardsid6581", required = true, descriptionKey = "HARDSID_6581", order = 1)
            private int hardsid6581 = DEFAULT_HARD_SID_6581;

            @Parameter(names = "hardsid8580", required = true, descriptionKey = "HARDSID_8580", order = 2)
            private int hardsid8580 = DEFAULT_HARD_SID_8580;

        }

        @Parameter(names = "chipCount", required = true, descriptionKey = "HARDSID_MAPPING_CHIP_COUNT", order = 0)
        private int chipCount;

        @Parameter(descriptionKey = "HARDSID_MAPPING_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private HardSidMappingParameters hardSidMappingParameters = new HardSidMappingParameters();

    }

    @Parameters(commandNames = "EXSID_MAPPING", commandDescriptionKey = "EXSID_MAPPING", resourceBundle = BUNDLE)
    public static class ExSidMappingEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class ExSidMappingParameters {

        }

        @Parameter(descriptionKey = "EXSID_MAPPING_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private ExSidMappingParameters hardSidMappingParameters = new ExSidMappingParameters();

    }

    @Parameters(commandNames = "USBSID_MAPPING", commandDescriptionKey = "USBSID_MAPPING", resourceBundle = BUNDLE)
    public static class UsbSidMappingEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class UsbSidMappingParameters {

        }

        @Parameter(descriptionKey = "USBSID_MAPPING_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private UsbSidMappingParameters usbSidMappingParameters = new UsbSidMappingParameters();

    }

    @Parameters(commandNames = "SET_FILTER_ENABLE", commandDescriptionKey = "SET_FILTER_ENABLE", resourceBundle = BUNDLE)
    public static class SetFilterEnableEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetFilterEnableParameters {

            @Parameter(names = "filterEnable", required = true, converter = NegatedBooleanConverter.class, descriptionKey = "DISABLE_FILTER", order = 1)
            private boolean filterEnable = DEFAULT_USE_FILTER;
        }

        @Parameter(names = "sidNum", required = true, descriptionKey = "SIDNUM", order = 0)
        private int sidNum;

        @Parameter(descriptionKey = "SET_FILTER_ENABLE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetFilterEnableParameters setFilterEnableParameters = new SetFilterEnableParameters();

    }

    @Parameters(commandNames = "SET_FILTER_NAME", commandDescriptionKey = "SET_FILTER_NAME", resourceBundle = BUNDLE)
    public static class SetFilterNameEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetFilterNameParameters {

        }

        @Parameter(names = "sidNum", required = true, descriptionKey = "SIDNUM", order = 0)
        private int sidNum;

        @Parameter(names = "emulation", required = true, descriptionKey = "SET_FILTER_NAME_EMULATION", order = 1)
        private Emulation emulation;

        @Parameter(names = "chipModel", required = true, descriptionKey = "SET_FILTER_NAME_CHIP_MODEL", order = 2)
        private ChipModel chipModel;

        @Parameter(names = "filterName", required = true, validateWith = AnyFilterNameValidator.class, descriptionKey = "SET_FILTER_NAME_FILTER_NAME", order = 3)
        private String filterName;

        @Parameter(descriptionKey = "SET_FILTER_NAME_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetFilterNameParameters setFilterNameParameters = new SetFilterNameParameters();

    }

    @Parameters(commandNames = "SET_FILTER", commandDescriptionKey = "SET_FILTER", resourceBundle = BUNDLE)
    public static class SetFilterEvent {

        @Parameter(names = "filterName", required = true, validateWith = AnyFilterNameValidator.class, descriptionKey = "SET_FILTER_FILTER_NAME", order = 0)
        private String filterName;

        @Parameter(names = "filter6581CurvePosition", required = true, descriptionKey = "SET_FILTER_FILTER_6581_CURVE_POSITION", order = 1)
        private float filter6581CurvePosition;

        @Parameter(names = "voiceNonlinearity", required = true, descriptionKey = "SET_FILTER_VOICE_NON_LINEARITY", order = 2)
        private float voiceNonlinearity;

        @Parameter(names = "steepness", required = true, descriptionKey = "SET_FILTER_STEEPNESS", order = 3)
        private float steepness;

        @Parameter(names = "resonanceFactor", required = true, descriptionKey = "SET_FILTER_RESONANCE_FACTOR", order = 4)
        private float resonanceFactor;

        @Parameter(names = "offset", required = true, descriptionKey = "SET_FILTER_OFFSET", order = 5)
        private float offset;

        @Parameter(names = "nonlinearity", required = true, descriptionKey = "SET_FILTER_NON_LINEARITY", order = 6)
        private float nonlinearity;

        @Parameter(names = "minimumfetresistance", required = true, descriptionKey = "SET_FILTER_MINIMUM_FET_RESISTANCE", order = 7)
        private float minimumfetresistance;

        @Parameter(names = "k", required = true, descriptionKey = "SET_FILTER_K", order = 8)
        private float k;

        @Parameter(names = "filter8580CurvePosition", required = true, descriptionKey = "SET_FILTER_FILTER_8580_CURVE_POSITION", order = 9)
        private float filter8580CurvePosition;

        @Parameter(names = "baseresistance", required = true, descriptionKey = "SET_FILTER_BASE_RESISTANCE", order = 10)
        private float baseresistance;

        @Parameter(names = "b", required = true, descriptionKey = "SET_FILTER_B", order = 11)
        private float b;

        @Parameter(names = "attenuation", required = true, descriptionKey = "SET_FILTER_ATTENUATION", order = 12)
        private float attenuation;

        @Parameter(names = "circuitModel", descriptionKey = "SET_FILTER_CIRCUIT_MODEL", order = 13)
        private ChipModel circuitModel;

        @Parameter(names = "circuitCurve", descriptionKey = "SET_FILTER_CIRCUIT_CURVE", order = 14)
        private float circuitCurve = 0.5f;

        @Parameter(names = "circuitRange", descriptionKey = "SET_FILTER_CIRCUIT_RANGE", order = 15)
        private float circuitRange = 0.5f;

        @Parameter(names = "circuitCapacitance", descriptionKey = "SET_FILTER_CIRCUIT_CAPACITANCE", order = 16)
        private float circuitCapacitance = 470;

        @Parameter(descriptionKey = "SET_FILTER_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "SET_DIGI_BOOSTED_8580", commandDescriptionKey = "SET_DIGI_BOOSTED_8580", resourceBundle = BUNDLE)
    public static class SetDigiBoosted8580Event {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetDigiBoosted8580Parameters {

            @Parameter(names = "digiBoosted8580", required = true, descriptionKey = "DIGIBOOSTED8580", order = 0)
            private boolean digiBoosted8580 = DEFAULT_DIGI_BOOSTED_8580;
        }

        @Parameter(descriptionKey = "SET_DIGI_BOOSTED_8580_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDigiBoosted8580Parameters setDigiBoosted8580Parameters = new SetDigiBoosted8580Parameters();

    }

    @Parameters(commandNames = "SET_STEREO", commandDescriptionKey = "SET_STEREO", resourceBundle = BUNDLE)
    public static class SetStereoEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetStereoParameters {

            @Parameter(names = "dualSidBase", required = true, descriptionKey = "DUAL_SID_BASE", order = 1)
            private int dualSidBase = DEFAULT_DUAL_SID_BASE;

            @Parameter(names = "thirdSIDBase", required = true, descriptionKey = "THIRD_SID_BASE", order = 2)
            private int thirdSIDBase = DEFAULT_THIRD_SID_BASE;

            @Parameter(names = "fakeStereo", required = true, descriptionKey = "FAKE_STEREO", order = 3)
            private boolean fakeStereo = DEFAULT_FAKE_STEREO;

            @Parameter(names = "sidToRead", required = true, descriptionKey = "SID_TO_READ", order = 4)
            private SidReads sidToRead = DEFAULT_SID_TO_READ;
        }

        @Parameter(names = "stereoMode", required = true, descriptionKey = "SET_STEREO_MODE", order = 0)
        private StereoMode stereoMode = StereoMode.AUTO;

        @Parameter(descriptionKey = "SET_STEREO_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetStereoParameters setStereoParameters = new SetStereoParameters();

    }

    @Parameters(commandNames = "SET_MUTE", commandDescriptionKey = "SET_MUTE", resourceBundle = BUNDLE)
    public static class SetMuteEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetMuteParameters {

        }

        @Parameter(names = "sidNum", required = true, descriptionKey = "SIDNUM", order = 0)
        private int sidNum;

        @Parameter(names = "voice", required = true, descriptionKey = "SET_MUTE_VOICE", order = 1)
        private int voice;

        @Parameter(names = "value", required = true, descriptionKey = "SET_MUTE_VALUE", order = 2)
        private boolean value;

        @Parameter(descriptionKey = "SET_MUTE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetMuteParameters setMuteParameters = new SetMuteParameters();

    }

    @Parameters(commandNames = "SET_DETECT_PSID64_CHIP_MODEL", commandDescriptionKey = "SET_DETECT_PSID64_CHIP_MODEL", resourceBundle = BUNDLE)
    public static class SetDetectPsid64ChipModelEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetDetectPsid64ChipModelParameters {

            @Parameter(names = "detectPSID64ChipModel", required = true, descriptionKey = "DETECT_PSID64_CHIP_MODEL", order = 0)
            private boolean detectPSID64ChipModel = DEFAULT_DETECT_PSID64_CHIP_MODEL;
        }

        @Parameter(descriptionKey = "SET_DETECT_PSID64_CHIP_MODEL_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetDetectPsid64ChipModelParameters setDetectPsid64ChipModelParameters = new SetDetectPsid64ChipModelParameters();

    }

    @Parameters(commandNames = "SET_STEREO_SNIFFER", commandDescriptionKey = "SET_STEREO_SNIFFER", resourceBundle = BUNDLE)
    public static class SetStereoSnifferEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetStereoSnifferParameters {

            @Parameter(names = "stereoSniffer", required = true, descriptionKey = "STEREO_SNIFFER", order = 0)
            private boolean stereoSniffer = DEFAULT_STEREO_SNIFFER;
        }

        @Parameter(descriptionKey = "SET_STEREO_SNIFFER_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetStereoSnifferParameters setStereoSnifferParameters = new SetStereoSnifferParameters();

    }

    @Parameters(commandNames = "SET_SILENCE_TIMEOUT", commandDescriptionKey = "SET_SILENCE_TIMEOUT", resourceBundle = BUNDLE)
    public static class SetSilenceTimeoutEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetSilenceTimeoutParameters {

            @Parameter(names = "silenceTimeout", required = true, descriptionKey = "SILENCE_TIMEOUT", order = 0)
            private int silenceTimeout = DEFAULT_SILENCE_TIMEOUT;
        }

        @Parameter(descriptionKey = "SET_SILENCE_TIMEOUT_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetSilenceTimeoutParameters setSilenceTimeoutParameters = new SetSilenceTimeoutParameters();

    }

    @Parameters(commandNames = "SET_C64_MODEL", commandDescriptionKey = "SET_C64_MODEL", resourceBundle = BUNDLE)
    public static class SetC64ModelEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetC64ModelParameters {

            @Parameter(names = "c64Model", required = true, descriptionKey = "C64_MODEL", order = 0)
            private C64Model c64Model = DEFAULT_C64_MODEL;
        }

        @Parameter(descriptionKey = "SET_C64_MODEL_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetC64ModelParameters setC64ModelParameters = new SetC64ModelParameters();

    }

    @Parameters(commandNames = "SET_VIC_MODEL", commandDescriptionKey = "SET_VIC_MODEL", resourceBundle = BUNDLE)
    public static class SetVicModelEvent {

        @Parameters(resourceBundle = EMULATION_SECTION_BUNDLE)
        private static class SetVicModelParameters {

            @Parameter(names = "vicModel", required = true, descriptionKey = "VIC_MODEL", order = 0)
            private VICModel vicModel = DEFAULT_VIC_MODEL;
        }

        @Parameter(descriptionKey = "SET_VIC_MODEL_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetVicModelParameters setVicModelParameters = new SetVicModelParameters();

    }

    //
    // IC1541Section methods
    //

    @Parameters(commandNames = "TURN_DRIVE_ON", commandDescriptionKey = "TURN_DRIVE_ON", resourceBundle = BUNDLE)
    public static class TurnDriveOnEvent {

        @Parameters(resourceBundle = C1541_SECTION_BUNDLE)
        private static class TurnDriveOnParameters {

        }

        @Parameter(names = "driveOn", required = true, descriptionKey = "TURN_DRIVE_ON", order = 0)
        private boolean driveOn = DEFAULT_DRIVE_ON;

        @Parameter(descriptionKey = "TURN_DRIVE_ON_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private TurnDriveOnParameters turnDriveOnParameters = new TurnDriveOnParameters();

    }

    @Parameters(commandNames = "SET_PARALLEL_CABLE", commandDescriptionKey = "SET_PARALLEL_CABLE", resourceBundle = BUNDLE)
    public static class SetParallelCableEvent {

        @Parameters(resourceBundle = C1541_SECTION_BUNDLE)
        private static class SetParallelCableParameters {

        }

        @Parameter(names = "parallelCable", required = true, descriptionKey = "SET_PARALLEL_CABLE", order = 0)
        private boolean parallelCable = DEFAULT_PARALLEL_CABLE;

        @Parameter(descriptionKey = "SET_PARALLEL_CABLE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetParallelCableParameters setParallelCableParameters = new SetParallelCableParameters();

    }

    @Parameters(commandNames = "SET_JIFFY_DOS_INSTALLED", commandDescriptionKey = "SET_JIFFY_DOS_INSTALLED", resourceBundle = BUNDLE)
    public static class SetJiffyDosInstalledEvent {

        @Parameters(resourceBundle = C1541_SECTION_BUNDLE)
        private static class SetJiffyDosInstalledParameters {

            @Parameter(names = "jiffyDosInstalled", required = true, descriptionKey = "JIFFYDOS", order = 0)
            private boolean jiffyDosInstalled = DEFAULT_JIFFYDOS_INSTALLED;
        }

        @Parameter(descriptionKey = "SET_JIFFY_DOS_INSTALLED_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetJiffyDosInstalledParameters setJiffyDosInstalledParameters = new SetJiffyDosInstalledParameters();

    }

    @Parameters(commandNames = "SET_RAM_EXPANSION", commandDescriptionKey = "SET_RAM_EXPANSION", resourceBundle = BUNDLE)
    public static class SetRamExpansionEvent {

        @Parameters(resourceBundle = C1541_SECTION_BUNDLE)
        private static class SetRamExpansionParameters {

        }

        @Parameter(names = "ramExpansion0", required = true, descriptionKey = "SET_RAM_EXPANSION0", order = 0)
        private boolean ramExpansion0 = DEFAULT_RAM_EXPAND_0X2000;

        @Parameter(names = "ramExpansion1", required = true, descriptionKey = "SET_RAM_EXPANSION1", order = 1)
        private boolean ramExpansion1 = DEFAULT_RAM_EXPAND_0X4000;

        @Parameter(names = "ramExpansion2", required = true, descriptionKey = "SET_RAM_EXPANSION2", order = 2)
        private boolean ramExpansion2 = DEFAULT_RAM_EXPAND_0X6000;

        @Parameter(names = "ramExpansion3", required = true, descriptionKey = "SET_RAM_EXPANSION3", order = 3)
        private boolean ramExpansion3 = DEFAULT_RAM_EXPAND_0X8000;

        @Parameter(names = "ramExpansion4", required = true, descriptionKey = "SET_RAM_EXPANSION4", order = 4)
        private boolean ramExpansion4 = DEFAULT_RAM_EXPAND_0XA000;

        @Parameter(descriptionKey = "SET_RAM_EXPANSION_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetRamExpansionParameters setRamExpansionParameters = new SetRamExpansionParameters();

    }

    @Parameters(commandNames = "SET_FLOPPY_TYPE", commandDescriptionKey = "SET_FLOPPY_TYPE", resourceBundle = BUNDLE)
    public static class SetFloppyTypeEvent {

        @Parameters(resourceBundle = C1541_SECTION_BUNDLE)
        private static class SetFloppyTypeParameters {

        }

        @Parameter(names = "floppyType", required = true, descriptionKey = "SET_FLOPPY_TYPE", order = 0)
        private FloppyType floppyType = DEFAULT_FLOPPY_TYPE;

        @Parameter(descriptionKey = "SET_FLOPPY_TYPE_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private SetFloppyTypeParameters setFloppyTypeParameters = new SetFloppyTypeParameters();

    }

    //
    // IPrinterSection methods
    //

    @Parameters(commandNames = "TURN_PRINTER_ON", commandDescriptionKey = "TURN_PRINTER_ON", resourceBundle = BUNDLE)
    public static class TurnPrinterOnEvent {

        @Parameters(resourceBundle = PRINTER_SECTION_BUNDLE)
        private static class TurnPrinterOnParameters {

        }

        @Parameter(names = "printerOn", required = true, descriptionKey = "TURN_PRINTER_ON", order = 0)
        private boolean printerOn = DEFAULT_PRINTER_ON;

        @Parameter(descriptionKey = "TURN_PRINTER_ON_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private TurnPrinterOnParameters turnPrinterOnParameters = new TurnPrinterOnParameters();

    }

    @Parameters(commandNames = "SET_PRINTER", commandDescriptionKey = "SET_PRINTER", resourceBundle = BUNDLE)
    public static class SetPrinterEvent {

        @Parameter(names = "printerModel", required = true, descriptionKey = "PRINTER_PRINTER_MODEL", order = 0)
        private PrinterModel printerModel = DEFAULT_PRINTER_MODEL;

        @Parameter(names = "printerConnection", required = true, descriptionKey = "PRINTER_PRINTER_CONNECTION", order = 1)
        private PrinterConnection printerConnection = DEFAULT_PRINTER_CONNECTION;

        @Parameter(descriptionKey = "SET_PRINTER_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "FLUSH_PRINTER", commandDescriptionKey = "FLUSH_PRINTER", resourceBundle = BUNDLE)
    public static class FlushPrinterEvent {

        @Parameter(descriptionKey = "FLUSH_PRINTER_FIRES_EVENT")
        private String firesEvent;

    }

    //
    // IWhatsSidSection methods
    //

    @Parameters(commandNames = "SET_WHATSSID", commandDescriptionKey = "SET_WHATSSID", resourceBundle = BUNDLE)
    public static class WhatsSIDEvent {

        @Parameters(resourceBundle = WHATS_SID_SECTION_BUNDLE)
        private static class WhatsSIDParameters {

            @Parameter(names = "enable", required = true, descriptionKey = "WHATSSID_ENABLE", order = 0)
            private boolean enable = DEFAULT_WHATSSID_ENABLE;

            @Parameter(names = "captureTime", required = true, descriptionKey = "WHATSSID_CAPTURE_TIME", order = 1)
            private int captureTime = DEFAULT_WHATSSID_CAPTURE_TIME;

            @Parameter(names = "matchStartTime", required = true, descriptionKey = "WHATSSID_MATCH_START_TIME", order = 2)
            private int matchStartTime = DEFAULT_WHATSSID_MATCH_START_TIME;

            @Parameter(names = "matchRetryTime", required = true, descriptionKey = "WHATSSID_MATCH_RETRY_TIME", order = 3)
            private int matchRetryTime = DEFAULT_WHATSSID_MATCH_RETRY_TIME;

            @Parameter(names = "minimumRelativeConfidence", required = true, descriptionKey = "WHATSSID_MINIMUM_RELATIVE_CONFIDENCE", order = 4)
            private float minimumRelativeConfidence = DEFAULT_WHATSSID_MINIMUM_RELATIVE_CONFIDENCE;

        }

        @Parameter(descriptionKey = "SET_WHATSSID_FIRES_EVENT")
        private String firesEvent;

        @ParametersDelegate
        private WhatsSIDParameters whatsSIDParameters = new WhatsSIDParameters();

    }

    //
    // Business methods
    //

    @Parameters(commandNames = "SET_COMMAND", commandDescriptionKey = "SET_COMMAND", resourceBundle = BUNDLE)
    public static class CommandEvent {

        @Parameter(names = {"command"}, required = true, descriptionKey = "SET_COMMAND_COMMAND", order = 0)
        private String command;

        @Parameter(descriptionKey = "SET_COMMAND_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "TYPE_KEY", commandDescriptionKey = "TYPE_KEY", resourceBundle = BUNDLE)
    public static class TypeKeyEvent {

        @Parameter(names = {"key"}, required = true, descriptionKey = "TYPE_KEY_KEY", order = 0)
        private KeyTableEntry key;

        @Parameter(descriptionKey = "TYPE_KEY_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "PRESS_KEY", commandDescriptionKey = "PRESS_KEY", resourceBundle = BUNDLE)
    public static class PressKeyEvent {

        @Parameter(names = {"key"}, required = true, descriptionKey = "PRESS_KEY_KEY", order = 0)
        private KeyTableEntry key;

        @Parameter(descriptionKey = "PRESS_KEY_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "RELEASE_KEY", commandDescriptionKey = "RELEASE_KEY", resourceBundle = BUNDLE)
    public static class ReleaseKeyEvent {

        @Parameter(names = {"key"}, required = true, descriptionKey = "RELEASE_KEY_KEY", order = 0)
        private KeyTableEntry key;

        @Parameter(descriptionKey = "RELEASE_KEY_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "PRESS_JOYSTICK", commandDescriptionKey = "PRESS_JOYSTICK", resourceBundle = BUNDLE)
    public static class PressJoystickEvent {

        @Parameter(names = {
                "number"}, required = true, validateWith = JoystickNumberValidator.class, descriptionKey = "PRESS_JOYSTICK_NUMBER", order = 0)
        private int number;

        @Parameter(names = {
                "value"}, required = true, validateWith = JoystickValueValidator.class, descriptionKey = "PRESS_JOYSTICK_VALUE", order = 1)
        private int value;

        @Parameter(descriptionKey = "PRESS_JOYSTICK_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "FAST_FORWARD", commandDescriptionKey = "FAST_FORWARD", resourceBundle = BUNDLE)
    public static class FastForwardEvent {

        @Parameter(descriptionKey = "FAST_FORWARD_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "NORMAL_SPEED", commandDescriptionKey = "NORMAL_SPEED", resourceBundle = BUNDLE)
    public static class NormalSpeedEvent {

        @Parameter(descriptionKey = "NORMAL_SPEED_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_TUNE_INFO", commandDescriptionKey = "GET_TUNE_INFO", resourceBundle = BUNDLE)
    public static class GetTuneInfoEvent {

        @Parameter(descriptionKey = "GET_TUNE_INFO_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_PLAYER_INFO", commandDescriptionKey = "GET_PLAYER_INFO", resourceBundle = BUNDLE)
    public static class GetPlayerInfoEvent {

        @Parameter(descriptionKey = "GET_PLAYER_INFO_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_PLAYLIST", commandDescriptionKey = "GET_PLAYLIST", resourceBundle = BUNDLE)
    public static class GetPlayListEvent {

        @Parameter(descriptionKey = "GET_PLAYLIST_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_STATUS", commandDescriptionKey = "GET_STATUS", resourceBundle = BUNDLE)
    public static class GetStatusEvent {

        @Parameter(descriptionKey = "GET_STATUS_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_ACTIVE_SETTINGS", commandDescriptionKey = "GET_ACTIVE_SETTINGS", resourceBundle = BUNDLE)
    public static class GetActiveSettingsEvent {

        @Parameter(descriptionKey = "GET_ACTIVE_SETTINGS_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "INSERT_DISK", commandDescriptionKey = "INSERT_DISK", resourceBundle = BUNDLE)
    public static class InsertDiskEvent {

        @Parameter(names = "contents", required = true, descriptionKey = "INSERT_DISK_CONTENTS", order = 0)
        private byte[] contents;

        @Parameter(names = "diskName", required = true, descriptionKey = "INSERT_DISK_DISK_NAME", order = 1)
        private String diskName;

        @Parameter(descriptionKey = "INSERT_DISK_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "EJECT_DISK", commandDescriptionKey = "EJECT_DISK", resourceBundle = BUNDLE)
    public static class EjectDiskEvent {

        @Parameter(descriptionKey = "EJECT_DISK_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "INSERT_TAPE", commandDescriptionKey = "INSERT_TAPE", resourceBundle = BUNDLE)
    public static class InsertTapeEvent {

        @Parameter(names = "contents", required = true, descriptionKey = "INSERT_TAPE_CONTENTS", order = 0)
        private byte[] contents;

        @Parameter(names = "tapeName", required = true, descriptionKey = "INSERT_TAPE_TAPE_NAME", order = 1)
        private String tapeName;

        @Parameter(descriptionKey = "INSERT_TAPE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "EJECT_TAPE", commandDescriptionKey = "EJECT_TAPE", resourceBundle = BUNDLE)
    public static class EjectTapeEvent {

        @Parameter(descriptionKey = "EJECT_TAPE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "CONTROL_DATASETTE", commandDescriptionKey = "CONTROL_DATASETTE", resourceBundle = BUNDLE)
    public static class ControlDatasetteEvent {

        @Parameter(names = "control", required = true, descriptionKey = "CONTROL_DATASETTE_CONTROL", order = 0)
        private Control control;

        @Parameter(descriptionKey = "CONTROL_DATASETTE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "INSERT_REU_FILE", commandDescriptionKey = "INSERT_REU_FILE", resourceBundle = BUNDLE)
    public static class InsertReuFileEvent {

        @Parameter(names = "contents", required = true, descriptionKey = "INSERT_REU_FILE_CONTENTS", order = 0)
        private byte[] contents;

        @Parameter(names = "reuName", required = true, descriptionKey = "INSERT_REU_FILE_REU_NAME", order = 1)
        private String reuName;

        @Parameter(descriptionKey = "INSERT_REU_FILE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "INSERT_REU", commandDescriptionKey = "INSERT_REU", resourceBundle = BUNDLE)
    public static class InsertReuEvent {

        @Parameter(names = "sizeKb", required = true, descriptionKey = "INSERT_REU_SIZEKB", order = 0)
        private int sizeKb;

        @Parameter(descriptionKey = "INSERT_REU_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "STAR_TREU_WORKAROUND", commandDescriptionKey = "STAR_TREU_WORKAROUND", resourceBundle = BUNDLE)
    public static class StarTreuWorkaroundEvent {

        @Parameter(names = "enable", required = true, arity = 1, descriptionKey = "STAR_TREU_WORKAROUND_ENABLE", order = 0)
        private boolean enable;

        @Parameter(descriptionKey = "STAR_TREU_WORKAROUND_FIRES_EVENT")
        private String firesEvent;
    }

    @Parameters(commandNames = "INSERT_GEORAM_FILE", commandDescriptionKey = "INSERT_GEORAM_FILE", resourceBundle = BUNDLE)
    public static class InsertGeoRAMFileEvent {

        @Parameter(names = "requestId", descriptionKey = "INSERT_GEORAM_FILE_REQUEST_ID", order = 0)
        private int requestId;

        @Parameter(names = "contents", required = true, descriptionKey = "INSERT_GEORAM_FILE_CONTENTS", order = 1)
        private byte[] contents;

        @Parameter(names = "name", descriptionKey = "INSERT_GEORAM_FILE_NAME", order = 2)
        private String name;

        @Parameter(descriptionKey = "INSERT_GEORAM_FILE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "INSERT_GEORAM", commandDescriptionKey = "INSERT_GEORAM", resourceBundle = BUNDLE)
    public static class InsertGeoRAMEvent {

        @Parameter(names = "requestId", descriptionKey = "INSERT_GEORAM_REQUEST_ID", order = 0)
        private int requestId;

        @Parameter(names = "sizeKb", required = true, descriptionKey = "INSERT_GEORAM_SIZEKB", order = 1)
        private int sizeKb;

        @Parameter(descriptionKey = "INSERT_GEORAM_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "GET_GEORAM_IMAGE", commandDescriptionKey = "GET_GEORAM_IMAGE", resourceBundle = BUNDLE)
    public static class GetGeoRAMImageEvent {

        @Parameter(names = "requestId", descriptionKey = "GET_GEORAM_IMAGE_REQUEST_ID", order = 0)
        private int requestId;

        @Parameter(descriptionKey = "GET_GEORAM_IMAGE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "FREEZE_CARTRIDGE", commandDescriptionKey = "FREEZE_CARTRIDGE", resourceBundle = BUNDLE)
    public static class FreezeCartridgeEvent {

        @Parameter(descriptionKey = "FREEZE_CARTRIDGE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "SET_OSCILLOSCOPE", commandDescriptionKey = "SET_OSCILLOSCOPE", resourceBundle = BUNDLE)
    public static class OscilloscopeEvent {

        @Parameter(names = "enable", required = true, descriptionKey = "OSCILLOSCOPE_ENABLE", order = 0)
        private boolean enable;

        @Parameter(names = "width", required = true, descriptionKey = "OSCILLOSCOPE_WIDTH", order = 2)
        private int width;

        @Parameter(names = "height", required = true, descriptionKey = "OSCILLOSCOPE_HEIGHT", order = 3)
        private int height;

        @Parameter(descriptionKey = "SET_OSCILLOSCOPE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "SET_OPL_OSCILLOSCOPE", commandDescriptionKey = "SET_OPL_OSCILLOSCOPE", resourceBundle = BUNDLE)
    public static class OplOscilloscopeEvent {

        @Parameter(names = "detailMask", required = true, descriptionKey = "SET_OPL_OSCILLOSCOPE_DETAIL_MASK", order = 0)
        private int detailMask;

        @Parameter(descriptionKey = "SET_OPL_OSCILLOSCOPE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "RELEASE_OSC_BATCH", commandDescriptionKey = "RELEASE_OSC_BATCH", resourceBundle = BUNDLE)
    public static class ReleaseOscBatchEvent {

        @Parameter(names = "buffer", descriptionKey = "RELEASE_OSC_BATCH_BUFFER")
        private byte[] buffer;

    }

    @Parameters(commandNames = "SET_FORCE_CHECK_SONG_LENGTH", commandDescriptionKey = "SET_FORCE_CHECK_SONG_LENGTH", resourceBundle = BUNDLE)
    public static class ForceCheckSongLengthEvent {

        @Parameter(names = "force", required = true, descriptionKey = "SET_FORCE_CHECK_SONG_LENGTH_FORCE", order = 0)
        private boolean force;

        @Parameter(descriptionKey = "FORCE_CHECK_SONG_LENGTH_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "SET_SID_LISTENER_ENABLE", commandDescriptionKey = "SET_SID_LISTENER_ENABLE", resourceBundle = BUNDLE)
    public static class SidListenerEnableEvent {

        @Parameter(names = "sidListenerEnable", required = true, descriptionKey = "SET_SID_LISTENER_ENABLE_ENABLE", order = 0)
        private boolean sidListenerEnable;

        @Parameter(names = "sidWriteBatch", descriptionKey = "SET_SID_LISTENER_SID_WRITE_BATCH", order = 1)
        private boolean sidWriteBatch;

        @Parameter(descriptionKey = "SET_SID_LISTENER_ENABLE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "AUTO_DISK_CHANGE", commandDescriptionKey = "AUTO_DISK_CHANGE", resourceBundle = BUNDLE)
    public static class AutoDiskChangeEvent {

        @Parameter(names = "contents", required = true, descriptionKey = "AUTO_DISK_CHANGE_CONTENTS", order = 0)
        private byte[] contents;

        @Parameter(names = "diskName", required = true, descriptionKey = "AUTO_DISK_CHANGE_DISK_NAME", order = 1)
        private String diskName;

        @Parameter(names = "ticks", required = true, descriptionKey = "AUTO_DISK_CHANGE_TICKS", order = 2)
        private long ticks;

        @Parameter(descriptionKey = "AUTO_DISK_CHANGE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "AUTO_KEY_TYPE", commandDescriptionKey = "AUTO_KEY_TYPE", resourceBundle = BUNDLE)
    public static class AutoKeyTypeEvent {

        @Parameter(names = "keyEventType", required = true, descriptionKey = "AUTO_KEY_TYPE_KEY_EVENT_TYPE", order = 0)
        private KeyEventType keyEventType;

        @Parameter(names = "key", required = true, descriptionKey = "AUTO_KEY_TYPE_KEY", order = 1)
        private KeyTableEntry key;

        @Parameter(names = "ticks", required = true, descriptionKey = "AUTO_KEY_TYPE_TICKS", order = 2)
        private long ticks;

        @Parameter(descriptionKey = "AUTO_KEY_TYPE_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "SET_INSPECTION", commandDescriptionKey = "SET_INSPECTION", resourceBundle = BUNDLE)
    private static class InspectionEvent {

        @Parameter(names = "action", required = true, descriptionKey = "INSPECTION_ACTION", order = 0)
        private String action;

        @Parameter(names = "channels", descriptionKey = "INSPECTION_CHANNELS", order = 1)
        private int channels = 31;

        @Parameter(names = "type", descriptionKey = "INSPECTION_TYPE", order = 2)
        private String type;

        @Parameter(names = "target", descriptionKey = "INSPECTION_TARGET", order = 3)
        private int target;

        @Parameter(names = "value", descriptionKey = "INSPECTION_VALUE", order = 4)
        private int value = 1;

        @Parameter(names = "mask", descriptionKey = "INSPECTION_MASK", order = 5)
        private int mask = 255;

        @Parameter(names = "oneShot", descriptionKey = "INSPECTION_ONE_SHOT", order = 6)
        private boolean oneShot = true;

        @Parameter(descriptionKey = "SET_INSPECTION_FIRES_EVENT")
        private String firesEvent;

    }

    @Parameters(commandNames = "RELEASE_INSPECTION", commandDescriptionKey = "RELEASE_INSPECTION", resourceBundle = BUNDLE)
    private static class ReleaseInspectionEvent {

        @Parameter(names = "sequence", required = true, descriptionKey = "RELEASE_INSPECTION_SEQUENCE", order = 0)
        private int sequence;

    }

    public static void usage(Console console) {
        usage(console, jCommander -> new EventUsageFormatter(jCommander, true));
    }

    public static void usage(Console console, Function<JCommander, IUsageFormatter> eventUsageFormatter) {
        JCommander jCommander = JCommander.newBuilder().addObject(new ExportEventParameters())
                //
                .addCommand(new InitialiseEvent())
                //
                .addCommand(new OpenEvent())
                //
                .addCommand(new ClockEvent())
                //
                .addCommand(new IdleEvent())

                //
                // ISidplay2Section methods
                //

                .addCommand(new DefaultPlayLengthEvent())
                //
                .addCommand(new SetLoopEvent())
                //
                .addCommand(new SetSingleEvent())
                //
                .addCommand(new SetPalEmulationEnableEvent())
                //
                .addCommand(new SetTurboTapeEvent())

                .addCommand(new SetStartupWarpEvent())
                //
                .addCommand(new SetFadeTimeEvent())

                //
                // IAudioSection methods
                //

                .addCommand(new SetSamplingRateEvent())
                //
                .addCommand(new SetSamplingEvent())
                //
                .addCommand(new SetVolumeLevelsEvent())
                //
                .addCommand(new SetBufferSizeEvent())
                //
                .addCommand(new SetAudioBufferSizeEvent())
                //
                .addCommand(new SetDelayEvent())
                //
                .addCommand(new SetReverbEvent())

                //
                // IEmulationSection methods
                //

                .addCommand(new SetEngineEvent())
                //
                .addCommand(new SetDefaultEmulationEvent())
                //
                .addCommand(new SetUserEmulationEvent())
                //
                .addCommand(new SetDefaultClockSpeedEvent())
                //
                .addCommand(new SetUserClockSpeedEvent())
                //
                .addCommand(new SetDefaultChipModelEvent())
                //
                .addCommand(new SetUserChipModelEvent())
                //
                .addCommand(new SetOverrideChipModelEvent())
                //
                .addCommand(new HardSidMappingEvent())
                //
                .addCommand(new ExSidMappingEvent())
                //
                .addCommand(new UsbSidMappingEvent())
                //
                .addCommand(new SetFilterEnableEvent())
                //
                .addCommand(new SetFilterNameEvent())
                //
                .addCommand(new SetFilterEvent())
                //
                .addCommand(new SetDigiBoosted8580Event())
                //
                .addCommand(new SetStereoEvent())
                //
                .addCommand(new SetMuteEvent())
                //
                .addCommand(new SetDetectPsid64ChipModelEvent())
                //
                .addCommand(new SetStereoSnifferEvent())
                //
                .addCommand(new SetSilenceTimeoutEvent())
                //
                .addCommand(new SetC64ModelEvent())
                //
                .addCommand(new SetVicModelEvent())

                //
                // IC1541Section methods
                //

                .addCommand(new TurnDriveOnEvent())
                //
                .addCommand(new SetParallelCableEvent())
                //
                .addCommand(new SetJiffyDosInstalledEvent())
                //
                .addCommand(new SetRamExpansionEvent())
                //
                .addCommand(new SetFloppyTypeEvent())

                //
                // IPrinterSection methods
                //

                .addCommand(new TurnPrinterOnEvent())
                //
                .addCommand(new SetPrinterEvent())
                //
                .addCommand(new FlushPrinterEvent())

                //
                // IWhatsSidSection methods
                //

                .addCommand(new WhatsSIDEvent())

                //
                // Business methods
                //

                .addCommand(new CommandEvent())
                //
                .addCommand(new TypeKeyEvent())
                //
                .addCommand(new PressKeyEvent())
                //
                .addCommand(new ReleaseKeyEvent())
                //
                .addCommand(new PressJoystickEvent())
                //
                .addCommand(new FastForwardEvent())
                //
                .addCommand(new NormalSpeedEvent())
                //
                .addCommand(new GetTuneInfoEvent())
                //
                .addCommand(new GetPlayerInfoEvent())
                //
                .addCommand(new GetPlayListEvent())
                //
                .addCommand(new GetStatusEvent())
                //
                .addCommand(new GetActiveSettingsEvent())
                //
                .addCommand(new InsertDiskEvent())
                //
                .addCommand(new EjectDiskEvent())
                //
                .addCommand(new InsertTapeEvent())
                //
                .addCommand(new EjectTapeEvent())
                //
                .addCommand(new ControlDatasetteEvent())
                //
                .addCommand(new InsertReuFileEvent())
                //
                .addCommand(new InsertReuEvent())
                //
                .addCommand(new StarTreuWorkaroundEvent())
                //
                .addCommand(new InsertGeoRAMFileEvent())
                //
                .addCommand(new InsertGeoRAMEvent())
                //
                .addCommand(new GetGeoRAMImageEvent())
                //
                .addCommand(new FreezeCartridgeEvent())
                //
                .addCommand(new OscilloscopeEvent())
                //
                .addCommand(new OplOscilloscopeEvent())
                //
                .addCommand(new ReleaseOscBatchEvent())
                //
                .addCommand(new ForceCheckSongLengthEvent())
                //
                .addCommand(new SidListenerEnableEvent())
                //
                .addCommand(new AutoDiskChangeEvent())
                //
                .addCommand(new AutoKeyTypeEvent())
                //
                .addCommand(new InspectionEvent())
                //
                .addCommand(new ReleaseInspectionEvent())

                //
                .columnSize(MAX_VALUE).programName(ExportEventParameters.class.toString()).console(console).build();

        jCommander.setUsageFormatter(eventUsageFormatter.apply(jCommander));
        jCommander.usage();
    }

    public static void main(String[] args) {
        usage(new DefaultConsole());
    }

}