GetTimeStampForMsg Method - intrepidcs API
C/C++ declare - VB.NET delcare - C# declare - Parameters - Return Values - Remarks - C/C++ example - VB.NET example - C# example

This method calculates the timestamp for a message, based on the connected hardware type, and converts it to a usable variable.

C/C++ Declare

int _stdcall icsneoGetTimeStampForMsg(void * hObject, icsSpyMessage *pMsg, icsSpyMessage *pMsg, double *pTimeStamp);


Visual Basic .NET Declare

Public Declare Function icsneoGetTimeStampForMsg Lib "icsneo40.dll" (ByVal hObject As IntPtr, ByRef pMsg As icsSpyMessage, ByRef pTimeStamp As Double) As Int32


C# Declare

[DllImport("icsneo40.dll")]
public static extern IntPtr icsneoGetTimeStampForMsg(Int32 hObject, ref icsSpyMessage pMsg, ref double
pTimeStamp);


Parameters

hObject
    [in] Specifies the driver object created by OpenNeoDevice.

pMsg
    [in] The message to be used for calculating timestamp.

pTimeStamp
    [out] The calculated timestamp.

 

Return Values

Returns 1 if successful, 0 if an error occurred. GetLastAPIError must be called to obtain the specific error. The errors that can be generated by this function are:

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

Different models of neoVI devices have different time resolutions. This function uses the proper formula to calculate a timestamp based on the connected device type. 


Examples

C/C++ Example

int hObject;   
int iResult;
double dTimeStamp;
icsSpyMessage Msg;

iResult = icsneoGetTimeStampForMsg(m_hObject, &Msg, &dTimeStamp);

Visual Basic .NET Example

Dim
iResult As Integer 
Dim dTimeStamp As Double
icsSpyMessage Msg;

iResult =
icsneoGetTimeStampForMsg(m_hObject, Msg, dTimeStamp)

C# Example

int iResult; 
long lTimeStamp; 
icsSpyMessage Msg;

iResult = icsNeoDll.
icsneoGetTimeStampForMsg(m_hObject, ref Msg, ref dTimeStamp);

IntrepidCS API Documentation - (C) Copyright 2000-2022 Intrepid Control Systems, Inc.  (www.intrepidcs.com)

Last Updated : Monday, April 27, 2020