1 #ifndef VNUTIL_H_INCLUDED
2 #define VNUTIL_H_INCLUDED
9 #include "vn/math/matrix.h"
10 #include "vn/math/vector.h"
11 #include "vn/util/export.h"
21 #define VNAPI_REVISION 126
26 int VnApi_major(
void);
31 int VnApi_minor(
void);
36 int VnApi_patch(
void);
41 int VnApi_revision(
void);
48 VnError VnApi_getVersion(
char *out,
size_t outLength);
55 uint8_t VnUtil_toUint8FromHexChar(
char c);
63 uint8_t VnUtil_toUint8FromHexStr(
char const *str);
71 uint16_t VnUtil_toUint16FromHexStr(
char const *str);
79 void VnUtil_toHexStrFromUint8(uint8_t toConvert,
char *output);
87 void VnUtil_toHexStrFromUint16(uint16_t toConvert,
char *output);
95 size_t VnUtil_toStrFromUint16(uint16_t toConvert,
char *output);
102 uint8_t DllExport VnUtil_countSetBitsUint8(uint8_t data);
109 void strFromBool(
char *out,
bool val);
121 uint16_t
stoh16(uint16_t sensorOrdered);
127 uint32_t
stoh32(uint32_t sensorOrdered);
133 uint64_t
stoh64(uint64_t sensorOrdered);
139 uint16_t
htos16(uint16_t hostOrdered);
145 uint32_t
htos32(uint32_t hostOrdered);
151 uint64_t
htos64(uint64_t hostOrdered);
157 float htosf4(
float hostOrdered);
163 double htosf8(
double hostOrdered);
uint16_t htos16(uint16_t hostOrdered)
Converts a 16-bit integer in host order to sensor order.
uint32_t htos32(uint32_t hostOrdered)
Converts a 32-bit integer in host order to sensor order.
double htosf8(double hostOrdered)
Converts an 8-byte float in host order to sensor order.
uint16_t stoh16(uint16_t sensorOrdered)
Converts a 16-bit integer in sensor order to host order.
uint32_t stoh32(uint32_t sensorOrdered)
Converts a 32-bit integer in sensor order to host order.
uint64_t stoh64(uint64_t sensorOrdered)
Converts a 64-bit integer in sensor order to host order.
Represents a 4 component vector with an underlying data type of float.
Definition: vector.h:68
Represents a 3 component vector with an underlying data type of double.
Definition: vector.h:41
float htosf4(float hostOrdered)
Converts a 4-byte float in host order to sensor order.
Represents a 3x3 matrix with an underlying data type of float.
Definition: matrix.h:11
uint64_t htos64(uint64_t hostOrdered)
Converts a 64-bit integer in host order to sensor order.
Various vector types and operations.
Definition: vector.h:14