|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.AccelerometerData
Encapsulates accelerometer sensor readings. Contains some or all of the following acceleration information:
AccelerometerSensor.ORIENTATION_TOP_UP or AccelerometerSensor.ORIENTATION_LEFT_UP.
getXAccHistory(), getYAccHistory() and
getZAccHistory() have the most recent acceleration value stored at
index 0, while the oldest value is stored at the end of the array. AccelerometerSensor.
The data object is populated based on the channel configuration (see AccelerometerChannelConfig).
For example, if an application is only interested in orientation information, raw acceleration sample values are not provided.
AccelerometerChannelConfig| Method Summary | ||
long |
getLastTimestamp()
Returns the timestamp for the last raw acceleration measurement. |
|
short |
getLastXAcceleration()
Returns the latest acceleration along X axis. |
|
short |
getLastYAcceleration()
Returns the latest acceleration along Y axis. |
|
short |
getLastZAcceleration()
Returns the latest acceleration along Z axis. |
|
int |
getNewBatchLength()
Returns count of the new samples in the historical array since the last query call. |
|
int |
getOrientation()
Returns the last known orientation of the handheld. |
|
long[] |
getSampleTsHistory()
Returns sample timings. |
|
short[] |
getXAccHistory()
Returns historical readings for acceleration along the X axis. |
|
short[] |
getYAccHistory()
Returns historical readings for acceleration along the Y axis. |
|
short[] |
getZAccHistory()
Returns historical readings for acceleration along the Z axis. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public long getLastTimestamp()
throws NullPointerException
NullPointerException - if the data is retrieved from orientation only channel, resulting in
no raw sample buffers being allocated.
public short getLastXAcceleration()
throws NullPointerException
NullPointerException - if the data is retrieved from orientation only channel, resulting in
no raw sample buffers being allocated.
public short getLastYAcceleration()
throws NullPointerException
NullPointerException - if the data is retrieved from orientation only channel, resulting in
no raw sample buffers being allocated.
public short getLastZAcceleration()
throws NullPointerException
NullPointerException - if the data is retrieved from orientation only channel resulting in
no raw sample buffers being allocated.public int getNewBatchLength()
public int getOrientation()
AccelerometerSensor class if queried; -1 otherwiseAccelerometerSensorpublic long[] getSampleTsHistory()
null otherwise.public short[] getXAccHistory()
null otherwise.public short[] getYAccHistory()
null otherwise.public short[] getZAccHistory()
null otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.