06-22-2010 08:41 AM
Hello,
there is an illustration in attachement about what i'm talking ![]()
I have a config.ini file in wich i recover devices information ( COM ,baud ...) and the file names of devices that
are used to perform this test (temperature calibration) i can save this information in a cluster "cluster of setting"
so i can resume a calibration few days after and recovering all setting and data done.
My trouble is here:
In those files are stored others attributes ( Sn , correction coeff , date of calibration ....)
a little bit like a data base ( will be in the futur) but for now their simple files but that will not change the idea.
What could be an easy use
Having two clusters one containing the setting providing from config (benchx) and an other those from files
or allowing place in the first to make a composit of the both (from config and from files)
a third solutions could be to open file each time information is needed but this sound heavy
I hope i 'am clear enough
Best regards
Tinnitus
Solved! Go to Solution.
06-22-2010 09:14 AM
...,
i you ever been to this kind of thing
maybe you have used another way
Best regards
Tinnitus
06-22-2010 09:30 AM
I'm not entirely sure I understand what you're asking. It's not clear whether you're asking about the best format to use, or whether you should read the file(s) in at the beginning of the program and store the information somewhere, or whether you should read the data as needed.
If you're asking about the format, you should use whatever format makes most sense to you. Personally, if I were doing this, based on your general hierarchy I'd use an XML file. The generral schema could be something like this:
<General>
<ProgramName />
<Operator />
...
</General>
<Benches>
<Bench1>
<SomeTag />
<Files>
<File1></File1>
<File2></File2>
</Files>
</Bench1>
<Bench2></Bench2>
...
<Benches>
If you're asking about file access, you can obviously do it either way. If you want to make it possible to be able to change these files "dynamically" outside of the application then obviously you would need to be able to read the relevant part(s) "on demand". Otherwise, using some sort of Action Engine is probably a good way to go.
06-22-2010 10:27 AM
not exalctly,
this more concerning the use and the sclability of code
if i use two separated clusters one from config files and one from filesfor a unique device
for example for the same device COM information will be in first cluster and correction coeff will be in second cluster
that i show in .doc are possible solutions i see but i don't know all a would like to have suggestions
06-22-2010 11:28 AM
Thank you for your interest
it is talking about that a way comes to me in fact i compil data from config and data from files
in a bigger cluster that it is used like a sub config cluster i don't know if this a good way but
i will go this and will see...
Best regards
Tinnitus