Another question regarding time

Making & changing box plugins and external apps
Post Reply
atom2004
Posts: 3
Joined: Wed Sep 19, 2012 5:48 pm

Another question regarding time

Post by atom2004 »

Hi,

Although I've read all time related posters, I still got confused about how time is handled in openvibe. Here are some questions:

1. What exactly is ChunkStartTime and ChunkEndTime? How they are measured and how they are related to time in the signal

2. When the following codes are executed in the process function of a box plugin. What exactly is the time we are getting here. Is it relative to the time when you click the play button in the Designer, or the first signal sample acquired. If it is the former case, how can I get the stimulus time relative to the first signal sample acquired so I can find the location of the event in the signal.

IStimulationSet* l_pStimulations = m_oAlgo0_StimulationDecoder.getOutputStimulationSet();
uint64 l_ui64StimulationDate = l_pStimulations->getStimulationDate(j);

Thanks a lot!

Yichuan

jlegeny
Posts: 239
Joined: Tue Nov 02, 2010 8:51 am
Location: Mensia Technologies Paris FR
Contact:

Re: Another question regarding time

Post by jlegeny »

Hello Yichuan,

ChunkStartTime is created by the acquisition server upon receiving data, in the designer this time is always relative to the starting of the scenario, as all the data received by the acquisition server while there is no connection is discarded.
ChunkEndTime is calculated from the StartTime, Sampling Frequency and number of samples in the chunk.

As for the stimulus relative to the beginning, I would suggest sending a stimulation from your application which would mark the beginning of the experiment, while the acquisition is already running.

Cheers
Jozef

Post Reply