Oh okay. I thought this was completely replaced with TCP tagging. However, if I would use external stimulations, I need to do this in C++, right? Thanks for asking your expert. I would prefer the TCP tagging solution with python since all my code is based on python. So please let me know
This is what I do right now:
I acquire the signals from the generic oscillator.
In the designer I use the network-acquisition.xml example.
After I started the acquisition server and designer, I execute the example script tcp-tagging-client.py
Code: Select all
from time import time, sleep
# host and port of tcp tagging server
HOST = '127.0.0.1'
PORT = 15361
# Event identifier (See stimulation codes in OpenVibe documentation)
EVENT_ID = 0x00008205
# Artificial delay (ms). It may need to be increased if the time to send the tag is too long and causes tag loss.
# transform a value into an array of byte values in little-endian order.
def to_byte(value, length):
for x in range(length):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
for i in range(100):
# create the three pieces of the tag, padding, event_id and timestamp
# timestamp can be either the posix time in ms, or 0 to let the acquisition server timestamp the tag itself.
timestamp= list(to_byte(int(time()*1000)+DELAY, 8))
# send tag and sleep
Now I would expect, that the stimuli are displayed but they aren't.