Example

;--- This is an example of Application Spec file ---
;
; The file is devided into sections. Each section starts with
; the section name (a keyword preceed by #)
;
#NAME MC  ; This name (MC) is referred in log files and error messages.

#MACROS
;
; Macros are used-defined symbols used for convenience in the file
;
BUS        /dev/ttyS1        ; Serial port feeding the RS485 bus
FOX1    S1_NW + S1_NW2    ; Either NW or NW2 taken in Switcher 1
FOX2    S2_NW + S2_NW2    ; Either NW or NW2 taken in Switcher 2
TALLY    TALLY_SGN | TALLY_VIP ; Virtual parallell of two GPOs

; GPIs can be referrenced ir rules by "GPI number"
; but it is more convenient to define macros for them. Same for GPOs.

; GPIs
;
S1_NW        GPI FOO 1    ; UTAH SWR GPO-11 fired when NW is taken
S1_NW2        GPI FOO 2    ; UTAH SWR GPO-12 fired when NW2 is taken
S1_PROD        GPI FOO 3    ; UTAH SWR GPO-13 fired when ST1 is taken

S2_NW        GPI FOO 4    ; UTAH SWR GPO-11 fired when NW is taken
S2_NW2        GPI FOO 5    ; UTAH SWR GPO-12 fired when NW2 is taken
S2_PROD        GPI FOO 6    ; UTAH SWR GPO-13 fired when ST1 is taken

EV1_NW        GPI FOO 7    
EV1_NW2        GPI FOO 8    
EV1_PROD    GPI FOO 9

EV2_NW        GPI FOO 10
EV2_NW2        GPI FOO 11
EV2_PROD    GPI FOO 12

ER_EV1        GPI BAR 1    ; EV1 taken in ER 4X1 RTR
ER_EV2        GPI BAR 2    ; EV2 taken    in ER 4X1 RTR

AIR_PLY1    GPI BAR 3    ; S1 taken in AIR 4X1 RTR
AIR_PLY2    GPI BAR 4    ; S2 taken in AIR 4X1 RTR
AIR_PROD    GPI BAR 5     ; PROD taken in AIR 4X1 RTR
AIR_ER        GPI BAR 6    ; ER taken in AIR 4X1 RTR

;
; GPOs
;
SPL            GPO BAR 9    ; Enable FOX Splicer
TALLY_SGN    GPO BAR 10    ; "On Air" sign
TALLY_VIP    GPO BAR 11    ; "On Air" label in VIP
VT7_CUT        GPO BAR 12    ; RLY cutting signal ER-->VT7

; Each unit takes in own section.
; Following the section name is the unit address in decimal.
;
#UNIT 2 ; RK-T28

name     FOO
config     12/0
port    BUS

#UNIT 3 ; RK-MC06

name         BAR
config         8/4
port        BUS
gpo default    latch
gpo 11         pulse
gpo 12         pulse
pulse default   250
pulse 12     1000


#RULES

FOX1 & AIR_PLY1 = SPL    
(S2_NW + S2_NW2) & AIR_PLY2 = SPL    

(EV1_NW + EV1_NW2) & ER_EV1 & AIR_ER = SPL
(EV2_NW + EV2_NW2) & ER_EV2 & AIR_ER = SPL
    
S1_PROD & AIR_PLY1 = TALLY
S2_PROD & AIR_PLY2 = TALLY
EV1_PROD & ER_EV1 & AIR_ER = TALLY
EV2_PROD & ER_EV2 & AIR_ER = TALLY

; The following rules are to avoid video/audio feed back
; from Air (ER) to production Switcher when VT7 is taken
; in the prod. switcher and production is taken somewhere
; in the ER path.

EV1_PROD & ER_EV1 = VT7_CUT
EV2_PROD & ER_EV2 = VT7_CUT