diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-06-25 09:58:00 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-06-25 09:58:00 +0000 |
commit | efecad9df3e8847f45a4284ec717c32260460adc (patch) | |
tree | 703aab4408f54e4933869252406a3f4f77ccb9d4 /src/ats/gnunet-service-ats_addresses.h | |
parent | c83d77d730a4ae94dff88ec0c6801fde14490f65 (diff) | |
download | gnunet-efecad9df3e8847f45a4284ec717c32260460adc.tar.gz gnunet-efecad9df3e8847f45a4284ec717c32260460adc.zip |
completed normalizing with min max handlin
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.h')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h index 8c462ed8c..4eddd5290 100644 --- a/src/ats/gnunet-service-ats_addresses.h +++ b/src/ats/gnunet-service-ats_addresses.h | |||
@@ -233,12 +233,30 @@ | |||
233 | 233 | ||
234 | struct GAS_Addresses_Handle; | 234 | struct GAS_Addresses_Handle; |
235 | 235 | ||
236 | 236 | /** | |
237 | * Information provided by ATS normalization | ||
238 | */ | ||
237 | struct GAS_NormalizationInfo | 239 | struct GAS_NormalizationInfo |
238 | { | 240 | { |
239 | unsigned int index; | 241 | /** |
240 | uint32_t avg; | 242 | * Next index to use in averaging queue |
243 | */ | ||
244 | unsigned int avg_queue_index; | ||
245 | |||
246 | /** | ||
247 | * Averaging queue | ||
248 | */ | ||
241 | uint32_t atsi_abs[GAS_normalization_queue_length]; | 249 | uint32_t atsi_abs[GAS_normalization_queue_length]; |
250 | |||
251 | /** | ||
252 | * Averaged ATSI values from queue | ||
253 | */ | ||
254 | uint32_t avg; | ||
255 | |||
256 | /** | ||
257 | * Normalized values from queue to a range of values [1.0...2.0] | ||
258 | */ | ||
259 | double norm; | ||
242 | }; | 260 | }; |
243 | 261 | ||
244 | /** | 262 | /** |
@@ -354,7 +372,7 @@ struct ATS_Address | |||
354 | 372 | ||
355 | /** | 373 | /** |
356 | * Normalized ATS performance information for this address | 374 | * Normalized ATS performance information for this address |
357 | * Each entry can be accessed using the GNUNET_ATS_QualityProperties index | 375 | * Each entry can be accessed using the GNUNET_ATS_QualityProperties avg_queue_index |
358 | */ | 376 | */ |
359 | struct GAS_NormalizationInfo atsin[GNUNET_ATS_QualityPropertiesCount]; | 377 | struct GAS_NormalizationInfo atsin[GNUNET_ATS_QualityPropertiesCount]; |
360 | }; | 378 | }; |