Changeset 16444
- Timestamp:
- 05/30/13 00:17:24 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r16383 r16444 516 516 void CmdStartRun() 517 517 { 518 PostCmd(FTM::kCmdStartRun, FTM::kStartRun); 519 CmdGetRegister(0); 520 518 521 Info("Sending start trigger."); 519 520 PostCmd(FTM::kCmdStartRun, FTM::kStartRun); 521 522 // Update state information by requesting a new header 522 } 523 524 void CmdStopRun() 525 { 526 PostCmd(FTM::kCmdStopRun); 523 527 CmdGetRegister(0); 524 } 525 526 void CmdStopRun() 527 { 528 528 529 Info("Sending stop trigger."); 529 530 PostCmd(FTM::kCmdStopRun);531 532 // Update state information by requesting a new header533 CmdGetRegister(0);534 530 } 535 531 … … 576 572 return false; 577 573 574 PostCmd(FTM::kCmdCrateReset, 1<<addr); 578 575 Info("Sending crate reset for crate "+to_string(addr)); 579 PostCmd(FTM::kCmdCrateReset, 1<<addr);580 576 581 577 return true; … … 584 580 bool CmdResetCamera() 585 581 { 586 Info("Sending camera reset");587 588 582 PostCmd(FTM::kCmdCrateReset, FTM::kResetCrate0); 589 583 PostCmd(FTM::kCmdCrateReset, FTM::kResetCrate1); 590 584 PostCmd(FTM::kCmdCrateReset, FTM::kResetCrate2); 591 585 PostCmd(FTM::kCmdCrateReset, FTM::kResetCrate3); 586 587 Info("Sending camera reset"); 592 588 593 589 return true; … … 1972 1968 fCounterStat = fFTM.GetCounter(FTM::kStaticData); 1973 1969 1970 fFTM.CmdSendStatDat(fTargetConfig->second); 1971 1974 1972 T::Message("Trigger successfully disabled... sending new configuration."); 1975 1976 fFTM.CmdSendStatDat(fTargetConfig->second);1977 1973 1978 1974 // Next state is: wait for the answer to our configuration … … 1988 1984 // If now the configuration is not what we expected 1989 1985 // we had an error (maybe old events waiting in the queue?) 1990 // ======================1991 1986 if (fFTM.GetState()!=ConnectionFTM::kConfigured) 1992 1987 return FTM::State::kConfigError2; 1993 // ======================1994 // There is no simple way to check if the clock1995 // conditioner is locked. Every message send to request a static1996 // data block may end up in the same buffer at the FTM, thus1997 // the result will be that it is in state Configuring, which1998 // will always return the clock conditioner to be unlocked.1999 /*2000 if (!fFTM.IsLocked())2001 {2002 T::Warn("Configuration successfull, but clock conditioner not locked.");2003 return FTM::State::kConfigError3;2004 }*/2005 // ======================2006 1988 2007 1989 // Check configuration again when a new static data block … … 2009 1991 fCounterStat = fFTM.GetCounter(FTM::kStaticData); 2010 1992 2011 // T::Info(" ==> TODO: Update run in database!"); 2012 T::Message("Sending new configuration was successfull."); 1993 // This is also displayed when the ratecontrol sends its configuration... 1994 if (T::GetCurrentState()==FTM::State::kConfiguring2) 1995 T::Message("Sending new configuration was successfull."); 1996 else 1997 T::Message("Configuration successfull updated."); 2013 1998 2014 1999 // Next state is: wait for the answer to our configuration
Note:
See TracChangeset
for help on using the changeset viewer.