Probe::Probe(Options &options, std::ostream &stream) : Machine(options), Controller((Machine &)*this), Printer(stream), interp(*this), gridSize(5), clearHeight(1), probeDepth(-1), probeFeed(5), liftOff(false), liftOffFeed(0.5), minMem(2000), maxMem(5400), useLastZExpression(true), pass(0), didOutputProbe(false) { options.pushCategory("Probe"); options.addTarget("grid-size", gridSize, "Set max probe grid size."); options.addTarget("clear-height", clearHeight, "Set probe Z clearance."); options.addTarget("probe-depth", probeDepth, "Set probe Z depth."); options.addTarget("probe-feed", probeFeed, "Set probe feed rate."); options.addTarget("lift-off", liftOff, "Enable lift off probing."); options.addTarget("lift-off-feed", liftOffFeed, "Set probe lift off speed."); options.addTarget("min-mem", minMem, "Set probe starting memory address. " "This is where the probed values will be stored in the " "controller's memory."); options.addTarget("max-mem", maxMem, "Set probe maximum memory address."); options.addTarget("use-last-z-expression", useLastZExpression, "Always use " "the last Z word expression when computing Z heights " "rather than using the current computed value. This " "option makes it possible to preserve a Z height variable " "reference."); options.addTarget("probe-prefix", probePrefix, "GCode to emit before the probe"); options.addTarget("probe-suffix", probeSuffix, "GCode to emit after the probe"); options.popCategory(); }
void ProxyManager::addOptions(Options &options) { options.pushCategory("Network"); options.addTarget("proxy-enable", enable, "Enable proxy configuration"); options.addTarget("proxy", proxy, "Set proxy for outgoing HTTP connections"); options.addTarget("proxy-user", user, "Set user name for proxy connections"); SmartPointer<Option> opt = options.addTarget("proxy-pass", pass, "Set password for proxy connections"); opt->setObscured(); options.popCategory(); }
void SocketDebugger::addOptions(Options &options) { options.pushCategory("Debugging"); options.addTarget("debug-sockets", enabled, "Enable the socket debugger. Normal socket operation will " "not be available."); options.addTarget("capture-sockets", capture, "Capture incoming and outgoing " "socket data and save to 'capture-directory'."); options.addTarget("capture-directory", captureDir, "Directory to store " "captured network data."); options.popCategory(); }
ConnectionManager::ConnectionManager(Options &options) : connected(false), programLine(0), machine(false), estop(false), synchronize(false) { options.pushCategory("EMC2 Remote"); options.addTarget("connection", connectionStr, "address and port of a remove EMC2 connection"); options.addTarget("connection-pass", connectionPass, "EMC2 connection password"); options.addTarget("enable-pass", enablePass, "EMC2 enable password, " "defaults to the connection password"); options.popCategory(); }
SessionManager::SessionManager(Options &options) : factory(new SessionFactory), sessionLifetime(Time::SEC_PER_DAY), sessionTimeout(Time::SEC_PER_HOUR), lastSessionCleanup(0), sessionCookie("sid"), dirty(false) { options.pushCategory("Web Server Sessions"); options.addTarget("session-timeout", sessionTimeout, "The max maximum " "amount of time in seconds since the last time a session " "was used before it timesout. Zero for no session " "timeout."); options.addTarget("session-lifetime", sessionLifetime, "The maximum " "session lifetime in seconds. Zero for unlimited " "session lifetime."); options.addTarget("session-cookie", sessionCookie, "The name of the " "session cookie."); options.popCategory(); }
Machine::Machine(Options &options) : time(0), distance(0) { add(new MachineUnitAdapter); add(new MachineLinearizer); add(new MachineMatrix); add(new MoveSink(*this, options)); add(new MachineState); options.pushCategory("Machine"); options.addTarget("output-moves", outputMoves, "Print moves to file or standard out"); options.popCategory(); }
OAuth2::OAuth2(Options &options, const string &provider, const string &authURL, const string &tokenURL, const string &profileURL, const string &scope) : provider(provider), authURL(authURL), tokenURL(tokenURL), profileURL(profileURL), scope(scope) { options.pushCategory(String::capitalize(provider) + " OAuth2 Login"); options.addTarget(provider + "-auth-url", this->authURL, "OAuth2 auth URL"); options.addTarget(provider + "-token-url", this->tokenURL, "OAuth2 token URL"); options.addTarget(provider + "-scope", this->scope, "OAuth2 API scope"); options.addTarget(provider + "-redirect-base", redirectBase, "OAuth2 redirect base URL"); options.addTarget(provider + "-client-id", clientID, "OAuth2 API client ID"); options.addTarget(provider + "-client-secret", clientSecret, "OAuth2 API client secret")->setObscured(); options.popCategory(); }
void Logger::addOptions(Options &options) { options.pushCategory("Logging"); options.add("log", "Set log file."); options.addTarget("verbosity", verbosity, "Set logging level for INFO " #ifdef DEBUG "and DEBUG " #endif "messages."); options.addTarget("log-crlf", logCRLF, "Print carriage return and line feed " "at end of log lines."); #ifdef DEBUG options.addTarget("log-debug", logDebug, "Disable or enable debugging info."); #endif options.addTarget("log-time", logTime, "Print time information with log entries."); options.addTarget("log-date", logDate, "Print date information with log entries."); options.addTarget("log-date-periodically", logDatePeriodically, "Print date to log before new log entries if so many " "seconds have passed since the last date was printed."); options.addTarget("log-short-level", logShortLevel, "Print shortened level " "information with log entries."); options.addTarget("log-level", logLevel, "Print level information with log entries."); options.addTarget("log-thread-prefix", logThreadPrefix, "Print thread prefixes, if set, with log entries."); options.addTarget("log-domain", logDomain, "Print domain information with log entries."); options.addTarget("log-simple-domains", logSimpleDomains, "Remove any " "leading directories and trailing file extensions from " "domains so that source code file names can be easily used " "as log domains."); options.add("log-domain-levels", 0, new OptionAction<Logger>(this, &Logger::domainLevelsAction), "Set log levels by domain. Format is:\n" "\t<domain>[:i|d|t]:<level> ...\n" "Entries are separated by white-space and or commas.\n" "\ti - info\n" #ifdef DEBUG "\td - debug\n" #endif #ifdef HAVE_DEBUGGER "\tt - enable traces\n" #endif "For example: server:i:3 module:6\n" "Set 'server' domain info messages to level 3 and 'module' info " #ifdef DEBUG "and debug " #endif "messages to level 6. All other domains will follow " "the system wide log verbosity level.\n" "If <level> is negative it is relative to the system wide " "verbosity." )->setType(Option::STRINGS_TYPE); options.addTarget("log-thread-id", logThreadID, "Print id with log entries."); options.addTarget("log-header", logHeader, "Enable log message headers."); options.addTarget("log-no-info-header", logNoInfoHeader, "Don't print 'INFO(#):' in header."); options.addTarget("log-color", logColor, "Print log messages with ANSI color coding."); options.addTarget("log-to-screen", logToScreen, "Log to screen."); options.addTarget("log-truncate", logTrunc, "Truncate log file."); options.addTarget("log-redirect", logRedirect, "Redirect all output to log " "file. Implies !log-to-screen."); options.addTarget("log-rotate", logRotate, "Rotate log files on each run."); options.addTarget("log-rotate-dir", logRotateDir, "Put rotated logs in this directory."); options.addTarget("log-rotate-max", logRotateMax, "Maximum number of rotated logs to keep."); options.popCategory(); }