12-02-2011 12:01 PM
i read out several instruments and want to mark the signal with a unit and its name. So i will not get into trouble if i change my program a few months later.
i try to show what i wnat to do with an ASCII sketch
Instrument (Ta, 274, K) ---> [ some magic with the values ] -----> .csv [Ta, K -> head of file ; 274 -> data row]
What would you suggest me to use? Should i bundle name, value and unit where Ta, and K are string constants.
Should i use a cluster, or an array or...?
12-02-2011 12:32 PM
If these items are related to each other (which they seem to be) I would recommend using a typedefed cluster. The benefit of the typedef is that if you need to modify the cluster definition all uses of it will pick up the update. The cluster is a good representation since you can have items of different types stored in it. An array all elements have to be the same type. BTW, you can have arrays of cluster if you will be dealing with multiple like items using the same cluster definition.