main : Squelch, RX/TX/TUNE mode, Macros, RSID, etc

class pyfldigi.client.main.Main(clientObj)[source]

Bases: object

All the commands under ‘fldigi.main’ in the XML-RPC spec for fldigi.

Note

An instance of this class automatically gets created under pyfldigi.client.client.Client when it is constructed.

abort()[source]

Aborts a transmit or tune

Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.tx()  # Put flgidigi into transmit mode
>>> fldigi.delay(10)  # wait a bit
>>> fldigi.main.abort()  # abort the transmit
afc

The AFC (auto frequency control) state

Getter:Returns the AFC [auto frequency control] state
Setter:Sets the AFC [auto frequency control] state.
Type:bool
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.afc  # read to demonstrate its initial value
True
>>> fldigi.main.afc = False  # disable
>>> fldigi.main.afc  # read back to demonstrate that it changed
False
get_max_macro_id()[source]

Returns the maximum macro ID number

Returns:The maximum macro ID number
Return type:int
get_trx_state(suppress_errors=False)[source]

Returns transmit/tune/receive status returns: [‘TX’, ‘RX’, ‘TUNE’] ??

reverse

The Reverse Sideband state (whether or not the mark and space are reversed)

Getter:Returns the Reverse Sideband state
Setter:Sets the Reverse Sideband state.
Type:bool
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.reverse  # read to demonstrate its initial value
True
>>> fldigi.main.reverse = False  # disable
>>> fldigi.main.reverse  # read back to demonstrate that it changed
False
rsid

The RSID state.

Reed-Solomon Identification (RSID) is used in several digital mode programs. RSID allows the automatic identification of any digital transmission which has been assigned a unique code identifier. On reception of a RS ID, two events occur: the mode used is detected and the central frequency of the RSID, which is also the central frequency of the identified mode, is determined with a precision of 2.7 Hz. This is sufficient to allow all current modes to begin accurate decoding. This is an excellent way to insure that signals like MFSK are properly tuned and decoded. The RSID signal is transmitted in 1.4 sec and has a bandwidth of 172 Hz. Detection of the RSID signal is possible down to a Signal to Noise ratio of about -16 dB, so with a sensitivity equal or better than the majority of the digital modes (RTTY, PSK31...), except several modes as PSK10, PSKAM10, THROB, THROBX or JT65.

Note

Consequently, it is possible to detect RSID and not be able to decode the ensuing data signal due to it being too weak a signal.

fldigi allows the RSID signal to be sent at the beginning and the end of each transmission. The leading RSID is the normal position. During reception fldigi can decode RSID signals within the entire audio spectrum. It can also be configured to limit the reception to a narrow bandwidth centered on the current audio subcarrier. Detection occurs as a background process and does not interfer with the normal signal decoding. False detection is possible, but statistically rare due to the use of a very strong autocorrelation function associated with the RSID codes.

Note

For more info, please see: http://www.w1hkj.com/RSID_description.html

Getter:Returns the RSID state.
Setter:Sets the RSID state.
Type:bool
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.rsid  # read to demonstrate its initial value
True
>>> fldigi.main.rsid = False  # disable
>>> fldigi.main.rsid  # read back to demonstrate that it changed
False
run_macro(macroNum)[source]

Runs a macro

Parameters:macroNum (int) – The macro # to run. Must be a valid #.
rx()[source]

Puts fldigi into receive mode.

Note

This is the default mode that FLDIGI starts in. This command is only needed when you’ve put it into some other mode.

Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.tx()  # Put flgidigi into transmit mode
>>> fldigi.delay(1000)  # wait a bit
>>> fldigi.main.rx()  # Put flgidigi into receive mode
send(data, block=True, timeout=10)[source]

This is the preferred way of sending a block of text.

Parameters:
  • data (str or bytes) – The text or data to encode and transmit
  • block (bool) – if True, the function blocks until all data has been transmitted. If False, this method returns immediately while the radio transmits.
  • timeout (float or int) – The # of seconds to wait before returning a TimeoutError

Warning

FLDIGI does NOT turn the transmit off after the text is done transmitting.

Example:
>>> import pyfldigi
>>> c = pyfldigi.Client()
>>> # Make sure to set up the modem and rig settings here!!!
>>> c.main.send('Lorem ipsum dolor sit amet')
set_wf_sideband

The current waterfall sideband (either USB or LSB)

Getter:Returns the current waterfall sideband (either USB or LSB)
Setter:Sets the waterfall sideband to USB or LSB.
Todo:The setter doesn’t seem to work, at least in some contexts or modes.
Type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.wf_sideband  # read to demonstrate its initial value
'USB'
>>> fldigi.main.wf_sideband = 'LSB'  # set to Lower sideband
>>> fldigi.main.wf_sideband  # read back to demonstrate that it changed
'LSB'
squelch

The squelch state (True or False)

Getter:Returns the squelch state.
Setter:Sets the squelch state.
Type:bool
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.squelch  # read to demonstrate its initial value
True
>>> fldigi.main.squelch = False  # disable
>>> fldigi.main.squelch  # read back to demonstrate that it changed
False
squelch_level

The squelch level. Range is 0.0 - 100.0

Getter:Returns the squelch level
Setter:Sets the squelch state.
Type:float
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.squelch_level  # read to demonstrate its initial value
5.0
>>> fldigi.main.squelch_level = 4  # set to 4.  will be casted to float.
>>> fldigi.main.squelch_level  # read back to demonstrate that it changed
4.0
status1

Returns the contents of the first status field (typically s/n)

Returns:First status field
Return type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.status1
''
status2

Returns the contents of the second status field

Returns:Second status field
Return type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.status2
''
tune()[source]

Puts fldigi into tune mode. I’m assuming that this allows antenna tuning via CAT/RIG control.

Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.tune()  # Put flgidigi into tune mode
tx()[source]

Puts fldigi into transmit mode. This will key the PTT or VOX via CAT control.

Note

If you’re looking to transmit a block of text, please use :py:method:`pyfldigi.client.main.send`

Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.tx()  # Put flgidigi into transmit mode
>>> fldigi.delay(1000)  # wait a bit
>>> fldigi.main.rx()  # Put flgidigi into receive mode
txlock

The Transmit [frequency] Lock state. When unlocked the transmit and receive frequencies can be uncoupled.

Getter:Returns the Transmit [frequency] Lock state
Setter:Sets the Transmit [frequency] Lock state.
Type:bool
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.txlock  # read to demonstrate its initial value
True
>>> fldigi.main.txlock = False  # disable
>>> fldigi.main.txlock  # read back to demonstrate that it changed
False
wf_sideband

The current waterfall sideband (either USB or LSB)

Getter:Returns the current waterfall sideband (either USB or LSB)
Setter:Sets the waterfall sideband to USB or LSB.
Todo:The setter doesn’t seem to work, at least in some contexts or modes.
Type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.main.wf_sideband  # read to demonstrate its initial value
'USB'
>>> fldigi.main.wf_sideband = 'LSB'  # set to Lower sideband
>>> fldigi.main.wf_sideband  # read back to demonstrate that it changed
'LSB'