11 #define SAVE_SENSORS "sensors.dat" 17 #if( FMI_SUPPORT_A617 ) 26 SensorList::SensorList():
29 std::map<uint32,SensorListItem>::const_iterator it = mSensors.begin();
30 for( ; it != mSensors.end(); it++ )
32 if( mSensors.get( it->first ).isValid() )
34 mSensorIndexInList[ mSensors.get( it->first ).getDisplayIndex() ] = mSensors.get( it->first ).getUniqueId();
44 std::map<uint8,uint32>::const_iterator it = mSensorIndexInList.find( item.
getDisplayIndex() );
45 if( ( it != mSensorIndexInList.end() ) && it->second != item.
getUniqueId() && item.
isValid() )
47 std::map<uint8,uint32>::const_iterator curr;
48 std::map<uint8,uint32>::const_iterator end;
56 curr = mSensorIndexInList.find( mSensors.get( item.
getUniqueId() ).getDisplayIndex() );
64 end = mSensorIndexInList.find( mSensors.get( item.
getUniqueId() ).getDisplayIndex() );
71 curr = mSensorIndexInList.end();
78 di = mSensors.get( curr->second ).getDisplayIndex();
83 mSensors.get( curr->second ).setDisplayIndex( di );
84 mSensorIndexInList[ mSensors.get( curr->second ).getDisplayIndex() ] = mSensors.get( curr->second ).getUniqueId();
91 di = mSensors.get( curr->second ).getDisplayIndex();
96 mSensors.get( curr->second ).setDisplayIndex( di );
97 mSensorIndexInList[ mSensors.get( curr->second ).getDisplayIndex() ] = mSensors.get( curr->second ).getUniqueId();
102 mSensorIndexInList.erase( mSensors.get( item.
getUniqueId() ).getDisplayIndex() );
105 mSensors.put( item );
BOOL isValid() const
Check whether this item is valid.
Data structure to hold details of an A617 sensor that the server needs to keep.
uint8 getDisplayIndex() const
Get display index.
unsigned char uint8
8-bit unsigned integer
uint32 getUniqueId() const
Get the unique id.