@@ -53,11 +53,11 @@ class GroupedDataSubscriber(Subscriber):
53
53
54
54
If incoming frame rate is higher than the samples per second, or timestamp alignment does not accurately coinside with
55
55
the subsecond distribution, some data will be downsampled. Downsampled data count is tracked and reported to through the
56
- downsampledcount property.
56
+ ` downsampledcount` property.
57
57
58
58
Only a single one-second data buffer will be published at a time. If data cannot be processed within the one-second
59
- window, a warning message will be displayed and the data will be skipped. The number of skipped data sets is tracked
60
- and reported through the processmissedcount property.
59
+ window, a warning message will be displayed and any new data will be skipped. The number of skipped data sets is tracked
60
+ and reported through the ` processmissedcount` property.
61
61
62
62
This example depends on a semi-accurate system clock to group data by timestamp. If the system clock is not accurate,
63
63
data may not be grouped as expected.
@@ -346,7 +346,7 @@ def process_data(subscriber: GroupedDataSubscriber, timestamp: np.uint64, databu
346
346
The function will only be called once per second with a buffer of grouped data for the second.
347
347
If the function processing time exceeds the one second window, a warning message will be displayed
348
348
and new data will be skipped. The number of skipped data sets is tracked and reported through the
349
- processmissed count property.
349
+ `processmissedcount` property.
350
350
351
351
Parameters:
352
352
timestamp: The timestamp, at top of second, for the grouped data
@@ -373,13 +373,15 @@ def process_data(subscriber: GroupedDataSubscriber, timestamp: np.uint64, databu
373
373
# 2024-07-30 17:55:29.366
374
374
375
375
# At this point, all measurements are aligned to the same subsecond timestamp
376
+
377
+ # If you know which measurement you are looking for, you can use the following loopup:
378
+ # measurement = measurements.get(my_signalid)
379
+
380
+ # Loop through each measurement in the subsecond time-aligned group
376
381
for measurement in measurements .values ():
377
382
# To use UUID values, you can use the following loop instead:
378
383
# for signalid, measurement in measurements.items():
379
384
380
- # If you know which measurement you are looking for, you can use the following loopup:
381
- # measurement = measurements.get(my_signalid)
382
-
383
385
# Note:
384
386
# measurement.value is a numpy float64
385
387
# measurement.timestamp is a numpy uint64 (in ticks, i.e., 100-nanosecond intervals)
0 commit comments