tweigel-dev / python-tuio

This repository is a python3 implementation of the TUIO protocol.
MIT License
3 stars 4 forks source link

Add frame sequence number to refresh callback inside TuioDispatcher #17

Closed kryptokommunist closed 2 years ago

kryptokommunist commented 3 years ago

How about exposing the frame sequence number in the TuioListener.refresh callback?

tweigel-dev commented 3 years ago

Hay, Thanks for your PR and sorry for my late response! Nice that someone else want to do something with the TUIO Protocoll in Python ;) The whole feathre reagring TUIO Time is not implemented here. Do you think that your suggestion is the right behavior? I get the refresh function form the c++ documentation as following Detailed Description http://www.tuio.org/?cpp

The TuioTime class is a simple structure that is used to reprent the time that has elapsed since the session start. The time is internally represented as seconds and fractions of microseconds which should be more than sufficient for gesture related timing requirements. Therefore at the beginning of a typical TUIO session the static method initSession() will set the reference time for the session. Another important static method getSessionTime will return a TuioTime object representing the time elapsed since the session start. The class also provides various addtional convience method, which allow some simple time arithmetics.

AND image that means that we have to store a time relative to the start of a session. therefore we have to hold the current time. Maybe with a incrementing time thread or with the local os time.

kryptokommunist commented 3 years ago

Hey there, no worries. I take my time as well :)

I am using Tuio for a software that is "abusing" the protocol to send location data of a laser tracking system by this guy. In that context exposing the frame sequence number made sense to me. But if that is not in the protocol this shouldn't be merged I guess. Then it's just a hack using the protocol not as intended.

tweigel-dev commented 2 years ago

Is this PR still requested?

kryptokommunist commented 2 years ago

No thanks, all good :)