354 // |
354 // |
355 EXPORT_C void TSensrvProperty::GetValue( TReal& aValue ) const |
355 EXPORT_C void TSensrvProperty::GetValue( TReal& aValue ) const |
356 { |
356 { |
357 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetValue return %e" ), iRealValue ) ); |
357 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetValue return %e" ), iRealValue ) ); |
358 |
358 |
359 __ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
359 //__ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
360 |
360 |
361 aValue = iRealValue; |
361 if( ESensrvRealProperty == iPropertyType ) |
|
362 aValue = iRealValue; |
|
363 else if( ESensrvIntProperty == iPropertyType ) |
|
364 aValue = iIntValue; |
362 } |
365 } |
363 |
366 |
364 // --------------------------------------------------------------------------- |
367 // --------------------------------------------------------------------------- |
365 // TSensrvProperty::GetValue() |
368 // TSensrvProperty::GetValue() |
366 // --------------------------------------------------------------------------- |
369 // --------------------------------------------------------------------------- |
465 // |
468 // |
466 EXPORT_C void TSensrvProperty::GetMaxValue( TReal& aMaxValue ) const |
469 EXPORT_C void TSensrvProperty::GetMaxValue( TReal& aMaxValue ) const |
467 { |
470 { |
468 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetMaxValue return %e" ), iRealValueMax ) ); |
471 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetMaxValue return %e" ), iRealValueMax ) ); |
469 |
472 |
470 __ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
473 //__ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
471 |
474 |
472 aMaxValue = iRealValueMax; |
475 if( ESensrvRealProperty == iPropertyType ) |
|
476 aMaxValue = iRealValueMax; |
|
477 else if ( ESensrvIntProperty == iPropertyType ) |
|
478 aMaxValue = iIntValueMax; |
|
479 |
473 } |
480 } |
474 |
481 |
475 // --------------------------------------------------------------------------- |
482 // --------------------------------------------------------------------------- |
476 // TSensrvProperty::GetMinValue() |
483 // TSensrvProperty::GetMinValue() |
477 // --------------------------------------------------------------------------- |
484 // --------------------------------------------------------------------------- |
478 // |
485 // |
479 EXPORT_C void TSensrvProperty::GetMinValue( TReal& aMinValue ) const |
486 EXPORT_C void TSensrvProperty::GetMinValue( TReal& aMinValue ) const |
480 { |
487 { |
481 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetMinValue return %e" ), iRealValueMin ) ); |
488 API_TRACE( ( _L( "Sensor Util - TSensrvProperty::GetMinValue return %e" ), iRealValueMin ) ); |
482 |
489 |
483 __ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
490 //__ASSERT_ALWAYS( ESensrvRealProperty == iPropertyType, User::Panic( KSensrvPropertyPanic, 0 )); |
484 |
491 if( ESensrvRealProperty == iPropertyType ) |
485 aMinValue = iRealValueMin; |
492 aMinValue = iRealValueMin; |
|
493 else if( ESensrvIntProperty == iPropertyType ) |
|
494 aMinValue = iIntValueMin; |
486 } |
495 } |
487 |
496 |
488 // --------------------------------------------------------------------------- |
497 // --------------------------------------------------------------------------- |
489 // TSensrvProperty::SetMaxValue |
498 // TSensrvProperty::SetMaxValue |
490 // --------------------------------------------------------------------------- |
499 // --------------------------------------------------------------------------- |