WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Timestamps on Arrington data? VPX.dll? (https://forum.worldviz.com/showthread.php?t=5012)

performlabrit 04-11-2014 08:35 AM

Timestamps on Arrington data? VPX.dll?
 
I'm attempting to use the Arrington interface, but want accurate timing data.

Although the Vizard plugin does not provide a function to get accurate timing information, the Arrington SDK does, with its function:

VPX_GetDataTime2(0,pointerToACTypeDouble);

I was hoping to use the arrington.sendCommand() function, but seems to only be able to send command line interface functions.

I've seen mention of Vizards vpx.pyd module, but see no documentation.

Any advice?

performlabrit 04-11-2014 10:42 AM

Solved! Here's a way to access the SDK functions directly, using ctypes module's DLL support. Special thanks to Flip Phillips at Skidmore College for the solution.

Quote:

from ctypes import * # eyetrackka
import os

vpxDll = 'C:\ViewPoint 2.9.2.5\VPX_InterApp.dll'

if ( not os.access(vpxDll,os.F_OK) ):
print("WARNING: Invalid vpxDll path")

cdll.LoadLibrary( vpxDll )
vpx = CDLL( vpxDll )

eyeTime = c_double();
eyeTimePointer = pointer(eyeTime)
eyeA = self.arrington.EYE_A;


eyeDataTime = vpx.VPX_GetDataTime2(eyeA,eyeTimePointer)

outputString = 'eyeDataTime %f eyeTime %f' % (eyeDataTime, eyeTime.value)
print outputString


All times are GMT -7. The time now is 06:28 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC