WiresmithTech / tedium

3 stars 1 forks source link

Handle Different Read Lengths for Multichannel Readers #9

Open JamesMc86 opened 1 year ago

JamesMc86 commented 1 year ago

Right now these return the length of the block. Either return a value for each channel or more likely check the output lengths and if less than the block size, assume that is all that is read.

JamesMc86 commented 1 year ago

Big issue with this - how do we do this and not allocate vectors? Probably can't because we could ask to read 100 channels in theory so assumptions like smallvec could help but probably aren't enough to cover all cases.

This isn't a big performance issue. But I would love this to work in WASM for example.

JamesMc86 commented 1 year ago

The other big question is: do we need to support this?

The NI TDMS API does not allow writing in a way that you have different channel lengths per channel in a single block anyway (it doesn't event support mixing types!). So why bust our ass to support this use case?

The important thing is that we know if a channel is complete, not an exact read number - although we do like to pass that back,