Client : Communicate with FLDIGI via XML-RPC¶
Namespaced XML-RPC Commands:
- main : Squelch, RX/TX/TUNE mode, Macros, RSID, etc
- modem : Select the FLDIGI modem and read/write its settings
- rig : Rig (CAT) control via flrig, hamlib, RigCAT, RTS/DTR, or GPIO
- flmsg : FLMSG Interface
- text : Read and write to the FLDIGI text boxes
- ioconfig : ARQ/KISS I/O port
- pskreporter : PSK Reporter spotter
- log : QSO Logbook / Contest Read/Write
- Appendix : List of XML-RPC commands
-
class
pyfldigi.client.client.
Client
(hostname='127.0.0.1', port=7362, reset=True)[source]¶ Bases:
object
A client that can read/write settings to FLDIGI via XML-RPC protocol
Official FLDIGI XML-RPC Protocol Documentation page
Note
Instances of the following classes will be instantiated and added as properties to the Client() object:
pyfldigi.client.modem.Modem
as ‘modem’pyfldigi.client.main.Main
as ‘main’pyfldigi.client.rig.Rig
as ‘rig’pyfldigi.client.log.Log
as ‘log’pyfldigi.client.text.Text
as ‘text’pyfldigi.client.pskreporter.Spot
as ‘spot’pyfldigi.client.flmsg.Flmsg
as ‘flmsg’pyfldigi.client.ioconfig.Io
as ‘io’
The purpose of pigeon-holing the functions into classes is to provide a convenient namespace, similar to the XML-RPC function names. I’ve taken a bit of artistic liberty with naming and grouping!
-
config_dir
¶ Returns the name of the configuration directory
Returns: the configuration directory. NOTE: On a Windows machine, backslashes will be replaced with forward slashes Return type: str Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.config_dir 'C:/Users/jeff/fldigi.files/'
-
delay
(milliseconds)[source]¶ Simple delay / blocking call
Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.delay(100) # 100 millisecond delay
-
methods
¶ Returns the list of methods in which fldigi can handle via the xml-rpc interface
Returns: Returns the list of methods in which fldigi can handle via the xml-rpc interface Return type: list of dict Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.methods [{'name': fldigi.list, 'signature': 'A:n', 'help': 'Returns the list of methods.'}, ... ]
-
name
¶ Returns the program name and version
Returns: Returns the program name and version Return type: str Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.name fldigi
-
terminate
(save_options=True, save_log=True, save_macros=True)[source]¶ Terminates fldigi. Sent as a bitmask specifying data to save: 0=options; 1=log; 2=macros
Parameters: - save_options (bool) – True to save options; False otherwise.
- save_log (bool) – True to save log; False otherwise
- save_macros (bool) – True to save macros; False otherwise
Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.terminate()
-
version
¶ Returns the program version as a python dict
Returns: Returns the program version Return type: dict with the keys: ‘major’, ‘minor’, ‘patch’ Example: >>> import pyfldigi >>> fldigi = pyfldigi.Client() >>> fldigi.version {'major': 3, 'minor': 23, 'patch': '.17'}