Data streaming



I have been studying the lua API, however could not understand is there a possibility to stream the measured data in the realtime. Every example calls project:start(), then project:stop() and only then analyzes the data.

Our usecase is to capture the data continuously (virtually 24/7) and stream it in the realtime to some time-series database like InfluxDB. For data analysis we can match the measurements with the events registered through different channels by their timestamps.

Does Otii Arc support such feature?

Thanks in advance



It is not possible to steam data in realtime.
The possibility you have is to, during the recording, access the data and analyse the new data points since last read.

What I try to explain is to iterate something like this:

number_of_new_samples = project:get_channel_count(device, recording_id, channel)
new_data = project:get_channel_data(device,recording_id,channel,number_of_old_samples+1,number_of_new_samples-number_of_old_samples)
number_of_old_samples = number_of_new_samples

Best regards,


Thanks! Good to hear that recording does not have to be stopped to access the samples. I understand that over the time the recording will eat more and more memory. May I use to drop fetched samples?



project:crop_data function can only be used after recording is stopped.

Best regards,



Is there some other way to contain memory utilization (am I right in my assumption?) and keep recording endlessly?



One way is to start a new recording and remove the old when the data is processed.
The drawback is the small glitch in time when starting a new recording.
To be creative, you could overlap this glitch by using a second Otii Arc and connect this with a sense resistor to ADC± and use the data from this. However, this might me a lot of work for small amount of data.

Best regards,