GigE: Accessing Timestamp

Accessing the Timestamp of the current frame can be done in the following way:

 

With PvAPI:


// declare and get the TimeStampFrequency

tPvUint32 lFreq;

PvAttrUint32Get(m_Handle,"TimeStampFrequency",&lFreq);

double m_Frequency;

m_Frequency = (double)lFreq;

 

// declare and get the FrameTimeStamp

unsigned __int64 lStamp = Camera->Frame.TimestampHi;

lStamp <<= 32;

lStamp += Camera->Frame.TimestampLo;

 

// declare and get the absolute time since camera startup

double lTime = ((long double)lStamp) / m_Frequency

 

With Vimba:

 

// declare and get the TimeStampFrequency

VmbInt64_t lFreq;

VmbFeatureIntGet(GCamera,"GevTimestampTickFrequency",&lFreq);

 

// declare and get the absolute time since camera startup

VmbUint64_t lTime = pFrame->timestamp / lFreq;



Back to list