This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Duplicate entries in TCF file

I have inherited a project that is in pretty rough shape, in looking at the TCF file I have noticed dozens of duplicate entries.  Does anyone know which values are read from the file and thus which I can safely delete?   I believe it uses the last found value but wanted to make sure before I start cleaning it up.  Here is an example:

bios.PRD.create("PRD_MyResponseTimer");
bios.PRD.instance("PRD_MyResponseTimer").order = 18;
bios.PRD.instance("PRD_MyResponseTimer").mode = "one-shot";
bios.PRD.instance("PRD_MyResponseTimer").period = 1000;
bios.PRD.instance("PRD_MyResponseTimer").fxn = prog.extern("MyResponseTimeoutCallback");
bios.PRD.instance("PRD_MyResponseTimer").comment = "Emission Port Response Timeout Timer";
bios.PRD.instance("PRD_MyResponseTimer").period = 500;
bios.PRD.instance("PRD_MyResponseTimer").period = 1000;
bios.PRD.instance("PRD_MyResponseTimer").period = 500;
bios.PRD.instance("PRD_MyResponseTimer").period = 2000;
bios.PRD.instance("PRD_MyResponseTimer").period = 10000;
bios.PRD.instance("PRD_MyResponseTimer").period = 500;
bios.PRD.instance("PRD_MyResponseTimer").mode = "continuous";
bios.PRD.instance("PRD_MyResponseTimer").period = 1000;

  • A TCF file can be either manually edited by text or edited via the graphical tool gconf.  When modified by gconf, each editing action generates a new entry in the TCF file, and they just accumulate over time.  You're correct in that the last one "wins", so you can feel free to remove previous entries.

    So, in your example above, you can eliminate all .period settings except the last one (1000), and you can eliminate the first .mode setting ("one-shot").

    Regards,

    - Rob