Inherits ilog::CLoggerComponentBase, and iprm::CParamsSet.
Selection-based device configuration component.
CDeviceIdBasedConfigurationComp implements the Adapter Pattern to provide device-specific configuration as an iprm::IParamsSet that automatically synchronizes with device selection. It bridges device configuration management with parameter-based UI frameworks.
This component observes device selection, configuration changes, and device state, maintaining bidirectional synchronization between the UI parameter set and the device's persistent configuration.
- Purpose:
- Enables seamless UI binding to device configurations by:
- Automatically loading configuration when device is selected
- Synchronizing parameter changes back to configuration manager
- Handling device state transitions (updating when device opens/closes)
- Preventing recursive updates with FlagLocker pattern
- Key Features:
- Automatic Synchronization: Bidirectional sync between UI params and device config
- Selection Awareness: Updates when selected device changes
- State Tracking: Refreshes configuration on device state changes
- Anti-Recursion: FlagLocker prevents infinite update loops
- Change Notifications: Triggers updates through model update binders
- Component Configuration:
-
- Synchronization Flow:
User selects device
↓
Configuration loaded from manager
↓
Parameters updated in UI
↓
User modifies parameter
↓
Configuration saved to manager
↓
Change notification fired
- Usage Pattern:
iprm::IParamsSet* pParams = pConfig;
QVariant value = pParams->GetParamValue("BaudRate");
pParams->SetParamValue("BaudRate", 115200);
Selection-based device configuration component.
- See also
- IDeviceConfigurationManager
-
imtbase::ISelection
-
CDeviceIdBasedConfigurationManagerComp
Definition at line 89 of file CDeviceIdBasedConfigurationComp.h.