FLDG Programmer Guide

by Terry G. Glagowski, PhD / W1TR / AFA1DI

W1TR@ARRL.net
01-Oct-2013 12:17 - for FLDigi Version 3.21.76

 

Introduction

References

Member Data

Member Functions

Usage Cases

Summary

Introduction

This document describes the FLDG DLL interface between the Microsoft .NET application framework / programming system and the FLDigi XML-RPC interface.  The FLDG .DLL is written for Microsoft .NET version 4.0 in C# source code using Microsoft Visual Studio 2010 Professional.  The XML Documentation option was used to create information to be available in the Object Browser when the client software development environment is Microsoft Visual Studio.

FLDG is callable from C#, VB.net, and C++ .net and operates entirely in the managed code .NET 4.0 Environment.

Note: in general, if FLDigi versions are backward compatible and methods are not changed or removed, this DLL will support newer FLDigi versions without supporting the latest features.  This DLL does NOT support any FLDigi methods that are deprecated as of version 3.21.75.

References

See http://www.w1hkj.com/ for access to the FLDigi and other FL family of software
See http://www.w1hkj.com/FldigiHelp-3.21/xmlrpc-control.html for details on the FLDigi XML_RPC interface.
See http://xmlrpc.scripting.com/default.html for more details on the general specifications for XML_RPC interfaces.
See http://en.wikipedia.org/wiki/XML-RPC for an introduction to the XML_RPC interface.

Member Data

DLL Error Codes

Properties

DLL Error Codes

This section describes the return codes available for error diagnosis for the FLDG DLL client software.

OK

This means that no error was detected and the function returned normally with the expected value.

XML_RPC_ServerError

This means that there was an error originated by the XML_RPC server.

NetworkError

This means that there was a network error, most likely the unavailability of the XML_RPC server on the network, or an error in address or port number.

DataError

This means that there was some kind of data error in one of the arguments or return value for an FLDigi XML_RPC method.

XML_Error

This means that there was a syntax error in the XML stream sent or received from the XML_RPC server.

Error

This means that some miscellaneous error has occurred.

Properties

This DLL has properties that can be accessed to determine mode or affect the behavior of the DLL.

ErrorCode

The ErrorCode is read-only property having an enumeration value of type ErrorCode (see DLL Error Codes above).

ErrorMessage

This property is an error message passed from a lower function within the software such as an exception message, etc.

ErrorName

This property is a descriptive name for the error originated by the FLDG DLL software. 

ErrorNumber

This property is a unique identifier number for the error to help tracing FLDG DLL bugs by identifying the location in the source code where the error happened.

QueryResponseLogFilename

The default value of this property is the empty string, but when non-empty contains the filename of a log file that contains a total log of queries issued and responses received during DLL operation. 

SimulatedQueryFilename

The default value of this property is the empty string, but when non-empty contains the filename of an XML Query File that is sent by the FLDG DLL to the XML_RPC server for debugging purposes thereby totally bypassing all the member functions.

SimulatedResponseFilename

The default value of this property is the empty string, but when non-empty contains the filename of an XML Response File that is sent by the FLDG DLL to the client program for debugging purposes thereby totally bypassing the XML_RPC server.

Version

This is the DLL Version based on Build Time (last write to the DLL) as a unique identifier.

XmlRpcServerName

This is the IP Address / Port Number string for the FLDG object instance, making possible multiple instances of the FLDigi software and FLDG object controlling is using separate IP addresses / port numbers. Example String: "http://localhost:7362" which is the default port for FLDigi unless a command line option is used to start the process.

Member Functions

The following categories of member functions are in FLDG:
1) Infrastructure Functions
    there are member functions for supporting the infrastructure of assembling XML Format Queries, decoding XML Format Responses, and communicating with the XML-RPC Server of FLDigi.
2) Signature Functions
    there are member functions for each signature type for the FLDigi methods,
3) Method Functions
    There is a one-to-one relationship between the XML_RPC methods for FLDigi and the member functions in this DLL

Infrastructure Functions

Infrastructure functions deal with constructing XML Format Queries, decoding XML Format Responses, and sending / receiving messages to the XML_RPC Server.

public static String Base64_Decode( String theBase64String )

This function decodes BASE64 characters into a UTF8 (ASCII) character string.
It is used by those method functions and signature functions that have BASE64 return values.
See http://en.wikipedia.org/wiki/Base64

public static String Base64_Encode( String theAsciiString )

This function encodes a UTF8 (ASCII) character string into BASE64 characters.
It is used by those method functions and signature functions that have BASE64 arguments.
See http://en.wikipedia.org/wiki/Base64

public String HTTP_PostToServer( String thePost, String theURL )

This function is intended for private usage by the XML RPC Communications Processor.  The argument is the raw text of the HTTP Post, and the URL to which it is posted.  The return value is the response from the HTTP Post.

public String XmlRpcAppendDeclaration( XmlDocument theXmlDocument)

This function is intended for private usageby the XML Query Generator and installs an XML Declaration to a new but empty XML Document. The return value is the XML String for debugging purposes.

public String XmlRpcAppendFaultResponse( XmlDocument theXmlDocument, int theFaultCode, String theFaultMessage )

This function is intended for private usage by the XML Query Generator and appends a fault response to the XML format response. The return value is the XML String for debugging purposes.

public String XmlRpcAppendMethodCall( XmlDocument theXmlDocument, String theMethod )

This function is intended for private usage and appends a method call to the XML Format Query. The return value is the XML String for debugging purposes.

public String XmlRpcAppendParam( XmlDocument theXmlDocument, String theValue, String theType )

This function is intended for private usage by the XML Query Generator and appends a PARAM hook in the XML Format Query. The return value is the XML String for debugging purposes.

public String XmlRpcGetResponseValue( XmlDocument theXmlResponse )

This function is intended for private usage by the XML Response Processor and extracts the response value from the XML Format Response.

public XmlDocument XmlRpcQueryServer( XmlDocument theXmlQuery )

This function is intended for private usage by the XML RPC Communications Processor.  The argument is the XML_RPC Format Query, and the return value is the XML_RPC Format Response.

Signature Functions

public String XmlRpc_6_ii( String theFunction, Int32 theArgument1, Int32 theArgument2 )

This method helps implement the FLDigi methods with signature "6_ii".

public String XmlRpc_6_n( String theFunction )

This method helps implement the FLDigi methods with signature "6_n".

public String[] XmlRpc_A_n( String theFunction )

This method helps implement the FLDigi methods with signature "A_n".

public Boolean XmlRpc_b_b( String theFunction, Boolean theArgument )

This method helps implement the FLDigi methods with signature "b_b".

public Boolean XmlRpc_b_n( String theFunction )

This method helps implement the FLDigi methods with signature "b_n".

public Double XmlRpc_d_d( String theFunction, Double theArgument )

This method helps implement the FLDigi methods with signature "d_d".

public Double XmlRpc_d_n( String theFunction )

This method helps implement the FLDigi methods with signature "d_n".

public Int32 XmlRpc_i_i( String theFunction, Int32 theArgument )

This method helps implement the FLDigi methods with signature "i_i".

public void XmlRpc_n_6( String theFunction, String theArgument )

This method helps implement the FLDigi methods with signature "n_6".

public void XmlRpc_n_A( String theFunction, String[] theArgument )

This method helps implement the FLDigi methods with signature "n_A".

public void XmlRpc_n_b( String theFunction, Boolean theArgument )

This method helps implement the FLDigi methods with signature "n_b".

public void XmlRpc_n_i( String theFunction, Int32 theArgument )

This method helps implement the FLDigi methods with signature "n_i".

public void XmlRpc_n_n( String theFunction )

This method helps implement the FLDigi methods with signature "n_n".

public void XmlRpc_n_s( String theFunction, String theArgument )

This method helps implement the FLDigi methods with signature "n_s".

public void XmlRpc_n_V( String theFunction, XmlDocument theXmlMethodCall, XmlNode theArgument )

This method helps implement the FLDigi methods with signature "n_V".  V is either an array or structure argument.

public String XmlRpc_s_b( String theFunction, Boolean theArgument )

This method helps implement the FLDigi methods with signature "s_b".

public String XmlRpc_s_i( String theFunction, Int32 theArgument )

This method helps implement the FLDigi methods with signature "s_i".

public String XmlRpc_s_i( String theFunction, Int32 theArgument )

This method helps implement the FLDigi methods with signature "s_i".

public String XmlRpc_s_n( String theFunction )

This method helps implement the FLDigi methods with signature "s_n".

public String XmlRpc_S_n( String theFunction )

This method helps implement the FLDigi methods with signature "S_n".

public String XmlRpc_s_s( String theFunction, String theArgument )

This method helps implement the FLDigi methods with signature "s_n".

public XmlDocument XmlRpc_V_n( String theFunction )

This method helps implement the FLDigi methods with signature "V_n".  V is either an array or structure return value.

public XmlDocument XmlRpc_V_n( String theFunction )

This method helps implement the FLDigi methods with signature "V_n".  V is either an array or structure return value.

Method Functions

There are several families of method functions associated with groups of state variables within the FLDigi Application:

FLDIGI Constructor

FLDIGI Family

LOG Family

MAIN Family

MODEM Family

NAVTEX Family

RIG Family

RXTX Family

SPOT Family

TEXT Family

WEFAX Family

FLDIGI Constructor

public FLDIGI()

This function constructs an object from the FLDIGI class, i.e. the class constructor, and is NOT related to a FLDigi method.  The return value IS the instantiated object.

FLDIGI Family

The FLDIGI family is a collection of functions that Get and Set state variables associated with the FLDigi application including program version and list of methods.

public String Fldigi_Config_Dir()

This method implements the "fldigi.config_dir" method, returns the FLDigi configuration directory.yle="margin-left: 40px">public String[] Fldigi_List()

public String[] Fldigi_List()

This method implements the "fldigi.list" method, returns the FLDigi method list.  Since the raw XML Response contains a structure value, this has been decoded into an array of strings, each with the format {method name} - {method signature} - {help description}.

public String Fldigi_Name()

This method implements the "fldigi.name" method, returns the FLDIGI Program Name.

public String Fldigi_Name_Version()

This method implements the "fldigi.name_version" method, returns the FLDIGI Program Name and Version.

public void Fldigi_Terminate()

This method implements the "fldigi.terminate" method, Terminates FLDIGI Without Saving Anything.

public void Fldigi_Terminate( int theTerminationOption )

This method implements the "fldigi.terminate" method, Terminates FLDIGI with option:
Bit 0 = Save Options
Bit 1 = Save Log
Bit 2 = Save Macros

public String Fldigi_Version()

This method implements the "fldigi.version" method, Returns the FLDIGI Program Version.

public String Fldigi_Version_Struct()

This method implements the "fldigi.version_struct" method, Returns the FLDIGI Program Version as a Structure (outer XML of Value)

public String Fldigi_Version_Struct()

This method implements the "fldigi.version_struct" method, Returns the FLDIGI Program Version as a Structure (outer XML of Value)

LOG Family

The LOG family Gets and Sets a number of state variables associated with QSO in the LOG.

public void Log_Clear()

This method implements the "log.clear" method, Clears the LOG family of FLDigi state variables.

public String Log_Get_AZ()

This method implements the "log.get_az" method, Gets the LOG Azimuth.

public String Log_Get_Band()

This method implements the "log.get_band" method, Gets the LOG Band.

public String Log_Get_Call()

This method implements the "log.get_call" method, Gets the LOG Call.

public String Log_Get_Country()

This method implements the "log.get_country" method, Gets the LOG Country.

public String Log_Get_Exchange()

This method implements the "log.get_exchange" method, Gets the LOG Exchange.

public String Log_Get_Frequency()

This method implements the "log.get_frequency" method, Gets the LOG Frequency state variable.

public String Log_Get_Locator()

This method implements the "log.get_locator" method, Gets the LOG Locator (Maidenhead Grid) .

public String Log_Get_Name()

This method implements the "log.get_name" method, Gets the LOG Name.

public String Log_Get_QTH()

This method implements the "log.get_qth" method, Gets the LOG Name.

public String Log_Get_RST_In()

This method implements the "log.get_rst_in" method, Gets the LOG Name.

public String Log_Get_RST_Out()

This method implements the "log.get_rst_out" method, Gets the LOG Name.

public String Log_Get_Serial_Number()

This method implements the "log.get_rst_out" method, Gets the LOG Serial Number state variable.

public String Log_Get_Serial_Number_Sent()

This method implements the "log.get_serial_number_sent" method, Gets the LOG Serial Number Sent.

public String Log_Get_Serial_Number_Sent()

This method implements the "log.get_serial_number_sent" method, Gets the LOG Serial Number Sent.

public String public String Log_Get_State()

This method implements the "log.get_state" method, Gets the LOG State.

public String public String Log_Get_Time_Off()

This method implements the "log.get_time_off" method, Gets the LOG Time Off.

public String public String Log_Get_Time_On()

This method implements the "log.get_time_on" method, Gets the LOG Time On.

public String public String Log_Set_Call()

This method implements the "log.set_call" method, Sets the LOG Call.

public String public String Log_Set_Exchange()

This method implements the "log.set_exchange" method, Sets the LOG Exchange .

public String public String Log_Set_Locator()

This method implements the "log.set_locator" method, Sets the LOG Name.

public String public String Log_Set_Name()

This method implements the "log.set_name" method, Sets the LOG Name.

public String public String Log_Set_QTH()

This method implements the "log.set_qth" method, Sets the LOG QTH.

public String public String Log_Set_Serial_Number()

This method implements the "log.set_serial_number" method, Sets the LOG Serial Number.

MAIN Family

The MAIN family of functions Gets and Sets state variables associated with the main FLDigi DSP receiver and transmitter.

public void Main_Abort()

This method implements the "main.abort" method, forces the MAIN Transceiver Mode from Transmit Mode or Tune Mode to Receive Mode.

public Boolean Main_Get_AFC()

This method implements the "main.get_afc" method, Gets the MAIN AFC Status.

public Double Main_Get_Frequency()

This method implements the "main.get_frequency" method, Gets the MAIN Frequency.

public Boolean Main_Get_Lock()

This method implements the "main.get_lock" method, Gets the MAIN Lock.

public Int32 Main_Get_Max_Macro_ID()

This method implements the "main.get_max_macro_id" method, Gets the MAIN Macro ID.

public Int32 Main_Get_Reverse()

This method implements the "main.get_reverse" method, Gets the MAIN Reverse.

public Boolean Main_Get_RSID()

This method implements the "main.get_rsid" method, Gets the MAIN RSID (RxID).

public Boolean Main_Get_Squelch()

This method implements the "main.get_squelch" method, Gets the MAIN Squelch Status state variable.

public Double Main_Get_Squelch_Level()

This method implements the "main.get_squelch_level" method, Gets the MAIN Squelch Level .

public String Main_Get_Status1()

This method implements the "main.get_status1" method, Gets the MAIN Status One.
This is Digital Mode (Modem Name) dependent.

public String Main_Get_Status2()

This method implements the "main.get_status2" method, Gets the MAIN Status Two.
This is Digital Mode (Modem Name) dependent.

public String Main_Get_TRX_State()

This method implements the "main.get_trx_state" method, Gets the MAIN TRX State.

public String Main_Get_TRX_Status()

This method implements the "main.get_trx_status" method, Gets the MAIN TRX State.

public String Main_Get_WF_Sideband()

This method implements the "main.get_wf_sideband" method, Gets the MAIN Waterfall Sideband .

public Double Main_Inc_Frequency( double theFrequency )

This method implements the "main.inc_frequency" method, Increments RF Carrier Frequency, Returns New RF Carrier Frequency.

public Double Main_Inc_Squelch_Level( Double theSquelchLevelIncrement )

This method implements the "main.inc_squelch_level" method, Increments the Squelch Level, Returns New Squelch Level

public void Main_Run_Macro( Int32 theMacroID )

This method implements the "main.run_macro" method, Runs Macro with MacroID

public void Main_RX()

This method implements the "main.rx" method, Sets the MAIN Transceiver Mode to Receive Mode

public Boolean Main_Set_AFC( Boolean theAFC_Status )

This method implements the "main.set_afc" method, Sets the MAIN AFC Status.

public Double Main_Set_Frequency( double theFrequency )

This method implements the "main.set_frequency" method, Sets the MAIN Frequency and returns the previous value.

public Boolean Main_Set_Lock( Boolean TheLockStatus )

This method implements the "main.set_lock" method and Sets the MAIN Lock and returns the previous value.

public Boolean Main_Set_Reverse( Boolean theReverseStatus )

This method implements the "main.set_lock" method, Sets the MAIN Lock and returns the previous value.

public Boolean Main_Set_RSID( Boolean theRSID_Status )

This method implements the "main.set_rsid" method, Sets the MAIN RSID (RxID) and returns the previous value.

public Boolean Main_Set_Squelch( Boolean theSquelchStatus )

This method implements the "main.set_squelch" method, Sets the MAIN Squelch Status state variable and returns the previous value.

public Double Main_Set_Squelch_Level( Double theSquelchLevel )

This method implements the "main.set_squelch_level" method, Sets the MAIN Squelch Level and returns the previous value.

public void Main_Set_WF_Sideband( String theWF_Sideband )

This method implements the "main.set_wf_sideband" method, Sets the MAIN Waterfall Sideband .

public Boolean Main_Toggle_AFC()

This method implements the "main.toggle_afc" method, Toggles the MAIN AFC Status and returns the New value.

public Boolean Main_Toggle_Lock()

This method implements the "main.toggle_lock" method, Toggles the MAIN Lock Status and returns the New value.

public Boolean Main_Toggle_Reverse()

This method implements the "main.toggle_reverse" method, Toggles the MAIN Reverse Sideband Status and returns the New value.

public Boolean Main_Toggle_RSID()

This method implements the "main.toggle_rsid" method, Toggles the MAIN RSID (RxID) Status and returns the New value.

public void Main_Tune()

This method implements the "main.tune" method, Sets the Transceiver Mode to Tune Mode.

public void Main_TX()

This method implements the "main.tune" method, Sets the Transceiver Mode to Transmit Mode.

MODEM Family

The MODEM family of functions Gets and Sets state variables associated with the modem options / digital mode selection.

public Int32 Modem_Get_AFC_Search_Range()

This method implements the "modem.get_afc_search_range" method, Gets the MODEM AFC Search Range.

public Int32 Modem_Get_Bandwidth()

This method implements the "modem.get_bandwidth" method, Gets the MODEM Bandwidth.

public Int32 Modem_Get_Carrier()

This method implements the "modem.get_carrier" method, Gets the MODEM Carrier Frequency (audio).

public Int32 Modem_Get_ID()

This method implements the "modem.get_id" method and Gets the MODEM ID (numeric).

public Int32 Modem_Get_Max_ID()

This method implements the "modem.get_max_id" method, Gets the MODEM Max Modem ID.

public String Modem_Get_Name()

This method implements the "modem.get_name" method, Gets the MODEM Name.
Note: Modem Name is equivalent to Digital Mode.

public String[] Modem_Get_Names()

This method implements the "modem.get_names" method, Gets the a String Array containing a list of Modem Names.
Note: Modem Name is equivalent to Digital Mode.

public Double Modem_Get_Quality()

This method implements the "modem.get_quality" method, Gets the MODEM Quality.

public Int32 Modem_Inc_AFC_Search_Range( Int32 theAFC_SearchRange )

This method implements the "modem.inc_afc_search_range" method, Increments the MODEM AFC Search Range, and returns the new value.

public Int32 Modem_Inc_Carrier( Int32 theCarrierFrequencyIncrement )

This method implements the "modem.inc_carrier" method, Increments the MODEM Carrier Frequency (audio), and returns the new value.

public Int32 Modem_Olivia_Get_Bandwidth()

This method implements the "modem.olivia.get_bandwidth" method, Gets the MODEM Olivia Bandwidth.

public Int32 Modem_Olivia_Get_Tones()

This method implements the "modem.olivia.get_tones" method, Gets the MODEM Olivia Tones (count).

public void Modem_Olivia_Set_Bandwidth( Int32 theOliviaBandwidth )

This method implements the "modem.olivia.set_bandwidth" method, Sets the MODEM Olivia Bandwidth.

public void Modem_Olivia_Set_Tones( Int32 theOliviaTones )

This method implements the "modem.olivia.set_tones" method, Sets the MODEM Olivia Olivia Tones (count).

public void Modem_Search_Down()

This method implements the "modem.search_down" method, Starts Modem Search Downward in Frequency.

public void Modem_Search_Up()

This method implements the "modem.search_up" method, Starts Modem Search Upward in Frequency.

public void Modem_Set_AFC_Search_Range( Int32 theModemSearchRange )

This method implements the "modem.set_afc_search_range" method, Sets the Modem AFC Search Range.

public void Modem_Set_Bandwidth( Int32 theBandwidth )

This method implements the "modem.set_bandwidth" method, Sets the Modem Bandwidth .

public Int32 Modem_Set_By_ID( Int32 theModemID )

This method implements the "modem.set_by_id" method, Sets the Modem ID Number.

public String Modem_Set_By_Name( String theModemName )

This method implements the "modem.set_by_name" method, Sets the Modem Name.

public Int32 Modem_Set_Carrier( Int32 theCarrierFrequency )

This method implements the "modem.set_carrier" method, Sets the Modem Carrier Frequency (audio).

NAVTEX Family

The NAVTEX family of functions Gets and Sets state variables associated with NAVTEX operations.
Disclaimer: NAVTEX family functions have not been tested.  More information regarding NAVTEX is needed from FLDigi authors.

public String Navtex_Get_Message( Int32 theDelay )

This method implements the "navtex.get_message" method, Sets the NAVTEX Delay.

public String Navtex_Send_Message( String theNavtexMessage )

This method implements the "navtex.send_message" method, Sends a NAVTEX Message.

RIG Family

The RIG Family is a set of functions that Get and Set state variables associated with the RIG or Transceiver coupled to FLDigi.
Coupling of a rig to FLDigi is not necessary for successful digital reception and transmission, but functionality is more limited.

public String Rig_Get_Bandwidth()

This method implements the "rig.get_bandwidth" method, Gets the RIG Bandwidth.

public String[] Rig_Get_Bandwidths()

This method implements the "rig.get_bandwidths" method, Gets the RIG Bandwidths list.

public double Rig_Get_Frequency()

This method implements the "rig.get_frequency" method, Gets the RIG Frequency.

public String Rig_Get_Mode()

This method implements the "rig.get_mode" method, Gets the RIG Mode.

public String[] Rig_Get_Modes()

This method implements the "rig.get_modes" method, Gets the RIG Modes list.

public String Rig_Get_Name()

This method implements the "rig.get_name" method, Gets the RIG Name.

public String Rig_Get_Notch()

This method implements the "rig.get_notch" method, Gets the RIG Notch.

public void Rig_Release_Control()

This method implements the "rig.release_control" method, Release XML-RPC Control.
FLDIGI Will Return to CAT Control / Monitoring of RIG if this is Set Up.

public void Rig_Set_Bandwidth( String theBandwith )

This method implements the "rig.set_bandwidth" method, Sets the RIG Bandwidth.

public void Rig_Set_Bandwidths( String[] theBandwithList )

This method implements the "rig.set_bandwidths" method, Sets the RIG Bandwidths list.

public double Rig_Set_Frequency( Double theFrequency )

This method implements the "rig.set_frequency" method, Sets the RIG Frequency, Returns the old value.

public void Rig_Set_Mode( String theArgument )

This method implements the "rig.set_mode" method, Sets the RIG Mode, Returns the old value.

public void Rig_Set_Modes( String[] theModeList )

This method implements the "rig.set_modes" method, Sets the RIG Modes List.

public void Rig_Set_Name( String theRigName )

This method implements the "rig.set_name" method, Sets the RIG Name.

public void Rig_Set_Notch( Int32 theNotch )

This method implements the "rig.set_notch" method, Sets the RIG Notch.

public void Rig_Take_Control()

This method implements the "rig.take_control" method, Take XML-RPC Control of FLDigi.
FLDIGI Will Relinquish CAT Control / Monitoring of RIG and Depend on Controlling Application to do so.

RXTX Family

The RXTX Family and TEXT Family are functions that Get and Set Text in the RX and TX Buffer of FLDigi.

public String RX_Get_Data()

This method implements the "rx.get_data" method, Returns all RX data received since last query in BASE64 format.

public String RXTX_Get_Data()

This method implements the "rxtx.get_data" method, Returns all RXTX combined data since last query in BASE64 format.

public String TX_Get_Data()

This method implements the "tx.get_data" method, Returns all TX data transmitted since last query in BASE64 format.

SPOT Family

public Boolean Spot_Get_Auto()

This method implements the "spot.get_auto" method, Get AutoSpotter Status.

public Int32 Spot_PSKrep_Get_Count()

This method implements the "spot.pskrep.get_count" method, Get Number of Callsigns Spotted in Current Session.

public Boolean Spot_Set_Auto( Boolean theAutoStatus )

This method implements the "spot.set_auto" method, Set AutoSpotter Status, Return Old value.

public Boolean Spot_Toggle_Auto()

This method implements the "spot.toggle_auto" method, Toggle AutoSpotter Status, Return New value.

TEXT Family

The RXTX Family and TEXT Family are functions that Get and Set Text in the RX and TX Buffer of FLDigi.

public void Text_Add_TX( String theText )

This method implements the "text.add_tx" method, Add Text to the Transmit Buffer.

public void Text_Add_TX_Bytes(String theText )

This method implements the "text.add_tx_bytes" method, Add Text to TX Window.  Translation to Base64 from UTF8 ASCII format of the argument is included.

public void Text_Clear_RX()

This method implements the "text.clear_rx" method, Clear the RX Buffer.

public void Text_Clear_TX()

This method implements the "text.clear_tx" method, Clear the TX Buffer.

public String Text_Get_RX( Int32 theStartIndex, Int32 theLength )

This method implements the "text.get_rx" method, Get Base64 Format Text at Start Index and Length Specified.  Truncates if insufficient data is available or start index is out of range.  Translation from Base64 to UTF8 ASCII format of the return value is included.

public String Text_Get_RX_All()

This method implements the "text.get_rx_length" method, followed by the "text.get_rx_length" method to get ALL Text in RX Buffer in Base64 Format.  Translation from Base64 to UTF8 ASCII format of the return value is included.

public Int32 Text_Get_RX_Length()

This method implements the "text.get_rx_length" method, Gets Length of Text in RX Buffer.

WEFAX Family

The WEFAX Family of functions Gets and Sets state variables associated with WEFAX operation.
Disclaimer: WEFAX family functions were not tested, and insufficient information regarding return values is available from FLDigi authors at this time.

public String WEFAX_End_Reception()

This method implements the "wefax.end_reception" method, Get Received WEFAX File.

public String WEFAX_Get_Received_File()

This method implements the "wefax.get_received_file" method, Get Received WEFAX File.

public String WEFAX_Get_State_String()

This method implements the "wefax.state_string" method, Get WEFAX Engine State (RX/TX) for Information.

public String WEFAX_Send_File( String theWEFAX_File )

This method implements the "wefax.send_file" method, Send WEFAX File.

public String WEFAX_Set_ADIF_Log( Boolean theADIF_LoggingStatus )

This method implements the "wefax.set_adif_log" method, Set ADIF Logging Status.

public String WEFAX_Set_Max_Lines( Int32 theMaximumLines )

This method implements the "wefax.set_max_lines" method, Set Maximum Lines.

public String WEFAX_Set_TX_Abort_Flag()

This method implements the "wefax.set_tx_abort_flag" method, Set TX Abort Flag - Cancel WEFAX Image Transmission.

public String WEFAX_Skip_APT()

This method implements the "wefax.skip_apt" method, Set TX Abort Flag - Skip APT During WEFAX Reception.

public String WEFAX_Skip_Phasing()

This method implements the "wefax.skip_phasing" method, Set TX Abort Flag - Skip Phasing During WEFAX Reception.

public String WEFAX_Start_Manual_Reception()

This method implements the "wefax.start_manual_reception" method, Set TX Abort Flag - Start FAX Image Reception in Manual Mode.

Usage Cases

This section contains some use cases to show the intended use of the FLDG DLL to control the FLDigi Application.
Source code is provided for C# but is easily translated to VB.NET or C++ .NET.

The following code segments are assumed to be a part of a C# Windows Forms application and that the form controls activate the following functions.
It is also assumed that there are controls in the form that are used to enter and display data.

Starting FLDigi Application

Use a code sequence similar to this to activate FLDigi from an application using the DLL.

Deciding what executable path and command line arguments to use is outside the scope of the DLL logic.

 

using System.Diagnostics;  // interact with system processes

 

Void Activate_FLDigi()

{

       String myFLDigiExecutablePath = “. . .\FLDigi.exe”;           // Use the REAL full path to FLDigi Executable

static Process myProcess = new Process();                     // Suggest Making This a Variable in a Class, not local

myProcess.StartInfo.UseShellExecute = false;

myProcess.StartInfo.FileName = myFLDigiExecutablePath;

// Set Command Line Options as Required

// See FLDigi XML-RPC Document

myProcess.StartInfo.Arguments = "--wo";                       // Command Line Option for Minimize

myProcess.StartInfo.Arguments = "";                           // Command Line Option for Normal

myProcess.StartInfo.CreateNoWindow = false;

myProcess.Start();

}

Set the IP Address and Port Number

using TGG_LIB;                                                       // Use TGG Custom Classes

using TGG_LIB.FLDIGI;

 

private void Terminate_FLDigi()

{

       String myServerName = “http://localhost:7362”;                // Server Name Shown is Default, Use Arbitrary IP and Port

FLDIGI myFLDIGI = new FLDIGI();                               // Suggest Making This a Variable in a Class, not local

       myFLDIGI.XmlRpcServerName = myServerName;

}

Terminating FLDigi Application

using TGG_LIB;                                                       // Use TGG Custom Classes

using TGG_LIB.FLDIGI;

 

private void SetIPandPort_FLDigi()

{

       FLDIGI myFLDIGI = new FLDIGI();                               // Suggest Making This a Variable in a Class, not local

       myFLDIGI.Fldigi_Terminate();

}

 

Getting Information from FLDigi Application

This code will capture much information from FLDigi and display it on a form in your application.
Items with name L_ are label controls, CB_ are ComboBox controls, T_ are TextBox controls, CK_ are CheckBox controls, declarations not shown here.

 

using TGG_LIB;             // Use TGG Custom Classes

using TGG_LIB.FLDIGI;

 

private void GetAllInfo()

              {

                     String[] myStringArray;

 

                     ///// FLDIGI

                     // Labels

                     L_FLDIGI_ConfigDir.Text = String.Format("Config Dir: {0}", m_FLDIGI.Fldigi_Config_Dir());

                     L_FLDIGI_ProgramName.Text = String.Format("Pgm Name: {0}", m_FLDIGI.Fldigi_Name());

                     L_FLDIGI_ProgramNameAndVersion.Text = String.Format("Pgm Name/Ver: {0}", m_FLDIGI.Fldigi_Name_Version());

                     L_FLDIGI_Version.Text = String.Format("Version: {0}", m_FLDIGI.Fldigi_Version());

 

                     // ComboBoxes

                     myStringArray = m_FLDIGI.Fldigi_List();

                     if (myStringArray != null)

                     {

                           CB_FLDIGI_List.Items.Clear();

                           foreach (String myString in myStringArray)

                           {

                                  CB_FLDIGI_List.Items.Add(myString);

                           }

                     }

 

                     ///// LOG

                     // TextBoxes

                     T_Log_Name.Text = String.Format("{0}", m_FLDIGI.Log_Get_Name());

                     T_Log_QTH.Text = String.Format("{0}", m_FLDIGI.Log_Get_QTH());

                     T_Log_Call.Text = String.Format("{0}", m_FLDIGI.Log_Get_Call());

                     T_Log_Exchange.Text = String.Format("{0}", m_FLDIGI.Log_Get_Exchange());

                     T_Log_Locator.Text = String.Format("{0}", m_FLDIGI.Log_Get_Locator());

                     T_Log_SerialNumber.Text = String.Format("{0}", m_FLDIGI.Log_Get_Serial_Number());

 

                     // Labels

                     L_Log_Notes.Text = String.Format("Notes: {0}", m_FLDIGI.Log_Get_Notes());

                     L_Log_Frequency.Text = String.Format("Freq: {0}", m_FLDIGI.Log_Get_Frequency());

                     L_Log_Band.Text = String.Format("Band: {0}", m_FLDIGI.Log_Get_Band());

                     L_Log_RST_In.Text = String.Format("RST RX: {0}", m_FLDIGI.Log_Get_RST_In());

                     L_Log_RST_Out.Text = String.Format("RST TX: {0}", m_FLDIGI.Log_Get_RST_Out());

                     L_Log_SerialNumberSent.Text = String.Format("Sent#: {0}", m_FLDIGI.Log_Get_Serial_Number_Sent());

                     L_Log_TimeOn.Text = String.Format("Time On: {0}", m_FLDIGI.Log_Get_Time_On());

                     L_Log_TimeOff.Text = String.Format("Time Off: {0}", m_FLDIGI.Log_Get_Time_Off());

                     L_Log_Country.Text = String.Format("Ctry: {0}", m_FLDIGI.Log_Get_Country());

                     L_Log_State.Text = String.Format("State: {0}", m_FLDIGI.Log_Get_State());

                     L_Log_Province.Text = String.Format("Prov: {0}", m_FLDIGI.Log_Get_Province());

 

                     ///// MAIN

                     // TextBoxes

                     T_Main_Frequency.Text = String.Format("{0}", m_FLDIGI.Main_Get_Frequency());

                     T_Main_SquelchLevel.Text = String.Format("{0}", m_FLDIGI.Main_Get_Squelch_Level());

 

                     // Labels

                     L_Main_MaxMacroID.Text = String.Format("Max Macro ID: {0}", m_FLDIGI.Main_Get_Max_Macro_ID());

                     L_Main_Status1.Text = String.Format("Status1: {0}", m_FLDIGI.Main_Get_Status1());

                     L_Main_Status2.Text = String.Format("Status2: {0}", m_FLDIGI.Main_Get_Status2());

                     L_Main_TRX_State.Text = String.Format("TRX State: {0}", m_FLDIGI.Main_Get_TRX_State());

                     L_Main_TRX_Status.Text = String.Format("TRX Status: {0}", m_FLDIGI.Main_Get_TRX_Status());

 

                     // CheckBoxes

                     CK_Main_AFC.Checked = m_FLDIGI.Main_Get_AFC();

                     CK_Main_Lock.Checked = m_FLDIGI.Main_Get_Lock();

                     CK_Main_Squelch.Checked = m_FLDIGI.Main_Get_Squelch();

                     CK_Main_Reverse.Checked = m_FLDIGI.Main_Get_Reverse();

                     CK_Main_RSID.Checked = m_FLDIGI.Main_Get_RSID();

 

                     ///// RIG

                     // TextBoxes

                     T_Rig_Bandwidth.Text = String.Format("{0}", m_FLDIGI.Rig_Get_Bandwidth());

                     T_Rig_Mode.Text = String.Format("{0}", m_FLDIGI.Rig_Get_Mode());

                     T_Rig_Frequency.Text = String.Format("{0}", m_FLDIGI.Rig_Get_Frequency());

                     T_Rig_Notch.Text = String.Format("{0}", m_FLDIGI.Rig_Get_Notch());

 

                     // ComboBoxes

                     // CB_Rig_Bandwidths

                     myStringArray = m_FLDIGI.Rig_Get_Bandwidths();

                     if (myStringArray != null)

                     {

                           CB_Rig_Bandwidths.Items.Clear();

                           foreach (String myString in myStringArray)

                           {

                                  CB_Rig_Bandwidths.Items.Add(myString);

                           }

                     }

 

                     // CB_Rig_Modes

                     myStringArray = m_FLDIGI.Rig_Get_Modes();

                     if (myStringArray != null)

                     {

                           CB_Rig_Modes.Items.Clear();

                           foreach (String myString in myStringArray)

                           {

                                  CB_Rig_Modes.Items.Add(myString);

                           }

                     }

 

                     ///// MODEM

                     // TextBoxes

                     T_Modem_AFC_SearchRange.Text = String.Format("{0}", m_FLDIGI.Modem_Get_AFC_Search_Range());

                     T_Modem_Bandwidth.Text = String.Format("{0}", m_FLDIGI.Modem_Get_Bandwidth());

                     T_Modem_Carrier.Text = String.Format("{0}", m_FLDIGI.Modem_Get_Carrier());

                     T_Modem_ID.Text = String.Format("{0}", m_FLDIGI.Modem_Get_ID());

                     T_Modem_Name.Text = String.Format("{0}", m_FLDIGI.Modem_Get_Name());

                     T_Modem_Olivia_Bandwidth.Text = String.Format("{0}", m_FLDIGI.Modem_Olivia_Get_Bandwidth());

                     T_Modem_OliviaTones.Text = String.Format("{0}", m_FLDIGI.Modem_Olivia_Get_Tones());

 

                     // Labels

                     L_Modem_MaxID.Text = String.Format("MaxID: {0}", m_FLDIGI.Modem_Get_Max_ID());

 

                     // ComboBoxes

                     //CB_Modem_Names =

                     myStringArray = m_FLDIGI.Modem_Get_Names();

                     if (myStringArray != null)

                     {

                           CB_Modem_Names.Items.Clear();

                           foreach (String myString in myStringArray)

                           {

                                  CB_Modem_Names.Items.Add(myString);

                           }

                     }

 

                     ///// TEXT

                     // TextBoxes

                     T_Text_RX.Text = m_FLDIGI.Text_Get_RX_All();

              }

 

Updating Information in FLDigi Application

This code will update information in FLDigi.
Items with name L_ are label controls, CB_ are ComboBox controls, T_ are TextBox controls, CK_ are CheckBox controls, declarations not shown here.

These routines are event handlers for form controls and are a part of the Form Class.

 

using TGG_LIB;             // Use TGG Custom Classes

using TGG_LIB.FLDIGI;

 

              /// <summary>TextBox: LOG / QTH - Double Click</summary>

              private void T_Log_QTH_DoubleClick(object sender, EventArgs e)

              {

                     m_FLDIGI.Log_Set_QTH(T_Log_QTH.Text);

              }

              //=========================================================================================

 

              /// <summary>TextBox: Transmit - KeyPress</summary>

              /// <remarks>Send Contents of Transmit field to FLDIGI</remarks>

              private void T_Text_TX_KeyPress(object sender, KeyPressEventArgs e)

              {

                     String myString;

 

                     switch (e.KeyChar)

                     {

                           // Translate CR to CR/LF

                           case '\r':

                                  myString = "\r\n";

                                  break;

                           // Pass Along Other Characters As They Are

                           default:

                                  myString = Convert.ToString(e.KeyChar);

                                  break;

                     }

 

                     m_FLDIGI.Text_Add_TX(myString);

              }

              //=========================================================================================

 

              /// <summary>TextBox: MAIN / Frequency - Double Click</summary>

              private void T_Main_Frequency_DoubleClick(object sender, EventArgs e)

              {

                     try

                     {

                           m_FLDIGI.Main_Set_Frequency(Convert.ToDouble(T_Main_Frequency.Text));

                           L_Status.Text = String.Format("{0}", FLDIGI_ErrorCategory.OK.ToString());

 

                           // Report Error Status

                            ReportErrorStatus();

                     }

                     catch (Exception ex)

                     {

                           L_Status.Text = String.Format("{0}: {1}-{2} {3}", m_FLDIGI.ErrorCode.ToString(), m_FLDIGI.ErrorName, m_FLDIGI.ErrorMessage, ex.Message);

                           m_FLDIGI.Main_Set_Frequency(0.0);

                     }

              }

              //=========================================================================================

 

Summary

This document has described the FLDG interface DLL between the Microsoft .NET version 4 programming environment and the FLDigi dll available from the FLDigi download page (see references above).  Some basic use cases accessing data in the FLDigi application are shown to help developers get started using the FLDG dll.