com.rapplogic.aru.uploader.CliOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arduino-remote-uploader Show documentation
Show all versions of arduino-remote-uploader Show documentation
Command line tool and client api for uploading Arduino Sketches to a remote Arduino
The newest version!
/**
* Copyright (c) 2015 Andrew Rapp. All rights reserved.
*
* This file is part of arduino-remote-uploader
*
* arduino-remote-uploader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* arduino-remote-uploader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with arduino-remote-uploader. If not, see .
*/
package com.rapplogic.aru.uploader;
import java.util.List;
import java.util.Map;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
public class CliOptions {
// cli doesn't allow single dashes in args which is insane!
public final static String sketch = "sketch";
public final static String verboseArg = "verbose";
public final static String ackTimeoutMillisArg = "ack-timeout-ms";
public final static String arduinoTimeoutArg = "arduino-timeout-s";
public final static String retriesPerPacketArg = "retries";
public final static String delayBetweenRetriesMillisArg = "retry-delay-ms";
// TODO total timeout
final private Options options = new Options();
private CommandLine commandLine;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy