- 12/05/2014 at 13:50 #833Michael MaudererParticipant
I was hoping to integrate the EyeX SDK into a (existing) experimental Python application. Using ctypes it is no problem to access C functions from a external library, however it is necessary to know the declaration of a struct in order to use it from the Python side (e.g., to create a new instance).
In order to create an interaction context I need to call
TX_CONTEXTHANDLEwhich is a
struct txInteractionContext*(which I now need to create on the Python side).
Maybe I have been missing something, but I can’t seem to find the declaration of
struct txInteractionContext. Is this a hidden implementation detail?12/05/2014 at 15:09 #835Robert [Tobii]Participant
You are right, the implementation of the InteractionContext class (which extends an empty struct) is only accessible on the server side (i.e. inside the EyeX Engine). As a client application, you should not need to care about creating new instances of this, just call txCreateContext, keep track of the pointer and make sure to release it when shutting down. Please check out one of the C samples, for example MinimalGazeDataStream.c12/05/2014 at 15:52 #838Michael MaudererParticipant
Ah sorry, my bad. I got confused by all the macro magic.
The function actually takes a
struct txInteractionContext**, which of course doesn’t need an existing
struct txInteractionContextto be created by me.
Thanks for your quick help!
- You must be logged in to reply to this topic.