Changeset 11050 for trunk/FACT++/src
- Timestamp:
- 06/17/11 09:54:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/LocalControl.h
r11047 r11050 26 26 #include <boost/filesystem.hpp> 27 27 28 #include "tools.h" 29 28 30 #include "WindowLog.h" 29 31 #include "StateMachineImp.h" … … 49 51 LocalControl(const char *name) : T(name), 50 52 fStateMachine(0), lout(T::GetStreamIn()), 51 fName(boost::filesystem::path(name).filename() .c_str())53 fName(boost::filesystem::path(name).filename()) 52 54 { } 53 55 … … 57 59 lout << " " << kUnderline << "Specific commands:" << endl; 58 60 lout << kBold << " st,states " << kReset << "Display a list of the available states with description." << endl; 61 lout << kBold << " # <text> " << kReset << "Echo <text> to the output stream" << endl; 59 62 lout << kBold << " .s " << kReset << "Wait for the state-machine to change to the given state." << endl; 60 63 lout << " " " .s <state> [<timeout>]" << endl; … … 103 106 } 104 107 105 const Time timeout = Time()+boost::posix_time::millisec(ms);108 const Time timeout = ms<=0 ? Time(Time::none) : Time()+boost::posix_time::millisec(ms); 106 109 107 110 const int target = atoi(str.c_str()+3); … … 112 115 } 113 116 117 if (str[0]=='#') 118 { 119 lout << Tools::Trim(str.substr(1)) << endl; 120 return true; 121 } 122 114 123 if (T::Process(str)) 115 124 return true; … … 121 130 122 131 void SetReceiver(StateMachineImp &imp) { fStateMachine = &imp; } 132 }; 133 134 // ************************************************************************** 135 /** @class LocalStream 136 137 @brief Derives the LocalControl from ConsoleStream 138 139 This is basically a LocalControl, which derives through the template 140 argument from the ConsoleStream class. 141 142 */ 143 // ************************************************************************** 144 #include "Console.h" 145 146 class LocalStream : public LocalControl<ConsoleStream> 147 { 148 public: 149 LocalStream(const char *name, bool = false) 150 : LocalControl<ConsoleStream>(name) { } 123 151 }; 124 152 … … 134 162 */ 135 163 // ************************************************************************** 136 #include "Console.h"137 164 #include "tools.h" 138 165
Note:
See TracChangeset
for help on using the changeset viewer.