Changeset 16775
- Timestamp:
- 06/08/13 12:30:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fadctrl.cc
r16732 r16775 1088 1088 } 1089 1089 1090 fConfigTimer = Time(Time::none);1091 1092 1090 // Now the old run is stopped already. So all other servers can start a new run 1093 1091 // (Note that we might need another step which only checks if the continous trigger … … 1095 1093 const int64_t runs[2] = { runno, runno+1 }; 1096 1094 fDimStartRun.Update(runs); 1097 1098 // T::Info(" ==> TODO: Insert/update run configuration in database!");1099 1095 1100 1096 return FAD::State::kConfiguring1; … … 1510 1506 if (T::GetCurrentState()==FAD::State::kConfiguring1) 1511 1507 { 1512 // We need some delay so that the FAD is not busy anymore1513 // and really sees the software trigger1514 // FIXME: Do we need this to be configurable?1515 //if (Time()-fConfigTimer<boost::posix_time::milliseconds(3000))1516 1517 1508 // Wait until the configuration commands to all boards 1518 1509 // have been sent and achknowledged … … 1521 1512 return FAD::State::kConfiguring1; 1522 1513 1523 if (!fConfigTimer) 1524 fConfigTimer = Time(); 1525 1526 // Wait a short moment to ensure that all board have processed 1527 // the received data 1528 if (Time()-fConfigTimer<boost::posix_time::milliseconds(250)) 1529 return FAD::State::kConfiguring1; 1530 1514 // Now we can sent the trigger 1531 1515 for (BoardList::iterator it=fBoards.begin(); it!=fBoards.end(); it++) 1532 1516 it->second->Cmd(FAD::kCmdSingleTrigger); … … 1567 1551 // const lock_guard<mutex> guard(fMutexReconnect); 1568 1552 // fReconnectionList.clear(); 1553 1554 return FAD::State::kConfiguring3; 1555 } 1556 1557 if (T::GetCurrentState()==FAD::State::kConfiguring3) 1558 { 1559 // Wait until the configuration commands to all boards 1560 // have been sent and achknowledged 1561 for (BoardList::iterator it=fBoards.begin(); it!=fBoards.end(); it++) 1562 if (!it->second->IsTxQueueEmpty()) 1563 return FAD::State::kConfiguring3; 1569 1564 1570 1565 return FAD::State::kConfigured; … … 1675 1670 T::AddStateName(FAD::State::kConfiguring2, "Configuring2", 1676 1671 "Waiting until all boards returned their configuration and they are valid."); 1672 1673 T::AddStateName(FAD::State::kConfiguring3, "Configuring3", 1674 "Waiting until 'enable trigger line' was sent to all boards."); 1677 1675 1678 1676 T::AddStateName(FAD::State::kConfigured, "Configured", … … 1790 1788 "|run_type[string]:Run type which describes the runs"); 1791 1789 1792 T::AddEvent("RESET_CONFIGURE", FAD::State::kConfiguring1, FAD::State::kConfiguring2, FAD::State::kConfigur ed)1790 T::AddEvent("RESET_CONFIGURE", FAD::State::kConfiguring1, FAD::State::kConfiguring2, FAD::State::kConfiguring3, FAD::State::kConfigured) 1793 1791 (bind(&StateMachineFAD::ResetConfig, this)) 1794 1792 ("If configuration failed and the fadctrl is waiting for something, use this to reset the state."); … … 1957 1955 Configs fConfigs; 1958 1956 Configs::const_iterator fTargetConfig; 1959 1960 Time fConfigTimer;1961 1957 1962 1958
Note:
See TracChangeset
for help on using the changeset viewer.