You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking to stream analog data that is collected in QTM. Looking at the examples in the SDK folders, I have found the majority of information and examples on streaming marker data.
I have tried modifying the BasicExample.py file, to stream in analog data, but I keep receiving an error when I try to retrieve the analog parameter packet.
I have no issues with my connection to QTM, and am able to stream marker data using the basic example how it is intended.
I am fairly new to Python, and any help to better understand the code would be appreciated. Thank you in advance.
CODE:
"""
Minimal usage example
Connects to QTM and streams 3D data forever
(start QTM first, load file, Play->Play with Real-Time output)
"""
import asyncio
import qtm
def on_packet(packet):
""" Callback function that is called everytime a data packet arrives from QTM """
print("Framenumber: {}".format(packet.framenumber))
header, markers = packet.get_analog()
print("Component info: {}".format(header))
async def setup():
""" Main function """
connection = await qtm.connect("127.0.0.1")
if connection is None:
return
Hello,
I am looking to stream analog data that is collected in QTM. Looking at the examples in the SDK folders, I have found the majority of information and examples on streaming marker data.
I have tried modifying the BasicExample.py file, to stream in analog data, but I keep receiving an error when I try to retrieve the analog parameter packet.
I have no issues with my connection to QTM, and am able to stream marker data using the basic example how it is intended.
I am fairly new to Python, and any help to better understand the code would be appreciated. Thank you in advance.
CODE:
"""
Minimal usage example
Connects to QTM and streams 3D data forever
(start QTM first, load file, Play->Play with Real-Time output)
"""
import asyncio
import qtm
def on_packet(packet):
""" Callback function that is called everytime a data packet arrives from QTM """
print("Framenumber: {}".format(packet.framenumber))
header, markers = packet.get_analog()
print("Component info: {}".format(header))
async def setup():
""" Main function """
connection = await qtm.connect("127.0.0.1")
if connection is None:
return
if name == "main":
asyncio.ensure_future(setup())
asyncio.get_event_loop().run_forever()
The text was updated successfully, but these errors were encountered: