08.06.2013 Views

Bernese GPS Software Version 5.0 - Bernese GNSS Software

Bernese GPS Software Version 5.0 - Bernese GNSS Software

Bernese GPS Software Version 5.0 - Bernese GNSS Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18. The Menu System<br />

Keyword values are also updated if the input file is saved. The content of the keywords<br />

STASELECT and STASELHLP is, however, only relevant if manual station selection is enabled<br />

(keyword RADIO 2 is 1). The metacommand updateifsave allows to execute MENUAUX<br />

only if a specific condition of keyword values is fulfilled when the panel file is saved (see<br />

example in Figure 18.8).<br />

MENUAUX Error Handling<br />

The MENUAUX-mechanism has a built in error handling mechanism. The menu detects if<br />

the program MENUAUX cannot be executed or whether the auxiliary program encountered<br />

a handled or a fatal error and informs the user with a corresponding error message. To this<br />

purpose the menu defines in the input file for MENUAUX the name of an error output file as<br />

well as a return code (keyword MENUAUX IRCODE) which is initialized to 9. As a first action<br />

MENUAUX sets the value to 5. After processing the requested action the return code is set<br />

to 0 – if no error occurred – or to 2 – if an error was encountered. If the menu then finds<br />

a return code of 5 in the file returned by MENUAUX the auxiliary program did start but<br />

failed with a fatal error. If the return code 2 is found the menu displays the corresponding<br />

error or warning message provided by MENUAUX.<br />

The input file and the error message file of a MENUAUX-run is deleted by the menu immediately<br />

after the execution. To make them available (e.g., for debugging purposes) the<br />

keyword MENUAUX DEBUG in file ${U}/PAN/MENU EXT.INP can be set to 1 using an ASCII<br />

editor.<br />

18.9.6 User-Specific Additions to the Menu System<br />

We have tried to make the menu system a little bit extensible and give the user an opportunity<br />

to use the <strong>Bernese</strong> menu system for his own programs. The user programs may be<br />

written in any language (e.g., C++, Fortran, Perl). There are some requirements<br />

• The program has to have exactly one input file in a given format (see Section 18.9.2).<br />

On Windows platform the program has to read the name of its input file as a command<br />

line parameter, on UNIX platform it has to read the input file name from the standard<br />

input as described in Section 18.8.<br />

• The input file is expected to be located in the directory ${U}/PAN with the extension<br />

INP.<br />

• A help file may exist in the directory ${X}/HLP with the extension HLP.<br />

• The path to the executable may be specified in ”Menu>Configure>Program names” (see Figure<br />

18.2). The default is the directory ${XG} or make use of the option “Special path<br />

for individual programs”.<br />

Adding a user program into the menu system is done simply by specifying the name of the<br />

program in “Additional User Programs 3: Menu - User” (”Menu>Configure>Program names”). The user<br />

programs are then accessible from the menu under ”Menu>User”.<br />

Page 380 AIUB

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!