LabVIEW-DCAF / TDMSModule

A background datalogger for TDMS files
https://decibel.ni.com/content/projects/reference-designs-for-distributed-control-systems
Apache License 2.0
6 stars 3 forks source link

Add dynamic filename support via tag #72

Open AndrewHeim opened 5 years ago

AndrewHeim commented 5 years ago

I have a system where the user will want to be able to choose the filename. Yes, you could argue that it's not headless, and that means DCAF isn't a perfect fit. I would disagree.

I imagine this working similar to the "Enable Logging" tag. It gives the user the option to enable the feature, and once the user selects it, it creates a unique " Filename" tag (which is a string).

The module then reads the value of that string each time the "Enable" tag goes high, naming the new file that value. We'd need to check for valid filenames and figure out the best way to present that error too. I can do that at the UI layer (since I have a separate application for that), and just pass approved paths... so I'll be tempted to short cut that for this project. I recognize that ideally it would do that error checking.

After a quick once over, it would appear that this won't even be a big behavior change. The module already looks like it starts a new file each time the Enable tag is toggled.

I need to do this for my project. I'd love to discuss it. If you like it, I hope to be able to submit those changes when they're done.

becega commented 5 years ago

Sound good, one thing to consider is what to do with blank name or invalid name in case the has not been initialized. This could be an extra field on the configuration as default file name.