Milestone #11650: Mar 2016 Release A - 201603A
201602A Replace Vector of Monitors with Map.
- We currently iterate over a vector of monitors to associate a logical ID (SSDN Channel field) with its corresponding hardware ADC and Channel. Replacing the vector with a map container provides simplified, more readable code by removing iteration over the vector. The map key is either the Acnet device SSDN Channel field or a unique index if there is not an associated Acnet device.
- As part of this modification, the usage of the parameter name ssdnCh will also be modified throughout the code to become intId, an abbreviation of intensityId, where intId is a more generic, less specific, logical identifier of the ADC/Channel pair. The value intId must be unique and will correspond to an associated Acnet device SSDN Channel field if one is required.
intId ties the following calls to each other:
addMirrToroid( uint16_t adcId, uint16_t adcCh, uint16_t intId ); addATRLatchDev( uint16_t latchId, uint16_t intId, ... ); intensityread( uint16_t intId ); std::map<uint16_t, IntMonitorDev*> _monitorTable; // key intId
#1 Updated by Roger Tokarek almost 5 years ago
There are approximately 32 VMEInt functions that access class IntMonitorDev via the vector _monitors. Re-estimating the time for this project from 4 hours to 24 - includes possible addition of a map replacement of a vector in DAQPool to extend and complement the changes in VMEInt.