diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-4B709839-8EEF-4AD2-9868-9AF0176B1E5B.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-4B709839-8EEF-4AD2-9868-9AF0176B1E5B.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,75 @@ + + + + + +Using +Sensor Channels APIsThe Sensor Channel establishes a data exchange connection between +the sensor framework and hardware using the sensor channel APIs. + +Include the library SensrvClient.lib in +your .mmp file. + +Include the following +header files, as they are required for accessing sensor channels regardless +of the channel type: +
    +
  • sensrvchannel.h

  • +
  • sensrvchannelinfo.h

  • +
  • sensrvtypes.h

  • +
  • sensrvchannelfinder.h

  • +
  • sensrvdatalistener.h

  • +
+
+Retrieve details +about the required sensor channel. For details. see Querying +for Sensor Channels. + +Connect to the sensor +by opening a connection with the sensor channel. + +Create an instance +of CSensrvChannel and specify the instance of TSensrvChannelInfo returned +by CSensrvChannelFinder::FindChannelsL(), as a parameter +in the NewL() constructor. + CSensrvChannel* sensorChannel; + sensorChannel = CSensrvChannel::NewL(channelInfoList[0]);// channelInfoList is +// returned by the CSensrvChannelFinder::FindChannelsL()funtion + +Open the sensor +channel using CSensrvChannel::OpenChannelL() function. +channel->OpenChannelL(); + + + +Perform any of the +following operations: +
    +
  • Receive data from +sensors
  • +
  • Listen for channel +changes
  • +
  • Retrieve channel +properties
  • +
  • Set channel properties
  • +
  • Listen for channel +property changes
  • +
  • Receive channel +data based on conditions
  • +
+
+Close the channel. +channel->CloseChannel(); A +channel must be closed when not required, as it reduces power consumption +of the Symbian device. An open sensor channel keeps the device processor active +each time data arrives. Therefore, the processor does not change to idle state +even when the device user is not performing any operations on the device. + +
+
\ No newline at end of file