Closed ahofmann75 closed 2 years ago
Right, apparently we need to update the help to be:
If nothing is passed to the application command line or no device is specified, then the following will be displayed:
@sulimma please advise, should we update only the help, or should we update the behavior?
As the typical user has a single device a missing device number should be treated as -tdc=0
This is partly intended behaviour. The idea was, that the tool without any parameters provides an overview over the available TDCs.
However, the behaviour also is not implemented correctly.
If you look at the issued that I provided for specification: https://github.com/cronologic-de/xhptdc8_babel/issues/19
It says: If there is at least one command line switch, only the selected structures are printed. Note the plural in "structures".
However, in the wiki you differentiate between "-all", "one structure" or "one structure and -v". https://github.com/cronologic-de/xhptdc8_babel/wiki/using_info_tool That is not the intended behaviour.
The idea was that the user can list any combination of structures or -v and then everything that was specified is printed out. There is no need for special cases in the documentation. Please simplify the wiki accordingly.
The code should:
1) add "-static" to the set of print methods to run. 2) clear the set of methods whenever the first flag specifying a print option is found on the command line 3) add whatever options are found on the command line to the set of print methods
Independently (orthogonally) from that 1) the set of TDCs to process is set to all TDCs 2) if the first command line option is not a flag, the TDC it specified is added to the set of TDCs to process 3) if a flag "-tdc" is encountered, the TDC is added to the set of boards to be processed 4) loop over the set of tdcs and call each print method from the set of print methods on each of these
The application always prints the static_info of the device when -tdc=[TDC] is missing. This does not match the help text.