Code examples, 4 code examples – PNI TCM 5 User Manual
Page 44
PNI Sensor Corporation
Doc #1007537 r12
TCM3 & TCM5 User Manual- Sept 2011
Page 44
4.4 Code Examples
4.4.1 Binary TCM High Performance Protocol C Header File & CRC-16
Function
// type declarations
typedef struct
{
UInt8 pollingMode, flushFilter;
Float32 sensorAcqTime, intervalRespTime;
} __attribute__ ((packed)) AcqParams;
typedef struct
{
Float32 stdDevErr;
Float32 xCoverage;
Float32 yCoverage;
Float32 zCoverage;
Float32 magBearth;
Float32 reserve1;
} __attribute__ ((packed)) CalScore;
enum
{
// Frame IDs (Commands)
kGetModInfo = 1, // 1
kModInfoResp,
// 2
kSetDataComponents, // 3
kGetData,
// 4
kDataResp,
// 5
kSetConfig,
// 6
kGetConfig,
// 7
kConfigResp,
// 8
kSave,
// 9
kStartCal,
// 10
kStopCal,
// 11
kSetParam,
// 12
kGetParam,
// 13
kParamResp,
// 14
kPowerDown,
// 15