Sensor Class Reference

class Sensor

Interface for Sensor Used for controlling sensors

N/A
Since
S60 3.2
Public Member Functions
~Sensor()
intAddCondition(void **, int, double, double, int, int)
intCancelDataListening()
voidCloseChannel()
intOpenChannel(SensorListener *)
intRemoveCondition(void *)
intStartConditionListening(int)
intStartDataListening(SensorData **, int, long, bool, bool, bool)
voidStartServer()
intStopConditionListening()
voidStopServer()

Constructor & Destructor Documentation

~Sensor()

~Sensor()[inline, virtual]

Destructor, to allow deletion through this interface

Member Functions Documentation

AddCondition(void **, int, double, double, int, int)

intAddCondition(void **aHandle,
intaChannelId,
doubleaLowerLimit,
doubleaUpperLimit,
intaLowerOp,
intaUpperOp
)[pure virtual]

Adds condition and starts condition listening

Parameters

void ** aHandlepointer to created condition object
int aChannelIdchannel index
double aLowerLimitlimit or lower limit of range
double aUpperLimitupper limit or discarded in case of LimitCondition
int aLowerOpoperator type for limit or lower limit in range
int aUpperOpupper limit operator or discarded in case of LimitCondition

CancelDataListening()

intCancelDataListening()[pure virtual]

Cancel listening to data

CloseChannel()

voidCloseChannel()[pure virtual]

Closes channel to sensor

OpenChannel(SensorListener *)

intOpenChannel(SensorListener *aListener)[pure virtual]

Opens channel to sensor, must be called before starting listening, sets listener

Parameters

SensorListener * aListener

RemoveCondition(void *)

intRemoveCondition(void *aHandle)[pure virtual]

Removes condition from native side

Parameters

void * aHandlepointer to condition object to remove

StartConditionListening(int)

intStartConditionListening(intaListeningType)[pure virtual]

Starts condition listening

Parameters

int aListeningType

StartDataListening(SensorData **, int, long, bool, bool, bool)

intStartDataListening(SensorData **aData,
intaBufferSize,
longaBufferingPeriod,
boolaTimestampsIncluded,
boolaValiditiesIncluded,
boolaIsOneShot
)[pure virtual]

Starts listening the data

Parameters

SensorData ** aData
int aBufferSizenumber of data values listened
long aBufferingPeriod
bool aTimestampsIncludedif true timestamps should be included in returned Data objects
bool aValiditiesIncludedif true validities should be included in returned Data objects
bool aIsOneShot

StartServer()

voidStartServer()[pure virtual]

Starts the server for listening the events, does nothing if not needed

StopConditionListening()

intStopConditionListening()[pure virtual]

Starts condition listening

StopServer()

voidStopServer()[pure virtual]

Stops server