CyberAtom C Library

2.5.0

Classes | Macros | Typedefs | Enumerations | Functions
cyberatom.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  IResponseCallbacks
 Groups callbacks used to handle data incomming from the device. More...
 

Macros

#define EXTERN_C
 
#define APICALL   EXTERN_C
 
#define APIENTRY
 

Typedefs

typedef struct _IDevice * IDeviceHandle
 Opaque pointer to handle representing IDevice.
 
typedef struct _IConnection * IConnectionHandle
 Opaque pointer to handle representing IConnection.
 
typedef void(APIENTRY * FUNC_sysInfo) (void *userData, const char *model, const char *firmwareVersion)
 Handles retrieval of SYS_INFO message from the device. More...
 
typedef void(APIENTRY * FUNC_quatData) (void *userData, float q0, float q1, float q2, float q3)
 Handles retrieval of QUAT_DATA message from the device. More...
 
typedef void(APIENTRY * FUNC_eulerData) (void *userData, float p, float r, float y)
 Handles retrieval of EULER_DATA message from the device. More...
 
typedef void(APIENTRY * FUNC_rotRateData) (void *userData, float x, float y, float z)
 Handles retrieval of ROT_RATE_DATA message from the device. More...
 
typedef void(APIENTRY * FUNC_accCalibMatrix) (void *userData, float *cal, float *bias)
 Handles retrieval of ACC_CALIB_MAT message from the device. More...
 
typedef void(APIENTRY * FUNC_magCalibMatrix) (void *userData, float *cal, float *bias)
 Handles retrieval of MAG_CALIB_MAT message from the device. More...
 
typedef void(APIENTRY * FUNC_gyrCalibMatrix) (void *userData, float *cal, float *bias)
 Handles retrieval of GYR_CALIB_MAT message from the device. More...
 
typedef void(APIENTRY * FUNC_filterMagMatrix) (void *userData, float *mat)
 Handles retrieval of FILTER_MAG_MAT message from the device. More...
 
typedef void(APIENTRY * FUNC_filterAccMatrix) (void *userData, float *mat)
 Handles retrieval of FILTER_ACC message from the device. More...
 
typedef void(APIENTRY * FUNC_filterGyrMatrix) (void *userData, float *mat)
 Handles retrieval of FILTER_GYR message from the device. More...
 
typedef void(APIENTRY * FUNC_filterProcMatrix) (void *userData, float *mat)
 Handles retrieval of FILTER_PROCN message from the device. More...
 
typedef void(APIENTRY * FUNC_temperature) (void *userData, float temp)
 Handles retrieval of TEMP message from the device. More...
 
typedef void(APIENTRY * FUNC_baudRate) (void *userData, uint8_t rate)
 Handles retrieval of BAUD_RATE message from the device. More...
 
typedef void(APIENTRY * FUNC_i2cAddress) (void *userData, uint8_t addr)
 Handles retrieval of I2C_ADDR message from the device. More...
 
typedef void(APIENTRY * FUNC_confirm) (void *userData)
 Handles retrieval of CONFIRM message from the device.
 
typedef void(APIENTRY * FUNC_rawAccData) (void *userData, int16_t x, int16_t y, int16_t z)
 Handles retrieval of RAW_ACC message from the device. More...
 
typedef void(APIENTRY * FUNC_rawMagData) (void *userData, int16_t x, int16_t y, int16_t z)
 Handles retrieval of RAW_MAG message from the device. More...
 
typedef void(APIENTRY * FUNC_rawGyrData) (void *userData, int16_t x, int16_t y, int16_t z)
 Handles retrieval of RAW_GYR message from the device. More...
 
typedef void(APIENTRY * FUNC_normAccData) (void *userData, float x, float y, float z)
 Handles retrieval of NORM_ACC message from the device. More...
 
typedef void(APIENTRY * FUNC_normMagData) (void *userData, float x, float y, float z)
 Handles retrieval of NORM_MAG message from the device. More...
 
typedef void(APIENTRY * FUNC_normGyrData) (void *userData, float x, float y, float z)
 Handles retrieval of NORM_GYR message from the device. More...
 
typedef void(APIENTRY * FUNC_calibAccData) (void *userData, float x, float y, float z)
 Handles retrieval of CALIB_ACC message from the device. More...
 
typedef void(APIENTRY * FUNC_calibMagData) (void *userData, float x, float y, float z)
 Handles retrieval of CALIB_MAG message from the device. More...
 
typedef void(APIENTRY * FUNC_calibGyrData) (void *userData, float x, float y, float z)
 Handles retrieval of CALIB_GYR message from the device. More...
 
typedef void(APIENTRY * FUNC_stats) (void *userData, uint32_t perf0, uint32_t perf1, uint32_t perf2, uint32_t perf3, uint32_t perf4, uint32_t perf5, uint32_t perf6, uint32_t perf7)
 Handles retrieval of STATS message from the device. More...
 
typedef struct IResponseCallbacksIResponseHandle
 

Enumerations

enum  Exception {
  E_OK = 0x00, E_UnsupportedMessageIdException, E_DataTransferException, E_CannotOpenPortException,
  E_DeviceNotFoundException, E_CannotOpenDeviceException, E_UnspecifiedException = 0xffff
}
 Represents code for potential exception raised in the code. More...
 

Functions

APICALL void APIENTRY IDevice_release (IDeviceHandle handle)
 
APICALL void APIENTRY IDevice_checkForMessages (IDeviceHandle handle, enum Exception *exception)
 
APICALL void APIENTRY IConnection_release (IConnectionHandle handle)
 
APICALL IDeviceHandle APIENTRY Device_create (IConnectionHandle connection, IResponseHandle response)
 Creates a object and returns a handle to it. More...
 
APICALL void APIENTRY Device_getSysInfo (IDeviceHandle handle)
 Requests sending back information on the device type and firmware version. More...
 
APICALL void APIENTRY Device_getQuatData (IDeviceHandle handle)
 Requests information about actual device spatial orientation expressed in form of quaternion. More...
 
APICALL void APIENTRY Device_getEulerData (IDeviceHandle handle)
 Requests information about actual device spatial orientation expressed in form of Euler angles. More...
 
APICALL void APIENTRY Device_getRotRateData (IDeviceHandle handle)
 Requests actual rotation rate information from the device. More...
 
APICALL void APIENTRY Device_reboot (IDeviceHandle handle)
 Requests the device to reboot. More...
 
APICALL void APIENTRY Device_factoryReset (IDeviceHandle handle)
 Requests loading factory settings into device RAM memory. More...
 
APICALL void APIENTRY Device_setAccCalibMatrix (IDeviceHandle handle, float *cal, float *bias)
 Changes accelerometer calibration settings the device is using at the moment. More...
 
APICALL void APIENTRY Device_setMagCalibMatrix (IDeviceHandle handle, float *cal, float *bias)
 Changes magnetometer calibration settings the device is using at the moment. More...
 
APICALL void APIENTRY Device_setGyrCalibMatrix (IDeviceHandle handle, float *cal, float *bias)
 Changes gyroscope calibration settings the device is using at the moment. More...
 
APICALL void APIENTRY Device_setFilterMagMatrix (IDeviceHandle handle, float *mat)
 Changes Kalman filter coeficiences for magnetometer sensor. More...
 
APICALL void APIENTRY Device_setFilterAccMatrix (IDeviceHandle handle, float *mat)
 Changes Kalman filter coeficiences for accelerometer sensor. More...
 
APICALL void APIENTRY Device_setFilterGyrMatrix (IDeviceHandle handle, float *mat)
 Changes Kalman filter coeficiences for gyroscope sensor. More...
 
APICALL void APIENTRY Device_setFilterProcMatrix (IDeviceHandle handle, float *mat)
 
APICALL void APIENTRY Device_getFilterMagMatrix (IDeviceHandle handle)
 Requests Kalman filter coeficiences for magnetometer measurement noise. More...
 
APICALL void APIENTRY Device_getFilterAccMatrix (IDeviceHandle handle)
 Requests Kalman filter coeficiences for accelerometer measurement noise. More...
 
APICALL void APIENTRY Device_getFilterGyrMatrix (IDeviceHandle handle)
 Requests Kalman filter coeficiences for gyroscope measurement noise. More...
 
APICALL void APIENTRY Device_getFilterProcMatrix (IDeviceHandle handle)
 Requests Kalman filter coeficiences for process noise. More...
 
APICALL void APIENTRY Device_getTemperature (IDeviceHandle handle)
 Requests actual tempereature data. More...
 
APICALL void APIENTRY Device_setBaudRate (IDeviceHandle handle, uint8_t rate)
 Changes baud rate for UART interface. More...
 
APICALL void APIENTRY Device_setI2cAddress (IDeviceHandle handle, uint8_t address)
 Changes 7-bit address as an I2C slave device. More...
 
APICALL void APIENTRY Device_getI2cAddress (IDeviceHandle handle)
 Requests sending actual I2C device address. More...
 
APICALL void APIENTRY Device_getBaudRate (IDeviceHandle handle)
 Requests sending actual baud rate used for UART interface.. More...
 
APICALL void APIENTRY Device_resetGyr (IDeviceHandle handle)
 Resets gyroscope bias estimates. More...
 
APICALL void APIENTRY Device_writeFlash (IDeviceHandle handle)
 Saves current settings in device RAM into internal non-volotile flash memory. More...
 
APICALL void APIENTRY Device_getRawAccData (IDeviceHandle handle)
 Requests sending RAW type of accelerometer measurements. More...
 
APICALL void APIENTRY Device_getRawMagData (IDeviceHandle handle)
 Requests sending RAW type of magnetometer measurements. More...
 
APICALL void APIENTRY Device_getRawGyrData (IDeviceHandle handle)
 Requests sending RAW type of gyroscope measurements. More...
 
APICALL void APIENTRY Device_getNormAccData (IDeviceHandle handle)
 Requests sending normalized values of accelerometer measurements. More...
 
APICALL void APIENTRY Device_getNormMagData (IDeviceHandle handle)
 Requests sending normalized values of magnetometer measurements. More...
 
APICALL void APIENTRY Device_getNormGyrData (IDeviceHandle handle)
 Requests sending normalized values of gyroscope measurements. More...
 
APICALL void APIENTRY Device_getCalibAccData (IDeviceHandle handle)
 Requests sending post-calibration values of accelerometer measurements. More...
 
APICALL void APIENTRY Device_getCalibMagData (IDeviceHandle handle)
 Requests sending post-calibration values of magnetometer measurements. More...
 
APICALL void APIENTRY Device_getCalibGyrData (IDeviceHandle handle)
 Requests sending post-calibration values of gyroscope measurements. More...
 
APICALL void APIENTRY Device_getAccCalibMatrix (IDeviceHandle handle)
 Requests calibration matrices used for accelerometer measurements. More...
 
APICALL void APIENTRY Device_getMagCalibMatrix (IDeviceHandle handle)
 Requests calibration matrices used for magnetometer measurements. More...
 
APICALL void APIENTRY Device_getGyrCalibMatrix (IDeviceHandle handle)
 Requests calibration matrices used for gyroscope measurements. More...
 
APICALL void APIENTRY Device_getStats (IDeviceHandle handle)
 
APICALL IConnectionHandle APIENTRY SerialConnection_create (const char *portName, int baudRate, enum Exception *exception)
 Creates a object and returns a handle to it. More...
 
APICALL IConnectionHandle APIENTRY UsbConnection_create (enum Exception *exception)
 Creates a object and returns a handle to it. More...
 
APICALL IConnectionHandle APIENTRY UsbConnection_createWithSerial (const char *serialNumber, enum Exception *exception)
 Creates a object and returns a handle to it. More...
 
APICALL int APIENTRY UsbConnection_enumerateDevices (char *buffer, size_t maxStringSize, size_t maxNumString)
 

Typedef Documentation

typedef void(APIENTRY * FUNC_accCalibMatrix) (void *userData,float *cal, float *bias)

Handles retrieval of ACC_CALIB_MAT message from the device.

Parameters
cal
bias
typedef void(APIENTRY * FUNC_baudRate) (void *userData,uint8_t rate)

Handles retrieval of BAUD_RATE message from the device.

Parameters
rate
typedef void(APIENTRY * FUNC_calibAccData) (void *userData,float x, float y, float z)

Handles retrieval of CALIB_ACC message from the device.

Parameters
xX component of post-calibrated data
yY component of post-calibrated data
zZ component of post-calibrated data
typedef void(APIENTRY * FUNC_calibGyrData) (void *userData,float x, float y, float z)

Handles retrieval of CALIB_GYR message from the device.

Parameters
xX component of post-calibrated data
yY component of post-calibrated data
zZ component of post-calibrated data
typedef void(APIENTRY * FUNC_calibMagData) (void *userData,float x, float y, float z)

Handles retrieval of CALIB_MAG message from the device.

Parameters
xX component of post-calibrated data
yY component of post-calibrated data
zZ component of post-calibrated data
typedef void(APIENTRY * FUNC_eulerData) (void *userData,float p, float r, float y)

Handles retrieval of EULER_DATA message from the device.

Parameters
pPitch angle value.
rRoll angle value.
yYaw angle value.
typedef void(APIENTRY * FUNC_filterAccMatrix) (void *userData,float *mat)

Handles retrieval of FILTER_ACC message from the device.

Parameters
mat
typedef void(APIENTRY * FUNC_filterGyrMatrix) (void *userData,float *mat)

Handles retrieval of FILTER_GYR message from the device.

Parameters
mat
typedef void(APIENTRY * FUNC_filterMagMatrix) (void *userData,float *mat)

Handles retrieval of FILTER_MAG_MAT message from the device.

Parameters
mat
typedef void(APIENTRY * FUNC_filterProcMatrix) (void *userData,float *mat)

Handles retrieval of FILTER_PROCN message from the device.

Parameters
mat
typedef void(APIENTRY * FUNC_gyrCalibMatrix) (void *userData,float *cal, float *bias)

Handles retrieval of GYR_CALIB_MAT message from the device.

Parameters
cal
bias
typedef void(APIENTRY * FUNC_i2cAddress) (void *userData,uint8_t addr)

Handles retrieval of I2C_ADDR message from the device.

Parameters
addractual device I2C address
typedef void(APIENTRY * FUNC_magCalibMatrix) (void *userData,float *cal, float *bias)

Handles retrieval of MAG_CALIB_MAT message from the device.

Parameters
cal
bias
typedef void(APIENTRY * FUNC_normAccData) (void *userData,float x, float y, float z)

Handles retrieval of NORM_ACC message from the device.

Parameters
xX component of measured and normalized data
yY component of measured and normalized data
zZ component of measured and normalized data
typedef void(APIENTRY * FUNC_normGyrData) (void *userData,float x, float y, float z)

Handles retrieval of NORM_GYR message from the device.

Parameters
xX component of measured and normalized data
yY component of measured and normalized data
zZ component of measured and normalized data
typedef void(APIENTRY * FUNC_normMagData) (void *userData,float x, float y, float z)

Handles retrieval of NORM_MAG message from the device.

Parameters
xX component of measured and normalized data
yY component of measured and normalized data
zZ component of measured and normalized data
typedef void(APIENTRY * FUNC_quatData) (void *userData,float q0, float q1, float q2, float q3)

Handles retrieval of QUAT_DATA message from the device.

Parameters
q0q0 (w) quaternion component.
q1q1 (x) quaternion component.
q2q2 (y) quaternion component.
q3q3 (z) quaternion component.
typedef void(APIENTRY * FUNC_rawAccData) (void *userData,int16_t x, int16_t y, int16_t z)

Handles retrieval of RAW_ACC message from the device.

Parameters
xX component of measured data
yY component of measured data
zZ component of measured data
typedef void(APIENTRY * FUNC_rawGyrData) (void *userData,int16_t x, int16_t y, int16_t z)

Handles retrieval of RAW_GYR message from the device.

Parameters
xX component of measured data
yY component of measured data
zZ component of measured data
typedef void(APIENTRY * FUNC_rawMagData) (void *userData,int16_t x, int16_t y, int16_t z)

Handles retrieval of RAW_MAG message from the device.

Parameters
xX component of measured data
yY component of measured data
zZ component of measured data
typedef void(APIENTRY * FUNC_rotRateData) (void *userData,float x, float y, float z)

Handles retrieval of ROT_RATE_DATA message from the device.

Parameters
xrotation rate over local device X axis
yrotation rate over local device Y axis
zrotation rate over local device Z axis
typedef void(APIENTRY * FUNC_stats) (void *userData,uint32_t perf0, uint32_t perf1, uint32_t perf2, uint32_t perf3, uint32_t perf4, uint32_t perf5, uint32_t perf6, uint32_t perf7)

Handles retrieval of STATS message from the device.

Parameters
perf0
perf1
perf2
perf3
perf4
perf5
perf6
perf7
typedef void(APIENTRY * FUNC_sysInfo) (void *userData,const char *model, const char *firmwareVersion)

Handles retrieval of SYS_INFO message from the device.

Parameters
modelNull-terminated string representing device model.
firmwareVersionNull-terminated string containing firmware version.
typedef void(APIENTRY * FUNC_temperature) (void *userData,float temp)

Handles retrieval of TEMP message from the device.

Parameters
tempActual temperature of the device in Celsius degrees.

Enumeration Type Documentation

enum Exception

Represents code for potential exception raised in the code.

Enumerator
E_OK 

Returned on successful operation.

E_UnsupportedMessageIdException 

Thrown when connected CyberAtom device sends message with code unknown to the API library.

E_DataTransferException 

Thrown when there was a problem to retrieve data packet from the device.

E_CannotOpenPortException 

Occurs when specified serial port cannot be open.

E_DeviceNotFoundException 

Occurs when no CyberAtom device has been found connected to the computer.

E_CannotOpenDeviceException 

Occurs when connection with CyberAtom device cannot be established.

E_UnspecifiedException 

Returned when unknown exception has been thrown in the execution.

Function Documentation

APICALL IDeviceHandle APIENTRY Device_create ( IConnectionHandle  connection,
IResponseHandle  response 
)

Creates a object and returns a handle to it.

Note
Make sure you maintain lifecycle of given connection and response interfaces accordingly with the lifecycle of the Device class instance itself.
Returns
A handle to newly created object or zero if the operation failed.
APICALL void APIENTRY Device_factoryReset ( IDeviceHandle  handle)

Requests loading factory settings into device RAM memory.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getAccCalibMatrix ( IDeviceHandle  handle)

Requests calibration matrices used for accelerometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getBaudRate ( IDeviceHandle  handle)

Requests sending actual baud rate used for UART interface..

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getCalibAccData ( IDeviceHandle  handle)

Requests sending post-calibration values of accelerometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getCalibGyrData ( IDeviceHandle  handle)

Requests sending post-calibration values of gyroscope measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getCalibMagData ( IDeviceHandle  handle)

Requests sending post-calibration values of magnetometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getEulerData ( IDeviceHandle  handle)

Requests information about actual device spatial orientation expressed in form of Euler angles.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getFilterAccMatrix ( IDeviceHandle  handle)

Requests Kalman filter coeficiences for accelerometer measurement noise.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getFilterGyrMatrix ( IDeviceHandle  handle)

Requests Kalman filter coeficiences for gyroscope measurement noise.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getFilterMagMatrix ( IDeviceHandle  handle)

Requests Kalman filter coeficiences for magnetometer measurement noise.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getFilterProcMatrix ( IDeviceHandle  handle)

Requests Kalman filter coeficiences for process noise.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getGyrCalibMatrix ( IDeviceHandle  handle)

Requests calibration matrices used for gyroscope measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getI2cAddress ( IDeviceHandle  handle)

Requests sending actual I2C device address.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getMagCalibMatrix ( IDeviceHandle  handle)

Requests calibration matrices used for magnetometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getNormAccData ( IDeviceHandle  handle)

Requests sending normalized values of accelerometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getNormGyrData ( IDeviceHandle  handle)

Requests sending normalized values of gyroscope measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getNormMagData ( IDeviceHandle  handle)

Requests sending normalized values of magnetometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getQuatData ( IDeviceHandle  handle)

Requests information about actual device spatial orientation expressed in form of quaternion.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getRawAccData ( IDeviceHandle  handle)

Requests sending RAW type of accelerometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getRawGyrData ( IDeviceHandle  handle)

Requests sending RAW type of gyroscope measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getRawMagData ( IDeviceHandle  handle)

Requests sending RAW type of magnetometer measurements.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getRotRateData ( IDeviceHandle  handle)

Requests actual rotation rate information from the device.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getStats ( IDeviceHandle  handle)
Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getSysInfo ( IDeviceHandle  handle)

Requests sending back information on the device type and firmware version.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_getTemperature ( IDeviceHandle  handle)

Requests actual tempereature data.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_reboot ( IDeviceHandle  handle)

Requests the device to reboot.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_resetGyr ( IDeviceHandle  handle)

Resets gyroscope bias estimates.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY Device_setAccCalibMatrix ( IDeviceHandle  handle,
float *  cal,
float *  bias 
)

Changes accelerometer calibration settings the device is using at the moment.

Parameters
calArray of 9 matrix (3x3) elements for missalignment calibration.
biasArray of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setBaudRate ( IDeviceHandle  handle,
uint8_t  rate 
)

Changes baud rate for UART interface.

Parameters
rateInteger value representing new baud rate.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setFilterAccMatrix ( IDeviceHandle  handle,
float *  mat 
)

Changes Kalman filter coeficiences for accelerometer sensor.

Parameters
mata11,a22 and a33 matrix coeficiences for magnetometer accelerometer noise matrix.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setFilterGyrMatrix ( IDeviceHandle  handle,
float *  mat 
)

Changes Kalman filter coeficiences for gyroscope sensor.

Parameters
mata11,a22 and a33 matrix coeficiences for magnetometer gyroscope noise matrix.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setFilterMagMatrix ( IDeviceHandle  handle,
float *  mat 
)

Changes Kalman filter coeficiences for magnetometer sensor.

Parameters
mata11,a22 and a33 matrix coeficiences for magnetometer measurement noise matrix.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setFilterProcMatrix ( IDeviceHandle  handle,
float *  mat 
)
Parameters
matAn array with 7 matrix elements for the filter process matric to set.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setGyrCalibMatrix ( IDeviceHandle  handle,
float *  cal,
float *  bias 
)

Changes gyroscope calibration settings the device is using at the moment.

Parameters
calArray of 9 matrix (3x3) elements for missalignment calibration.
biasArray of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setI2cAddress ( IDeviceHandle  handle,
uint8_t  address 
)

Changes 7-bit address as an I2C slave device.

Parameters
addressNew I2c device address.
handleA handle to a logical device object.
APICALL void APIENTRY Device_setMagCalibMatrix ( IDeviceHandle  handle,
float *  cal,
float *  bias 
)

Changes magnetometer calibration settings the device is using at the moment.

Parameters
calArray of 9 matrix (3x3) elements for missalignment calibration.
biasArray of 9 matrix (3x3) elements for bias and temperature and temperature bias calibration.
handleA handle to a logical device object.
APICALL void APIENTRY Device_writeFlash ( IDeviceHandle  handle)

Saves current settings in device RAM into internal non-volotile flash memory.

Parameters
handleA handle to a logical device object.
APICALL void APIENTRY IConnection_release ( IConnectionHandle  handle)
Parameters
handleA handle to the object to release
APICALL void APIENTRY IDevice_checkForMessages ( IDeviceHandle  handle,
enum Exception exception 
)
Parameters
exceptionPointer to variable where exception code (failure) or E_OK (success) will be stored. Can be NULL if ignored.
handleA handle to a logical device object.
APICALL void APIENTRY IDevice_release ( IDeviceHandle  handle)
Parameters
handleA handle to the object to release
APICALL IConnectionHandle APIENTRY SerialConnection_create ( const char *  portName,
int  baudRate,
enum Exception exception 
)

Creates a object and returns a handle to it.

Parameters
exceptionPointer to variable where exception code (failure) or E_OK (success) will be stored. Can be NULL if ignored.
Returns
A handle to newly created object or zero if the operation failed.
APICALL IConnectionHandle APIENTRY UsbConnection_create ( enum Exception exception)

Creates a object and returns a handle to it.

Note
This constructor creates connection to first CyberAtom device found on USB device list.
Parameters
exceptionPointer to variable where exception code (failure) or E_OK (success) will be stored. Can be NULL if ignored.
Returns
A handle to newly created object or zero if the operation failed.
APICALL IConnectionHandle APIENTRY UsbConnection_createWithSerial ( const char *  serialNumber,
enum Exception exception 
)

Creates a object and returns a handle to it.

Note
This constructor can be used more than one USB devices are in use at the same time.
Parameters
exceptionPointer to variable where exception code (failure) or E_OK (success) will be stored. Can be NULL if ignored.
Returns
A handle to newly created object or zero if the operation failed.