10 #define EXTERN_C extern "C" 16 # define APICALL EXTERN_C __declspec(dllexport) 17 # define APIENTRY __cdecl 19 #define APICALL EXTERN_C 52 typedef void (APIENTRY *
FUNC_sysInfo)(
void* userData ,
const char* model,
const char* firmwareVersion);
62 typedef void (APIENTRY *
FUNC_quatData)(
void* userData ,
float q0,
float q1,
float q2,
float q3);
71 typedef void (APIENTRY *
FUNC_eulerData)(
void* userData ,
float p,
float r,
float y);
168 typedef void (APIENTRY *
FUNC_rawAccData)(
void* userData ,int16_t x, int16_t y, int16_t z);
177 typedef void (APIENTRY *
FUNC_rawMagData)(
void* userData ,int16_t x, int16_t y, int16_t z);
186 typedef void (APIENTRY *
FUNC_rawGyrData)(
void* userData ,int16_t x, int16_t y, int16_t z);
254 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);
659 APICALL
int APIENTRY UsbConnection_enumerateDevices(
char* buffer,
size_t maxStringSize,
size_t maxNumString );
void(APIENTRY * FUNC_temperature)(void *userData, float temp)
Handles retrieval of TEMP message from the device.
Definition: cyberatom.h:139
APICALL void APIENTRY Device_getSysInfo(IDeviceHandle handle)
Requests sending back information on the device type and firmware version.
APICALL void APIENTRY Device_setAccCalibMatrix(IDeviceHandle handle, float *cal, float *bias)
Changes accelerometer calibration settings the device is using at the moment.
void(APIENTRY * FUNC_calibGyrData)(void *userData, float x, float y, float z)
Handles retrieval of CALIB_GYR message from the device.
Definition: cyberatom.h:240
void(APIENTRY * FUNC_eulerData)(void *userData, float p, float r, float y)
Handles retrieval of EULER_DATA message from the device.
Definition: cyberatom.h:71
APICALL void APIENTRY Device_getNormGyrData(IDeviceHandle handle)
Requests sending normalized values of gyroscope measurements.
APICALL void APIENTRY Device_getStats(IDeviceHandle handle)
APICALL void APIENTRY Device_getRawGyrData(IDeviceHandle handle)
Requests sending RAW type of gyroscope measurements.
void(APIENTRY * FUNC_baudRate)(void *userData, uint8_t rate)
Handles retrieval of BAUD_RATE message from the device.
Definition: cyberatom.h:146
APICALL void APIENTRY Device_setGyrCalibMatrix(IDeviceHandle handle, float *cal, float *bias)
Changes gyroscope calibration settings the device is using at the moment.
APICALL void APIENTRY IConnection_release(IConnectionHandle handle)
void(APIENTRY * FUNC_sysInfo)(void *userData, const char *model, const char *firmwareVersion)
Handles retrieval of SYS_INFO message from the device.
Definition: cyberatom.h:52
FUNC_temperature temperature
Callback - Handles retrieval of TEMP message from the device.
Definition: cyberatom.h:297
FUNC_normAccData normAccData
Callback - Handles retrieval of NORM_ACC message from the device.
Definition: cyberatom.h:318
APICALL IConnectionHandle APIENTRY UsbConnection_create(enum Exception *exception)
Creates a object and returns a handle to it.
FUNC_filterMagMatrix filterMagMatrix
Callback - Handles retrieval of FILTER_MAG_MAT message from the device.
Definition: cyberatom.h:285
APICALL void APIENTRY Device_getBaudRate(IDeviceHandle handle)
Requests sending actual baud rate used for UART interface..
APICALL void APIENTRY Device_reboot(IDeviceHandle handle)
Requests the device to reboot.
FUNC_filterAccMatrix filterAccMatrix
Callback - Handles retrieval of FILTER_ACC message from the device.
Definition: cyberatom.h:288
void(APIENTRY * FUNC_calibAccData)(void *userData, float x, float y, float z)
Handles retrieval of CALIB_ACC message from the device.
Definition: cyberatom.h:222
void(APIENTRY * FUNC_rotRateData)(void *userData, float x, float y, float z)
Handles retrieval of ROT_RATE_DATA message from the device.
Definition: cyberatom.h:80
APICALL void APIENTRY Device_setI2cAddress(IDeviceHandle handle, uint8_t address)
Changes 7-bit address as an I2C slave device.
APICALL void APIENTRY Device_resetGyr(IDeviceHandle handle)
Resets gyroscope bias estimates.
APICALL void APIENTRY Device_setBaudRate(IDeviceHandle handle, uint8_t rate)
Changes baud rate for UART interface.
void(APIENTRY * FUNC_filterGyrMatrix)(void *userData, float *mat)
Handles retrieval of FILTER_GYR message from the device.
Definition: cyberatom.h:125
APICALL void APIENTRY Device_getCalibMagData(IDeviceHandle handle)
Requests sending post-calibration values of magnetometer measurements.
APICALL void APIENTRY IDevice_checkForMessages(IDeviceHandle handle, enum Exception *exception)
Occurs when specified serial port cannot be open.
Definition: cyberatom.h:31
APICALL void APIENTRY Device_getTemperature(IDeviceHandle handle)
Requests actual tempereature data.
FUNC_confirm confirm
Callback - Handles retrieval of CONFIRM message from the device.
Definition: cyberatom.h:306
FUNC_normGyrData normGyrData
Callback - Handles retrieval of NORM_GYR message from the device.
Definition: cyberatom.h:324
Occurs when connection with CyberAtom device cannot be established.
Definition: cyberatom.h:33
void(APIENTRY * FUNC_filterMagMatrix)(void *userData, float *mat)
Handles retrieval of FILTER_MAG_MAT message from the device.
Definition: cyberatom.h:111
APICALL void APIENTRY Device_setFilterAccMatrix(IDeviceHandle handle, float *mat)
Changes Kalman filter coeficiences for accelerometer sensor.
APICALL void APIENTRY Device_getQuatData(IDeviceHandle handle)
Requests information about actual device spatial orientation expressed in form of quaternion...
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.
Definition: cyberatom.h:254
FUNC_calibGyrData calibGyrData
Callback - Handles retrieval of CALIB_GYR message from the device.
Definition: cyberatom.h:333
FUNC_rawMagData rawMagData
Callback - Handles retrieval of RAW_MAG message from the device.
Definition: cyberatom.h:312
Occurs when no CyberAtom device has been found connected to the computer.
Definition: cyberatom.h:32
FUNC_rawGyrData rawGyrData
Callback - Handles retrieval of RAW_GYR message from the device.
Definition: cyberatom.h:315
APICALL void APIENTRY Device_setFilterMagMatrix(IDeviceHandle handle, float *mat)
Changes Kalman filter coeficiences for magnetometer sensor.
APICALL void APIENTRY Device_getCalibGyrData(IDeviceHandle handle)
Requests sending post-calibration values of gyroscope measurements.
APICALL void APIENTRY Device_getAccCalibMatrix(IDeviceHandle handle)
Requests calibration matrices used for accelerometer measurements.
Returned on successful operation.
Definition: cyberatom.h:28
FUNC_rawAccData rawAccData
Callback - Handles retrieval of RAW_ACC message from the device.
Definition: cyberatom.h:309
void(APIENTRY * FUNC_filterProcMatrix)(void *userData, float *mat)
Handles retrieval of FILTER_PROCN message from the device.
Definition: cyberatom.h:132
FUNC_quatData quatData
Callback - Handles retrieval of QUAT_DATA message from the device.
Definition: cyberatom.h:267
void(APIENTRY * FUNC_quatData)(void *userData, float q0, float q1, float q2, float q3)
Handles retrieval of QUAT_DATA message from the device.
Definition: cyberatom.h:62
FUNC_filterProcMatrix filterProcMatrix
Callback - Handles retrieval of FILTER_PROCN message from the device.
Definition: cyberatom.h:294
APICALL void APIENTRY Device_setMagCalibMatrix(IDeviceHandle handle, float *cal, float *bias)
Changes magnetometer calibration settings the device is using at the moment.
APICALL IConnectionHandle APIENTRY SerialConnection_create(const char *portName, int baudRate, enum Exception *exception)
Creates a object and returns a handle to it.
APICALL void APIENTRY Device_getRawMagData(IDeviceHandle handle)
Requests sending RAW type of magnetometer measurements.
FUNC_magCalibMatrix magCalibMatrix
Callback - Handles retrieval of MAG_CALIB_MAT message from the device.
Definition: cyberatom.h:279
void(APIENTRY * FUNC_accCalibMatrix)(void *userData, float *cal, float *bias)
Handles retrieval of ACC_CALIB_MAT message from the device.
Definition: cyberatom.h:88
void(APIENTRY * FUNC_rawAccData)(void *userData, int16_t x, int16_t y, int16_t z)
Handles retrieval of RAW_ACC message from the device.
Definition: cyberatom.h:168
void(APIENTRY * FUNC_normMagData)(void *userData, float x, float y, float z)
Handles retrieval of NORM_MAG message from the device.
Definition: cyberatom.h:204
FUNC_gyrCalibMatrix gyrCalibMatrix
Callback - Handles retrieval of GYR_CALIB_MAT message from the device.
Definition: cyberatom.h:282
APICALL void APIENTRY Device_getGyrCalibMatrix(IDeviceHandle handle)
Requests calibration matrices used for gyroscope measurements.
void(APIENTRY * FUNC_calibMagData)(void *userData, float x, float y, float z)
Handles retrieval of CALIB_MAG message from the device.
Definition: cyberatom.h:231
APICALL void APIENTRY Device_getCalibAccData(IDeviceHandle handle)
Requests sending post-calibration values of accelerometer measurements.
APICALL void APIENTRY Device_writeFlash(IDeviceHandle handle)
Saves current settings in device RAM into internal non-volotile flash memory.
void(APIENTRY * FUNC_rawGyrData)(void *userData, int16_t x, int16_t y, int16_t z)
Handles retrieval of RAW_GYR message from the device.
Definition: cyberatom.h:186
FUNC_rotRateData rotRateData
Callback - Handles retrieval of ROT_RATE_DATA message from the device.
Definition: cyberatom.h:273
struct _IConnection * IConnectionHandle
Opaque pointer to handle representing IConnection.
Definition: cyberatom.h:44
APICALL IConnectionHandle APIENTRY UsbConnection_createWithSerial(const char *serialNumber, enum Exception *exception)
Creates a object and returns a handle to it.
void * userData
Pointer to an arbitrary user data to pass down to callbacks functions.
Definition: cyberatom.h:260
Exception
Represents code for potential exception raised in the code.
Definition: cyberatom.h:26
FUNC_filterGyrMatrix filterGyrMatrix
Callback - Handles retrieval of FILTER_GYR message from the device.
Definition: cyberatom.h:291
APICALL void APIENTRY IDevice_release(IDeviceHandle handle)
FUNC_accCalibMatrix accCalibMatrix
Callback - Handles retrieval of ACC_CALIB_MAT message from the device.
Definition: cyberatom.h:276
void(APIENTRY * FUNC_confirm)(void *userData)
Handles retrieval of CONFIRM message from the device.
Definition: cyberatom.h:159
APICALL void APIENTRY Device_getRotRateData(IDeviceHandle handle)
Requests actual rotation rate information from the device.
APICALL void APIENTRY Device_getFilterGyrMatrix(IDeviceHandle handle)
Requests Kalman filter coeficiences for gyroscope measurement noise.
Returned when unknown exception has been thrown in the execution.
Definition: cyberatom.h:36
void(APIENTRY * FUNC_gyrCalibMatrix)(void *userData, float *cal, float *bias)
Handles retrieval of GYR_CALIB_MAT message from the device.
Definition: cyberatom.h:104
FUNC_sysInfo sysInfo
Callback - Handles retrieval of SYS_INFO message from the device.
Definition: cyberatom.h:264
APICALL void APIENTRY Device_setFilterGyrMatrix(IDeviceHandle handle, float *mat)
Changes Kalman filter coeficiences for gyroscope sensor.
void(APIENTRY * FUNC_normAccData)(void *userData, float x, float y, float z)
Handles retrieval of NORM_ACC message from the device.
Definition: cyberatom.h:195
void(APIENTRY * FUNC_rawMagData)(void *userData, int16_t x, int16_t y, int16_t z)
Handles retrieval of RAW_MAG message from the device.
Definition: cyberatom.h:177
APICALL void APIENTRY Device_getFilterProcMatrix(IDeviceHandle handle)
Requests Kalman filter coeficiences for process noise.
void(APIENTRY * FUNC_filterAccMatrix)(void *userData, float *mat)
Handles retrieval of FILTER_ACC message from the device.
Definition: cyberatom.h:118
APICALL void APIENTRY Device_getNormAccData(IDeviceHandle handle)
Requests sending normalized values of accelerometer measurements.
Thrown when there was a problem to retrieve data packet from the device.
Definition: cyberatom.h:30
APICALL void APIENTRY Device_getRawAccData(IDeviceHandle handle)
Requests sending RAW type of accelerometer measurements.
APICALL void APIENTRY Device_getFilterMagMatrix(IDeviceHandle handle)
Requests Kalman filter coeficiences for magnetometer measurement noise.
void(APIENTRY * FUNC_magCalibMatrix)(void *userData, float *cal, float *bias)
Handles retrieval of MAG_CALIB_MAT message from the device.
Definition: cyberatom.h:96
Thrown when connected CyberAtom device sends message with code unknown to the API library...
Definition: cyberatom.h:29
FUNC_calibMagData calibMagData
Callback - Handles retrieval of CALIB_MAG message from the device.
Definition: cyberatom.h:330
APICALL void APIENTRY Device_getMagCalibMatrix(IDeviceHandle handle)
Requests calibration matrices used for magnetometer measurements.
void(APIENTRY * FUNC_normGyrData)(void *userData, float x, float y, float z)
Handles retrieval of NORM_GYR message from the device.
Definition: cyberatom.h:213
APICALL IDeviceHandle APIENTRY Device_create(IConnectionHandle connection, IResponseHandle response)
Creates a object and returns a handle to it.
struct _IDevice * IDeviceHandle
Opaque pointer to handle representing IDevice.
Definition: cyberatom.h:41
FUNC_calibAccData calibAccData
Callback - Handles retrieval of CALIB_ACC message from the device.
Definition: cyberatom.h:327
APICALL void APIENTRY Device_factoryReset(IDeviceHandle handle)
Requests loading factory settings into device RAM memory.
FUNC_stats stats
Callback - Handles retrieval of STATS message from the device.
Definition: cyberatom.h:336
FUNC_baudRate baudRate
Callback - Handles retrieval of BAUD_RATE message from the device.
Definition: cyberatom.h:300
FUNC_normMagData normMagData
Callback - Handles retrieval of NORM_MAG message from the device.
Definition: cyberatom.h:321
APICALL void APIENTRY Device_getI2cAddress(IDeviceHandle handle)
Requests sending actual I2C device address.
APICALL void APIENTRY Device_getEulerData(IDeviceHandle handle)
Requests information about actual device spatial orientation expressed in form of Euler angles...
void(APIENTRY * FUNC_i2cAddress)(void *userData, uint8_t addr)
Handles retrieval of I2C_ADDR message from the device.
Definition: cyberatom.h:153
FUNC_i2cAddress i2cAddress
Callback - Handles retrieval of I2C_ADDR message from the device.
Definition: cyberatom.h:303
Groups callbacks used to handle data incomming from the device.
Definition: cyberatom.h:258
FUNC_eulerData eulerData
Callback - Handles retrieval of EULER_DATA message from the device.
Definition: cyberatom.h:270
APICALL void APIENTRY Device_setFilterProcMatrix(IDeviceHandle handle, float *mat)
APICALL void APIENTRY Device_getNormMagData(IDeviceHandle handle)
Requests sending normalized values of magnetometer measurements.
APICALL void APIENTRY Device_getFilterAccMatrix(IDeviceHandle handle)
Requests Kalman filter coeficiences for accelerometer measurement noise.