XLINK 500/100 Operations & Maintenance Manual page # 184
:AT 0 #1 29.50 29.50 :RH 0 #1 65.00 65.00 :DP 0 #1 26.77 26.77
Th
e goal of the script is to append “Little Creek A21938” to that transmission format. The code is
very simple:
@TXFORMAT
def append_info(standard):
"""appends information to tx"""
return st " Little Creek A21938"
Once the transmission is setup to use the script above (by enabling
Custom Script Format
and
setting
Format Function
to
append_info,
the transmission data would become
:AT 0 #1 29.50 29.50 :RH 0 #1 65.00 65.00 :DP 0 #1 26.77 26.77
Little Creek A21938
19.2.2.
Rules for Transmission Formatting Scripts
These rules must be followed when writing a script that will be used for transmission formatting:
The @TXFORMAT decorator must be on the line preceding the Python function. The
decorator is case sensitive.
The function takes in one parameter: it is a string which the result of a standard tx
format (e.g., SHEF).
The function returns one parameter: a string containing the new transmission data.
The function may call into any other functions in the script file. Those other functions
do not need to have the @TXFORMAT decorator.
19.3.
Script Tasks
Script tasks are a bit like measurements and telemetry. Each script task has its own independent
setup, and each script task runs on its own schedule.
Every script task is associated with its own Python function. When the script task runs, it
executes the function.
Script tasks can be setup to run on a schedule or to trigger when a certain event happens. Please
see the
Trigger
setting below.
19.3.1.
Script Task Setup
Active
Just like the measurement field, this one indicates whether the script task will ever
run.
Label
This is a customer given name to the script task for easy identification.
Script Function
What script function to execute when the script is triggered.
Trigger:
This field determines when the script should run. Options are
Scheduled
Script task will run on a schedule, just like a measurement. The schedule is
based on the settings
Scheduled Interval and Scheduled Time
. Only
happens if recording is on.
Bootup