The class has little behaviour and only does sanity checks where it is possible. It is therefore assumed that users of this class are aware of and conform to a properties definition for a given property identifier.
There are 2 groups of properties, General Channel Properties and Specific Channel Properties.
General Channel Properties are properties that are supported by all channels. These are defined in sensrvgeneralproperties.h. Specific Channel Properties are properties that are supported by specific channel types as required. These are defined in the relevant headers files.
The property identifier uniquely identifies the property within a channel. These property ids must fall into the relevant range specified by TSensrvPropertyRangeUsage. Each property will have a constant defined for its identifier. e.g. KSensrvPropIdDataRate.
A Sensor channel which supports data rates within a given range can use one Data Rate property. The range is defined using the property's maximum and minimum value. E.g. A sensor channel supports a data range from 10Hz to 100Hz and all values within this range are feasible. To implement this use one Data Rate property with a minimum value 10 and a maximum value of 100.
A Sensor channel which supports discrete data rates can use the Data Rate property as an array. E.g. A sensor channel supports the following data rates 10Hz, 40Hz and 50Hz. To implement this four different Data Rate properties are needed. The following table shows the content of the four properties, only mandatory attributes are shown.
The first property (first row in table above) is the header for the property array. It defines that this property is an array property. The attributes of this property are:
Array index: -2 means that the property is an array property Value: 1 means that current value of the property is defined by the property with an array index of 1. The value is 40Hz in this example. Min value 0 is the start index of the property array Max value: 2 is the last index of the property array Read only: EFalse means that the properties current value can be changed,
In this example the possible values of the property are 0, 1, and 2 which corresponds to data rates of 10Hz, 40Hz and 50Hz.
Accelerometer data definition. TSensrvAccelerometerAxisDataIndexes is used to provide an index that relates to each of the class fields.
|
Public Member Functions |
IMPORT_C | TSensrvProperty () |
| Default Constructor.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TInt aValue, const TInt aMaxValue, const TInt aMinValue, const TBool aReadOnly, const TSensrvPropertyType aPropertyType) |
| Constructor to create complete integer type property.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TInt aValue) |
| Constructor to create property object for setting integer property value.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TReal aValue, const TReal aMaxValue, const TReal aMinValue, const TBool aReadOnly, const TSensrvPropertyType aPropertyType) |
| Constructor to create complete TReal type of property.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TReal aValue) |
| Constructor to create property object for setting real property value.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TDesC8 &aValue, const TBool aReadOnly, const TSensrvPropertyType aPropertyType) |
| Constructor to create complete buffer property.
|
IMPORT_C | TSensrvProperty (const TSensrvPropertyId aPropertyId, const TInt aItemIndex, const TDesC8 &aValue) |
| Constructor to create property object for setting buffer property value.
|
IMPORT_C void | SetPropertyId (TSensrvPropertyId aPropertyId) |
| Set the property Id for the property.
|
IMPORT_C TSensrvPropertyId | GetPropertyId () const |
| Return Property Id.
|
IMPORT_C void | SetItemIndex (TInt aItemIndex) |
| Set the property item index for the property.
|
IMPORT_C TInt | PropertyItemIndex () const |
| Get the property item index number.
|
IMPORT_C TSensrvPropertyType | PropertyType () const |
| Return property type.
|
IMPORT_C TBool | ReadOnly () const |
| Checks if the property is readonly.
|
IMPORT_C void | SetReadOnly (TBool aReadOnly) |
| Set the readonly information for the property.
|
IMPORT_C void | SetValue (const TInt aValue) |
| Set integer property value.
|
IMPORT_C void | SetValue (const TReal aValue) |
| Set real property value.
|
IMPORT_C void | SetValue (const TDesC8 &aValue) |
| Set buffer property value.
|
IMPORT_C void | GetValue (TInt &aValue) const |
| Get integer property value.
|
IMPORT_C void | GetValue (TReal &aValue) const |
| Get real property value.
|
IMPORT_C void | GetValue (TDes8 &aValue) const |
| Get buffer property value.
|
IMPORT_C TDes8 & | GetValueRef () |
| Get reference to buffer property value.
|
IMPORT_C void | GetMaxValue (TInt &aMaxValue) const |
| Get property maximum value of integer property.
|
IMPORT_C void | GetMinValue (TInt &aMinValue) const |
| Get property minimum value of integer property.
|
IMPORT_C void | SetMaxValue (TInt aMaxValue) |
| Set property maximum value of integer property.
|
IMPORT_C void | SetMinValue (TInt aMinValue) |
| Set property minimum value of integer property.
|
IMPORT_C void | GetMaxValue (TReal &aMaxValue) const |
| Get property maximum value of real property.
|
IMPORT_C void | GetMinValue (TReal &aMinValue) const |
| Get property minimum value of real property.
|
IMPORT_C void | SetMaxValue (const TReal &aMaxValue) |
| Set property maximum value of real property.
|
IMPORT_C void | SetMinValue (const TReal &aMinValue) |
| Set property minimum value of real property.
|
IMPORT_C void | SetSecurityInfo (const TSecurityInfo &aSecurityInfo) |
| Set security info of the property.
|
IMPORT_C TSecurityInfo | GetSecurityInfo () const |
| Get security info of the property.
|
IMPORT_C void | SetArrayIndex (const TInt aArrayIndex) |
| Set array index of the property.
|
IMPORT_C TInt | GetArrayIndex () const |
| Get array index of the property.
|