Changeset 10688 for trunk/FACT++/src/ftmctrl.cc
- Timestamp:
- 05/12/11 21:52:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10679 r10688 1401 1401 1402 1402 // FTM Commands 1403 Add Configuration("TOGGLE_LED", kStateIdle)1403 AddEvent("TOGGLE_LED", kStateIdle) 1404 1404 (Wrapper(boost::bind(&ConnectionFTM::CmdToggleLed, &fFTM))) 1405 1405 ("toggle led"); 1406 1406 1407 Add Configuration("PING", kStateIdle)1407 AddEvent("PING", kStateIdle) 1408 1408 (Wrapper(boost::bind(&ConnectionFTM::CmdPing, &fFTM))) 1409 1409 ("send ping"); 1410 1410 1411 Add Configuration("REQUEST_DYNAMIC_DATA", kStateIdle)1411 AddEvent("REQUEST_DYNAMIC_DATA", kStateIdle) 1412 1412 (Wrapper(boost::bind(&ConnectionFTM::CmdReqDynDat, &fFTM))) 1413 1413 ("request transmission of dynamic data block"); 1414 1414 1415 Add Configuration("REQUEST_STATIC_DATA", kStateIdle)1415 AddEvent("REQUEST_STATIC_DATA", kStateIdle) 1416 1416 (Wrapper(boost::bind(&ConnectionFTM::CmdReqStatDat, &fFTM))) 1417 1417 ("request transmission of static data from FTM to memory"); 1418 1418 1419 Add Configuration("GET_REGISTER", "I", kStateIdle)1419 AddEvent("GET_REGISTER", "I", kStateIdle) 1420 1420 (boost::bind(&StateMachineFTM::GetRegister, this, _1)) 1421 1421 ("read register from address addr" 1422 1422 "|addr[short]:Address of register"); 1423 1423 1424 Add Configuration("SET_REGISTER", "I:2", kStateIdle)1424 AddEvent("SET_REGISTER", "I:2", kStateIdle) 1425 1425 (boost::bind(&StateMachineFTM::SetRegister, this, _1)) 1426 1426 ("set register to value" … … 1428 1428 "|val[short]:Value to be set"); 1429 1429 1430 Add Configuration("START_RUN", kStateIdle)1430 AddEvent("START_RUN", kStateIdle) 1431 1431 (Wrapper(boost::bind(&ConnectionFTM::CmdStartRun, &fFTM))) 1432 1432 ("start a run (start distributing triggers)"); 1433 1433 1434 Add Configuration("STOP_RUN", kStateTakingData)1434 AddEvent("STOP_RUN", kStateTakingData) 1435 1435 (Wrapper(boost::bind(&ConnectionFTM::CmdStopRun, &fFTM))) 1436 1436 ("stop a run (stop distributing triggers)"); 1437 1437 1438 Add Configuration("TAKE_N_EVENTS", "I", kStateIdle)1438 AddEvent("TAKE_N_EVENTS", "I", kStateIdle) 1439 1439 (boost::bind(&StateMachineFTM::TakeNevents, this, _1)) 1440 1440 ("take n events (distribute n triggers)|number[int]:Number of events to be taken"); 1441 1441 1442 Add Configuration("DISABLE_REPORTS", "B", kStateIdle)1442 AddEvent("DISABLE_REPORTS", "B", kStateIdle) 1443 1443 (boost::bind(&StateMachineFTM::DisableReports, this, _1)) 1444 1444 ("disable sending rate reports" 1445 1445 "|status[bool]:disable or enable that the FTM sends rate reports (yes/no)"); 1446 1446 1447 Add Configuration("SET_THRESHOLD", "I:2", kStateIdle)1447 AddEvent("SET_THRESHOLD", "I:2", kStateIdle) 1448 1448 (boost::bind(&StateMachineFTM::SetThreshold, this, _1)) 1449 1449 ("Set the comparator threshold" … … 1451 1451 "|Threshold[counts]:Threshold to be set in binary counts"); 1452 1452 1453 Add Configuration("SET_PRESCALING", "I:1", kStateIdle)1453 AddEvent("SET_PRESCALING", "I:1", kStateIdle) 1454 1454 (boost::bind(&StateMachineFTM::SetPrescaling, this, _1)) 1455 1455 ("" 1456 1456 "|[]:"); 1457 1457 1458 Add Configuration("ENABLE_FTU", "I:1;B:1", kStateIdle)1458 AddEvent("ENABLE_FTU", "I:1;B:1", kStateIdle) 1459 1459 (boost::bind(&StateMachineFTM::EnableFTU, this, _1)) 1460 1460 ("Enable or disable FTU" … … 1462 1462 "|Enable[bool]:Whether FTU should be enabled or disabled (yes/no)"); 1463 1463 1464 Add Configuration("TOGGLE_FTU", "I:1", kStateIdle)1464 AddEvent("TOGGLE_FTU", "I:1", kStateIdle) 1465 1465 (boost::bind(&StateMachineFTM::ToggleFTU, this, _1)) 1466 1466 ("Toggle status of FTU (this is mainly meant to be used in the GUI)" 1467 1467 "|Board[idx]:Index of the board (0-39)"); 1468 1468 1469 Add Configuration("SET_TRIGGER_INTERVAL", "I:1", kStateIdle)1469 AddEvent("SET_TRIGGER_INTERVAL", "I:1", kStateIdle) 1470 1470 (boost::bind(&StateMachineFTM::SetTriggerInterval, this, _1)) 1471 1471 ("Sets the trigger interval which is the distance between two consecutive artificial triggers." 1472 1472 "|interval[int]:The applied trigger interval is: interval*4ns+8ns"); 1473 1473 1474 Add Configuration("SET_TRIGGER_DELAY", "I:1", kStateIdle)1474 AddEvent("SET_TRIGGER_DELAY", "I:1", kStateIdle) 1475 1475 (boost::bind(&StateMachineFTM::SetTriggerDelay, this, _1)) 1476 1476 ("" 1477 1477 "|delay[int]:The applied trigger delay is: delay*4ns+8ns"); 1478 1478 1479 Add Configuration("SET_TIME_MARKER_DELAY", "I:1", kStateIdle)1479 AddEvent("SET_TIME_MARKER_DELAY", "I:1", kStateIdle) 1480 1480 (boost::bind(&StateMachineFTM::SetTimeMarkerDelay, this, _1)) 1481 1481 ("" 1482 1482 "|delay[int]:The applied time marker delay is: delay*4ns+8ns"); 1483 1483 1484 Add Configuration("SET_DEAD_TIME", "I:1", kStateIdle)1484 AddEvent("SET_DEAD_TIME", "I:1", kStateIdle) 1485 1485 (boost::bind(&StateMachineFTM::SetDeadTime, this, _1)) 1486 1486 ("" 1487 1487 "|dead_time[int]:The applied dead time is: dead_time*4ns+8ns"); 1488 1488 1489 Add Configuration("ENABLE_TRIGGER", "B:1", kStateIdle)1489 AddEvent("ENABLE_TRIGGER", "B:1", kStateIdle) 1490 1490 (boost::bind(&StateMachineFTM::Enable, this, _1, FTM::StaticData::kTrigger)) 1491 1491 ("Switch on the physics trigger" … … 1493 1493 1494 1494 // FIXME: Switch on/off depending on sequence 1495 Add Configuration("ENABLE_EXT1", "B:1", kStateIdle)1495 AddEvent("ENABLE_EXT1", "B:1", kStateIdle) 1496 1496 (boost::bind(&StateMachineFTM::Enable, this, _1, FTM::StaticData::kExt1)) 1497 1497 ("Switch on the triggers through the first external line" … … 1499 1499 1500 1500 // FIXME: Switch on/off depending on sequence 1501 Add Configuration("ENABLE_EXT2", "B:1", kStateIdle)1501 AddEvent("ENABLE_EXT2", "B:1", kStateIdle) 1502 1502 (boost::bind(&StateMachineFTM::Enable, this, _1, FTM::StaticData::kExt2)) 1503 1503 ("Switch on the triggers through the second external line" 1504 1504 "|Enable[bool]:Enable ext2 trigger (yes/no)"); 1505 1505 1506 Add Configuration("ENABLE_VETO", "B:1", kStateIdle)1506 AddEvent("ENABLE_VETO", "B:1", kStateIdle) 1507 1507 (boost::bind(&StateMachineFTM::Enable, this, _1, FTM::StaticData::kVeto)) 1508 1508 ("Enable veto line" 1509 1509 "|Enable[bool]:Enable veto (yes/no)"); 1510 1510 1511 Add Configuration("SET_TRIGGER_SEQUENCE", "C:3", kStateIdle)1511 AddEvent("SET_TRIGGER_SEQUENCE", "C:3", kStateIdle) 1512 1512 (boost::bind(&StateMachineFTM::SetTriggerSeq, this, _1)) 1513 1513 ("Setup the sequence of artificial triggers produced by the FTM" … … 1516 1516 "|LPext[int]:number of triggers of the external light pulser"); 1517 1517 1518 Add Configuration("SET_TRIGGER_COINCIDENCE", "S:1", kStateIdle)1518 AddEvent("SET_TRIGGER_COINCIDENCE", "S:1", kStateIdle) 1519 1519 (boost::bind(&StateMachineFTM::SetTriggerCoincidence, this, _1)) 1520 1520 ("Setup the coincidence condition for physcis triggers" 1521 1521 "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)"); 1522 1522 1523 Add Configuration("SET_TRIGGER_WINDOW", "S:1", kStateIdle)1523 AddEvent("SET_TRIGGER_WINDOW", "S:1", kStateIdle) 1524 1524 (boost::bind(&StateMachineFTM::SetTriggerWindow, this, _1)) 1525 1525 (""); 1526 1526 1527 Add Configuration("SET_CALIBRATION_COINCIDENCE", "S:1", kStateIdle)1527 AddEvent("SET_CALIBRATION_COINCIDENCE", "S:1", kStateIdle) 1528 1528 (boost::bind(&StateMachineFTM::SetCalibCoincidence, this, _1)) 1529 1529 ("Setup the coincidence condition for artificial (calibration) triggers" 1530 1530 "|N[int]:Number of requirered coincident triggers from sum-patches (1-40)"); 1531 1531 1532 Add Configuration("SET_CALIBRATION_WINDOW", "S:1", kStateIdle)1532 AddEvent("SET_CALIBRATION_WINDOW", "S:1", kStateIdle) 1533 1533 (boost::bind(&StateMachineFTM::SetCalibWindow, this, _1)) 1534 1534 (""); … … 1536 1536 1537 1537 // Load/save static data block 1538 T::Add Configuration("SAVE", "C", kStateIdle)1538 T::AddEvent("SAVE", "C", kStateIdle) 1539 1539 (boost::bind(&StateMachineFTM::SaveStaticData, this, _1)) 1540 1540 ("Saves the static data (FTM configuration) from memory to a file" 1541 1541 "|filename[string]:Filename (can include a path), .bin is automatically added"); 1542 1542 1543 T::Add Configuration("LOAD", "C", kStateIdle)1543 T::AddEvent("LOAD", "C", kStateIdle) 1544 1544 (boost::bind(&StateMachineFTM::LoadStaticData, this, _1)) 1545 1545 ("Loads the static data (FTM configuration) from a file into memory and sends it to the FTM" … … 1549 1549 1550 1550 // Verbosity commands 1551 T::Add Configuration("SET_VERBOSE", "B")1551 T::AddEvent("SET_VERBOSE", "B") 1552 1552 (boost::bind(&StateMachineFTM::SetVerbosity, this, _1)) 1553 1553 ("set verbosity state" 1554 1554 "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data"); 1555 1555 1556 T::Add Configuration("SET_HEX_OUTPUT", "B")1556 T::AddEvent("SET_HEX_OUTPUT", "B") 1557 1557 (boost::bind(&StateMachineFTM::SetHexOutput, this, _1)) 1558 1558 ("enable or disable hex output for received data" 1559 1559 "|hexout[bool]:disable or enable hex output for received data (yes/no)"); 1560 1560 1561 T::Add Configuration("SET_DYNAMIC_OUTPUT", "B")1561 T::AddEvent("SET_DYNAMIC_OUTPUT", "B") 1562 1562 (boost::bind(&StateMachineFTM::SetDynamicOut, this, _1)) 1563 1563 ("enable or disable output for received dynamic data (data is still broadcasted via Dim)" … … 1566 1566 1567 1567 // Conenction commands 1568 Add Configuration("DISCONNECT", kStateConnected, kStateIdle)1568 AddEvent("DISCONNECT", kStateConnected, kStateIdle) 1569 1569 (boost::bind(&StateMachineFTM::Disconnect, this)) 1570 1570 ("disconnect from ethernet"); 1571 1571 1572 Add Configuration("RECONNECT", "O", kStateDisconnected, kStateConnected, kStateIdle)1572 AddEvent("RECONNECT", "O", kStateDisconnected, kStateConnected, kStateIdle) 1573 1573 (boost::bind(&StateMachineFTM::Reconnect, this, _1)) 1574 1574 ("(Re)connect ethernet connection to FTM, a new address can be given" … … 1576 1576 1577 1577 // Other 1578 Add Transition(kCmdTest, "TEST", "O")1578 AddEvent(kCmdTest, "TEST", "O") 1579 1579 (boost::bind(&StateMachineFTM::Test, this, _1)) 1580 1580 ("Just for test purpose, do not use");
Note:
See TracChangeset
for help on using the changeset viewer.