Changeset 10273 for trunk/FACT++/src/StateMachineImp.cc
- Timestamp:
- 03/30/11 15:55:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineImp.cc
r10218 r10273 233 233 lout << kBlue << name; 234 234 235 const Converter conv(lout, fmt, false); 236 237 const vector<char> v = conv.GetVector(str.substr(p0)); 238 if (!conv.valid() || v.empty()!=conv.empty()) 239 { 240 lout << kRed << "Couldn't properly parse the input... ignored." << endl; 241 return false; 242 } 243 244 return PostEvent(*evt, v.data(), v.size()); 245 /* 235 246 const Converter c(lout, fmt, str.substr(p0)); 236 247 … … 243 254 244 255 return PostEvent(*evt, c.Ptr(), c.Size()); 256 */ 245 257 } 246 258 … … 470 482 evt->AddAllowedStates(states); 471 483 472 Out() << ": " << Time().GetAsStr() << " :Adding command " << evt->GetName();484 Out() << ": " << Time().GetAsStr() << " - Adding command " << evt->GetName(); 473 485 Out() << " (transition to " << GetStateDescription(evt->GetTargetState()) << ")" << endl; 474 486 … … 912 924 //! \enddot 913 925 //! 926 //! @param dummy 927 //! If this parameter is set to treu then no action is executed 928 //! and now events are dispatched from the event list. It is usefull 929 //! if functions are assigned directly to any event to simulate 930 //! a running loop (e.g. block until Stop() was called or fExitRequested 931 //! was set by an EXIT command. 932 //! 914 933 //! @returns 915 934 //! In the case of a a fatal error -1 is returned, fExitRequested-1 in all … … 919 938 //! @todo Fix docu (kSM_SetReady, HandleEvent) 920 939 // 921 int StateMachineImp::Run( )940 int StateMachineImp::Run(bool dummy) 922 941 { 923 942 if (fCurrentState>=kSM_Ready) … … 935 954 { 936 955 usleep(1); 956 if (dummy) 957 continue; 937 958 938 959 // Execute a step in the current state of the state machine
Note:
See TracChangeset
for help on using the changeset viewer.