Low-Level C++ SDK  v1.2.0
Loading...
Searching...
No Matches
WeArtTrackingRawData.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "WeArtCommon.h"
9#include "WeArtMessages.h"
10#include <queue>
11
14public:
15
19 WeArtTrackingRawData(HandSide handSide, ActuationPoint actuationPoint);
20
22 struct Sample {
24 std::uint64_t timestamp;
27 };
28
32
35 void AddSampleCallback(std::function<void(Sample)> callback);
36
38 void OnMessageReceived(WeArtMessage* msg) override;
39
40private:
41 HandSide handSide;
42 ActuationPoint actuationPoint;
43
44 const unsigned int K_NUM_SAMPLES = 3;
45 std::queue<Sample> samples;
46 std::vector<std::function<void(Sample)>> callbacks;
47};
48
HandSide
Definition: WeArtCommon.h:17
Message Listener basic interface.
Definition: WeArtMessageListener.h:9
Object used to track the raw sensors data for a single thimble.
Definition: WeArtTrackingRawData.h:13
void OnMessageReceived(WeArtMessage *msg) override
Callback called when an accepted message is received.
Definition: WeArtTrackingRawData.cpp:26
void AddSampleCallback(std::function< void(Sample)> callback)
Adds a callback called whenever a new sample is received.
Definition: WeArtTrackingRawData.cpp:22
Sample GetLastSample()
Get the last sample received.
Definition: WeArtTrackingRawData.cpp:16
Definition: WeArtCommon.h:123
Sensor data sample.
Definition: WeArtTrackingRawData.h:22
SensorData data
Sampled sensor data.
Definition: WeArtTrackingRawData.h:26
std::uint64_t timestamp
Timestamp when the sample was created (in milliseconds unix epoch time)
Definition: WeArtTrackingRawData.h:24