You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Processors/Channel/InfoObjects.h
+53-2Lines changed: 53 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -299,11 +299,22 @@ class PLUGIN_API EventChannel :
299
299
BINARY_BASE_VALUE = 10
300
300
};
301
301
302
-
/** Default constructor
302
+
/**
303
+
Enumerator indicating where the timestamps for the event are originating, so they can be easily synchronized
304
+
*/
305
+
enum EventTimestampOrigin
306
+
{
307
+
timestampsFromContinuousSource, /* The timestamps from this event originate in a source processor alongside related continuous signals.
308
+
Typical for */
309
+
timestampsDerivedFromChannel, /* The timestamps are derived from a channel. Typical for events created by filter nodes */
310
+
timestampsFromGlobalSource /* The timestamps are derived from the global timed. Typical for sources without continuous channels */
311
+
};
312
+
313
+
/** Default constructor. Use this if the event is unrelated to any continuous data.
303
314
@param type The type of event this channel represents (TTL, TEXT, BYINARY_MSG)
304
315
@param numChannels The number of virtual channels
305
316
@param dataLength The length of the event payload
306
-
@param sampleRate the sample rate this channel timestamps are referred to
317
+
@param sampleRate the sample rate this channel timestamps are referred to. If less or equal than zero will automatically get set to the processor sample rate or the global one
307
318
@param source A pointer to the source processor
308
319
@param subproc Optional. The source subprocessor index.
309
320
@@ -316,9 +327,35 @@ class PLUGIN_API EventChannel :
316
327
-For message events, the length of the string in characters
317
328
-For typed array events, the number of elements
318
329
330
+
This constructor will set the timestamp origin flag to timestampFromContinuousSource if the source processor isGeneratesTimestamps() returns true
@@ -358,11 +395,25 @@ class PLUGIN_API EventChannel :
358
395
/** Handy method to get an equivalente metadata value type for the main event data*/
359
396
BaseType getEquivalentMetaDataType() const;
360
397
398
+
/** Returns which kind of origin the timestamps for these events have */
399
+
EventTimestampOrigin getTimestampOrigin() const;
400
+
401
+
/** Returns the processor id which generated the timestamps, in case they are derived from a channel. Otherwise it returns the same as getSourceNodeId()*/
402
+
uint16 getTimestampOriginProcessor() const;
403
+
404
+
/** Returns the subprocessor index which generated the timestamps, in case they are derived from a channel. Otherwise it returns the same as getSubProcessorIdx()*/
0 commit comments