SGMVATValveState::SGMVATValveState(const QString &name, QObject *parent) : AMSingleEnumeratedControl(name, "", parent) { // Setup value options. addValueOption(Closed, "Closed", SGMVATVALVE_CLOSED_SETPOINT); addValueOption(Open, "Open", SGMVATVALVE_OPEN_SETPOINT, SGMVATVALVE_OPEN_MIN, SGMVATVALVE_OPEN_MAX); }
CommsParameters::CommsParameters(IEnvironmentVariables& env) : GBerryConsoleCommon::RuntimeParameters(env) { parser().setApplicationDescription("Communication manager of GBerry game platform"); parser().addVersionOption(); addBooleanOption(DISABLE_WAITAPP, new QCommandLineOption(DISABLE_WAITAPP, "Disables showing waiting application")); addBooleanOption(DISABLE_MAINUI, new QCommandLineOption(DISABLE_MAINUI, "Disables showing main application")); addValueOption(ROOT_PATH, new QCommandLineOption(ROOT_PATH, "Defines used root path", "rootpath")); addBuildTimeDefault(ROOT_PATH, xstr(GBERRY_ROOT_PATH)); addEnvironmentVariable(ROOT_PATH, "GBERRY_ROOT_PATH"); // TODO: should value options add*() have different signature? Do we need value name to anything? addValueOption(COMMS_CONFIG, new QCommandLineOption(COMMS_CONFIG, "Defines used configuration file", "commsconfig")); addEnvironmentVariable(COMMS_CONFIG, "GBERRY_COMMS_CONFIG"); }
ApplicationParameters::ApplicationParameters(IEnvironmentVariables& env) : GBerryConsoleCommon::RuntimeParameters(env) { // TODO: info for these should be read from appcfg.json //_parser.setApplicationDescription("Communication manager of GBerry game platform"); //_parser.addVersionOption() addValueOption(APPLICATION_CODE, new QCommandLineOption(APPLICATION_CODE, "Defines uses application code identification", "application_code")); addEnvironmentVariable(APPLICATION_CODE, "GBERRY_APPLICATION_CODE"); }