Changeset 10186


Ignore:
Timestamp:
03/01/11 07:38:47 (14 years ago)
Author:
ogrimm
Message:
Board list may be passed by command line
Location:
fact/FADctrl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fact/FADctrl/FAD.cc

    r10164 r10186  
    5252// Constructor
    5353//
    54 FAD::FAD(): EvidenceServer(SERVER_NAME) {
     54FAD::FAD(std::vector<std::string> List): EvidenceServer(SERVER_NAME) {
    5555
    5656  // Initialization
     
    7171
    7272  // Construct boards
    73   BoardList = Tokenize(GetConfig("BoardList"));
     73  if (List.empty()) BoardList = Tokenize(GetConfig("BoardList"));
     74  else BoardList = List;
    7475
    7576  for (unsigned int i=0; i<BoardList.size(); i++) {
  • fact/FADctrl/FAD.h

    r10164 r10186  
    6363
    6464  public:
    65     FAD();
     65    FAD(std::vector<std::string>);
    6666    ~FAD();
    6767
  • fact/FADctrl/FADctrl.cc

    r10164 r10186  
    1717// ================
    1818
    19 int main() {
     19int main(int argc, char *argv[]) {
    2020
     21  std::vector<std::string> List;
     22 
     23  // Board list from command line?
     24  for (int i=1; i<argc; i++) List.push_back(argv[i]);
     25 
    2126  // Uses getc() for readline library (allows interruption by signal) and load history buffer
    2227  rl_getc_function = getc;
     
    2732
    2833  // Construct main instance (static ensures destructor is called with exit())
    29   static class FAD M;
     34  static class FAD M(List);
    3035
    3136  // Do not kill process if writing to closed socket
  • fact/FADctrl/History.txt

    r10185 r10186  
    151518/2/2011   Added 'reconnect' command
    161628/2/2011       Removed 'static' keywords in FADBoard::ReadLoop()
     171/3/2011        Board list can be passed via command line
Note: See TracChangeset for help on using the changeset viewer.