Changeset 19633
- Timestamp:
- 12/11/06 19:53:38 (2 years ago)
- Files:
-
- juggler/trunk/modules/gadgeteer/gadget/InputManager.cpp (modified) (3 diffs)
- juggler/trunk/modules/gadgeteer/gadget/InputManager.h (modified) (1 diff)
- juggler/trunk/modules/gadgeteer/gadget/Type/DeviceInterface.cpp (modified) (1 diff)
- juggler/trunk/modules/gadgeteer/gadget/Type/DeviceInterface.h (modified) (2 diffs)
- juggler/trunk/modules/jackal/rtrc/jccl/RTRC/ConfigManager.cpp (modified) (1 diff)
- juggler/trunk/modules/jackal/rtrc/jccl/RTRC/ConfigManager.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/gadgeteer/gadget/InputManager.cpp
r19603 r19633 79 79 InputManager::~InputManager() 80 80 { 81 shutdown(); 82 } 83 84 void InputManager::shutdown() 85 { 81 86 for (tDevTableType::iterator a = mDevTable.begin(); a != mDevTable.end(); ++a) // Stop all devices 82 87 { … … 273 278 updateAllDevices(); // Update all the input data 274 279 updateAllProxies(); // Update all the input data 275 BaseDeviceInterface::refreshAll Devices();// Refresh all the device interface handles280 BaseDeviceInterface::refreshAllInterfaces(); // Refresh all the device interface handles 276 281 vprDEBUG(gadgetDBG_INPUT_MGR,vprDBG_STATE_LVL) 277 282 << "Updated all devices" << std::endl << vprDEBUG_FLUSH; … … 330 335 updateAllDevices(); // Update all the input data 331 336 updateAllProxies(); // Update all the input data 332 BaseDeviceInterface::refreshAll Devices(); // Refresh all the device interface handles337 BaseDeviceInterface::refreshAllInterfaces(); // Refresh all the device interface handles 333 338 vprDEBUG(gadgetDBG_INPUT_MGR,vprDBG_VERB_LVL) 334 339 << "InputManager::configRemove(): Updated all data" << std::endl juggler/trunk/modules/gadgeteer/gadget/InputManager.h
r19603 r19633 126 126 bool configureDevice(jccl::ConfigElementPtr element); 127 127 128 /** 129 * Shutdown all devices and proxies. 130 */ 131 void shutdown(); 128 132 private: 129 133 /** juggler/trunk/modules/gadgeteer/gadget/Type/DeviceInterface.cpp
r18824 r19633 143 143 } 144 144 145 void BaseDeviceInterface::refreshAll Devices()145 void BaseDeviceInterface::refreshAllInterfaces() 146 146 { 147 147 for ( unsigned int i = 0; i < mAllocatedDevices.size(); ++i ) juggler/trunk/modules/gadgeteer/gadget/Type/DeviceInterface.h
r18824 r19633 77 77 * Refreshes the interface based on the current configuration. 78 78 * 79 * This method is called by refreshAll Devices when system79 * This method is called by refreshAllInterfaces when system 80 80 * @post (mProxyIndex == -1) ==> Proxy not initialized yet.<br> 81 81 * (mProxyIndex != -1) ==> mProxyName has name of device && local … … 103 103 public: 104 104 /** Refreshes all the known device interface objects. */ 105 static void refreshAll Devices();105 static void refreshAllInterfaces(); 106 106 107 107 private: // Static information juggler/trunk/modules/jackal/rtrc/jccl/RTRC/ConfigManager.cpp
r19490 r19633 743 743 } 744 744 745 void ConfigManager::shutdown(bool attemptRemoval) 746 { 747 // Attempt to remove configutation elements 748 // the "correct" way. 749 if (attemptRemoval) 750 { 751 mActiveLock.acquire(); 752 addConfigurationRemovals(&mActiveConfig); 753 mActiveLock.release(); 754 755 unsigned num_processed(0); 756 757 do 758 { 759 num_processed = attemptReconfiguration(); 760 } 761 while (num_processed > 0); 762 } 763 764 // Clear all pending configuration elements. 765 mPendingLock.acquire(); 766 mPendingConfig.clear(); 767 mPendingLock.release(); 768 769 // Clear all active configuration elements. 770 mActiveLock.acquire(); 771 mActiveConfig.vec().clear(); 772 mActiveConfig = Configuration(); 773 mActiveLock.release(); 774 775 // Clear all incoming configuration elements. 776 mIncomingLock.acquire(); 777 mIncomingConfig.clear(); 778 mIncomingLock.release(); 779 780 // Clear all element handlers. 781 mElementHandlers.clear(); 782 783 // Reset all count values. 784 mPendingCountMutex.acquire(); 785 mPendingCheckCount = 0; 786 mLastPendingSize = 0; 787 mPendingCountMutex.release(); 788 } 789 745 790 int ConfigManager::attemptReconfiguration() 746 791 { juggler/trunk/modules/jackal/rtrc/jccl/RTRC/ConfigManager.h
r19281 r19633 436 436 //@} 437 437 438 /** 439 * Shutdown the Configuration system. Removes all new, pending, and active 440 * configuration elements. 441 * 442 * @param attemptRemoval If true, add all active ConfigElements as removals 443 * and attempt to reconfig. 444 */ 445 void shutdown(bool attemptRemoval = false); 446 438 447 void setRemoteReconfigPlugin(jccl::RemoteReconfig* plugin); 439 448
