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.6 User Scripts<br />

In the slave script the file selection in the program input file can be defined using the<br />

method:<br />

Usage: replaceSel($bpe,$inpFil,$keyWrd,$filNam)<br />

Parameters: $bpe BPE object<br />

$inpFil name of the input file without path and extensions<br />

(in most cases simply the program name, e.g., ADDNEQ2)<br />

$keyWrd keyword where the new selection should replace the old one<br />

$filNam BPE cluster file containing the filenames (usually $PARAM1)<br />

19.6.5.3 Method for Special Action NEXTJOB<br />

Instead of directly calling the method “$bpe->PRT_GOTO($$bpe{PARAM2});” from the<br />

${BPE}/RUNBPE.pm module, ${BPE}/bpe util.pm provides a subroutine to for printing the<br />

GOTO PID into the protocol file:<br />

Usage: prtGoto($bpe,$pid)<br />

Parameters: $bpe BPE object<br />

$pid PID where to continue the processing<br />

The following example shows a part of the user script GOTO which selects the PID on where<br />

to continue from theNEXTJOB parameters according to the value of the variableSTARTCOUNT.<br />

That means for each start of the script, e.g., in an iteration loop, the next goto PID is used<br />

(see also Section 19.5.3):<br />

# Get variables<br />

# ------------my<br />

$iRun = $$bpe{STARTCOUNT} - 1; # because starts counting by zero<br />

my @nextJob = ($$bpe{PARAM2},$$bpe{PARAM3},$$bpe{PARAM4},$$bpe{PARAM5},<br />

$$bpe{PARAM6},$$bpe{PARAM7},$$bpe{PARAM8},$$bpe{PARAM9});<br />

# Write the "next jobs" statement<br />

# ------------------------------if<br />

(defined($nextJob[$iRun])) { $bpe->PRT_GOTO($nextJob[$iRun]) }<br />

19.6.5.4 Utilities for Output and Protocols<br />

The module ${BPE}/bpe util.pm provides two methods for printing messages into the<br />

protocol files:<br />

• Print a message line in the protocol file (status = MSG):<br />

Usage: prtMess($bpe,$msg)<br />

Parameters: $bpe BPE object<br />

$msg string to print<br />

• Report an error in the protocol file (status = ERR):<br />

Usage: prtErr($bpe,$msg)<br />

Parameters: $bpe BPE object<br />

$msg string to print<br />

This method prints only the message into the protocol file. The user script<br />

should be terminated using the perl command die() to stop the BPE (e.g.,<br />

“prtErr($bpe,"SOME ERROR"); die("BPE stopped by user script")”).<br />

<strong>Bernese</strong> <strong>GPS</strong> <strong>Software</strong> <strong>Version</strong> <strong>5.0</strong> Page 405

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

Saved successfully!

Ooh no, something went wrong!