- Timestamp:
- 10/29/11 21:37:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratescan.cc
r12312 r12323 66 66 67 67 DimDescribedService fDimData; 68 DimDescribedService fDimProc; 68 69 69 70 int fCounter; … … 94 95 95 96 string fCommand; 97 98 void UpdateProc() 99 { 100 const array<uint32_t,3> v = {{ fThresholdMin, fThresholdMax, fThresholdStep }}; 101 fDimProc.Update(v); 102 } 96 103 97 104 pair<Time, int> GetNewState(DimStampedInfo &info) const … … 280 287 fThresholdStep = evt.Get<uint32_t>(8); 281 288 289 UpdateProc(); 290 282 291 const Time now; 283 292 … … 368 377 fReference = kPatch; 369 378 fReferenceIdx = evt.GetUInt(); 379 380 return GetCurrentState(); 381 } 382 383 int ChangeStepSize(const EventImp &evt) 384 { 385 if (!CheckEventSize(evt.GetSize(), "ChangeStepSize", 4)) 386 return kSM_FatalError; 387 388 fThresholdStep = evt.Get<uint32_t>(); 389 390 UpdateProc(); 391 392 return GetCurrentState(); 393 } 394 395 int ChangeMaximum(const EventImp &evt) 396 { 397 if (!CheckEventSize(evt.GetSize(), "ChangeMaximum", 4)) 398 return kSM_FatalError; 399 400 fThresholdMax = evt.Get<uint32_t>(); 370 401 371 402 return GetCurrentState(); … … 401 432 fRates("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, this), 402 433 fDimData("RATE_SCAN/DATA", "I:1;F:1;F:1;F:1;F:40;F:160", ""), 434 fDimProc("RATE_SCAN/PROCESS_DATA", "I:1;I:1;I:1", 435 "Rate scan process data" 436 "|min[DAC]:Value at which scan was started" 437 "|max[DAC]:Value at which scan will end" 438 "|step[DAC]:Step size for scan"), 403 439 fCounter(-1), fReference(kCamera), fReferenceIdx(0) 404 440 { … … 436 472 "|max[int]:Limiting value in DAC counts" 437 473 "|step[int]:Single step in DAC counts"); 474 475 AddEvent("CHANGE_STEP_SIZE", "I:1", kStateInProgress) 476 (bind(&StateMachineRateScan::ChangeStepSize, this, placeholders::_1)) 477 ("Change the step size during a ratescan in progress" 478 "|step[int]:Single step in DAC counts"); 479 480 AddEvent("CHANGE_MAXIMUM", "I:1", kStateInProgress) 481 (bind(&StateMachineRateScan::ChangeMaximum, this, placeholders::_1)) 482 ("Change the maximum limit during a ratescan in progress" 483 "|max[int]:Limiting value in DAC counts"); 438 484 439 485 AddEvent("STOP", kStateInProgress)
Note:
See TracChangeset
for help on using the changeset viewer.