Changeset 11112 for trunk/FACT++/src
- Timestamp:
- 06/22/11 17:50:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fadctrl.cc
r11109 r11112 1108 1108 if (it==fBoards.end()) 1109 1109 return T::GetCurrentState(); 1110 1111 EnableConnection(it->second, enable); 1112 ConnectSlot(it->first, enable ? it->second.first : tcp::endpoint()); 1113 1114 return T::GetCurrentState(); 1115 } 1116 1117 int ToggleSlot(const EventImp &evt) 1118 { 1119 if (!CheckEventSize(evt.GetSize(), "ToggleSlot", 2)) 1120 return T::kSM_FatalError; 1121 1122 const int16_t slot = evt.GetShort(); 1123 1124 const BoardList::iterator it = GetSlot(slot); 1125 if (it==fBoards.end()) 1126 return T::GetCurrentState(); 1127 1128 const bool enable = it->second.second->IsDisconnected() && fStatus2[slot]==0; 1110 1129 1111 1130 EnableConnection(it->second, enable); … … 1460 1479 ("Disconnect a connected slot."); 1461 1480 1481 T::AddEvent("TOGGLE", "S:1", FAD::kDisconnected, FAD::kConnecting, FAD::kConnected) 1482 (boost::bind(&StateMachineFAD::ToggleSlot, this, _1)) 1483 (""); 1484 1462 1485 T::AddEvent("CLOSE_OPEN_FILES", FAD::kConnecting, FAD::kConnected) 1463 1486 (boost::bind(&StateMachineFAD::CloseOpenFiles, this))
Note:
See TracChangeset
for help on using the changeset viewer.