Home Forums Software Development Declaration of txInteractionContext

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #833
    Michael Mauderer
    Participant

    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 txCreateContext with an TX_CONTEXTHANDLE which 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?

    #835
    Robert [Tobii]
    Participant

    Hi,

    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.c

    #838
    Michael Mauderer
    Participant

    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 txInteractionContext to be created by me.

    Thanks for your quick help!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.