Changeset 11218
- Timestamp:
- 06/29/11 23:08:38 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/datalogger.cc
r11089 r11218 2526 2526 2527 2527 boost::thread t(boost::bind(RunThread, &logger)); 2528 2529 if (conf.Has("cmd")) 2530 { 2531 const vector<string> v = conf.Get<vector<string>>("cmd"); 2532 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 2533 shell.ProcessLine(*it); 2534 } 2535 2536 if (conf.Has("exec")) 2537 { 2538 const vector<string> v = conf.Get<vector<string>>("exec"); 2539 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 2540 shell.Execute(*it); 2541 } 2542 2543 if (conf.Get<bool>("quit")) 2544 shell.Stop(); 2545 2528 2546 2529 2547 shell.Run(); // Run the shell … … 2594 2612 ("log,l", var<string>(n), "Write log-file") 2595 2613 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 2614 ("cmd", vars<string>(), "Execute one or more commands at startup") 2615 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 2616 ("quit,q", po_switch(), "Quit after startup"); 2596 2617 ; 2597 2618 -
trunk/FACT++/src/dimctrl.cc
r11052 r11218 22 22 win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl; 23 23 24 if (conf.Has("cmd")) 25 { 26 const vector<string> v = conf.Get<vector<string>>("cmd"); 27 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 28 shell.ProcessLine(*it); 29 } 30 24 31 if (conf.Has("exec")) 25 32 { … … 28 35 shell.Execute(*it); 29 36 } 37 38 if (conf.Get<bool>("quit")) 39 shell.Stop(); 30 40 31 41 shell.Run(); … … 43 53 ("log,l", var<string>(n), "Write log-file") 44 54 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 55 ("cmd", vars<string>(), "Execute one or more commands at startup") 45 56 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 57 ("quit,q", po_switch(), "Quit after startup"); 46 58 ; 47 59 -
trunk/FACT++/src/drivectrl.cc
r11056 r11218 912 912 // boost::thread t(boost::bind(&StateMachineDrive<S>::Run, &io_service)); 913 913 914 if (conf.Has("cmd")) 915 { 916 const vector<string> v = conf.Get<vector<string>>("cmd"); 917 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 918 shell.ProcessLine(*it); 919 } 920 914 921 if (conf.Has("exec")) 915 922 { … … 918 925 shell.Execute(*it); 919 926 } 927 928 if (conf.Get<bool>("quit")) 929 shell.Stop(); 920 930 921 931 shell.Run(); // Run the shell … … 941 951 ("no-dim,d", po_switch(), "Disable dim services") 942 952 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 943 ("exec,e", vars<strings>(),"Execute one or more scrips at startup") 953 ("cmd", vars<string>(), "Execute one or more commands at startup") 954 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 955 ("quit,q", po_switch(), "Quit after startup"); 944 956 ; 945 957 -
trunk/FACT++/src/fadctrl.cc
r11197 r11218 1711 1711 //boost::thread t(boost::bind(&StateMachineFAD<S>::Run, &io_service)); 1712 1712 1713 if (conf.Has("cmd")) 1714 { 1715 const vector<string> v = conf.Get<vector<string>>("cmd"); 1716 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 1717 shell.ProcessLine(*it); 1718 } 1719 1713 1720 if (conf.Has("exec")) 1714 1721 { … … 1717 1724 shell.Execute(*it); 1718 1725 } 1726 1727 if (conf.Get<bool>("quit")) 1728 shell.Stop(); 1719 1729 1720 1730 shell.Run(); // Run the shell … … 1739 1749 ("no-dim,d", po_switch(), "Disable dim services") 1740 1750 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 1751 ("cmd", vars<string>(), "Execute one or more commands at startup") 1741 1752 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 1753 ("quit,q", po_switch(), "Quit after startup"); 1742 1754 ; 1743 1755 -
trunk/FACT++/src/fscctrl.cc
r11115 r11218 584 584 // boost::thread t(boost::bind(&StateMachineFSC<S>::Run, &io_service)); 585 585 586 if (conf.Has("cmd")) 587 { 588 const vector<string> v = conf.Get<vector<string>>("cmd"); 589 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 590 shell.ProcessLine(*it); 591 } 592 586 593 if (conf.Has("exec")) 587 594 { … … 590 597 shell.Execute(*it); 591 598 } 599 600 if (conf.Get<bool>("quit")) 601 shell.Stop(); 592 602 593 603 shell.Run(); // Run the shell … … 613 623 ("no-dim,d", po_bool(), "Disable dim services") 614 624 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 625 ("cmd", vars<string>(), "Execute one or more commands at startup") 615 626 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 627 ("quit,q", po_switch(), "Quit after startup"); 616 628 ; 617 629 -
trunk/FACT++/src/ftmctrl.cc
r11148 r11218 1897 1897 // boost::thread t(boost::bind(&StateMachineFTM<S>::Run, &io_service)); 1898 1898 1899 if (conf.Has("cmd")) 1900 { 1901 const vector<string> v = conf.Get<vector<string>>("cmd"); 1902 for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++) 1903 shell.ProcessLine(*it); 1904 } 1905 1899 1906 if (conf.Has("exec")) 1900 1907 { … … 1903 1910 shell.Execute(*it); 1904 1911 } 1912 1913 if (conf.Get<bool>("quit")) 1914 shell.Stop(); 1905 1915 1906 1916 shell.Run(); // Run the shell … … 1926 1936 ("no-dim,d", po_bool(), "Disable dim services") 1927 1937 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 1938 ("cmd", vars<string>(), "Execute one or more commands at startup") 1928 1939 ("exec,e", vars<string>(), "Execute one or more scrips at startup") 1940 ("quit,q", po_switch(), "Quit after startup"); 1929 1941 ; 1930 1942 -
trunk/FACT++/src/scheduler.cc
r11216 r11218 791 791 } 792 792 793 //io_service.SetReady();794 793 if (conf.Has("exec")) 795 794 {
Note:
See TracChangeset
for help on using the changeset viewer.