Sensor channel information

The Sensor Service API uses objects to represent sensor channels. One object contains the information for one sensor channel (see the following table). The Sensor Service API methods use these sensor channel objects as follows:

  • FindSensorChannel

    The ReturnValue property of the result object is an iterator containing the requested sensor channel information. Each item (object) in the iterator corresponds to one sensor channel matching the search criteria specified for the FindSensorChannel call.

  • RegisterForNotification

    The criteria.ChannelInfoMap property used for input is a sensor channel object. It specifies the channel from which the RegisterForNotification call registers to receive data.

  • GetChannelProperty

    The criteria.ChannelInfoMap property used for input is a sensor channel object. It specifies the channel of the property about which the GetChannelProperty call retrieves information.

Table: Sensor channel object properties

Property

Description

Type

Value

ChannelId

Specifies the inique identifier of the channel.

number

 

ContextType

Specifies the context in which the channel is available.

number

Possible values:

  • 0 - Not defined

  • 1 - Ambient sensor, for example to measure pressure

  • 2 - Provides information on the device

  • 3 - Measures user-initiated stimulus

Quantity

Specifies the quantity being sensed.

number

Possible values:

  • 0 - Not defined

  • 10 - Acceleration

  • 11 - Tapping

  • 12 - Orientation

  • 13 - Rotation

  • 14 - Magnetic

  • 15 - Tilt

ChannelType

Specifies the type of the channel. This is the unique identifier of the Sensor Subsystem (SSY) that provides data for this channel.

Each physical sensor registers to the S60 sensor framework as a Sensor Subsystem that provides specific sensor data. If the physical sensor provides multiple types of data, it can register a separate SSY for each type. For example, a sensor that provides both orientation and rotation data can register one SSY for orientation data and another for rotation data. ChannelType thus identifies a particular SSY representing the channel.

number

 

Location

Specifies the location of the sensor related to the channel.

string

 

VendorId

Specifies the vendor ID of the sensor related to the channel.

string

 

DataItemSize

Specifies the data item size delivered in the channel.

number

 

ChannelDataTypeId

Specifies the unique data type identifier for the data being sensed.

number