# auto-generated by grc.converter

id: hpsdr_hermesNB
label: hermesNB
category: '[HPSDR]'
flags:
- throttle

parameters:
-   id: Rx0F
    label: Rcvr 0 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx1F
    label: Rcvr 1 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx2F
    label: Rcvr 2 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx3F
    label: Rcvr 3 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx4F
    label: Rcvr 4 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx5F
    label: Rcvr 5 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx6F
    label: Rcvr 6 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: Rx7F
    label: Rcvr 7 Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: TxF
    label: Transmit Frequency, Hz.
    dtype: real
    default: '7200000'
-   id: RxSmp
    label: Rx Sample Rate
    dtype: int
    default: '192000'
    options: ['48000', '96000', '192000', '384000']
-   id: RxPre
    label: Rx Preamp Off/On
    dtype: int
    default: '0'
-   id: PTTRx
    label: PTT On Mutes Rx
    dtype: int
    default: '1'
-   id: PTTTx
    label: PTT Off Mutes Tx
    dtype: int
    default: '1'
-   id: PTTmode
    label: Tx PTT mode Off/Vox/On
    dtype: int
    default: '0'
-   id: TxDrive
    label: Tx Drive Level (0..255)
    dtype: int
    default: '0'
-   id: num_outputs
    label: Num Rcvrs (1 .. 7)
    dtype: int
    default: '1'
    hide: part
-   id: Intfc
    label: Ethernet Interface
    dtype: raw
    default: '"eth0"'
-   id: CkS
    label: HPSDR Clock Source
    dtype: raw
    default: '"0xF8"'
-   id: AlexTA
    label: Alex Tx Antenna
    dtype: enum
    default: '0'
    options: ['0', '1', '2']
    option_labels: [Tx1, Tx2, Tx3]
-   id: AlexRA
    label: Alex Rx Antenna
    dtype: enum
    default: '0'
    options: ['0', '0xa0', '0xc0', '0xe0']
    option_labels: [Tx Ant via T/R Relay, Rx1, Rx2, RxXvrtr]
-   id: AlexHPF
    label: Alex Rx HPF
    dtype: enum
    default: '0x00'
    options: ['0x00', '0x20', '0x10', '0x08', '0x04', '0x01', '0x02', '0x40']
    option_labels: [AutoTrack Rx0Freq, Bypass, 1.5 MHz HPF, 6.5 MHz HPF, 9.5 MHz HPF,
        13 MHz HPF, 20 MHz HPF, 6M LNA+LPF]
-   id: AlexLPF
    label: Alex Tx LPF
    dtype: enum
    default: '0x00'
    options: ['0x00', '0x08', '0x04', '0x02', '0x01', '0x40', '0x20', '0x10']
    option_labels: [AutoTrack TxFreq, 160m LPF, 80m LPF, 60/40m LPF, 30/20m LPF, 17/15m
            LPF, 12/10m LPF, 6m LPF]
-   id: Verbose
    label: Verbose (1=on, 0=off)
    dtype: int
    default: '0'
    options: ['0', '1']
    option_labels: ['Off', 'On']
-   id: MACAddr
    label: MAC Address or *
    dtype: string
    default: '"*"'

inputs:
-   domain: stream
    dtype: complex

outputs:
-   domain: stream
    dtype: complex
    multiplicity: ${ num_outputs }
asserts:
- ${ num_outputs >= 1 }
- ${ 7 >= num_outputs }

templates:
    imports: import hpsdr
    make: hpsdr.hermesNB(${Rx0F}, ${Rx1F}, ${Rx2F}, ${Rx3F}, ${Rx4F}, ${Rx5F}, ${Rx6F},
        ${Rx7F}, ${TxF}, ${RxPre}, ${PTTmode}, ${PTTTx}, ${PTTRx}, ${TxDrive}, ${RxSmp},
        ${Intfc}, ${CkS}, ${AlexRA}, ${AlexTA}, ${AlexHPF}, ${AlexLPF}, ${Verbose},
        ${num_outputs}, ${MACAddr})
    callbacks:
    - set_Receive0Frequency(${Rx0F})
    - set_Receive1Frequency(${Rx1F})
    - set_Receive2Frequency(${Rx2F})
    - set_Receive3Frequency(${Rx3F})
    - set_Receive4Frequency(${Rx4F})
    - set_Receive5Frequency(${Rx5F})
    - set_Receive6Frequency(${Rx6F})
    - set_Receive7Frequency(${Rx7F})
    - set_RxSampRate(${RxSmp})
    - set_RxPreamp(${RxPre})
    - set_PTTMode(${PTTmode})
    - set_PTTOffMutesTx(${PTTTx})
    - set_PTTOnMutesRx(${PTTRx})
    - set_TxDrive(${TxDrive})
    - set_TransmitFrequency(${TxF})
    - set_ClockSource(${CkS})
    - set_AlexRxAntenna(${AlexRA})
    - set_AlexTxAntenna(${AlexTA})
    - set_AlexRxHPF(${AlexHPF})
    - set_AlexTxLPF(${AlexLPF})
    - set_Verbose(${Verbose})

documentation: "This block is the HPSDR Hermes/Metis module, protocol_1.\n  It supports\
    \ one transmitter. It supports one through seven\n  receivers, your hardware probably\
    \ supports less than 7 receivers.\n    Hermes supports 4 receivers maximum.\n\
    \    Red Pitaya supports 6 receivers maximum.\n \n  *RxSamp = 48000, 96000, 192000,\
    \ or 384000\n  *RxPreamp = 0 (Off), or  1 (On)\n  *PTTMode = 0 (TxOff),  1 (Vox\
    \ on Txframe contents), or  2 (TxOn)\n  *PTTOffMutesTx = 0 (Tx always emits),\
    \ 1 (Tx IQ is zeroed when PTT is Off)\n  *PTTOnMutesRx = 0 (Rx always receives),\
    \ 1 (Rx IQ is zeroed when PTT is On)\n  *TxDrive = 0..255 (0 is minimum (but not\
    \ zero) drive, 255 is maximum drive)\n   Rcvr0 corresponds to out0, Rcvr1 corresponds\
    \ to out1.\n  *Interface = the ethernet interface to use.\n    Example: \"eth0\"\
    \ {including quote marks}.\n  *Clock Source = HPSDR Clock Selector - 1 byte->\
    \ assigned to one register.\n   byte->C1 when C0 = 0. Allows selection of clock\
    \ and mic sources. Only upper\n   6 bits are used (lower 2 bits are overwritten\
    \ by receive sample speed\n   selection. Hermes ignores this register. Default\
    \ value selects Mercury.\n     Example: \"0xfc\" {including quote marks}\n  *Alex\
    \ Tx Ant = selects transmit antenna (Tx1, Tx2, or Tx3).\n  *Alex Rx ant = selects\
    \ receive antenna connector, or Tx antenna via T/R relay.\n  *Alex Tx LPF = selects\
    \ transmit Low Pass Filter. Auto tracks the Transmit Frequency.\n  *Alex Rx HPF\
    \ = selects receive High Pass filter. Auto tracks Receiver 0 Frequency.\n  *Verbose\
    \ = if =1 then prints Hermes/Metis FPGA rev, Fwd and Rev log voltage from Alex\n\
    \  *MACAddr = \"HH:HH:HH:HH:HH:HH\" with HH being the MAC Address hex values,\
    \ or \"*\" to\n    select the first detected Metis/Hermes regardless of it's MAC\
    \ Address.\n    MACAddr is a string (and must be enclosed in quotes).\n  Update:\
    \ 03-13-2014: Reverse transmit I and Q samples (FPGA reverses them).\n  Update:\
    \ July 2017 - increase receivers supported to 7."

file_format: 1
