axis-sdk 2.4.1
API for axis-sdk
 
Loading...
Searching...
No Matches
axis_sdk.h
Go to the documentation of this file.
1
11#pragma once
12#ifndef _AXIS_SDK_API_H
13#define _AXIS_SDK_API_H
14
15#include <cstdint>
16#include <vector>
17
18#if defined(_WIN32)
19 // Microsoft
20 #ifdef AXIS_EXPORTING
21 #define AXIS_API extern "C" __declspec( dllexport )
22 #else
23 #define AXIS_API extern "C" __declspec( dllimport )
24 #endif
25#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
26 // GCC
27 #ifdef AXIS_EXPORTING
28 #define AXIS_API extern "C" __attribute__((visibility("default")))
29 #else
30 #define AXIS_API extern "C"
31 #endif
32#else
33 #error What platform is this?
34#endif
35
36#define AXIS_MAX_NODE_COUNT 17
37
38namespace Refract { namespace AXIS
39{
40 #define AXIS_RUNTIME_ERRORS_ENUM(DO) \
41 DO(OK) \
42 DO(PacketCallbackNotSet) \
43 DO(InvalidDongleCommand) \
44 DO(HubTimeout) \
45 DO(InvalidIPAddress) \
46 DO(InvalidParameter) \
47 DO(NoLANAdapter) \
48 DO(HTTPError) \
49 DO(HTTPException) \
50 DO(SocketError) \
51 DO(SocketException) \
52 DO(PreviousOpInProgress) \
53 DO(DongleNotConnected) \
54 DO(SerialPortError) \
55 DO(InternalError) \
56 DO(SDKNotStarted) \
57 DO(NoSubnet) \
58 DO(RUNTIME_ERROR_COUNT)
59
60 #define AXIS_PACKET_TYPES_ENUM(DO) \
61 DO(IMUData) \
62 DO(VisibleNodes) \
63 DO(PairedNodes) \
64 DO(SetWifiResponse) \
65 DO(ReportWifi) \
66 DO(ReportBatt) \
67 DO(DoubleClick) \
68 DO(Versions) \
69 DO(SuitInfo) \
70 DO(NodeAssignAck) \
71 DO(DevPacket) \
72 DO(NodeConfigResponse) \
73 DO(SkeletonData) \
74 DO(PACKET_TYPES_COUNT)
75
76 #define AXIS_DONGLE_COMMAND_TYPES_ENUM(DO) \
77 DO(Shutdown) \
78 DO(GetWifi) \
79 DO(GetBatt) \
80 DO(GetVersions) \
81 DO(Suitinfo) \
82 DO(Reboot) \
83 DO(SetWifi) \
84 DO(NodeAssign) \
85 DO(NodeInfo) \
86 DO(NodeAssignSingle) \
87 DO(NodeConfigSet) \
88 DO(Calibration) \
89 DO(NodeOperationMode) \
90 DO(Buzz) \
91 DO(LED) \
92 DO(BuzzMAC) \
93 DO(LEDMAC) \
94 DO(NodeConfigGet) \
95 DO(DONGLE_COMMAND_TYPES_COUNT)
96
97 #define AXIS_NODE_POSITIONS_ENUM(DO) \
98 DO(RightThigh) \
99 DO(RightCalf) \
100 DO(LeftThigh) \
101 DO(LeftCalf) \
102 DO(RightUpperArm) \
103 DO(RightForearm) \
104 DO(LeftUpperArm) \
105 DO(LeftForearm) \
106 DO(Spine) \
107 DO(RightFoot) \
108 DO(LeftFoot) \
109 DO(RightHand) \
110 DO(LeftHand) \
111 DO(RightShoulder) \
112 DO(LeftShoulder) \
113 DO(Head) \
114 DO(Hip) \
115 DO(Unassigned) \
116 DO(NODE_INDEX_COUNT)
117
118 #define AXIS_NODE_OPERATION_MODES_ENUM(DO) \
119 DO(Unsupported) \
120 DO(Fusion) \
121 DO(FusionNoMag) \
122 DO(OPERATION_MODE_COUNT)
123
124 #define AXIS_HUB_LOCATIONS_ENUM(DO) \
125 DO(HubLocationBack) \
126 DO(HubLocationFront) \
127 DO(AXIS_HUB_LOCATION_COUNT)
128
129 #define AXIS_HIP_PROVIDER_MODES_ENUM(DO) \
130 DO(HipProviderNone) \
131 DO(HipProviderNode) \
132 DO(HipProviderHub) \
133 DO(AXIS_HIP_PROVIDER_MODES_COUNT)
134
135 #define AXIS_NODE_CONFIG_CATEGORIES_ENUM(DO) \
136 DO(DEV) \
137 DO(Power) \
138 DO(AXIS_NODE_CONFIG_CATEGORIES_COUNT)
139
140 #define AXIS_NODE_CONFIG_DEV_PARAMS_ENUM(DO) \
141 DO(DevPacketBitflags) \
142 DO(AXIS_NODE_CONFIG_DEV_PARAMETERS_COUNT)
143
144 #define AXIS_NODE_CONFIG_POWER_PARAMS_ENUM(DO) \
145 DO(TransmissionPower) \
146 DO(TransmissionFrequency) \
147 DO(AXIS_NODE_CONFIG_POWER_PARAMETERS_COUNT)
148
149 #define AXIS_VMC_BONE_CONFIG_BONES_ENUM(DO) \
150 DO(VMCHips) \
151 DO(VMCLeftUpperLeg) \
152 DO(VMCRightUpperLeg) \
153 DO(VMCLeftLowerLeg) \
154 DO(VMCRightLowerLeg) \
155 DO(VMCLeftFoot) \
156 DO(VMCRightFoot) \
157 DO(VMCSpine) \
158 DO(VMCChest) \
159 DO(VMCUpperChest) \
160 DO(VMCNeck) \
161 DO(VMCHead) \
162 DO(VMCLeftShoulder) \
163 DO(VMCRightShoulder) \
164 DO(VMCLeftUpperArm) \
165 DO(VMCRightUpperArm) \
166 DO(VMCLeftLowerArm) \
167 DO(VMCRightLowerArm) \
168 DO(VMCLeftHand) \
169 DO(VMCRightHand) \
170 DO(VMC_CONFIG_COUNT)
172 #define AXIS_SKELETON_JOINTS_ENUM(DO) \
173 DO(SKHMD) \
174 DO(SKHead) \
175 DO(SKNeck) \
176 DO(SKUpperSpine) \
177 DO(SKMiddleSpine) \
178 DO(SKLowerSpine) \
179 DO(SKHip) \
180 DO(SKRightHip) \
181 DO(SKRightKnee) \
182 DO(SKRightAnkle) \
183 DO(SKRightFoot) \
184 DO(SKLeftHip) \
185 DO(SKLeftKnee) \
186 DO(SKLeftAnkle) \
187 DO(SKLeftFoot) \
188 DO(SKRightScapula) \
189 DO(SKRightShoulder) \
190 DO(SKRightElbow) \
191 DO(SKRightWrist) \
192 DO(SKRightHand) \
193 DO(SKLeftScapula) \
194 DO(SKLeftShoulder) \
195 DO(SKLeftElbow) \
196 DO(SKLeftWrist) \
197 DO(SKLeftHand) \
198 DO(SK_JOINT_COUNT)
200 #define MAKE_ENUM(VAR) VAR,
201
204 enum AxisRuntimeErrors : uint16_t{
205 AXIS_RUNTIME_ERRORS_ENUM(MAKE_ENUM)
206 };
207
210 enum AxisPacketTypes : uint16_t{
211 AXIS_PACKET_TYPES_ENUM(MAKE_ENUM)
212 };
213
216 enum AxisNodePositions : uint16_t{
217 AXIS_NODE_POSITIONS_ENUM(MAKE_ENUM)
218 };
219
222 enum AxisNodeOperationModes : uint16_t{
223 AXIS_NODE_OPERATION_MODES_ENUM(MAKE_ENUM)
224 };
225
228 enum AxisDongleCommandTypes : uint16_t{
229 AXIS_DONGLE_COMMAND_TYPES_ENUM(MAKE_ENUM)
230 };
231
234 enum AxisHipProviderModes : uint16_t{
235 AXIS_HIP_PROVIDER_MODES_ENUM(MAKE_ENUM)
236 };
237
240 enum AxisHubLocations : uint16_t{
241 AXIS_HUB_LOCATIONS_ENUM(MAKE_ENUM)
242 };
243
247 AXIS_NODE_CONFIG_CATEGORIES_ENUM(MAKE_ENUM)
248 };
249
252 enum AxisNodeConfigDevParams : uint16_t{
253 AXIS_NODE_CONFIG_DEV_PARAMS_ENUM(MAKE_ENUM)
254 };
255
259 AXIS_NODE_CONFIG_POWER_PARAMS_ENUM(MAKE_ENUM)
260 };
261
264 enum AxisVmcConfigBones : uint16_t{
265 AXIS_VMC_BONE_CONFIG_BONES_ENUM(MAKE_ENUM)
266 };
267
270 enum AxisSkeletonJoints : uint16_t{
272 };
273 #undef MAKE_ENUM
274
275#pragma pack(push, 8)
278 struct Quat_t
279 {
280 float x;
281 float y;
282 float z;
283 float w;
284 };
285
289 {
290 float x;
291 float y;
292 float z;
293 };
294
302
311
315 {
317 bool on;
318 uint8_t mac[6];
319 };
320
324 {
325 uint8_t wifiChannel;
326 };
327
331 {
332 uint8_t nodeCount;
333 bool success;
334 };
335
339 {
340 NodeIMUData_t nodeImuData[AXIS_MAX_NODE_COUNT];
342 };
343
347 {
348 uint8_t nodeCount;
349 NodeInfo_t nodeInfo[AXIS_MAX_NODE_COUNT];
350 };
351
360
364 {
365 uint8_t nodeCount;
366 NodeBattInfo_t nodeBattInfo[AXIS_MAX_NODE_COUNT];
367 };
368
372 {
373 uint8_t major;
374 uint8_t minor;
375 uint8_t patch;
376 };
377
385
394
403
415
427
431 {
432 float value;
433 };
434
438 {
439 uint32_t value;
440 };
441
445 {
453 uint8_t acc;
454 };
455
471
475 {
476 bool rightCalf = false;
477 bool leftCalf = false;
478 bool rightUpperArm = false;
479 bool rightForearm = false;
480 bool leftUpperArm = false;
481 bool leftForearm = false;
482 bool chest = false;
483 bool rightFoot = false;
484 bool leftFoot = false;
485 bool rightWrist = false;
486 bool leftWrist = false;
487 bool rightShoulder = false;
488 bool leftShoulder = false;
489 bool hip = false;
490 };
491
492 struct SteamVRLimbLengths_t
493 {
494 float height;
495 float unit;
496 float hmdOffsetZ;
497 float hmdOffsetY;
498 float neck;
499 float fakeNeck;
500 float shoulder;
501 float torso;
502 float spine3;
503 float spine2;
504 float spine1;
505 float hipUp;
506 float hipDown;
507 float hipWidth;
508 float hipWidthHalf;
509 float thigh;
510 float shin;
511 float foot;
512 float shoulderRootX;
513 float shoulderRootY;
514 float shoulderX;
515 float shoulderY;
516 float upperArm;
517 float forearm;
518 float hand;
519 };
520
556
559 typedef union
560 {
563 bool devPacketBitflags[DevPacket_t::DEV_PACKET_COMPONENT_COUNT];
568 uint32_t value;
570
585
589 {
591 uint8_t power;
593 uint8_t frequency;
594 };
595
603
613
621
650
677
681 {
685 uint8_t channel;
686 };
687
703
741
751
762
766 {
771 uint8_t red;
774 uint8_t green;
777 uint8_t blue;
780 uint8_t brightness;
781 };
782
786 {
788 uint8_t mac[6];
790 uint8_t intensity;
792 uint8_t duration;
793 };
794
798 {
800 uint8_t mac[6];
803 uint8_t red;
806 uint8_t green;
809 uint8_t blue;
812 uint8_t brightness;
813 };
814
844
859
863 {
865 const char* deviceName = "";
867 const char* deviceIp = "";
871 const char* deviceMac = "";
872 };
873
893
897 {
907 const char* errorString = "";
909 float battery;
911 const char* deviceName = "";
913 const char* deviceMac = "";
914 };
915
919 typedef void (*AxisRuntimeErrorCallback)(AxisRuntimeErrors runtimeError, int errorCode, const char* errorString);
924 typedef void (*AxisPacketCallback)(AxisPacketTypes packetType, const AxisPacket_t* incomingPacket);
928 typedef void (*AxisHubInfoCallback)(const AxisHubsInfo_t* hubInfo);
932 typedef void (*AxisHubStatusCallback)(const AxisHubStatus_t* hubStatus);
936 typedef void (*AxisDongleConnectionCallback)(bool connected);
937
945
958
966#pragma pack(pop)
967
989 AXIS_API bool IsDongleConnected();
1007 AXIS_API AxisRuntimeErrors GetHubInfoPageNumber(uint8_t pageNumber, AxisHubInfoCallback callback);
1030 AXIS_API AxisRuntimeErrors PairWithHub(const char* ipAddress, int port, AxisRuntimeErrorCallback callback);
1109 AXIS_API void Stop();
1117 AXIS_API AxisRuntimeErrors EnableVMCOSCOutput(const char* ipAddress, int port = 39539);
1125 AXIS_API void DisableOSC();
1136 AXIS_API AxisRuntimeErrors SetHubIP(const char* ipAddress, int port);
1137
1138 AXIS_API const char* GetAxisRuntimeErrorName(AxisRuntimeErrors error);
1139 AXIS_API const char* GetAxisPacketTypeName(AxisPacketTypes type);
1140 AXIS_API const char* GetAxisNodePositionName(AxisNodePositions index);
1141 AXIS_API const char* GetAxisNodeOperationModeName(AxisNodeOperationModes mode);
1142 AXIS_API const char* GetAxisDongleCommandTypeName(AxisDongleCommandTypes command);
1143 AXIS_API const char* GetAxisHubLocationName(AxisHubLocations location);
1144 AXIS_API const char* GetAxisHipProviderModeName(AxisHipProviderModes mode);
1145 AXIS_API const char* GetAxisNodeConfigCategoryName(AxisNodeConfigCategories category);
1146 AXIS_API const char* GetAxisNodeConfigDevParamName(AxisNodeConfigDevParams parameter);
1147 AXIS_API const char* GetAxisNodeConfigPowerParamName(AxisNodeConfigPowerParams parameter);
1148 AXIS_API const char* GetAxisVMCBoneConfigBoneName(AxisVmcConfigBones bone);
1149 AXIS_API const char* GetAxisSkeletonJointName(AxisSkeletonJoints joint);
1150
1151 AXIS_API AxisRuntimeErrors SetSteamVRLimbLengths(const SteamVRLimbLengths_t* lengths);
1152 AXIS_API void SetSteamVRManualOrientationOffset(float offset);
1153
1154 // These functions are here because it is easier to do this than to try and data marshall a union from C# -> C++
1155 AXIS_API AxisRuntimeErrors SendNoPayloadCommand(AxisDongleCommandTypes type);
1157 AXIS_API AxisRuntimeErrors SendRebootCommand(RebootCommandPayload_t::RebootCommandModes mode);
1158 AXIS_API AxisRuntimeErrors SendSetWifiCommand(uint8_t channel);
1159 AXIS_API AxisRuntimeErrors SendNodeAssignCommand(const NodesInfo_t* nodesInfo);
1160 AXIS_API AxisRuntimeErrors SendNodeInfoCommand(NodeInfoCommandPayload_t::NodeInfoCommandModes mode);
1161 AXIS_API AxisRuntimeErrors SendNodeAssignSingleCommand(const NodeInfo_t* nodeInfo);
1162 AXIS_API AxisRuntimeErrors SendSetDevpacketBitflags(bool accel, bool gyro, bool mag, bool fusion, bool linAccel);
1163 AXIS_API AxisRuntimeErrors SendSetPowerSettings(AxisNodeConfigPowerParams param, uint32_t value);
1164 AXIS_API AxisRuntimeErrors SendGetPowerSettings();
1165 AXIS_API AxisRuntimeErrors SendSetOperationMode(AxisNodeOperationModes mode);
1166 AXIS_API AxisRuntimeErrors SendLEDCommand(const LEDCommandPayload_t* command);
1167 AXIS_API AxisRuntimeErrors SendBuzzCommand(const BuzzCommandPayload_t* command);
1168 AXIS_API AxisRuntimeErrors SendLEDMACCommand(const LEDMACCommandPayload_t* command);
1169 AXIS_API AxisRuntimeErrors SendBuzzMACCommand(const BuzzMACCommandPayload_t* command);
1170
1171 // These functions are for unit testing C++ -> C# data marshalling
1172 AXIS_API void TriggerTestAxisPacket(AxisPacketTypes packetType);
1173 AXIS_API void TriggerTestAxisHubInfo(AxisHubInfoCallback callback);
1174 AXIS_API void TriggerTestAxisHubStatus(AxisHubStatusCallback callback);
1175 AXIS_API void TriggerTestDongleConnection(AxisDongleConnectionCallback callback);
1176
1177}
1178}
1179#endif // _AXIS_SDK_API_H
AxisRuntimeErrors EnableVMCOSCOutput(const char *ipAddress, int port=39539)
Enables output to VMC output via OSC.
#define AXIS_SKELETON_JOINTS_ENUM(DO)
Definition axis_sdk.h:172
void(* AxisRuntimeErrorCallback)(AxisRuntimeErrors runtimeError, int errorCode, const char *errorString)
Callback for runtime errors.
Definition axis_sdk.h:919
void(* AxisHubStatusCallback)(const AxisHubStatus_t *hubStatus)
Callback for getting Axis Hub status.
Definition axis_sdk.h:932
void(* AxisDongleConnectionCallback)(bool connected)
Callback for when dongle is connected or disconnected.
Definition axis_sdk.h:936
void(* AxisPacketCallback)(AxisPacketTypes packetType, const AxisPacket_t *incomingPacket)
Callback for getting packets from the dongle.
Definition axis_sdk.h:924
void(* AxisHubInfoCallback)(const AxisHubsInfo_t *hubInfo)
Callback for getting Axis Hub info.
Definition axis_sdk.h:928
AxisRuntimeErrors
Runtime error codes.
Definition axis_sdk.h:204
AxisNodeOperationModes
Operating modes used by AXIS nodes.
Definition axis_sdk.h:222
AxisHubLocations
Axis Hub locations.
Definition axis_sdk.h:240
AxisSkeletonJoints
Joints used for Refract::AXIS::SkeletonData_t.
Definition axis_sdk.h:270
AxisNodePositions
NodeIndex and what position on the body they represent.
Definition axis_sdk.h:216
AxisPacketTypes
Packet types.
Definition axis_sdk.h:210
AxisVmcConfigBones
Bones used for VMC.
Definition axis_sdk.h:264
AxisDongleCommandTypes
Command types.
Definition axis_sdk.h:228
AxisNodeConfigPowerParams
Parameters for node configuration in Refract::AXIS::AxisNodeConfigCategories::Power category.
Definition axis_sdk.h:258
AxisNodeConfigCategories
Categories for node configuration. See Refract::AXIS::NodeConfig_t.
Definition axis_sdk.h:246
AxisNodeConfigDevParams
Parameters for node configuration in Refract::AXIS::AxisNodeConfigCategories::DEV category.
Definition axis_sdk.h:252
AxisHipProviderModes
Hip Provider modes.
Definition axis_sdk.h:234
@ HubLocationBack
Definition axis_sdk.h:241
@ SK_JOINT_COUNT
Definition axis_sdk.h:271
@ VMC_CONFIG_COUNT
Definition axis_sdk.h:265
@ HipProviderNone
Definition axis_sdk.h:235
AxisRuntimeErrors PairWithHub(const char *ipAddress, int port, AxisRuntimeErrorCallback callback)
Pair with Hub.
AxisRuntimeErrors SendDongleCommand(const AxisDongleCommand_t *command)
Sends a command to the dongle.
AxisRuntimeErrors SetHubIP(const char *ipAddress, int port)
Set the IP of the Axis Hub.
AxisRuntimeErrors ResetHubStream(AxisRuntimeErrorCallback callback)
Tells connected Axis Hub to reset position tracking.
AxisRuntimeErrors StopHubStream(AxisRuntimeErrorCallback callback)
Tells connected Axis Hub to stop streaming.
AxisRuntimeErrors StartHubStream(AxisRuntimeErrorCallback callback)
Tells connected Axis Hub to start streaming.
bool IsDongleConnected()
Check whether the dongle is connected or not.
AxisRuntimeErrors SetSteamVRTrackerProfile(const SteamVRTrackerProfile_t *trackers)
Set which trackers for SteamVR are enabled/disabled.
AxisRuntimeErrors SetHipProviderMode(AxisHipProviderModes mode)
Set where the sdk should get the hip information from.
AxisRuntimeErrors SearchForAxisHub(AxisHubInfoCallback callback)
Search for Axis Hubs.
AxisRuntimeErrors SetSteamVRUserHeight(float height)
Set height for user which is used to guesstimate limb lengths.
AxisRuntimeErrors GetHubInfoPageNumber(uint8_t pageNumber, AxisHubInfoCallback callback)
Returns specific page of Refract::AXIS::AxisHubsInfo_t.
AxisRuntimeErrors Start()
Start the SDK. Call SetConfig first.
AxisRuntimeErrors IsAxisHubConnected(AxisRuntimeErrorCallback callback)
Check whether the hub is connected or not.
AxisRuntimeErrors EnableSteamVR(const AxisSteamVRConfig_t *config)
Enables SteamVR integration.
void Stop()
Stop the SDK.
AxisRuntimeErrors DisableSteamVR()
Disables SteamVR integration.
AxisRuntimeErrors GetHubStatus(AxisHubStatusCallback callback)
Get Hub Status.
void DisableOSC()
Disables OSC output.
void SetVMCBoneConfig(AxisVMCBoneConfig_t *config)
Sets which bones to output to OSC. Default is all on.
AxisRuntimeErrors SetConfig(const AxisSDKConfig_t *config)
SetConfig before calling Start.
AxisRuntimeErrors SetHubLocation(AxisHubLocations location)
Set the location of the Axis Hub (whether mounted on user's back or front)
AxisRuntimeErrors EnableVRChatOSCOutput()
Enables output to VR Chat via OSC.
Dongle command.
Definition axis_sdk.h:848
AxisDongleCommandTypes type
The type of command.
Definition axis_sdk.h:850
DongleCommandPayload_t payload
Payload of the command. The following commands do NOT have payloads:
Definition axis_sdk.h:857
Infomation for a device with Axis Hub.
Definition axis_sdk.h:863
const char * deviceMac
MAC address of the device with Axis Hub.
Definition axis_sdk.h:871
const char * deviceIp
IP address of the device with Axis Hub.
Definition axis_sdk.h:867
int devicePort
Port of the device with Axis Hub.
Definition axis_sdk.h:869
const char * deviceName
Name of the device with Axis Hub.
Definition axis_sdk.h:865
Information regarding Axis Hub status.
Definition axis_sdk.h:897
AxisRuntimeErrors error
Status of the GetHubStatus request.
Definition axis_sdk.h:903
const char * deviceName
Hub device name.
Definition axis_sdk.h:911
const char * errorString
String describing the error if any.
Definition axis_sdk.h:907
float battery
Battery level.
Definition axis_sdk.h:909
const char * deviceMac
Hub MAC address.
Definition axis_sdk.h:913
int errorCode
Error code of the error if any.
Definition axis_sdk.h:905
Array with hub information.
Definition axis_sdk.h:877
const char * errorString
String describing the error if any.
Definition axis_sdk.h:883
AxisRuntimeErrors error
Status of the SearchForAxisHub request.
Definition axis_sdk.h:881
AxisHubInfo_t hubsInfo[10]
Array of information for devices with Axis Hub.
Definition axis_sdk.h:891
uint8_t pageNumber
Current page number. Starts from 0.
Definition axis_sdk.h:888
uint8_t hubsDetected
Total number of hubs in the hubsInfo array.
Definition axis_sdk.h:885
Configuration struct for Axis SDK.
Definition axis_sdk.h:949
AxisDongleConnectionCallback dongleConnectionCallback
Set this to get a callback when the dongle is connected / disconnected.
Definition axis_sdk.h:952
AxisHubLocations hubLocation
Where the Axis hub is located on the user's body.
Definition axis_sdk.h:956
AxisRuntimeErrorCallback runtimeErrorCallback
Will be called when a runtime error occurs outside of api functions.
Definition axis_sdk.h:950
bool steamVR
Enable/disable steamVR driver integration. Default off.
Definition axis_sdk.h:953
AxisPacketCallback packetCallback
Set this to get packets from the dongle. Must be set or SetConfig will return AxisRuntimeErrors::Pack...
Definition axis_sdk.h:951
AxisSteamVRConfig_t steamVRConfig
Configuration for SteamVR.
Definition axis_sdk.h:954
AxisHipProviderModes hipProvider
Where hip information is being derived from.
Definition axis_sdk.h:955
Configuration struct for SteamVR integration.
Definition axis_sdk.h:941
float userHeight
Height of user in cm. Used to guesstimate limb lengths.
Definition axis_sdk.h:942
SteamVRTrackerProfile_t steamVRTrackers
Which trackers for SteamVR are enabled/disabled.
Definition axis_sdk.h:943
Configuration for which bones to output to VMC.
Definition axis_sdk.h:962
bool config[AxisVmcConfigBones::VMC_CONFIG_COUNT]
Array of booleans. Use Refract::AXIS::AxisVmcConfigBones.
Definition axis_sdk.h:964
Battery info.
Definition axis_sdk.h:364
uint8_t nodeCount
Number of nodes with data in the nodeBattInfo array.
Definition axis_sdk.h:365
NodeBattInfo_t nodeBattInfo[AXIS_MAX_NODE_COUNT]
Array of NodeInfo. Be sure to check nodeCount.
Definition axis_sdk.h:366
Payload for Refract::AXIS::AxisDongleCommandTypes::Buzz.
Definition axis_sdk.h:754
uint8_t intensity
Vibration intensity (1-255)
Definition axis_sdk.h:758
uint8_t duration
Vibration duration (value * 100 ms)
Definition axis_sdk.h:760
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:756
Payload for Refract::AXIS::AxisDongleCommandTypes::BuzzMAC.
Definition axis_sdk.h:786
uint8_t intensity
Vibration intensity (1-255)
Definition axis_sdk.h:790
uint8_t duration
Vibration duration (value * 100 ms)
Definition axis_sdk.h:792
uint8_t mac[6]
MAC address of the node to vibrate.
Definition axis_sdk.h:788
A packet with raw sensor data and sensor fusion state useful for development. Only available from fir...
Definition axis_sdk.h:525
uint32_t timeStamp
Ticks since the node started.
Definition axis_sdk.h:551
DevPacketComponents
Components in DevPacket.
Definition axis_sdk.h:528
@ Gyroscope
Gyroscope.
Definition axis_sdk.h:530
@ Magnetometer
Magnetometer.
Definition axis_sdk.h:531
@ LinearAccelerometer
Accelerometer with gravity removed.
Definition axis_sdk.h:533
@ Accelerometer
Accelerometer.
Definition axis_sdk.h:529
@ FusionStates
State of fusion algorithm.
Definition axis_sdk.h:532
bool flags[DEV_PACKET_COMPONENT_COUNT]
Whether or not the payload has data Check flags[DevPacket_t::DevPacketComponents::Accelerometer] to s...
Definition axis_sdk.h:536
DevPacketFusionState_t fusionState
Check flags[DevPacket_t::DevPacketComponents::FusionStates] to see if this has data.
Definition axis_sdk.h:547
DevPacketSensorData_t linearAccelerometer
Check flags[DevPacket_t::DevPacketComponents::LinearAccelerometer] to see if this has data.
Definition axis_sdk.h:554
DevPacketSensorData_t gyroscope
Check flags[DevPacket_t::DevPacketComponents::Gyroscope] to see if this has data.
Definition axis_sdk.h:542
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:549
DevPacketSensorData_t magnetometer
Check flags[DevPacket_t::DevPacketComponents::Magnetometer] to see if this has data.
Definition axis_sdk.h:545
State of the sensor fusion algorithm.
Definition axis_sdk.h:459
bool accelRecov
Whether accelerometer is in recovery.
Definition axis_sdk.h:468
float magRecovTrigger
Recovery trigger for magnetometer.
Definition axis_sdk.h:463
bool accelIgnored
Whether accelerometer is being ignored.
Definition axis_sdk.h:464
bool magRecov
Whether magnetometer is in recovery.
Definition axis_sdk.h:469
bool initializing
Whether fusion algorithm is in initializing state.
Definition axis_sdk.h:466
float accelError
Accelerometer error value in degress.
Definition axis_sdk.h:460
float magError
Magnetometer error value in degrees.
Definition axis_sdk.h:462
float accelRecovTrigger
Recovery trigger for accelerometer.
Definition axis_sdk.h:461
bool angularRateRecov
Whether gyroscope is in recovery state.
Definition axis_sdk.h:467
bool magIgnored
Whether magnetometer is being ignored.
Definition axis_sdk.h:465
Sensor Data for DevPacket.
Definition axis_sdk.h:445
uint8_t acc
Sensor accuracy.
Definition axis_sdk.h:453
Vector3_t data
Sensor data.
Definition axis_sdk.h:447
Version info for the dongle.
Definition axis_sdk.h:381
Version_t hardware
Hardware version.
Definition axis_sdk.h:382
Version_t firmware
Software version.
Definition axis_sdk.h:383
IMUData.
Definition axis_sdk.h:339
PosQuat_t hubData
Orientation and position data from Axis Hub. Will be default value if Axis Hub is not on.
Definition axis_sdk.h:341
NodeIMUData_t nodeImuData[AXIS_MAX_NODE_COUNT]
Array of individual node data. Refer to Refract::AXIS::AxisNodePositions for body positions.
Definition axis_sdk.h:340
Payload for Refract::AXIS::AxisDongleCommandTypes::LED.
Definition axis_sdk.h:766
uint8_t green
Green value (0-255)
Definition axis_sdk.h:774
uint8_t blue
Blue value (0-255)
Definition axis_sdk.h:777
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:768
uint8_t brightness
Brightness value (0-255)
Definition axis_sdk.h:780
uint8_t red
Red value (0-255)
Definition axis_sdk.h:771
Payload for Refract::AXIS::AxisDongleCommandTypes::LEDMAC.
Definition axis_sdk.h:798
uint8_t green
Green value (0-255)
Definition axis_sdk.h:806
uint8_t mac[6]
MAC address of the node whose LED color is to be changed.
Definition axis_sdk.h:800
uint8_t red
Red value (0-255)
Definition axis_sdk.h:803
uint8_t brightness
Brightness value (0-255)
Definition axis_sdk.h:812
uint8_t blue
Blue value (0-255)
Definition axis_sdk.h:809
Node battery info.
Definition axis_sdk.h:355
float voltageLevel
Voltage of the battery. 0 is node is off.
Definition axis_sdk.h:358
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:356
uint8_t batteryLevel
Battery level as a percentage. 0 is node is off.
Definition axis_sdk.h:357
Payload for Refract::AXIS::AxisDongleCommandTypes::Calibration.
Definition axis_sdk.h:707
CalibrationCommandTypes type
Calibration type.
Definition axis_sdk.h:737
CalibrationCommandTypes
Types of calibration.
Definition axis_sdk.h:710
@ Zero
Only zero.
Definition axis_sdk.h:716
@ All
Do both calibrate frame and zero.
Definition axis_sdk.h:712
@ CalibrateFrame
Only calibrate the reference frame.
Definition axis_sdk.h:714
CalibrationCommandPoses
Pose for calibration.
Definition axis_sdk.h:720
@ Body
A one step calibration type.
Definition axis_sdk.h:734
@ TableFloor
A more accurate type of calibration that requires 2 steps.
Definition axis_sdk.h:726
CalibrationCommandPoses pose
Calibration pose.
Definition axis_sdk.h:739
Node configuration packet. Only available from firmware version 2.4.x onwards.
Definition axis_sdk.h:575
uint8_t parameter
Parameter depending on the category.
Definition axis_sdk.h:582
NodeConfigPayload_t payload
Payload according to category and parameter.
Definition axis_sdk.h:583
AxisNodeConfigCategories category
Category of the configuration.
Definition axis_sdk.h:578
Node configuration float payload.
Definition axis_sdk.h:431
float value
float value
Definition axis_sdk.h:432
Node configuration uint32_t payload.
Definition axis_sdk.h:438
uint32_t value
uint32_t payload
Definition axis_sdk.h:439
Node configuration response packet. Only from firmware version 2.4.x onwards.
Definition axis_sdk.h:607
NodeConfigResponsePayload_t payload
Payload according to category.
Definition axis_sdk.h:611
AxisNodeConfigCategories category
Category of the configuration response.
Definition axis_sdk.h:610
Payload for NodeConfigResponse_t for Refract::AXIS::AxisNodeConfigCategories::Power.
Definition axis_sdk.h:589
uint8_t power
Transmission power in dBm.
Definition axis_sdk.h:591
uint8_t frequency
Transmission frequency in Hz.
Definition axis_sdk.h:593
IMUData.
Definition axis_sdk.h:306
Vector3_t linAccel
Linear acceleration (relative to node) in m/s2.
Definition axis_sdk.h:309
Quat_t quat
Orientation data.
Definition axis_sdk.h:308
bool on
Whether the node is on or not.
Definition axis_sdk.h:307
Node Info.
Definition axis_sdk.h:315
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:316
uint8_t mac[6]
MAC address of the node.
Definition axis_sdk.h:318
bool on
Whether the node is on or not. Only used for Refract::AXIS::AxisPacketTypes::PairedNodes.
Definition axis_sdk.h:317
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeInfo.
Definition axis_sdk.h:691
NodeInfoCommandModes
Modes for NodeInfoCommandPayload_t.
Definition axis_sdk.h:694
@ Paired
Get info for paired nodes.
Definition axis_sdk.h:698
@ Visible
Get info for visible nodes (non-paired)
Definition axis_sdk.h:696
NodeInfoCommandModes mode
Node info mode.
Definition axis_sdk.h:701
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeOperationMode.
Definition axis_sdk.h:745
AxisNodeOperationModes mode
Operation mode for the nodes.
Definition axis_sdk.h:749
Suit info for nodes.
Definition axis_sdk.h:407
uint8_t mac[6]
MAC address of the node.
Definition axis_sdk.h:409
Version_t firmware
Firmware version of the node.
Definition axis_sdk.h:410
AxisNodeOperationModes operationMode
Operation mode of the node.
Definition axis_sdk.h:411
bool on
Whether the node is on or not.
Definition axis_sdk.h:413
uint8_t batteryPercent
Battery level of the node in percent.
Definition axis_sdk.h:412
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:408
Version info for nodes.
Definition axis_sdk.h:389
Version_t hardware
Hardware version.
Definition axis_sdk.h:391
Version_t firmware
Software version.
Definition axis_sdk.h:392
AxisNodePositions nodeIndex
Position of the node.
Definition axis_sdk.h:390
Node info.
Definition axis_sdk.h:347
NodeInfo_t nodeInfo[AXIS_MAX_NODE_COUNT]
Array of NodeInfo. Be sure to check nodeCount.
Definition axis_sdk.h:349
uint8_t nodeCount
Number of nodes with data in the nodeInfo array.
Definition axis_sdk.h:348
Position and Orientation data.
Definition axis_sdk.h:298
Vector3_t pos
Position.
Definition axis_sdk.h:300
Quat_t quat
Orientation.
Definition axis_sdk.h:299
Quaternion.
Definition axis_sdk.h:279
float w
w / r
Definition axis_sdk.h:283
float y
y / j
Definition axis_sdk.h:281
float z
z / k
Definition axis_sdk.h:282
float x
x / i
Definition axis_sdk.h:280
Payload for Refract::AXIS::AxisDongleCommandTypes::Reboot.
Definition axis_sdk.h:654
RebootCommandModes
Modes for RebootCommandPayload_t.
Definition axis_sdk.h:657
@ Legs
Reboot only paired nodes on legs.
Definition axis_sdk.h:665
@ UpperBody
Reboot only paired nodes on upper body.
Definition axis_sdk.h:672
@ AllPaired
Reboot all paired nodes.
Definition axis_sdk.h:659
RebootCommandModes mode
Reboot mode.
Definition axis_sdk.h:675
SetWifi Response.
Definition axis_sdk.h:331
bool success
Whether SetWifi was successful or not.
Definition axis_sdk.h:333
uint8_t nodeCount
Number of nodes currently paired.
Definition axis_sdk.h:332
Orientation and position of joints. X is right, Y is up, -Z is forward.
Definition axis_sdk.h:617
PosQuat_t joints[AxisSkeletonJoints::SK_JOINT_COUNT]
Array of joint orientation and position. Use Refract::AXIS::AxisSkeletonJoints.
Definition axis_sdk.h:619
Tracker profile for SteamVR.
Definition axis_sdk.h:475
bool leftForearm
Whether left forearm tracker is on or off.
Definition axis_sdk.h:481
bool chest
Whether chest tracker is on or off.
Definition axis_sdk.h:482
bool leftCalf
Whether left calf tracker is on or off.
Definition axis_sdk.h:477
bool rightForearm
Whether right forearm tracker is on or off.
Definition axis_sdk.h:479
bool rightWrist
Whether right wrist tracker is on or off.
Definition axis_sdk.h:485
bool rightFoot
Whether right foot tracker is on or off.
Definition axis_sdk.h:483
bool rightUpperArm
Whether right upper arm tracker is on or off.
Definition axis_sdk.h:478
bool rightShoulder
Whether right shoulder tracker is on or off.
Definition axis_sdk.h:487
bool leftUpperArm
Whether left upper arm tracker is on or off.
Definition axis_sdk.h:480
bool hip
Whether hip tracker is on or off.
Definition axis_sdk.h:489
bool leftShoulder
Whether left shoulder tracker is on or off.
Definition axis_sdk.h:488
bool leftFoot
Whether left foot tracker is on or off.
Definition axis_sdk.h:484
bool leftWrist
Whether left wrist tracker is on or off.
Definition axis_sdk.h:486
bool rightCalf
Whether right calf tracker is on or off.
Definition axis_sdk.h:476
Suit info for nodes and receiver.
Definition axis_sdk.h:419
uint8_t nodeCount
Number of nodes with data in the nodesSuitInfo array.
Definition axis_sdk.h:420
NodeSuitInfo_t nodesSuitInfo[AXIS_MAX_NODE_COUNT]
Array of NodeSuitInfo_t. Be sure to check nodeCount.
Definition axis_sdk.h:421
uint8_t homeWifiChannel
Wifi channel the dongle should switch to after exiting pairing mode.
Definition axis_sdk.h:424
uint8_t currentWifiChannel
Wifi channel the dongle is currently on.
Definition axis_sdk.h:425
uint8_t dongleMAC[6]
MAC of the dongle.
Definition axis_sdk.h:422
DongleVersion_t dongleVersion
Version of the dongle.
Definition axis_sdk.h:423
Vector of 3 floats.
Definition axis_sdk.h:289
float z
z
Definition axis_sdk.h:292
float x
x
Definition axis_sdk.h:290
float y
y
Definition axis_sdk.h:291
Version info.
Definition axis_sdk.h:372
uint8_t patch
Patch revision number.
Definition axis_sdk.h:375
uint8_t major
Major revision number.
Definition axis_sdk.h:373
uint8_t minor
Minor revision number.
Definition axis_sdk.h:374
Version information in response to a GetVersions command.
Definition axis_sdk.h:398
DongleVersion_t dongleVersion
Version of the dongle.
Definition axis_sdk.h:399
NodeVersion_t nodeVersions[AXIS_MAX_NODE_COUNT]
Array of NodeVersion_t. Be sure to check nodeCount.
Definition axis_sdk.h:401
uint8_t nodeCount
Number of nodes with data in the nodeVersions array.
Definition axis_sdk.h:400
Payload for Refract::AXIS::AxisDongleCommandTypes::SetWifi.
Definition axis_sdk.h:681
uint8_t channel
Channel to change to.
Definition axis_sdk.h:685
GetWifi Response.
Definition axis_sdk.h:324
uint8_t wifiChannel
Wifi channel currently used.
Definition axis_sdk.h:325
AxisPacket. Check the packetType and access the respective member.
Definition axis_sdk.h:625
IMUData_t imuData
Definition axis_sdk.h:627
WifiRes_t wifiRes
Definition axis_sdk.h:636
SkeletonData_t skeletonData
Definition axis_sdk.h:648
NodeConfigResponse_t nodeConfigRes
Definition axis_sdk.h:646
DevPacket_t devPacket
Definition axis_sdk.h:644
SetWifiRes_t setWifiRes
Definition axis_sdk.h:634
SuitInfo_t suitInfo
Definition axis_sdk.h:642
BattInfo_t battInfo
Definition axis_sdk.h:638
NodesInfo_t nodesInfo
Definition axis_sdk.h:632
VersionsInfo_t versions
Definition axis_sdk.h:640
Payload of dongle command.
Definition axis_sdk.h:818
WifiCommandPayload_t wifi
Payload for Refract::AXIS::AxisDongleCommandTypes::SetWifi.
Definition axis_sdk.h:822
RebootCommandPayload_t reboot
Payload for Refract::AXIS::AxisDongleCommandTypes::Reboot.
Definition axis_sdk.h:820
BuzzCommandPayload_t buzz
Payload for Refract::AXIS::AxisDongleCommandTypes::Buzz.
Definition axis_sdk.h:836
LEDCommandPayload_t LED
Payload for Refract::AXIS::AxisDongleCommandTypes::LED.
Definition axis_sdk.h:838
NodeInfoCommandPayload_t nodeInfo
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeInfo.
Definition axis_sdk.h:826
LEDMACCommandPayload_t LEDMAC
Payload for Refract::AXIS::AxisDongleCommandTypes::LEDMAC.
Definition axis_sdk.h:842
NodeInfo_t nodeAssignSingle
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeAssignSingle.
Definition axis_sdk.h:828
NodesInfo_t nodeAssign
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeAssign.
Definition axis_sdk.h:824
NodeOperationModeCommandPayload_t nodeOperationMode
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeOperationMode.
Definition axis_sdk.h:834
NodeCalibrationCommandPayload_t calibration
Payload for Refract::AXIS::AxisDongleCommandTypes::Calibration.
Definition axis_sdk.h:832
NodeConfig_t nodeConfig
Payload for Refract::AXIS::AxisDongleCommandTypes::NodeConfigSet & Refract::AXIS::AxisDongleCommandTy...
Definition axis_sdk.h:830
BuzzMACCommandPayload_t buzzMAC
Payload for Refract::AXIS::AxisDongleCommandTypes::BuzzMAC.
Definition axis_sdk.h:840
Payload for Node configuration packet.
Definition axis_sdk.h:560
uint32_t value
Generic unsigned integer value.
Definition axis_sdk.h:568
Payload for Node configuration response packet.
Definition axis_sdk.h:599
NodeConfigResponsePowerPayload_t power
Payload Refract::AXIS::AxisNodeConfigCategories::Power.
Definition axis_sdk.h:601