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.

19. <strong>Bernese</strong> Processing Engine (BPE)<br />

19.6.6 Stop a User Scripts with an Error<br />

To stop the user script in case of an error do not use the Perl command exit 1. If the user<br />

script is terminated with the command die the BPE client reports the error to the BPE<br />

server. Using exit instead of die stops the complete client and no ending message is sent to<br />

the BPE server. As a consequence the BPE server will wait for this client script forever.<br />

19.6.7 Old User Scripts and Non-Perl User Scripts<br />

As stated above the user scripts may on UNIX systems be written in any programming<br />

language provided that the environment variables are accessible and the system commands<br />

can be executed. If the run method is not overloaded in the user script (overloading is possible<br />

if the user script is written in Perl), the default run method (defined in ${BPE}/RUNBPE.pm)<br />

is called and performs the following system command:<br />

system "$$bpe{U_OLD}/SCRIPT/$$bpe{SCRIPT}";<br />

It means that non-Perl user scripts are started as separate processes without any arguments.<br />

These scripts cannot use directly the methods defined in${BPE}/RUNBPE.pm. Instead of that<br />

the non-Perl scripts can use the utilities that are located in the ${X}/SCRIPT directory. Here<br />

is the list of available files with their brief description:<br />

AUTO UPD BEG MENU DO TAIL SET SESS ... dummy scripts (they have no functionality<br />

but they are called in old user scripts)<br />

CLEAN UP ... deletes some program-specific files<br />

END MENU ... sets the exit code according to error status<br />

PRT GOTO PRT MESS RUN PGMS ... wrappers of the corresponding methods<br />

defined in ${BPE}/RUNBPE.pm<br />

We have already stated that the new BPE is backwards compatible and old user scripts<br />

prepared for the <strong>Bernese</strong> <strong>GPS</strong> <strong>Software</strong> <strong>Version</strong> 4.2 can be used. A few modifications of the<br />

scripts are, however, necessary due to the new menu system, see Section 24.3.<br />

19.7 BPE Program Option Directories<br />

19.7.1 Program Input Files<br />

The program input files used by <strong>Bernese</strong> programs started in user scripts are located in the<br />

user’s ${U}/OPT-directory tree. For each script a subdirectory of ${U}/OPT is specified in<br />

the PCF in the column “Opt dir”. Several scripts may access the same option subdirectory.<br />

This subdirectory has to contain not only the program input files but also all menu input<br />

files MENU*.INP (except of MENU CMP.INP).<br />

Before starting the user script the client copies the content of the corresponding option directory<br />

into the PAN subdirectory of the client-specific temporary area. Accessing program<br />

input files using the RUNBPE::putKey method modifies the files in this temporary directory.<br />

Before executing a <strong>Bernese</strong> program the client executes the menu in non-interactive<br />

Page 408 AIUB

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

Saved successfully!

Ooh no, something went wrong!