-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathITimestampedDataSubscriber.h
29 lines (28 loc) · 1.32 KB
/
ITimestampedDataSubscriber.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "AHRSProtocol.h"
/**
* The ITimestampedDataSubscriber interface provides a method for consumers
* of navX-Model device data to be rapidly notified whenever new data
* has arrived.
*
* - timestampedDataReceived(): reception of sensor-timestamped data
*
* A "sensor" timestamp is provided, generated by the navX-Model device, which is
* at millisecond resolution. A "system timestamp", also at millisecond resolution,
* is also provided, which represents as accurately as possible the time at which the
* data was acquired from the navX-Model device. Note that the "system timestamp"
* typically has more jitter since it is generated by the host of the navX-Model
* device.
*
* Thus, in general sensor timestamps are preferred, as they are generated
* by the navX-Model device motion processor and has a greater accuracy (+/- 1ms) than the
* system timestamp which is vulnerable to latencies introduced by the
* host operating system.
*
* The system timestamp is provided to allow performance monitoring of the
* navX-Model device host's data acquisition process.
**/
class ITimestampedDataSubscriber {
public:
virtual ~ITimestampedDataSubscriber(){}
virtual void timestampedDataReceived( long system_timestamp, long sensor_timestamp, AHRSProtocol::AHRSUpdateBase& sensor_data, void * context ) = 0;
};