public class Device extends IDevice
| Constructor and Description |
|---|
Device(IConnection connection,
IResponseInterface response)
Constructs logical device object using given connection and forwards responses to given handler object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkForMessages()
Triggers communication with the device and checks whether there are any incoming messages from the device.
|
void |
factoryReset()
Requests loading factory settings into device RAM memory.
|
void |
getAccCalibMatrix()
Requests calibration matrices used for accelerometer measurements.
|
void |
getBaudRate()
Requests sending actual baud rate used for UART interface..
|
void |
getCalibAccData()
Requests sending post-calibration values of accelerometer measurements.
|
void |
getCalibGyrData()
Requests sending post-calibration values of gyroscope measurements.
|
void |
getCalibMagData()
Requests sending post-calibration values of magnetometer measurements.
|
void |
getEulerData()
Requests information about actual device spatial orientation expressed in form of Euler angles.
|
void |
getFilterAccMatrix()
Requests Kalman filter coeficiences for accelerometer measurement noise.
|
void |
getFilterGyrMatrix()
Requests Kalman filter coeficiences for gyroscope measurement noise.
|
void |
getFilterMagMatrix()
Requests Kalman filter coeficiences for magnetometer measurement noise.
|
void |
getFilterProcMatrix()
Requests Kalman filter coeficiences for process noise.
|
void |
getGyrCalibMatrix()
Requests calibration matrices used for gyroscope measurements.
|
void |
getI2cAddress()
Requests sending actual I2C device address.
|
void |
getMagCalibMatrix()
Requests calibration matrices used for magnetometer measurements.
|
void |
getNormAccData()
Requests sending normalized values of accelerometer measurements.
|
void |
getNormGyrData()
Requests sending normalized values of gyroscope measurements.
|
void |
getNormMagData()
Requests sending normalized values of magnetometer measurements.
|
void |
getQuatData()
Requests information about actual device spatial orientation expressed in form of quaternion.
|
void |
getRawAccData()
Requests sending RAW type of accelerometer measurements.
|
void |
getRawGyrData()
Requests sending RAW type of gyroscope measurements.
|
void |
getRawMagData()
Requests sending RAW type of magnetometer measurements.
|
void |
getRotRateData()
Requests actual rotation rate information from the device.
|
void |
getStats() |
void |
getSysInfo()
Requests sending back information on the device type and firmware version.
|
void |
getTemperature()
Requests actual tempereature data.
|
void |
reboot()
Requests the device to reboot.
|
void |
resetGyr()
Resets gyroscope bias estimates.
|
void |
setAccCalibMatrix(float[] cal,
float[] bias)
Changes accelerometer calibration settings the device is using at the moment.
|
void |
setBaudRate(short rate)
Changes baud rate for UART interface.
|
void |
setFilterAccMatrix(float[] mat)
Changes Kalman filter coeficiences for accelerometer sensor.
|
void |
setFilterGyrMatrix(float[] mat)
Changes Kalman filter coeficiences for gyroscope sensor.
|
void |
setFilterMagMatrix(float[] mat)
Changes Kalman filter coeficiences for magnetometer sensor.
|
void |
setFilterProcMatrix(float[] mat) |
void |
setGyrCalibMatrix(float[] cal,
float[] bias)
Changes gyroscope calibration settings the device is using at the moment.
|
void |
setI2cAddress(short address)
Changes 7-bit address as an I2C slave device.
|
void |
setMagCalibMatrix(float[] cal,
float[] bias)
Changes magnetometer calibration settings the device is using at the moment.
|
void |
writeFlash()
Saves current settings in device RAM into internal non-volotile flash memory.
|
public Device(IConnection connection, IResponseInterface response)
connection - A connection that this device object will use to communicate with physical device.response - A response object that will receive response messages from the device.
Note: Make sure you maintain lifecycle of given connection and response interfaces accordingly with the lifecycle of the Device class instance itself.public void getSysInfo()
public void getQuatData()
public void getEulerData()
public void getRotRateData()
public void reboot()
public void factoryReset()
public void setAccCalibMatrix(float[] cal,
float[] bias)
cal - Array of 9 matrix (3x3) elements for missalignment calibration.bias - Array of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.public void setMagCalibMatrix(float[] cal,
float[] bias)
cal - Array of 9 matrix (3x3) elements for missalignment calibration.bias - Array of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.public void setGyrCalibMatrix(float[] cal,
float[] bias)
cal - Array of 9 matrix (3x3) elements for missalignment calibration.bias - Array of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.public void setFilterMagMatrix(float[] mat)
mat - a11,a22 and a33 matrix coeficiences for magnetometer measurement noise matrix.public void setFilterAccMatrix(float[] mat)
mat - a11,a22 and a33 matrix coeficiences for magnetometer accelerometer noise matrix.public void setFilterGyrMatrix(float[] mat)
mat - a11,a22 and a33 matrix coeficiences for magnetometer gyroscope noise matrix.public void setFilterProcMatrix(float[] mat)
mat - An array with 7 matrix elements for the filter process matric to set.public void getFilterMagMatrix()
public void getFilterAccMatrix()
public void getFilterGyrMatrix()
public void getFilterProcMatrix()
public void getTemperature()
public void setBaudRate(short rate)
rate - Integer value representing new baud rate.
Note: This call changes settings stored in device RAM. However, the device takes into account baud rate only at the power-on or reset event. So this call should be followed by writeFlash().public void setI2cAddress(short address)
address - New I2c device address.
Note: This call changes settings stored in device RAM. However, the device takes into account baud rate only at the power-on or reset event. So this call should be followed by writeFlash().public void getI2cAddress()
public void getBaudRate()
public void resetGyr()
public void writeFlash()
public void getRawAccData()
public void getRawMagData()
public void getRawGyrData()
public void getNormAccData()
public void getNormMagData()
public void getNormGyrData()
public void getCalibAccData()
public void getCalibMagData()
public void getCalibGyrData()
public void getAccCalibMatrix()
public void getMagCalibMatrix()
public void getGyrCalibMatrix()
public void getStats()
public void checkForMessages()
throws UnsupportedMessageIdException,
DataTransferException
UnsupportedMessageIdException - Thrown when connected CyberAtom device sends message with code unknown to the API library.DataTransferException - Thrown when there was a problem to retrieve data packet from the device.