Changeset 10561 for trunk/FACT++/src
- Timestamp:
- 05/04/11 13:48:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10555 r10561 619 619 return true; 620 620 } 621 bool SetTriggerInterval(uint32_t val) 622 { 623 if (val>StaticData::kMaxTriggerInterval) 624 return false; 625 626 fStaticData.fTriggerInterval = val; 627 628 CmdSendStatDat(); 629 630 return true; 631 } 632 633 bool SetTriggerDelay(uint32_t val) 634 { 635 if (val>StaticData::kMaxDelayTrigger) 636 return false; 637 638 fStaticData.fDelayTrigger = val; 639 640 CmdSendStatDat(); 641 642 return true; 643 } 644 645 bool SetTimeMarkerDelay(uint32_t val) 646 { 647 if (val>StaticData::kMaxDelayTimeMarker) 648 return false; 649 650 fStaticData.fDelayTimeMarker = val; 651 652 CmdSendStatDat(); 653 654 return true; 655 } 656 657 bool SetDeadTime(uint32_t val) 658 { 659 if (val>StaticData::kMaxDeadTime) 660 return false; 661 662 fStaticData.fDeadTime = val; 663 664 CmdSendStatDat(); 665 666 return true; 667 } 621 668 622 669 int GetState() const { return IsConnected() ? fState : (int)FTM::kDisconnected; } … … 904 951 } 905 952 953 int SetTriggerInterval(const EventImp &evt) 954 { 955 if (!CheckEventSize(evt.GetSize(), "SetTriggerInterval", 4)) 956 return T::kSM_FatalError; 957 958 if (!fFTM.SetTriggerInterval(evt.GetInt())) 959 T::Warn("SetTriggerInterval - Value out of range."); 960 961 return T::GetCurrentState(); 962 } 963 964 int SetTriggerDelay(const EventImp &evt) 965 { 966 if (!CheckEventSize(evt.GetSize(), "SetTriggerDelay", 4)) 967 return T::kSM_FatalError; 968 969 if (!fFTM.SetTriggerDelay(evt.GetInt())) 970 T::Warn("SetTriggerDealy - Value out of range."); 971 972 return T::GetCurrentState(); 973 } 974 975 int SetTimeMarkerDelay(const EventImp &evt) 976 { 977 if (!CheckEventSize(evt.GetSize(), "SetTimeMarkerDelay", 4)) 978 return T::kSM_FatalError; 979 980 if (!fFTM.SetTimeMarkerDelay(evt.GetInt())) 981 T::Warn("SetTimeMarkerDelay - Value out of range."); 982 983 return T::GetCurrentState(); 984 } 985 986 int SetDeadTime(const EventImp &evt) 987 { 988 if (!CheckEventSize(evt.GetSize(), "SetDeadTime", 4)) 989 return T::kSM_FatalError; 990 991 if (!fFTM.SetDeadTime(evt.GetInt())) 992 T::Warn("SetDeadTime - Value out of range."); 993 994 return T::GetCurrentState(); 995 } 996 906 997 int Disconnect() 907 998 { … … 1047 1138 "|Board[idx]:Index of the board (0-39)"); 1048 1139 1140 AddConfiguration("SET_TRIGGER_INTERVAL", "I:1", kStateIdle) 1141 (boost::bind(&StateMachineFTM::SetTriggerInterval, this, _1)) 1142 ("" 1143 "|[]:"); 1144 1145 AddConfiguration("SET_TRIGGER_DELAY", "I:1", kStateIdle) 1146 (boost::bind(&StateMachineFTM::SetTriggerDelay, this, _1)) 1147 ("" 1148 "|[]:"); 1149 1150 AddConfiguration("SET_TIME_MARKER_DELAY", "I:1", kStateIdle) 1151 (boost::bind(&StateMachineFTM::SetTimeMarkerDelay, this, _1)) 1152 ("" 1153 "|[]:"); 1154 1155 AddConfiguration("SET_DEAD_TIME", "I:1", kStateIdle) 1156 (boost::bind(&StateMachineFTM::SetDeadTime, this, _1)) 1157 ("" 1158 "|[]:"); 1159 1049 1160 T::AddConfiguration("SET_VERBOSE", "B") 1050 1161 (boost::bind(&StateMachineFTM::SetVerbosity, this, _1)) … … 1086 1197 // ENABLE_EXT1 bool 1087 1198 // ENABLE_EXT2 bool 1088 // ENABLE_TIM bool1089 1199 // ENABLE_VETO bool 1090 1200 // ---> Enable(bit, bool)
Note:
See TracChangeset
for help on using the changeset viewer.