What is the relationship between RCE timestamp and TSC timestamp?

hello MushroomHunter,

please refer to developer guide,
it’s Argus::Ext::ISensorTimestampTsc::getSensorSofTimestampTsc to return the VI HW (SOF) timestamp based on TSC.
you may see-also Argus::ICaptureMetadata::getSensorTimestamp of the timestamp for the sensor.

for comparison,
please try adding some code snippets to Argus sample application, such as yuvJpeg
for instance,

+++ b/public/samples/yuvJpeg/main.cpp
@@ -32,6 +32,7 @@
 #include "Thread.h"
 
 #include <Argus/Argus.h>
+#include <Argus/Ext/SensorTimestampTsc.h>
 #include <EGLStream/EGLStream.h>
 

@@ -98,6 +99,8 @@ bool ConsumerThread::threadExecute()
 {
     IEGLOutputStream *iStream = interface_cast<IEGLOutputStream>(m_stream);
     IFrameConsumer *iFrameConsumer = interface_cast<IFrameConsumer>(m_consumer);
+    Ext::ISensorTimestampTsc *iSensorTimestampTsc = NULL;
+    unsigned long long tscTimeStamp = 0;
 
     // Wait until the producer has connected to the stream.
     CONSUMER_PRINT("Waiting until producer is connected...\n");
@@ -132,6 +135,13 @@ bool ConsumerThread::threadExecute()
                        static_cast<unsigned long long>(iMetadata->getSensorTimestamp()),
                        iMetadata->getSceneLux());
 
+        iSensorTimestampTsc = interface_cast<Ext::ISensorTimestampTsc>(metadata);
+        if (!iSensorTimestampTsc)
+            ORIGINATE_ERROR("failed to get iSensorTimestampTsc inteface");
+        tscTimeStamp = iSensorTimestampTsc->getSensorSofTimestampTsc();
+        CONSUMER_PRINT("FrameNum= %lu, TSC timestamps (us)= %llu\n",
+                        iFrame->getNumber(), tscTimeStamp/1000);
+

here’re the results for demonstration.

CONSUMER: Acquired Frame: 138, time 9292694120000
CONSUMER: 	Sensor Timestamp: 9292648434000, LUX: 1751.220947
CONSUMER: FrameNum= 138, TSC timestamps (us)= 9317942798