1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731
|
/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009, 2010 MobileRobots Inc.
Copyright (C) 2011, 2012, 2013 Adept Technology
This program 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 2 of the License, or
(at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
If you wish to redistribute ARIA under different terms, contact
Adept MobileRobots for information about a commercial version of ARIA at
robots@mobilerobots.com or
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
#include "ArTestConfig.h"
#include <ArConfig.h>
#include <ArConfigArg.h>
struct ArConfigPrimitiveData {
int myIntInt;
int myIntIntWithMin;
int myIntIntWithMax;
int myIntIntWithMinMax;
short myIntShort;
short myIntShortWithMin;
short myIntShortWithMax;
short myIntShortWithMinMax;
unsigned short myIntUShort;
unsigned short myIntUShortWithMin;
unsigned short myIntUShortWithMax;
unsigned short myIntUShortWithMinMax;
unsigned char myIntUChar;
unsigned char myIntUCharWithMin;
unsigned char myIntUCharWithMax;
unsigned char myIntUCharWithMinMax;
double myDouble;
double myDoubleWithMin;
double myDoubleWithMax;
double myDoubleWithMinAndMax;
bool myBool;
char myStringBuf[256];
std::list<ArConfigArg> myArgList;
ArConfigPrimitiveData();
}; // end struct ArConfigPrimitiveData
ArConfigPrimitiveData::ArConfigPrimitiveData() :
myIntInt(1),
myIntIntWithMin(2),
myIntIntWithMax(3),
myIntIntWithMinMax(4),
myIntShort(5),
myIntShortWithMin(6),
myIntShortWithMax(7),
myIntShortWithMinMax(8),
myIntUShort(9),
myIntUShortWithMin(10),
myIntUShortWithMax(11),
myIntUShortWithMinMax(12),
myIntUChar(13),
myIntUCharWithMin(12),
myIntUCharWithMax(11),
myIntUCharWithMinMax(10),
myDouble(17.1),
myDoubleWithMin(18.2),
myDoubleWithMax(19.3),
myDoubleWithMinAndMax(20.4),
myBool(false),
myStringBuf(),
myArgList()
{
myStringBuf[0] = '\0';
/// Constructor for making an integer argument by pointer (4 bytes)
myArgList.push_back(ArConfigArg("PointerIntInt",
&myIntInt,
"Pointer to an INT_INT, no bounds"));
myArgList.push_back(ArConfigArg("PointerIntIntWithMin",
&myIntIntWithMin,
"Pointer to an INT_INT, min bound",
1));
myArgList.push_back(ArConfigArg("PointerIntIntWithMax",
&myIntIntWithMax,
"Pointer to an INT_INT, max bounds",
INT_MIN,
9999));
myArgList.push_back(ArConfigArg("PointerIntIntWithMinMax",
&myIntIntWithMinMax,
"Pointer to an INT_INT, min and max bounds",
-1,
9999));
/// Constructor for making an int argument thats a short (2 bytes)
//ArConfigArg(const char * name, short *pointer,
// const char * description = "",
// int minInt = SHRT_MIN,
// int maxInt = SHRT_MAX);
myArgList.push_back(ArConfigArg("PointerIntShort",
&myIntShort,
"Pointer to an INT_SHORT, no bounds"));
myArgList.push_back(ArConfigArg("PointerIntShortWithMin",
&myIntShortWithMin,
"Pointer to an INT_SHORT, min bound",
1));
myArgList.push_back(ArConfigArg("PointerIntShortWithMax",
&myIntShortWithMax,
"Pointer to an INT_SHORT, max bounds",
SHRT_MIN,
9999));
myArgList.push_back(ArConfigArg("PointerIntShortWithMinMax",
&myIntShortWithMinMax,
"Pointer to an INT_SHORT, min and max bounds",
-1,
9999));
/// Constructor for making an int argument thats a ushort (2 bytes)
// ArConfigArg(const char * name, unsigned short *pointer,
// const char * description = "",
// int minInt = 0,
// int maxInt = USHRT_MAX);
myArgList.push_back(ArConfigArg("PointerIntUShort",
&myIntUShort,
"Pointer to an INT_USHORT, no bounds"));
myArgList.back().setRestartLevel(ArConfigArg::NO_RESTART);
myArgList.push_back(ArConfigArg("PointerIntUShortWithMin",
&myIntUShortWithMin,
"Pointer to an INT_USHORT, min bound",
1));
myArgList.back().setRestartLevel(ArConfigArg::RESTART_CLIENT);
myArgList.push_back(ArConfigArg("PointerIntUShortWithMax",
&myIntUShortWithMax,
"Pointer to an INT_USHORT, max bounds",
SHRT_MIN,
9999));
myArgList.back().setRestartLevel(ArConfigArg::RESTART_SOFTWARE);
myArgList.push_back(ArConfigArg("PointerIntUShortWithMinMax",
&myIntUShortWithMinMax,
"Pointer to an INT_USHORT, min and max bounds",
1,
9999));
myArgList.back().setRestartLevel(ArConfigArg::RESTART_HARDWARE);
///// Constructor for making an char (1 byte) argument by pointer (treated as int)
// ArConfigArg(const char * name, unsigned char *pointer,
// const char * description = "",
// int minInt = 0,
// int maxInt = 255);
myArgList.push_back(ArConfigArg("PointerIntUChar",
&myIntUChar,
"Pointer to an INT_UCHAR, no bounds"));
myArgList.push_back(ArConfigArg("PointerIntUCharWithMin",
&myIntUCharWithMin,
"Pointer to an INT_UCHAR, min bound",
1));
myArgList.push_back(ArConfigArg("PointerIntUCharWithMax",
&myIntUCharWithMax,
"Pointer to an INT_UCHAR, max bounds",
0,
11));
myArgList.push_back(ArConfigArg("PointerIntUCharWithMinMax",
&myIntUCharWithMinMax,
"Pointer to an INT_UCHAR, min and max bounds",
1,
11));
/// Constructor for making a double argument by pointer
// ArConfigArg(const char * name, double *pointer,
// const char * description = "",
// double minDouble = -HUGE_VAL,
// double maxDouble = HUGE_VAL);
myArgList.push_back(ArConfigArg("PointerDouble",
&myDouble,
"Pointer to a DOUBLE, no bounds"));
myArgList.push_back(ArConfigArg("PointerDoubleWithMin",
&myDoubleWithMin,
"Pointer to a DOUBLE, min bound and a precision set to 2 plus a really, really long description that should require word wrapping",
-1.2,
HUGE_VAL,
2));
myArgList.back().setExtraExplanation("A bit more information regarding the double with min.");
myArgList.push_back(ArConfigArg("PointerDoubleWithMax",
&myDoubleWithMax,
"Pointer to a DOUBLE, max bounds",
-HUGE_VAL,
9999.8));
myArgList.back().setExtraExplanation("A bit more information regarding the double with max.");
myArgList.push_back(ArConfigArg("PointerDoubleWithMinMax",
&myDoubleWithMinAndMax,
"Pointer to a DOUBLE, min and max bounds",
-1.2,
9999.8));
/// Constructor for making a boolean argument by pointer
//ArConfigArg(const char * name, bool *pointer,
// const char * description = "");
myArgList.push_back(ArConfigArg("PointerBool",
&myBool,
"Pointer to a BOOL"));
/// Constructor for making an argument of a string by pointer (see details)
// ArConfigArg(const char *name, char *str,
// const char *description,
// size_t maxStrLen);
myArgList.push_back(ArConfigArg("PointerString",
myStringBuf,
"Pointer to a STRING",
sizeof(myStringBuf)));
myArgList.push_back(ArConfigArg(ArConfigArg::SEPARATOR));
myArgList.push_back(ArConfigArg("ValueString",
"InputText",
"A STRING value",
0));
/// Constructor for making an argument of a string by pointer (see details)
// ArConfigArg(const char *name, const char *str,
// const char *description);
myArgList.push_back(ArConfigArg("ValueStringNoMaxLength",
"InputTextNoMaxLength",
"A STRING value, no max string length"));
/// Constructor for making an integer argument
// ArConfigArg(const char * name,
// int val,
// const char * description = "",
// int minInt = INT_MIN,
// int maxInt = INT_MAX);
myArgList.push_back(ArConfigArg("ValueIntInt",
1,
"An INT_INT value, no bounds"));
/// Constructor for making a double argument
// ArConfigArg(const char * name,
// double val,
// const char * description = "",
// double minDouble = -HUGE_VAL,
// double maxDouble = HUGE_VAL);
myArgList.push_back(ArConfigArg("ValueDouble",
2.3,
"A DOUBLE value, no bounds"));
/// Constructor for making a boolean argument
// ArConfigArg(const char * name,
// bool val,
// const char * description = "");
myArgList.push_back(ArConfigArg("ValueBool",
false,
"A BOOL value"));
/// Constructor for making an argument that has functors to handle things
// ArConfigArg(const char *name,
// ArRetFunctor1<bool, ArArgumentBuilder *> *setFunctor,
// ArRetFunctor<const std::list<ArArgumentBuilder *> *> *getFunctor,
// const char *description);
/// Constructor for just holding a description (for ArConfig)
// ArConfigArg(const char *str, Type type = DESCRIPTION_HOLDER);
myArgList.push_back(ArConfigArg("DescriptionHolder"));
myArgList.push_back(ArConfigArg("Description Holder With Blanks and a really long description that might need to employ truncation or word wrapping upon display"));
/// Constructor for holding an unknown argument (STRING_HOLDER)
// ArConfigArg(const char *name, const char *str);
myArgList.push_back(ArConfigArg("StringHolderName",
"StringHolderText"));
myArgList.push_back(ArConfigArg("String Holder Name With Blanks",
"String Holder Text With Blanks"));
/// Constructs a new named argument of the specified type.
//AREXPORT ArConfigArg(Type type,
// const char *name,
// const char *description);
myArgList.push_back(ArConfigArg(ArConfigArg::LIST,
"EmptyList",
"List with no children"));
/// Constructs a new argument of the specified type.
// ArConfigArg(Type type);
myArgList.push_back(ArConfigArg(ArConfigArg::SEPARATOR));
} // end method addToConfig
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct ArConfigDisplayHintData
{
std::list<ArConfigArg> myArgList;
ArConfigDisplayHintData();
}; // end struct ArConfigDisplayHintData
ArConfigDisplayHintData::ArConfigDisplayHintData() :
myArgList()
{
// STRING
// <code>Choices:</code><i>choice1</i>(<code>;;</code><i>choice#i</i>)*
myArgList.push_back(ArConfigArg("PrimaryColor",
"Red",
"Choices display hint, for a primary color"));
myArgList.back().setDisplayHint("Choices:Red;;Green;;Blue");
// <code>MapItem:</code><i>type</i><code>|</code>(<code>Parent</code>|<code>SubType</code>|<code>SubTypeAndParent</code>|<code>SubTypeGlob</code>)<code>|</code>(<code>Optional</code>|<code>Required</code>)
myArgList.push_back(ArConfigArg("Goals",
"",
"MapItem display hint, for goals"));
myArgList.back().setDisplayHint("MapItem:Goal");
// <code>ChildObject:</code><i>type</i><code>|</code>(<code>Parent</code>|<code>SubType</code>|<code>SubTypeAndParent</code>|<code>SubTypeGlob</code>)<code>|</code>(<code>Optional</code>|<code>Required</code>)
// TODO
// <code>Macro:</code><i>taskClass1</i>(<code>;;</code><i>taskClass#i</i>)*|(<code>Optional</code>|<code>Required</code>)
// TODO
// <code>Macro</code>
myArgList.push_back(ArConfigArg("Macros",
"",
"Macro display hint, no task classes"));
myArgList.back().setDisplayHint("Macro");
// <code>Time:</code><i>format</i>
// TODO
// <code>Time</code>
myArgList.push_back(ArConfigArg("PlainTime",
"",
"Time display hint, no formatting"));
myArgList.back().setDisplayHint("Time");
// <code>RobotFile:</code><i>fileFilterNames</i><code>|</code><i>fileFilters</i>
// KMC Not sure that wil work
myArgList.push_back(ArConfigArg("RobotFile",
"",
"RobotFile display hint, no filters"));
myArgList.back().setDisplayHint("RobotFile");
// INT
// <code>Color</code>
myArgList.push_back(ArConfigArg("Color",
0xAAAAAA,
"Color display hint, for chooser"));
myArgList.back().setDisplayHint("Color");
// BOOL
// <code>Checkbox</code>
myArgList.push_back(ArConfigArg("PlainCheckbox",
false,
"Checkbox display hint (plain)"));
myArgList.back().setDisplayHint("Checkbox");
// VISIBLE =
// <code>Visible:</code><i>OtherParamName=OtherParamValue</i>
// Creation of variable lists of parameters (a set of lasers, some parameters
// depending on the selected laser type)
// Data regarding a single laser unit.
//
ArConfigArg laserUnitInfo(ArConfigArg::LIST,
"LaserUnitInfo",
"Data for a laser on the robot.");
ArConfigArg laserNumberArg("LaserNumber",
0,
"ID of laser unit"); // ?? TODO Redundant with laserUnit name
laserNumberArg.setDisplayHint("Editable:false");
laserUnitInfo.addArg(laserNumberArg);
laserUnitInfo.addArg(ArConfigArg("LaserX",
0,
"X position of laser on robot, measured from center of rotation (mm)"));
laserUnitInfo.addArg(ArConfigArg("LaserY",
0,
"Y position of laser on robot, measured from center of rotation (mm)"));
laserUnitInfo.addArg(ArConfigArg("LaserZ",
0,
"Z position of laser on robot, measured from floor (mm)"));
ArConfigArg laserTypeArg("LaserType",
"",
"Type of the laser unit",
0);
laserTypeArg.setDisplayHint("Choices:LMS1xxx;;LMS2xxx;;URG");
laserUnitInfo.addArg(laserTypeArg);
// Data that is displayed only when LaserType is set to lms2xxx
//
ArConfigArg lms2xxInfo(ArConfigArg::LIST,
"LMS2xxInfo",
"Data for an LMS2xxx laser");
lms2xxInfo.setDisplayHint("Visible:LaserType=lms2xxx");
lms2xxInfo.addArg(ArConfigArg("LaserMaxRange",
32000,
"Maximum range of the laser (mm)"));
lms2xxInfo.addArg(ArConfigArg("LaserCumulativeBufSize",
200,
"Needs a description"));
laserUnitInfo.addArg(lms2xxInfo);
// Placeholders for all possible laser units on the robot
//
ArConfigArg laserUnitCount("LaserCount",
1,
"Number of lasers on the robot",
0,
3);
laserUnitCount.setDisplayHint("SpinBox");
myArgList.push_back(laserUnitCount);
// VISIBLE >
// <code>Visible:</code><i>OtherParamName>OtherParamValue</i>
int maxCount = 3;
char nameBuf[256];
char displayHintBuf[256];
for (int i = 1; i <= maxCount; i++) {
snprintf(nameBuf, sizeof(nameBuf), "LaserUnit%i", i);
nameBuf[sizeof(nameBuf) - 1] = '\0';
ArConfigArg curLaserUnit(nameBuf, laserUnitInfo);
// TODO Set laserNumber too?
ArConfigArg *laserNumberArg = curLaserUnit.findArg("LaserNumber");
if (laserNumberArg != NULL) {
laserNumberArg->setInt(i);
}
// This info is visible only when the laserUnitCount is big enough
//
snprintf(displayHintBuf, sizeof(displayHintBuf),
"Visible:LaserCount>%i", i - 1);
displayHintBuf[sizeof(displayHintBuf) - 1] = '\0';
curLaserUnit.setDisplayHint(displayHintBuf);
myArgList.push_back(curLaserUnit);
}
// <code>Visible:</code><i>OtherParamName!=OtherParamValue</i>
// <code>Visible:</code><code>false</code>
// <code>Editable:</code><i>OtherParamName=OtherParamValue</i>
// <code>Editable:</code><i>OtherParamName!=OtherParamValue</i>
// <code>Editable:</code><i>OtherParamName>OtherParamValue</i>
// <code>Editable:</code><code>false</code>
} // end ctor
// --------------------------------------------------------------------------
// Simple parameter that is editable only when a feature is enabled
//
//config.addParam("MicroCycleDockEnabled");
//config.addParam("MicroCycleDockStateOfCharge", ...
// "Editable:MicroCycleDockEnabled=true") // DisplayHint
//
// -------------------------------------------------------------------------
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArTestConfig::ArTestConfig(ArConfig *config,
const char *configSectionName) :
myTopLevelConfigPrimitives(new ArConfigPrimitiveData()),
myListMemberPrimitives(new ArConfigPrimitiveData()),
myDisplayHintData(new ArConfigDisplayHintData())
{
// KMC Was thinking that we may someday want flags to control these things
// so left them in the body.
addToConfig(config, configSectionName);
} // end ctor
ArTestConfig::~ArTestConfig()
{
delete myTopLevelConfigPrimitives;
delete myListMemberPrimitives;
delete myDisplayHintData;
}
bool ArTestConfig::addToConfig(ArConfig *config,
const char *configSectionName)
{
if (config == NULL) {
return false;
}
bool isSuccess = true;
if (myTopLevelConfigPrimitives != NULL) {
std::string fullSectionName;
if (configSectionName != NULL) {
fullSectionName = configSectionName;
}
fullSectionName += "Primitives";
for (std::list<ArConfigArg>::iterator iter =
myTopLevelConfigPrimitives->myArgList.begin();
(iter != myTopLevelConfigPrimitives->myArgList.end());
iter++) {
if ((*iter).getRestartLevel() != ArConfigArg::NO_RESTART) {
ArLog::log(ArLog::Normal,
" %s", (*iter).getName());
}
if (!config->addParam(*iter,
fullSectionName.c_str(),
ArPriority::NORMAL,
(*iter).getDisplayHint(),
(*iter).getRestartLevel())) {
isSuccess = false;
}
} // end for each top level arg
} // end if
if (myListMemberPrimitives != NULL) {
std::string fullSectionName;
if (configSectionName != NULL) {
fullSectionName = configSectionName;
}
fullSectionName += "ListMembers";
ArConfigArg listArg(ArConfigArg::LIST,
"PrimitiveList",
"List that contains all of the primitives");
for (std::list<ArConfigArg>::iterator iter =
myListMemberPrimitives->myArgList.begin();
(iter != myListMemberPrimitives->myArgList.end());
iter++) {
// KMC This is temp just because the separator was the first item in
// the list.
if ((*iter).getType() == ArConfigArg::SEPARATOR) {
continue;
}
if (!listArg.addArg(*iter)) {
// Not necessarily failure, cannot add pointers ...
}
} // end for each list member arg
if (!config->addParam(listArg,
fullSectionName.c_str(),
ArPriority::NORMAL)) {
isSuccess = false;
}
} // end if list member primitives
if (myDisplayHintData != NULL) {
std::string fullSectionName;
if (configSectionName != NULL) {
fullSectionName = configSectionName;
}
fullSectionName += "DisplayHints";
for (std::list<ArConfigArg>::iterator iter =
myDisplayHintData->myArgList.begin();
(iter != myDisplayHintData->myArgList.end());
iter++) {
if (!config->addParam(*iter,
fullSectionName.c_str(),
ArPriority::NORMAL,
(*iter).getDisplayHint())) {
isSuccess = false;
}
} // end for each top level arg
} // end if display hint data
{
std::string fullSectionName;
if (configSectionName != NULL) {
fullSectionName = configSectionName;
}
fullSectionName += "RestartTypes";
config->addParam(ArConfigArg("RestartClientBool",
false,
"A BOOL to flip to cause a client restart request to be sent"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_CLIENT);
config->addParam(ArConfigArg("RestartServerBool",
false,
"A BOOL to flip to cause the software to restart"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE);
config->addParam(ArConfigArg("RestartServerInt",
5,
"An INT to flip to cause the software to restart"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE);
config->addParam(ArConfigArg("RestartServerDouble",
5.0,
"A DOUBLE to flip to cause the software to restart"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE);
config->addParam(ArConfigArg("RestartRobotBool",
false,
"A BOOL to flip to cause the complete robot to restart (really this just turns it off right now)"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_HARDWARE);
config->addParam(ArConfigArg("RestartServerBool2",
false,
"A BOOL to flip to cause the software to restart"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_SOFTWARE);
config->addParam(ArConfigArg("RestartClientBool2",
false,
"A BOOL to flip to cause a client restart request to be sent"),
fullSectionName.c_str(),
ArPriority::NORMAL, "", ArConfigArg::RESTART_CLIENT);
}
return isSuccess;
} // end method addToConfig
|