id
int64 0
755k
| file_name
stringlengths 3
109
| file_path
stringlengths 13
185
| content
stringlengths 31
9.38M
| size
int64 31
9.38M
| language
stringclasses 1
value | extension
stringclasses 11
values | total_lines
int64 1
340k
| avg_line_length
float64 2.18
149k
| max_line_length
int64 7
2.22M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 6
65
| repo_stars
int64 100
47.3k
| repo_forks
int64 0
12k
| repo_open_issues
int64 0
3.4k
| repo_license
stringclasses 9
values | repo_extraction_date
stringclasses 92
values | exact_duplicates_redpajama
bool 2
classes | near_duplicates_redpajama
bool 2
classes | exact_duplicates_githubcode
bool 2
classes | exact_duplicates_stackv2
bool 1
class | exact_duplicates_stackv1
bool 2
classes | near_duplicates_githubcode
bool 2
classes | near_duplicates_stackv1
bool 2
classes | near_duplicates_stackv2
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
751,310
|
data_io.h
|
w1hkj_fldigi/src/include/data_io.h
|
// ----------------------------------------------------------------------------
//
// data_io.h
//
// support for ARQ server/client system such as pskmail and fl_arq
// support for KISS server/client system such as BPQ and JNOS
//
// Copyright (C) 2014
// Robert Stiles, KK5VD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef fldigi_data_io_h
#define fldigi_data_io_h
#include "gettext.h"
#define IO_START_STR _("Start")
#define IO_STOP_STR _("Stop")
#define DEFAULT_ARQ_IP_ADDRESS "127.0.0.1"
#define DEFAULT_ARQ_IP_PORT "7322"
#define DEFAULT_KISS_IP_ADDRESS "127.0.0.1"
#define DEFAULT_KISS_IP_IO_PORT "7342"
#define DEFAULT_KISS_IP_OUT_PORT "7343"
#define DEFAULT_XMLPRC_IP_ADDRESS "127.0.0.1"
#define DEFAULT_XMLRPC_IP_PORT "7362"
#define DEFAULT_FLRIG_IP_ADDRESS "127.0.0.1"
#define DEFAULT_FLRIG_IP_PORT "12345"
#define DEFAULT_FLLOG_IP_ADDRESS "127.0.0.1"
#define DEFAULT_FLLOG_IP_PORT "8421"
enum {DISABLED_IO, ARQ_IO, KISS_IO, XMLRPC_IO, FLRIG_IO, FLLOG_IO};
#define RSID_KISS_NOTIFY 0x01
#define RSID_KISS_ACTIVE 0x02
#define RSID_KISS_USER 0x03
#define DATA_IO_NA 0x00
#define DATA_IO_TCP 0x01
#define DATA_IO_UDP 0x02
// This variable indepent of progdefaults.data_io_enabled
// and progStatus.data_io_enabled
// Only on start do we assign this variable with progStatus.data_io_enabled.
// This is one way assignment as we dont want to save all of the available states
// this variable will have.
extern int data_io_enabled; // Located in kiss_io.cxx
extern int data_io_type; // Located in kiss_io.cxx
extern void disable_config_p2p_io_widgets(void);
extern void enable_config_p2p_io_widgets(void);
extern void set_ip_to_default(int which_io);
// KISS implementation
extern void kiss_init(bool connect_flag);
extern void kiss_close(bool override_flag);
extern void kiss_reset(void);
extern void WriteKISS(const char data);
extern void WriteKISS(const char *data);
extern void WriteKISS(const char *data, size_t size);
extern void WriteKISS(std::string data);
extern bool kiss_thread_running(void);
extern bool kiss_auto_connect(void);
extern void check_kiss_modem(void);
extern int kiss_get_char(void);
extern bool kiss_text_available; // Located in kiss_io.cxx
extern bool kiss_bcast_rsid_reception;
extern bool kiss_bcast_trx_toggle;
extern bool bcast_rsid_kiss_frame(int new_wf_pos, int new_mode, int old_wf_pos, int old_mode, int notify);
extern void bcast_trxc_kiss_frame(void);
extern void kiss_io_set_button_state(void *);
extern void connect_to_kiss_io(bool);
// ARQ implementation
extern void arq_init(void);
extern void arq_close(void);
extern bool arq_state(void);
extern void WriteARQ(unsigned char);
extern void checkTLF(void);
extern int arq_get_char(void);
extern bool arq_text_available;
extern bool gmfskmail;
extern std::string ArqFilename;
extern bool mailclient;
extern bool mailserver;
extern bool tlfio;
extern time_t inhibit_tx_seconds;
// Misc calls
extern void enable_disable_kpsql(void);
#endif
| 3,714
|
C++
|
.h
| 94
| 38.308511
| 106
| 0.729797
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,311
|
fd_view.h
|
w1hkj_fldigi/src/include/fd_view.h
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#ifndef fd_view_h
#define fd_view_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Output.H>
extern Fl_Output *view_FD_call;
extern Fl_Output *view_FD_class;
extern Fl_Output *view_FD_section;
extern Fl_Output *view_FD_mult;
extern Fl_Output *view_FD_score;
extern Fl_Output *view_FD_CW[12];
extern Fl_Output *view_FD_CW_OP[12];
extern Fl_Output *view_FD_DIG[12];
extern Fl_Output *view_FD_DIG_OP[12];
extern Fl_Output *view_FD_PHONE[12];
extern Fl_Output *view_FD_PHONE_OP[12];
#include <FL/Fl_Box.H>
#include <FL/Fl_Group.H>
#include "flinput2.h"
extern Fl_Input2 *inp_fd_tcpip_addr;
extern Fl_Input2 *inp_fd_tcpip_port;
extern Fl_Input2 *inp_fd_op_call;
#include <FL/Fl_Check_Button.H>
#include "confdialog.h"
#include "fl_digi.h"
#include "logsupport.h"
extern Fl_Check_Button *btn_fd_connect;
extern Fl_Box *box_fdserver_connected;
Fl_Double_Window* make_fd_view();
#endif
| 974
|
C++
|
.h
| 31
| 30.387097
| 73
| 0.757962
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,312
|
waterfall.h
|
w1hkj_fldigi/src/include/waterfall.h
|
// ----------------------------------------------------------------------------
// Waterfall Spectrum Analyzer Widget
// Copyright (C) 2006-2010 Dave Freese, W1HKJ
// Copyright (C) 2008 Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _WF_H
#define _WF_H
#include <FL/Fl_Widget.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Menu_Button.H>
#include <FL/Fl_Counter.H>
#include <FL/Fl_Box.H>
#include "gfft.h"
#include "fldigi-config.h"
#include "digiscope.h"
#include "flslider2.h"
#include <samplerate.h>
enum {
WF_FFT_RECTANGULAR, WF_FFT_BLACKMAN, WF_FFT_HAMMING,
WF_FFT_HANNING, WF_FFT_TRIANGULAR
};
#define WF_FFTLEN 8192
#define WF_SAMPLERATE 8000
#define WF_BLOCKSIZE 512
struct RGB {
uchar R;
uchar G;
uchar B;
};
struct RGBI {
uchar R;
uchar G;
uchar B;
uchar I;
};
// you can change the basic fft processing type by a simple change in the
// following typedef. change to float if you need to skimp on cpu cycles.
typedef double wf_fft_type;
//typedef float wf_fft_type;
typedef std::complex<wf_fft_type> wf_cpx_type;
extern RGBI mag2RGBI[256];
extern RGB palette[9];
enum WFmode {
WATERFALL,
SPECTRUM,
SCOPE,
NUM_WF_MODES
};
#define MAG_1 1
#define MAG_2 2
#define MAG_4 3
enum WFspeed { PAUSE = 0, FAST = 1, NORMAL = 2, SLOW = 4 };
extern void do_qsy(bool);
class WFdisp : public Fl_Widget {
public:
WFdisp (int x, int y, int w, int h, char *lbl = 0);
~WFdisp ();
int wfmag();
int setMag(int m);
void setOffset(int v);
void Mode(WFmode M) {
mode = M;
}
WFmode Mode() {
return mode;
}
int cursorFreq(int xpos) {
return (offset + step * xpos);
}
void Ampspan(double AmpSpn) {
ampspan = (int)AmpSpn;
}
double Ampspan() {
return ampspan;
}
void Bandwidth (int bw) {
bandwidth = bw;
makeMarker();
}
int Bandwidth () {
return bandwidth;
}
void Overload(int ovr) {
if (overload == ovr) return;
overload = ovr;
}
double AudioPeak() { return peakaudio; }
WFspeed Speed() { return wfspeed;}
void Speed(WFspeed rate) {
wfspeed = rate;
dispcnt = 1.0 * WF_BLOCKSIZE / WF_SAMPLERATE;
}
int Mag() { return mag;}
void Mag(int m) { setMag(m);}
int Offset() { return offset;}
void Offset(int v) { setOffset(v);}
void initmaps();
void draw();
int handle(int event);
void update_sigmap();
void update_waterfall();
void checkoffset();
void slew(int);
void movetocenter();
void carrier(int cf);
int carrier();
inline void makeNotch_(int notch_frequency);
inline void makeMarker_(int width, const RGB* color, int freq, const RGB* clrMin, RGB* clrM, const RGB* clrMax);
void make_fmt_marker ();
void makeMarker();
void process_analog(wf_fft_type *sig, int len);
void processFFT();
void sig_data(double *sig, int len);
void handle_sig_data();
void rfcarrier(long long f) {
rfc = f;
}
void USB(bool b) {
usb = b;
}
bool USB() {return usb;};
long long rfcarrier() { return rfc;};
void updateMarker() {
drawMarker();};
int peakFreq(int f0, int delta);
double powerDensity(double f0, double bw);
double powerDensityMaximum(int bw_nb, const int (*bw)[2]) const ;
void setPrefilter(int v);
void setcolors();
double dFreq() {return dfreq;}
void defaultColors();
private:
int disp_width;
int image_width;
int scale_width;
int RGBwidth;
int RGBsize;
int image_height;
int image_area;
int sig_image_area;
int mag;
int magset;
WFmode mode;
bool overload;
bool usb;
long long rfc;
int offset;
int sigoffset;
int step;
int carrierfreq;
int bandwidth;
int wfspdcnt;
float dispcnt;
float dispdec;
int ampspan;
double peakaudio;
double dfreq;
bool centercarrier;
bool cursormoved;
WFspeed wfspeed;
// int srate;
RGBI *fft_img;
RGB *markerimage;
RGB RGBmarker;
RGB RGBcursor;
RGBI RGBInotch;
wf_fft_type *fftwindow;
uchar *scaleimage;
uchar *fft_sig_img;
uchar *sig_img;
uchar *scline;
wf_cpx_type *wfbuf;
short int *fft_db;
int ptrFFTbuff;
wf_fft_type *circbuff;
int ptrCB;
wf_fft_type *pwr;
g_fft<wf_fft_type> *wfft;
int prefilter;
int checkMag();
void checkWidth();
void initMarkers();
void makeScale();
void drawScale();
void drawMarker();
int log2disp(int v);
void drawcolorWF();
void drawgrayWF();
void drawspectrum();
void drawsignal();
// resample
SRC_STATE* src_state;
SRC_DATA src_data;
int genptr;
float insamples[WF_BLOCKSIZE * 2];
float outsamples[WF_BLOCKSIZE * 16];
float *buf;
int srclen;
protected:
public:
bool wantcursor;
int cursorpos;
int newcarrier;
int oldcarrier;
bool tmp_carrier;
double Pwr(int i) {
if ( i > 0 && i < IMAGE_WIDTH) return pwr[i];
return 0.0;
}
};
class waterfall: public Fl_Group {
friend void x1_cb(Fl_Widget *w, void* v);
friend void slew_left(Fl_Widget *w, void * v);
friend void slew_right(Fl_Widget *w, void * v);
friend void center_cb(Fl_Widget *w, void *v);
friend void carrier_cb(Fl_Widget *w, void *v);
friend void mode_cb(Fl_Widget *w, void *v);
friend void set_wf_mode(void);
friend void ampspan_cb(Fl_Widget *w, void *v);
friend void qsy_cb(Fl_Widget *w, void *v);
friend void rate_cb(Fl_Widget *w, void *v);
friend void btnMem_cb(Fl_Widget *w, void *v);
public:
waterfall(int x, int y, int w, int h, char *lbl= 0);
~waterfall(){};
void show_scope(bool on);
void opmode();
void sig_data(double *sig, int len) {
wfdisp->sig_data(sig, len);
}
void handle_sig_data() {wfdisp->handle_sig_data();}
void Overload(bool ovr) {
wfdisp->Overload(ovr);
}
int carrier() {
return wfdisp->carrier();
}
void carrier(int f);
void rfcarrier(long long cf);
long long rfcarrier();
bool tmp_carrier(void) { return wfdisp->tmp_carrier; }
void set_XmtRcvBtn(bool val);
void USB(bool b);
bool USB();
void Reverse( bool v) { reverse = v;}
bool Reverse() { return reverse;}
void xmtrcv_selection_color(Fl_Color clr) {xmtrcv->selection_color(clr);}
void reverse_selection_color(Fl_Color clr) {btnRev->selection_color(clr);}
void xmtlock_selection_color(Fl_Color clr) {xmtlock->selection_color(clr);}
void Bandwidth(int bw)
{
wfdisp->Bandwidth(bw);
}
int peakFreq(int f0, int delta)
{
return (wfdisp->peakFreq(f0, delta));
}
double powerDensity(double f0, double bw)
{
return (wfdisp->powerDensity(f0,bw));
}
double powerDensityMaximum(int bw_nb, const int (*bw)[2]) const
{
return (wfdisp->powerDensityMaximum(bw_nb,bw));
}
int Speed();
void Speed(int rate);
int Mag();
void Mag(int m);
int Offset();
void Offset(int v);
int Carrier();
void Carrier(int f);
void draw_fmt_marker() { wfdisp->make_fmt_marker(); }
void movetocenter() { wfdisp->movetocenter();}
void redraw_marker() { wfdisp->makeMarker(); }
void setPrefilter(int v) {wfdisp->setPrefilter(v);}
void setcolors() { wfdisp->setcolors(); }
void setRefLevel();
void setAmpSpan();
double dFreq() { return wfdisp->dFreq();}
void setQSY(bool on) {
if (on)
qsy->activate();
else
qsy->deactivate();
}
double Pwr(int i) { return wfdisp->Pwr(i); }
int handle(int event);
void insert_text(bool check = false);
enum { WF_NOP, WF_AFC_BW, WF_SIGNAL_SEARCH, WF_SQUELCH,
WF_CARRIER, WF_MODEM, WF_SCROLL };
static const char* wf_wheel_action[7];
void handle_mouse_wheel(int what, int d);
Fl_Button *btnRev;
Fl_Counter2 *wfcarrier;
Fl_Counter2 *wfRefLevel;
Fl_Counter2 *wfAmpSpan;
Fl_Light_Button *xmtrcv;
Fl_Light_Button *xmtlock;
Fl_Button *qsy;
void UI_select(bool);
Digiscope *wfscope;
private:
int wf_dim;
WFdisp *wfdisp;
Fl_Group *rs1;
Fl_Button *mode;
Fl_Button *x1;
Fl_Button *left;
Fl_Button *center;
Fl_Button *right;
Fl_Button *wfrate;
Fl_Button *btnMem;
Fl_Menu_Button *mbtnMem;
int buttonrow;
bool reverse;
};
#endif
| 8,486
|
C++
|
.h
| 336
| 23.166667
| 113
| 0.697172
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,313
|
coordinate.h
|
w1hkj_fldigi/src/include/coordinate.h
|
// ----------------------------------------------------------------------------
// coordinate.h -- Handling of longitude and latitude.
//
// Copyright (C) 2012
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _COORDINATE_H
#define _COORDINATE_H
#include <iostream>
// Models a longitude or latitude.
class CoordinateT
{
// Precision is: 360 * 3600 = 1296000, 21 bits. A float might be enough.
double m_angle ; // In decimal degrees, between -180.0 and 180.0.
bool m_is_lon ; // Longitude or latitude.
// TODO: Consider adding a big offset to m_angle, instead of an extra flag.
void Check(void) const ;
void Init( char direction, double degrees );
public:
CoordinateT(bool ll=true)
: m_angle(0.0), m_is_lon(ll) {};
CoordinateT( double degrees, bool is_lon );
CoordinateT( char direction, double degrees );
CoordinateT( char direction, int degree, int minute, int second );
double angle(void) const { return m_angle ; }
bool is_lon(void) const { return m_is_lon; }
// Specific for reading from the file of navtex or wmo stations.
// Navtex: "57 06 N"
// Wmo : "69-36N", "013-27E", "009-25E"
friend std::istream & operator>>( std::istream & istrm, CoordinateT & ref );
friend std::ostream & operator<<( std::ostream & ostrm, const CoordinateT & ref );
class Pair ;
}; // CoordinateT
// Longitude , latitude.
class CoordinateT::Pair
{
CoordinateT m_lon, m_lat ;
public:
Pair() {}
Pair( const CoordinateT & coo1, const CoordinateT & coo2 );
Pair( double lon, double lat );
Pair( const std::string & locator );
CoordinateT longitude() const { return m_lon ; }
CoordinateT latitude() const { return m_lat ; }
CoordinateT & longitude() { return m_lon ; }
CoordinateT & latitude() { return m_lat ; }
double distance( const Pair & a ) const;
std::string locator() const ;
friend std::istream & operator>>( std::istream & istrm, Pair & ref );
friend std::ostream & operator<<( std::ostream & ostrm, const Pair & ref );
}; // CoordinateT::Pair
#endif // _COORDINATE_H
| 2,753
|
C++
|
.h
| 67
| 39.223881
| 83
| 0.673684
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,314
|
flslider2.h
|
w1hkj_fldigi/src/include/flslider2.h
|
// ----------------------------------------------------------------------------
// flslider2.h
//
// Copyright (C) 2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FL_SLIDER2_
#define FL_SLIDER2_
#include <FL/Fl_Slider.H>
#include <FL/Fl_Value_Slider.H>
#include <FL/Fl_Value_Input.H>
#include <FL/Fl_Spinner.H>
class Fl_Slider2 : public Fl_Slider
{
public:
Fl_Slider2(int x, int y, int w, int h, const char* l = 0)
: Fl_Slider(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Value_Slider2 : public Fl_Value_Slider
{
public:
Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0)
: Fl_Value_Slider(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Value_Input2 : public Fl_Value_Input
{
public:
Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0)
: Fl_Value_Input(x, y, w, h, l) { }
int handle(int event);
};
class Fl_Spinner2 : public Fl_Spinner
{
public:
Fl_Spinner2(int x, int y, int w, int h, const char* l = 0)
: Fl_Spinner(x, y, w, h, l) { }
int handle(int event);
};
//======================================================================
// Fl_Counter with
// improved event handling,
// color rendering
//======================================================================
// values for type():
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */
/**
Controls a single floating point value with button (or keyboard) arrows.
Double arrows buttons achieve larger steps than simple arrows.
\see Fl_Spinner for value input with vertical step arrows.
<P align=center>\image html counter.png</P>
\image latex counter.png "My_Counter" width=4cm
\todo Refactor the doxygen comments for My_Counter type() documentation.
The type of an My_Counter object can be set using type(uchar t) to:
\li \c FL_NORMAL_COUNTER: Displays a counter with 4 arrow buttons.
\li \c FL_SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons.
*/
class FL_EXPORT My_Counter : public Fl_Valuator {
Fl_Font textfont_;
Fl_Fontsize textsize_;
Fl_Color textcolor_;
Fl_Color bkcolor_;
double lstep_;
uchar mouseobj;
static void repeat_callback(void *);
int calc_mouseobj();
void increment_cb();
protected:
void draw();
public:
int handle(int);
My_Counter(int X, int Y, int W, int H, const char* L = 0);
~My_Counter();
/**
Sets the increment for the large step buttons.
The default value is 1.0.
\param[in] a large step increment.
*/
void lstep(double a) {lstep_ = a;}
/**
Sets the increments for the normal and large step buttons.
\param[in] a, b normal and large step increments.
*/
void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
/**
Sets the increment for the normal step buttons.
\param[in] a normal step increment.
*/
void step(double a) {Fl_Valuator::step(a);}
/**
Returns the increment for normal step buttons.
*/
double step() const {return Fl_Valuator::step();}
/** Gets the text font */
Fl_Font textfont() const {return textfont_;}
/** Sets the text font to \p s */
void textfont(Fl_Font s) {textfont_ = s;}
/** Gets the font size */
Fl_Fontsize textsize() const {return textsize_;}
/** Sets the font size to \p s */
void textsize(Fl_Fontsize s) {textsize_ = s;}
/** Gets the font color */
Fl_Color textcolor() const {return textcolor_;}
/** Sets the font color to \p s */
void textcolor(Fl_Color s) {textcolor_ = s;}
void textbkcolor(Fl_Color c) {bkcolor_ = c;}
};
class Fl_Counter2 : public My_Counter
{
public:
Fl_Counter2(int x, int y, int w, int h, const char* l = 0)
: My_Counter(x, y, w, h, l) { }
int handle(int event);
};
#endif // FL_SLIDER2_
| 4,528
|
C++
|
.h
| 132
| 31.94697
| 79
| 0.645819
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,315
|
outputencoder.h
|
w1hkj_fldigi/src/include/outputencoder.h
|
// ----------------------------------------------------------------------------
// outputencoder.h -- output charset conversion
//
// Copyright (C) 2012
// Andrej Lajovic, S57LN
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef OUTPUTENCODER_H
#define OUTPUTENCODER_H
#include <string>
#include <tiniconv.h>
class OutputEncoder
{
public:
OutputEncoder(const int charset_out = TINICONV_CHARSET_UTF_8, unsigned int buffer_size = 32);
~OutputEncoder(void);
void set_output_encoding(const int charset_out);
void push(std::string s);
const unsigned int pop(void);
const unsigned int peek(void);
private:
unsigned int buffer_size;
unsigned char *buffer;
unsigned char *encoding_ptr;
unsigned char *pop_ptr;
//unsigned int data_length;
tiniconv_ctx_s ctx;
};
#endif
| 1,497
|
C++
|
.h
| 43
| 33.093023
| 95
| 0.674258
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,316
|
colorbox.h
|
w1hkj_fldigi/src/include/colorbox.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef COLORBOX_H
#define COLORBOX_H
#include <FL/Fl_Button.H>
extern void loadPalette();
extern void savePalette();
extern void selectColor(int);
extern void setColorButtons();
class colorbox : public Fl_Button {
void draw();
public:
colorbox(int x, int y, int w, int h, const char *label = 0) : Fl_Button(x,y,w,h,label) {
Fl_Button::box(FL_DOWN_BOX);
};
void end(){};
};
#endif
| 1,283
|
C++
|
.h
| 35
| 35.314286
| 89
| 0.640902
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,318
|
cw.h
|
w1hkj_fldigi/src/include/cw.h
|
// ----------------------------------------------------------------------------
// cw.h -- morse code modem
//
// Copyright (C) 2006-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted in part from code contained in
// gmfsk source code distribution.
// gmfsk Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
// Copyright (C) 2004
// Lawrence Glaister (ve7it@shaw.ca)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _CW_H
#define _CW_H
#include <cstring>
#include <string>
#include "modem.h"
#include "filters.h"
#include "fftfilt.h"
#include "mbuffer.h"
#include "view_cw.h"
#define CW_SAMPLERATE 8000
#define CWMaxSymLen 4096 // AG1LE: - was 4096
#define MAX_MORSE_ELEMENTS 6 // maximum of 6 elements in a Morse character 256
// CW function return status codes.
#define CW_SUCCESS 0
#define CW_ERROR -1
#define ASC_NUL '\0' // End of string
#define ASC_SPACE ' ' // ASCII space char
// Tone and timing magic numbers.
#define KWPM (12 * CW_SAMPLERATE/10) // # samples in dot = KWPM / WPM
#define CWKNUM ((KWPM) / 10) // 640, 1/2 dot length at 5 wpm
#define TONE_SILENT 0 // 0Hz = silent 'tone'
#define USECS_PER_SEC 1000000 // Microseconds in a second
#define INITIAL_SEND_SPEED 18 // Initial send speed in WPM
#define INITIAL_RECEIVE_SPEED 18 // Initial receive speed in WPM
// Initial adaptive speed threshold
#define INITIAL_THRESHOLD (((KWPM) / INITIAL_RECEIVE_SPEED) * 2)
// Initial noise filter threshold
#define INITIAL_NOISE_THRESHOLD (((KWPM) / CW_MAX_SPEED) / 2)
#define TRACKING_FILTER_SIZE 16
#define MAX_PIPE_SIZE (22 * CW_SAMPLERATE * 12 / 800)
enum CW_RX_STATE {
RS_IDLE = 0,
RS_IN_TONE,
RS_AFTER_TONE
};
enum CW_EVENT {
CW_RESET_EVENT,
CW_KEYDOWN_EVENT,
CW_KEYUP_EVENT,
CW_QUERY_EVENT
};
class cw : public modem {
#define CLRCOUNT 16
#define DEC_RATIO 16
// Maximum number of signs (dit or dah) in a Morse char.
#define WGT_SIZE 7
struct SOM_TABLE {
std::string rpr; // The printable representation of the character
float wgt[WGT_SIZE]; // Dot-dash weight vector
};
protected:
int symbollen; // length of a dot in sound samples (tx)
int fsymlen; // length of extra interelement space (farnsworth)
double phaseacc; // used by NCO for rx/tx tones
double FFTphase;
double FFTvalue;
unsigned int smpl_ctr; // sample counter for timing cw rx
double agc_peak; // threshold for tone detection
bool use_matched_filter;
double upper_threshold;
double lower_threshold;
fftfilt *cw_FFT_filter; // sinc / matched filter
Cmovavg *bitfilter;
Cmovavg *trackingfilter;
int bitfilterlen;
CW_RX_STATE cw_receive_state; // Indicates receive state
CW_RX_STATE old_cw_receive_state;
CW_EVENT cw_event; // functions used by cw process routine
double pipe[MAX_PIPE_SIZE+1]; // storage for sync scope data
double clearpipe[MAX_PIPE_SIZE+1];
mbuffer<double, MAX_PIPE_SIZE + 1, 4> scopedata;
int pipeptr;
int pipesize;
bool scope_clear;
// user configurable data - local copy passed in from gui
int cw_speed;
int cw_bandwidth;
int cw_squelch;
int cw_send_speed; // Initially 18 WPM
int cw_receive_speed; // Initially 18 WPM
bool usedefaultWPM; // use default WPM
int cw_upper_limit;
int cw_lower_limit;
long int cw_noise_spike_threshold; // Initially ignore any tone < 10mS
int cw_in_sync; // Synchronization flag
// Sending parameters:
long int cw_send_dot_length; // Length of a send Dot, in Usec
long int cw_send_dash_length; // Length of a send Dash, in Usec
int lastsym; // last symbol sent
double risetime; // leading/trailing edge rise time (msec)
int knum; // number of samples on edges
int qnum; // number of samples on QSK signal edges
int QSKshape; // leading/trailing edge shape factor
double qskbuf[OUTBUFSIZE]; // signal array for qsk drive
double qskphase; //
bool firstelement;
bool lastelement;
double maxval;
// double *keyshape; // array defining leading edge
// Receiving parameters:
long int cw_receive_dot_length; // Length of a receive Dot, in Usec
long int cw_receive_dash_length; // Length of a receive Dash, in Usec
// Receive buffering
std::string rx_rep_buf;
int cw_rr_current; // Receive buffer current location
unsigned int cw_rr_start_timestamp; // Tone start timestamp
unsigned int cw_rr_end_timestamp; // Tone end timestamp
long int two_dots; // 2-dot threshold for adaptive speed
int in_replay; //AG1LE: if we have replay even, set to 1 otherwise = 0 ;
// Receive adaptive speed tracking.
double dot_tracking;
double dash_tracking;
inline double nco(double freq);
inline double qsknco();
void update_syncscope();
void clear_syncscope();
void update_Status();
void sync_parameters();
void reset_rx_filter();
int handle_event(int cw_event, std::string &sc);
inline int usec_diff(unsigned int earlier, unsigned int later);
void send_symbol(int symbol, int len, int state);
void send_ch(int c);
bool tables_init();
unsigned int tokenize_representation(char *representation);
void update_tracking(int dot, int dash);
static const SOM_TABLE som_table[];
float cw_buffer[512];
int cw_ptr;
int clrcount;
double lowerwpm;
double upperwpm;
int synchscope;
double noise_floor;
double sig_avg;
double siglevel;
bool use_paren;
std::string prosigns;
cmplx mixer(cmplx in);
// transmit wave shaping
int nusymbollen;
int nufsymlen;
int kpre;
int kpost;
double wpm;
double fwpm;
double cal_wpm;
void create_edges();
void sync_transmit_parameters();
void flush_audio();
void send_CW(int);
view_cw viewcw;
public:
cw();
~cw();
void init();
void rx_init();
void tx_init();
void restart() {};
int rx_process(const double *buf, int len);
void rx_FFTprocess(const double *buf, int len);
void rx_FIRprocess(const double *buf, int len);
void decode_stream(double);
int tx_process();
void incWPM();
void decWPM();
void toggleWPM();
double calWPM() { return cal_wpm; }
void calWPM(double val) { cal_wpm = val; }
int normalize(float *v, int n, int twodots);
std::string find_winner (float *inbuf, int twodots);
};
extern bool CW_table_changed;
extern bool CW_KEYLINE_isopen;
extern void close_CW_KEYLINE();
extern int open_CW_KEYLINE();
extern bool CW_KEYLINE_isopen;
extern void cwio_ptt(int on);
extern void cwio_key(int on);
extern void cal_cwio();
extern void cwio_display_calibration();
extern void calibrate_cwio();
extern void CAT_keying_calibrate();
extern void flrig_cwio_send(char);
extern pthread_mutex_t cwio_ptt_mutex;
#endif
| 7,310
|
C++
|
.h
| 212
| 32.457547
| 79
| 0.713554
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,319
|
dx_dialog.h
|
w1hkj_fldigi/src/include/dx_dialog.h
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#ifndef dx_dialog_h
#define dx_dialog_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
extern Fl_Group *btn_select_host;
#include "flinput2.h"
extern Fl_Input2 *inp_dxcc_host_url;
#include <FL/Fl_Button.H>
extern Fl_Button *btn_show_host_tab;
extern Fl_Input2 *inp_dccc_host_port;
extern Fl_Input2 *inp_dccc_login;
extern Fl_Input2 *inp_dxcc_password;
extern Fl_Button *btnDXCLUSTERpasswordShow;
#include <FL/Fl_Check_Button.H>
#include "status.h"
extern Fl_Check_Button *btn_dxcc_connect;
#include <FL/Fl_Box.H>
extern Fl_Box *lbl_dxc_connected;
extern Fl_Check_Button *btn_dxc_auto_connect;
#include <FL/Fl_Tabs.H>
extern Fl_Tabs *cluster_tabs;
extern Fl_Group *tabDXclusterTelNetStream;
#include "FTextView.h"
extern FTextView *brws_tcpip_stream;
extern void dxc_click_m1(Fl_Button*, void*);
extern Fl_Button *dxc_macro_1;
extern void dxc_click_m2(Fl_Button*, void*);
extern Fl_Button *dxc_macro_2;
extern void dxc_click_m3(Fl_Button*, void*);
extern Fl_Button *dxc_macro_3;
extern void dxc_click_m4(Fl_Button*, void*);
extern Fl_Button *dxc_macro_4;
extern void dxc_click_m5(Fl_Button*, void*);
extern Fl_Button *dxc_macro_5;
extern void dxc_click_m6(Fl_Button*, void*);
extern Fl_Button *dxc_macro_6;
extern void dxc_click_m7(Fl_Button*, void*);
extern Fl_Button *dxc_macro_7;
extern void dxc_click_m8(Fl_Button*, void*);
extern Fl_Button *dxc_macro_8;
extern Fl_Input2 *inp_dxcluster_cmd;
extern Fl_Button *btn_cluster_spot;
extern Fl_Button *btn_cluster_submit;
extern Fl_Group *tabDXclusterReports;
#include <FL/Fl_Browser.H>
extern Fl_Browser *reports_header;
extern Fl_Browser *brws_dx_cluster;
extern Fl_Button *btn_dxc_cluster_clear;
extern Fl_Check_Button *brws_order;
extern Fl_Button *btn_cluster_spot2;
extern Fl_Group *tabDXclusterConfig;
extern Fl_Browser *brws_dxcluster_hosts;
extern void dxcluster_hosts_select(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_select;
extern void dxcluster_hosts_add(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_add;
extern void dxcluster_hosts_delete(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_delete;
extern void dxcluster_servers(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_servers;
extern FTextEdit *ed_telnet_cmds;
extern void dxcluster_hosts_load_setup(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_load_setup;
extern void dxcluster_hosts_save_setup(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_save_setup;
extern void dxcluster_hosts_send_setup(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_hosts_send_setup;
extern Fl_Check_Button *btn_spot_when_logged;
extern Fl_Check_Button *btn_dxc_hertz;
#include <FL/Fl_Input.H>
extern Fl_Input *mlabel_1;
extern Fl_Input2 *mtext_1;
extern Fl_Input *mlabel_2;
extern Fl_Input2 *mtext_2;
extern Fl_Input *mlabel_3;
extern Fl_Input2 *mtext_3;
extern Fl_Input *mlabel_4;
extern Fl_Input2 *mtext_4;
extern Fl_Input *mlabel_5;
extern Fl_Input2 *mtext_5;
extern Fl_Input *mlabel_6;
extern Fl_Input2 *mtext_6;
extern Fl_Input *mlabel_7;
extern Fl_Input2 *mtext_7;
extern Fl_Input *mlabel_8;
extern Fl_Input2 *mtext_8;
extern void dxcluster_ar_help(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_ar_help;
extern void dxcluster_cc_help(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_cc_help;
extern void dxcluster_dx_help(Fl_Button*, void*);
extern Fl_Button *btn_dxcluster_dx_help;
extern Fl_Group *tabDXclusterHelp;
extern FTextView *brws_dxc_help;
extern Fl_Button *btn_dxc_help_query;
extern Fl_Input2 *inp_help_string;
extern Fl_Button *btn_dxc_help_clear;
Fl_Double_Window* dxc_window();
#endif
| 3,684
|
C++
|
.h
| 101
| 35.465347
| 73
| 0.781128
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,320
|
calendar.h
|
w1hkj_fldigi/src/include/calendar.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _FL_CALENDAR_H
#define _FL_CALENDAR_H
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Box.H>
#include "flinput2.h"
#include "date.h"
class Fl_Calendar_Base : public Fl_Group , public Date
{
private:
protected:
int cal_x;
int cal_y;
int cal_w;
int cal_h;
Fl_Button * days[6*7];
public:
Fl_Widget *target;
int calfmt;
/**
* The constructor for an empty Fl_Calendar_Base.
*/
Fl_Calendar_Base (int x, int y, int w = (7*20), int h = (6*20),
const char *l = 0);
Fl_Button * day_button (int i);
void update ();
void csize (int cx, int cy, int cw, int ch);
void setTarget (Fl_Widget *tgt);
};
class Fl_Calendar : public Fl_Calendar_Base
{
public:
/**
* The constructor for an empty Fl_Calendar.
*/
Fl_Calendar (int x, int y, int w = (7*20), int h = (8*20),
const char *l = 0);
void today ();
void previous_month ();
void next_month ();
void previous_year ();
void next_year ();
void setDate (int, int, int);
void update ();
void csize (int cx, int cy, int cw, int ch);
int handle (int);
protected:
// Fl_Button * weekdays[7];
// Fl_Button * caption;
Fl_Box * weekdays[7];
Fl_Box * caption;
Fl_Button * nxt_month;
Fl_Button * prv_month;
Fl_Button * nxt_year;
Fl_Button * prv_year;
};
class Fl_PopCal : public Fl_Window {
friend void popcal_cb(Fl_Widget *, long);
protected:
int popcalfmt_;
// Fl_Window popcal_form;
Fl_Calendar *popcal;
Fl_Input2 *target;
public:
Fl_PopCal (int x, int y, int w, int h, Fl_Input2 *inp = 0);
~Fl_PopCal ();
void popposition (int, int);
void popshow ();
void pophide ();
void popcal_cb_i (Fl_Widget *, long);
void popcalfmt (int);
int popcalfmt ();
int handle (int);
void setDate (int, int, int);
};
class Fl_DateInput : public Fl_Group {
protected:
Fl_Button *Btn;
Fl_Input2 *Input;
Fl_PopCal *Cal;
Fl_Window *popcal_form;
Fl_Calendar *popcal;
int popcalfmt_;
void makepopcal();
public:
Fl_DateInput (int x, int y, int w, int h, const char * = 0);
void format (int);
const char *value ();
void value (const char *);
void color (Fl_Color);
void textfont (int);
void textsize (int);
void textcolor (Fl_Color);
void labelfont (int);
void labelsize (int);
void labelcolor (int);
void align (Fl_Align);
void fl_popcal();
void take_focus();
};
#endif
| 3,404
|
C++
|
.h
| 121
| 24.809917
| 79
| 0.624653
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,321
|
fsk.h
|
w1hkj_fldigi/src/include/fsk.h
|
// ----------------------------------------------------------------------------
// fsk.cxx -- FSK signal generator
//
// Copyright (C) 2021
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// This code bears some resemblance to code contained in gmfsk from which
// it originated. Much has been changed, but credit should still be
// given to Tomi Manninen (oh2bns@sral.fi), who so graciously distributed
// his gmfsk modem under the GPL.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <iostream>
#include <string>
//#include "io_timer.h"
#include "serial.h"
//#include "io_timer.h"
#ifndef FSK_H
#define FSK_H
class FSK
{
// time (msec) for one symbollen @ 45.45 baud
#define BITLEN 0.022 //22
#define FSK_UNKNOWN 0x000
#define FSK_LETTERS 0x100
#define FSK_FIGURES 0x200
#define LTRS 0x1F
#define FIGS 0x1B
#define FSK_MARK 1
#define FSK_SPACE 0
public:
FSK();
~FSK();
bool open();
bool close();
void abort();
bool sending();
void send(const char ch);
void send(std::string s);
void append(const char ch);
void append(std::string s);
void shift_on_space(bool b) { _shift_on_space = b; }
bool shift_on_space() { return _shift_on_space; }
void dtr(bool b) { _dtr = b; }
bool dtr() { return _dtr; }
void rts(bool b) { _dtr = !b; }
bool rts() { return !_dtr; }
void reverse(bool b) { _reverse = b; }
bool reverse() { return _reverse; }
void open_port(std::string device_name);
void device(std::string device_name) {
serial_device = device_name;
}
void fsk_shares_port(Cserial *shared_device);
// size_t io_timer_id;
Cserial *using_port() { return fsk_port; }
private:
Cserial *fsk_port;
std::string serial_device;
bool shared_port; // default is false
static char letters[];
static char figures[];
static const char *ascii[];
int shift;
bool _shift_on_space;
bool _dtr;
bool _reverse;
int mode;
int shift_state;
int start_bits;
int stop_bits;
int chr_bits;
std::string str_buff;
int chr_out;
int fsk_chr;
int baudot_enc(int);
void send_baudot(int ch);
void fsk_out (bool);
double fsk_now();
void fskbit (int, double);
bool _sending;
public:
int callback_method();
int init_fsk_thread();
void exit_fsk_thread();
bool fsk_loop_terminate;
pthread_t fsk_thread;
friend
void *fsk_loop(void *data);
};
#endif
| 3,119
|
C++
|
.h
| 111
| 26.189189
| 79
| 0.68093
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,323
|
fsq.h
|
w1hkj_fldigi/src/include/fsq.h
|
// ----------------------------------------------------------------------------
// fsq.h -- FSQCALL compatible modem
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _FSQ_H
#define _FSQ_H
#include <string>
#include <iostream>
#include <fstream>
#include "trx.h"
#include "modem.h"
#include "complex.h"
#include "filters.h"
#include "crc8.h"
#include "picture.h"
#include <FL/Fl_Shared_Image.H>
class fsq : public modem {
#define SR 12000
#define FFTSIZE 4096
#define FSQ_SYMLEN 4096
#define NUMBINS 144 // 200 //((FFTSIZE / 4) - 2)
#define BLOCK_SIZE FFTSIZE
#define SHIFT_SIZE (FSQ_SYMLEN / 16)
#define MOVAVGLIMIT 15
enum STATE {TEXT, IMAGE};
friend void timed_xmt(void *);
friend void sounder(void *);
friend void aging(void *);
friend void fsq_add_tx_timeout(void *);
friend void fsq_stop_aging();
friend void try_transmit(void *);
friend void fsq_transmit(void *);
public:
protected:
// Rx
double rx_stream[BLOCK_SIZE + SHIFT_SIZE];
cmplx fft_data[2*FFTSIZE];
double a_blackman[BLOCK_SIZE];
double tones[NUMBINS];
Cmovavg *binfilt[NUMBINS];
int movavg_size;
int bkptr;
g_fft<double> *fft;
Cmovavg *snfilt;
Cmovavg *sigfilt;
Cmovavg *noisefilt;
Cmovavg *baudfilt;
double val;
double max;
double noise;
int peak;
int prev_peak;
int last_peak;
int peak_counter;
int peak_hits;
int symbol;
int prev_symbol;
int curr_nibble;
int prev_nibble;
int nibbles[199];
void lf_check(int);
void process_symbol(int);
double s2n;
char szestimate[40];
std::string rx_text;
std::string toprint;
int valid_callsign(std::string s);
void parse_rx_text();
void parse_space(bool);
void parse_qmark(std::string relay = "");
void parse_star();
void parse_repeat();
void parse_delayed_repeat();
void parse_pound(std::string relay = "");
void parse_dollar(std::string relay = "");
void parse_at(std::string relay = "");
void parse_amp(std::string relay = "");
void parse_carat(std::string relay = "");
void parse_pcnt();
void parse_vline(std::string relay = "");
void parse_greater(std::string relay = "");
void parse_less(std::string relay = "");
void parse_plus(std::string relay = "");
void parse_minus();
void parse_relay();
void parse_relayed();
bool b_bot;
bool b_eol;
bool b_eot;
// Tx
// C_FIR_filter *xmtfilt;
int tone;
int prevtone;
double txphase;
void send_string(std::string);
bool send_bot;
void flush_buffer ();
void send_char (int);
void send_idle ();
void send_symbol(int sym);
void send_tone(int tone);
void reply(std::string);
void delayed_reply(std::string, int delay);
void send_ack(std::string relay = "");
// Sounder
double sounder_interval;
void start_sounder(int); // 0, 1, 2, 3
void stop_sounder();
// Aging
void start_aging();
void stop_aging();
// RxTx
int fsq_frequency; // 0 / 1
int spacing;
int basetone;
int tx_basetone;
double speed;
double metric;
bool ch_sqlch_open;
CRC8 crc;
std::string station_calling;
std::string mycall;
std::string heard_log_fname;
std::string audit_log_fname;
std::ofstream heard_log;
std::ofstream audit_log;
void show_mode();
void adjust_for_speed();
void process_tones();
void init_nibbles();
void set_freq(double);
bool valid_char(int);
STATE state;
public:
fsq (trx_mode md);
~fsq ();
void init ();
void rx_init ();
void restart ();
void tx_init ();
int rx_process (const double *buf, int len);
int tx_process ();
std::string fsq_mycall() { return mycall; }
bool fsq_squelch_open();
static int symlen;
// support for fsq image transfers
private:
double amplitude;
double pixel;
unsigned char tx_pixel;
int tx_pixelnbr;
int image_mode;
public:
int byte;
double picf;
double picpeak;
C_FIR_filter *picfilter;
double phidiff;
double phase;
cmplx prevz;
cmplx currz;
double image_freq[10];
int image_counter;
int picW;
int picH;
int row;
int col;
int rgb;
int pixelnbr;
int RXspp;
int TXspp;
void recvpic(double smpl);
void send_image();
void fsq_send_image(std::string s);
void toggle_logs();
};
#endif
| 4,970
|
C++
|
.h
| 194
| 23.762887
| 79
| 0.671799
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,324
|
main.h
|
w1hkj_fldigi/src/include/main.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef MAIN_H_
#define MAIN_H_
#include <config.h>
// FreeBSD needs this
#include <time.h>
#include <string>
#include "ptt.h"
#include "log.h"
#include "data_io.h"
#if USE_HAMLIB
# include "rigclass.h"
#endif
extern std::string appname;
extern std::string BaseDir;
extern std::string HomeDir;
extern std::string RigsDir;
extern std::string ScriptsDir;
extern std::string PalettesDir;
extern std::string LogsDir;
extern std::string PicsDir;
extern std::string AvatarDir;
extern std::string HelpDir;
extern std::string MacrosDir;
extern std::string AnalysisDir;
extern std::string FMTDir;
extern std::string WrapDir;
extern std::string TalkDir;
extern std::string TempDir;
extern std::string DebugDir;
extern std::string LoTWDir;
extern std::string KmlDir;
extern std::string PskMailDir;
extern std::string DATA_dir;
extern std::string NBEMS_dir;
extern std::string ARQ_dir;
extern std::string ARQ_files_dir;
extern std::string ARQ_recv_dir;
extern std::string ARQ_send;
extern std::string WRAP_dir;
extern std::string WRAP_recv_dir;
extern std::string WRAP_send_dir;
extern std::string WRAP_auto_dir;
extern std::string ICS_dir;
extern std::string ICS_msg_dir;
extern std::string ICS_tmp_dir;
extern std::string FLMSG_dir;
extern std::string FLMSG_WRAP_dir;
extern std::string FLMSG_WRAP_recv_dir;
extern std::string FLMSG_WRAP_send_dir;
extern std::string FLMSG_WRAP_auto_dir;
extern std::string FLMSG_ICS_dir;
extern std::string FLMSG_ICS_msg_dir;
extern std::string FLMSG_ICS_tmp_dir;
extern std::string FLAMP_dir;
extern std::string FLAMP_rx_dir;
extern std::string FLAMP_tx_dir;
extern std::string xmlfname;
extern std::string scDevice[2];
extern PTT *push2talk;
#if USE_HAMLIB
extern Rig *xcvr;
#endif
extern cLogfile *Maillogfile;
extern cLogfile *logfile;
extern bool gmfskmail;
extern bool arqmode;
extern std::string ArqFilename;
extern bool mailclient;
extern bool mailserver;
extern bool tlfio;
extern bool arq_text_available;
extern int arq_get_char();
// ARQ mail implementation
extern void arq_init();
extern void arq_close();
extern void arq_restart();
extern void WriteARQ(unsigned char);
extern void checkTLF();
void check_nbems_dirs(void);
void check_data_dir(void);
extern bool nbems_dirs_checked;
// This inits or reinits everything related to KML: Reloads params etc...
void kml_init(bool load_files = false);
// close down remaining threads just before exiting UI
extern void exit_process();
int directory_is_created( const char * strdir );
// autostart an external program
extern void start_process(std::string executable);
#endif
| 3,547
|
C++
|
.h
| 108
| 31.638889
| 79
| 0.728496
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,325
|
combo.h
|
w1hkj_fldigi/src/include/combo.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _FL_COMBOBOX_H
#define _FL_COMBOBOX_H
#include <string>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Select_Browser.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Box.H>
#define FL_COMBO_UNIQUE 1
#define FL_COMBO_UNIQUE_NOCASE 2
#define FL_COMBO_LIST_INCR 100
class Fl_ComboBox;
enum {COMBOBOX, LISTBOX};
struct datambr {
char *s;
void *d;
};
class Fl_PopBrowser : public Fl_Window {
friend void popbrwsr_cb(Fl_Widget *, long);
Fl_Select_Browser *popbrwsr;
int hRow;
int wRow;
std::string keystrokes;
public:
Fl_PopBrowser (int x, int y, int w, int h, const char *label);
~Fl_PopBrowser ();
void popshow (int, int);
void pophide ();
void popbrwsr_cb_i (Fl_Widget *, long);
void add (char *s, void *d = 0);
void clear ();
void sort ();
int handle (int);
void clear_kbd() { keystrokes.clear(); }
Fl_ComboBox *parentCB;
Fl_Widget *parentWindow;
};
class Fl_ComboBox : public Fl_Group {
friend int DataCompare (const void *, const void *);
friend class Fl_PopBrowser;
friend void val_callback(Fl_Widget *, void *);
Fl_Button *btn;
Fl_Box *valbox;
Fl_Input *val;
Fl_PopBrowser *Brwsr;
datambr **datalist;
int listsize;
int maxsize;
int listtype;
int numrows_;
int type_;
int width;
int height;
void *retdata;
int idx;
Fl_Color _color;
void insert(const char *, void *);
public:
Fl_ComboBox (int x, int y, int w, int h, const char *lbl = 0,
int wtype = COMBOBOX);
~Fl_ComboBox();
const char *value ();
void value (std::string);
void put_value( const char *);
void fl_popbrwsr(Fl_Widget *);
void type (int = 0);
void add (const char *s, void *d = 0);
void clear ();
void clear_entry() {
if (type_ == LISTBOX) {
valbox->label("");
valbox->redraw_label();
} else {
val->value("");
val->redraw();
}
}
void sort ();
int index ();
void index (int i);
int find_index(const char *str);
void *data ();
void textfont (int);
void textsize (uchar);
void textcolor (Fl_Color c);
void color (Fl_Color c);
void readonly(bool yes = true);
int numrows() { return numrows_; }
void numrows(int n) { numrows_ = n; }
int lsize() { return listsize; }
void set_focus() { Fl::focus(btn); };
void position(int n);
void labelfont(Fl_Font fnt) { Fl_Group::labelfont(fnt); }
Fl_Font labelfont() { return Fl_Group::labelfont(); }
void labelsize(Fl_Fontsize n) { Fl_Group::labelsize(n); }
Fl_Fontsize labelsize() { return Fl_Group::labelsize(); }
int handle(int);
// Custom resize behavior -- input stretches, button doesn't
inline int val_x() { return x(); }
inline int val_y() { return y(); }
inline int val_w() { return w() - h(); }
inline int val_h() { return h(); }
inline int btn_x() { return x() + w() - h(); }
inline int btn_y() { return y(); }
inline int btn_w() { return h(); }
inline int btn_h() { return h(); }
void resize(int X, int Y, int W, int H) {
Fl_Group::resize(X,Y,W,H);
if (type_ == LISTBOX)
valbox->resize(val_x(), val_y(), val_w(), val_h());
else
val->resize(val_x(), val_y(), val_w(), val_h());
btn->resize(btn_x(), btn_y(), btn_w(), btn_h());
}
};
class Fl_ListBox : public Fl_ComboBox {
public:
Fl_ListBox (int x, int y, int w, int h, const char *lbl = 0) :
Fl_ComboBox(x,y,w,h,lbl,LISTBOX) {};
~Fl_ListBox() {};
};
#endif
| 4,254
|
C++
|
.h
| 142
| 27.901408
| 79
| 0.642752
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,326
|
dx_cluster.h
|
w1hkj_fldigi/src/include/dx_cluster.h
|
// ----------------------------------------------------------------------------
// dx_cluster.h -- constants, variables, arrays & functions that need to be
// outside of any thread
//
// Copyright (C) 2006-2007
// Dave Freese, W1HKJ
// Copyright (C) 2007-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi. Adapted in part from code contained in gmfsk
// source code distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef DX_CLUSTER_H
#define DX_CLUSTER_H
#include <string>
extern void DXcluster_init(void);
extern void DXcluster_close(void);
extern void DXcluster_connect(bool);
extern void DXcluster_submit();
extern void DXcluster_select();
extern void dxc_wwv_query();
extern void dxc_wwv_clear();
extern void dxc_help_query();
extern void dxc_help_clear();
extern void DXcluster_logoff();
extern void DXcluster_add_record();
extern void DXcluster_mode_check();
extern void DXcluster_band_check();
extern bool DXcluster_dupcheck();
extern bool DXcluster_connected;
extern void send_DXcluster_spot();
extern void dxcluster_hosts_save();
extern void dxcluster_hosts_load();
extern void dxcluster_hosts_clear_setup(Fl_Button*, void*);
extern void dxcluster_hosts_load_setup(Fl_Button*, void*);
extern void dxcluster_hosts_save_setup(Fl_Button*, void*);
extern void dxcluster_hosts_send_setup(Fl_Button*, void*);
extern void dxcluster_ccc_help(Fl_Button*, void*);
extern void dxcluster_arc_help(Fl_Button*, void*);
extern void dxcluster_dxc_help(Fl_Button*, void*);
extern void dxcluser_servers(Fl_Button*, void*);
extern void dxcluster_hosts_load();
extern void dxc_lines();
extern void dxc_lines_redraw();
extern void dxc_click_m1(Fl_Button*, void*);
extern void dxc_click_m2(Fl_Button*, void*);
extern void dxc_click_m3(Fl_Button*, void*);
extern void dxc_click_m4(Fl_Button*, void*);
extern void dxc_click_m5(Fl_Button*, void*);
extern void dxc_click_m6(Fl_Button*, void*);
extern void dxc_click_m7(Fl_Button*, void*);
extern void dxc_click_m8(Fl_Button*, void*);
struct dxinfo {
std::string spotter;
std::string freq;
std::string dxcall;
std::string remark;
std::string time;
std::string info;
std::string state;
std::string country;
std::string toall;
bool dx;
dxinfo() { clear(); }
void clear() {
spotter.clear();
freq.clear();
dxcall.clear();
remark.clear();
time.clear();
info.clear();
country.clear();
toall.clear();
dx = false;
}
~dxinfo() {}
};
#endif
| 3,137
|
C++
|
.h
| 91
| 32.967033
| 79
| 0.703924
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,327
|
KYkeying.h
|
w1hkj_fldigi/src/include/KYkeying.h
|
// ----------------------------------------------------------------------------
// KYkeying.h serial string CW interface to Elecraft transceivers
//
// Copyright (C) 2020
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _KYKEYING_H
#define _KYKEYING_H
extern bool use_KYkeyer;
extern int KYwpm;
extern void set_KYkeyer();
extern void KYkeyer_send_char(int);
#endif
| 1,099
|
C++
|
.h
| 28
| 38.107143
| 79
| 0.649485
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,328
|
weather.h
|
w1hkj_fldigi/src/include/weather.h
|
// ----------------------------------------------------------------------------
// weather.cxx -- a part of fldigi
//
// Copyright (C) 2012
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef WEATHER_H
#define WEATHER_H
#include <string>
extern void getwx(std::string &wx, std::string metar = "");
extern void get_METAR_station();
#endif
| 1,069
|
C++
|
.h
| 27
| 38.407407
| 79
| 0.632594
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,330
|
rigsupport.h
|
w1hkj_fldigi/src/include/rigsupport.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef RIG_SUPPORT_H
#define RIG_SUPPORT_H
#include <FL/Fl_Double_Window.H>
#include <string>
#include "serial.h"
#if USE_HAMLIB
#include "hamlib.h"
#endif
#include "xmlrpcpp/XmlRpc.h"
#include "xmlrpcpp/XmlRpcValue.h"
#define DEFAULT_RIGXML_FILENAME "rig-not-assigned.xml"
extern std::string windowTitle;
extern Cserial rigio;
extern void initOptionMenus();
extern void clearList();
extern void updateSelect();
extern size_t addtoList(long val);
extern void build_frequencies2_list();
extern void qso_movFreq(Fl_Widget* w, void*);
extern int cb_qso_opMODE();
extern int cb_qso_opBW();
extern int cb_qso_btnBW1();
extern int cb_qso_opBW1();
extern int cb_qso_btnBW2();
extern int cb_qso_opBW2();
extern void qso_setMode();
extern void setTitle();
extern int fwidths[];
extern void sendFreq(long int f);
extern void qso_addFreq();
extern void qso_delFreq();
extern void qso_selectFreq();
extern void qso_selectFreq(long int rfcarrier, int carrier);
extern void qso_setFreq();
extern void qso_setFreq(long int f);
extern void qso_clearList();
extern void saveFreqList();
extern void qso_updateEntry(int i, std::string usage);
extern bool readRigXML();
extern bool init_Xml_RigDialog();
extern bool init_NoRig_RigDialog();
extern bool ModeIsLSB(std::string);
#if USE_HAMLIB
extern bool init_Hamlib_RigDialog();
extern void selMode(rmode_t m);
extern std::string modeString(rmode_t m);
extern bool hamlib_USB();
extern bool hamlib_active();
#endif
// xmlrpc_rig specific
extern bool connected_to_flrig;
extern void xmlrpc_rig_set_qsy(long long rfc);
extern bool xmlrpc_USB();
extern void xmlrpc_send_command(std::string cmd);
extern void xmlrpc_priority(std::string cmd);
extern void xmlrpc_shutdown_flrig();
extern void FLRIG_set_flrig_ab(int n);
extern void FLRIG_start_flrig_thread();
extern void stop_flrig_thread();
extern void reconnect_to_flrig();
extern void set_flrig_ptt(int on);
extern void set_flrig_freq(unsigned long int fr);
extern void set_flrig_mode(const char *md);
extern void set_flrig_bw(int bw1, int bw2 = 0);
extern void set_flrig_notch();
extern void flrig_set_wpm();
extern void flrig_get_wpm();
//extern void flrig_cwio_ptt(int);
extern void flrig_cwio_send_text(std::string);
extern void flrig_fskio_send_text(std::string s);
// GPIO export/unexport pin #
extern void export_gpio(int);
extern void unexport_gpio(int);
//------------------------------------------------------------------------------
#endif
| 3,348
|
C++
|
.h
| 94
| 34.37234
| 80
| 0.713181
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,331
|
complex.h
|
w1hkj_fldigi/src/include/complex.h
|
// ----------------------------------------------------------------------------
// complex.h -- Complex arithmetic
//
// Copyright (C) 2006-2008
// Dave Freese, W1HKJ
// Copyright (C) 2008
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _COMPLEX_H
#define _COMPLEX_H
#include <cmath>
#include <complex>
typedef std::complex<double> cmplx;
inline cmplx cmac (const cmplx *a, const cmplx *b, int ptr, int len) {
cmplx z;
ptr %= len;
for (int i = 0; i < len; i++) {
z += a[i] * b[ptr];
ptr = (ptr + 1) % len;
}
return z;
}
#endif
| 1,279
|
C++
|
.h
| 38
| 32.263158
| 79
| 0.622977
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,332
|
Panel.h
|
w1hkj_fldigi/src/include/Panel.h
|
// ----------------------------------------------------------------------------
// Panel_Check.h
//
// Copyright (C) 2011
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef Panel_h_
#define Panel_h_
#include <FL/Fl_Group.H>
class Panel : public Fl_Group {
public:
int handle(int);
Panel(int X,int Y,int W,int H,const char*l=0) : Fl_Group(X,Y,W,H,l) {
clip_children(true);
}
void resize(int, int, int, int);
void position(int, int, int, int);
int orgx();
int orgy();
};
#endif
| 1,240
|
C++
|
.h
| 36
| 33.083333
| 79
| 0.620833
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,333
|
maclogger.h
|
w1hkj_fldigi/src/include/maclogger.h
|
#ifndef MACLOGGERIO_H
#define MACLOGGERIO_H
#include <vector>
#include "threads.h"
#include "socket.h"
#include "modem.h"
#define MACLOGGER_BUFFER_SIZE 2048
extern void get_maclogger_udp();
extern void *maclogger_loop(void *args);
extern void maclogger_init(void);
extern bool maclogger_start(void);
extern void maclogger_close(void);
#endif // MACLOGGERIO_H
| 364
|
C++
|
.h
| 13
| 26.615385
| 40
| 0.797688
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,334
|
picture.h
|
w1hkj_fldigi/src/include/picture.h
|
// ----------------------------------------------------------------------------
// picture.h
//
// Copyright (C) 2006-2008
// Dave Freese, W1HKJ
// Copyright (C) 2008
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef picture_H
#define picture_H
#include <FL/Fl_Widget.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Image.H>
class picture : public Fl_Widget {
private:
unsigned char *vidbuf;
int bufsize;
int width;
int height;
int numcol;
int slantdir;
void slant_corr(int x, int y);
void slant_undo();
int zoom ;
int background ;
bool binary ;
unsigned char binary_threshold ;
inline unsigned char pix2bin( unsigned char x ) const {
return x < binary_threshold ? 0 : 255 ;
}
static void draw_cb(void *data, int x, int y, int w, uchar *buf);
void resize_zoom(int, int, int, int);
void (*cbFunc)(Fl_Widget *, void *);
public:
picture(int, int, int, int, int bg_col = 0);
~picture();
void video(unsigned char const *, int);
void pixel(unsigned char data, int pos) {
if (pos < 0 || pos >= bufsize) {
return ;
}
vidbuf[pos] = data;
if (pos % (width * depth) == 0)
redraw();
}
unsigned char pixel(int);
int handle(int);
void draw();
void clear();
void image(Fl_Image *img) {Fl_Widget::image(img);}
void resize(int, int, int, int);
void resize_height(int new_height, bool clear_img);
void shift_horizontal_center(int hShift);
void stretch(double the_ratio);
int save_png(const char * filename, bool monochrome = false, const char * extra_comments = NULL);
void set_zoom(int the_zoom);
void set_binary(bool bin_mode) { binary = bin_mode ;}
int pix_width(void) const {
return width ;
}
int pix_height(void) const {
return height ;
}
const unsigned char * buffer(void) const {
return vidbuf;
}
/// Sometimes the row number goes back of one due to rounding error.
/// If this happens, noise removal does not work.
static const int noise_height_margin = 5 ;
void remove_noise( int row, int half_len, int noise_margin );
static const int depth = 3;
void callback (void (*cbf)(Fl_Widget *, void *) ){ cbFunc = cbf;}
void do_callback() {
if (cbFunc) cbFunc(this, (void*)0);
}
private:
bool restore( int row, int margin );
bool slantcorr;
public:
void dilatation( int row );
void erosion( int row );
void set_binary_threshold(unsigned char thres) {
binary_threshold = thres ;
}
unsigned char get_binary_threshold() const {
return binary_threshold ;
}
void slant(int dir);
void rotate();
void shift_center(int dir);
void noslant() {slantcorr = false;}
};
class picbox : public Fl_Box
{
public:
picbox(int x, int y, int w, int h, const char* l = 0)
: Fl_Box(x, y, w, h, l) { }
int handle(int event);
};
#endif
| 3,430
|
C++
|
.h
| 115
| 27.913043
| 99
| 0.674031
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,335
|
navtex.h
|
w1hkj_fldigi/src/include/navtex.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
// Remi Chateauneu
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _NAVTEX_H
#define _NAVTEX_H
/// Forward definition.
class navtex_implementation ;
#include <string>
#include "modem.h"
class navtex : public modem {
navtex_implementation * m_impl ;
/// Non-copiable object.
navtex();
navtex(const navtex *);
navtex & operator=(const navtex *);
public:
navtex (trx_mode md);
virtual ~navtex();
void rx_init();
void tx_init();
void restart();
int rx_process(const double *buf, int len);
int tx_process();
void set_freq( double );
std::string get_message(int max_seconds);
std::string send_message(const std::string & msg);
};
#endif
| 1,518
|
C++
|
.h
| 45
| 32.222222
| 79
| 0.647099
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,336
|
mt63.h
|
w1hkj_fldigi/src/include/mt63.h
|
// ----------------------------------------------------------------------------
// mt63.h
//
// Copyright (C) 2006-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
// Copyright (C) 2005
// Tomi Manninen (oh2bns@sral.fi)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef MT63_MODEM_H
#define MT63_MODEM_H
#include "dsp.h"
#include "mt63base.h"
#include "modem.h"
class mt63 : public modem {
#define TONE_AMP 0.8
private:
int Interleave;
int flush;
int escape;
bool long_integral;
MT63tx *Tx;
MT63rx *Rx;
dspLevelMonitor *InpLevel;
double_buff *InpBuff;
double_buff *emptyBuff;
bool flushbuffer;
double maxval;
public:
mt63(trx_mode mode);
~mt63();
void init();
void rx_init();
void tx_init();
void restart();
int rx_process(const double *buf, int len);
int tx_process();
void rx_flush();
void set_freq(double);
};
#endif
| 1,671
|
C++
|
.h
| 56
| 28.232143
| 81
| 0.638629
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,338
|
FTextRXTX.h
|
w1hkj_fldigi/src/include/FTextRXTX.h
|
// ----------------------------------------------------------------------------
// FTextView.h
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FTextRXTX_H_
#define FTextRXTX_H_
#include <string>
#include "FTextView.h"
///
/// A TextBase subclass to display received & transmitted text
///
class FTextRX : public FTextView
{
public:
FTextRX(int x, int y, int w, int h, const char *l = 0);
~FTextRX();
virtual int handle(int event);
#if FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR >= 3
virtual void add(unsigned int c, int attr = RECV);
virtual void add(const char *s, int attr = RECV)
{
while (*s)
add(*s++, attr);
}
#else
virtual void add(unsigned char c, int attr = RECV);
virtual void add(const char *s, int attr = RECV)
{
while (*s)
add(*s++, attr);
}
#endif
void set_all_entry(bool b);
bool get_quick_entry(void) { return menu[RX_MENU_ALL_ENTRY].value(); }
void set_scroll_hints(bool b);
bool get_scroll_hints(void) { return menu[RX_MENU_SCROLL_HINTS].value(); }
void mark(FTextBase::TEXT_ATTR attr = CLICK_START);
void clear(void);
void setFont(Fl_Font f, int attr = NATTR);
protected:
enum {
RX_MENU_QRZ_THIS, RX_MENU_CALL, RX_MENU_NAME, RX_MENU_QTH,
RX_MENU_STATE, RX_MENU_COUNTY, RX_MENU_PROVINCE,
RX_MENU_COUNTRY, RX_MENU_LOC,
RX_MENU_RST_IN, RX_MENU_RST_OUT,
RX_MENU_XCHG, RX_MENU_SERIAL,
RX_MENU_CLASS, RX_MENU_SECTION,
RX_MENU_SS_SER, RX_MENU_SS_PRE, RX_MENU_SS_CHK, RX_MENU_SS_SEC,
RX_MENU_CQZONE, RX_MENU_CQSTATE,
RX_MENU_1010_NR,
RX_MENU_AGE,
RX_MENU_CHECK,
RX_MENU_NAQP,
RX_MENU_SCOUT,
RX_MENU_TROOP,
RX_MENU_POWER,
RX_MENU_QSOP_STATE,
RX_MENU_QSOP_COUNTY,
RX_MENU_QSOP_SERNO,
RX_MENU_QSOP_NAME,
RX_MENU_QSOP_XCHG,
RX_MENU_QSOP_CAT,
RX_MENU_DIV,
RX_MENU_COPY,
RX_MENU_CLEAR,
RX_MENU_SELECT_ALL,
RX_MENU_SAVE,
RX_MENU_WRAP,
RX_MENU_ALL_ENTRY,
RX_MENU_SCROLL_HINTS,
RX_MENU_NUM_ITEMS
};
int num_words;
int handle_clickable(int x, int y);
int handle_qso_data(int start, int end);
void handle_qsy(int start, int end);
void handle_context_menu(void);
void menu_cb(size_t item);
const char* dxcc_lookup_call(int x, int y);
static void dxcc_tooltip(void* obj);
private:
FTextRX();
FTextRX(const FTextRX &t);
protected:
static Fl_Menu_Item menu[];
struct {
bool enabled;
float delay;
} tooltips;
};
///
/// A FTextBase subclass to display and edit text to be transmitted
///
class FTextTX : public FTextEdit
{
public:
FTextTX(int x, int y, int w, int h, const char *l = 0);
virtual int handle(int event);
void clear(void);
void clear_sent(void);
int nextChar(void);
bool eot(void);
void add_text(std::string s);
void pause() { PauseBreak = true; }
void setFont(Fl_Font f, int attr = NATTR);
protected:
enum { TX_MENU_TX, TX_MENU_RX, TX_MENU_ABORT,
TX_MENU_MFSK16_IMG,
TX_MENU_CUT, TX_MENU_COPY, TX_MENU_PASTE, TX_MENU_CLEAR,
TX_MENU_READ, TX_MENU_WRAP
};
int handle_key_shortcuts(int key);
int handle_key(int key);
int handle_key_macro(int key);
int handle_dnd_drag(int pos);
void handle_context_menu(void);
void menu_cb(size_t item);
void change_keybindings(void);
static int kf_default(int c, Fl_Text_Editor_mod* e);
static int kf_enter(int c, Fl_Text_Editor_mod* e);
static int kf_delete(int c, Fl_Text_Editor_mod* e);
static int kf_cut(int c, Fl_Text_Editor_mod* e);
static int kf_paste(int c, Fl_Text_Editor_mod* e);
private:
FTextTX();
FTextTX(const FTextTX &t);
protected:
static Fl_Menu_Item menu[];
bool PauseBreak;
int txpos;
int utf8_txpos;
static int *ptxpos;
int bkspaces;
};
#endif // FTextRXTX_H_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 4,604
|
C++
|
.h
| 156
| 26.692308
| 79
| 0.663496
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,339
|
Viewer.h
|
w1hkj_fldigi/src/include/Viewer.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef Viewer_h
#define Viewer_h
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Hold_Browser.H>
#include <FL/fl_show_colormap.H>
#include <string>
#include <config.h>
#include "viewpsk.h"
#include "psk_browser.h"
#include "flslider2.h"
#include "flinput2.h"
extern Fl_Double_Window *dlgViewer;
extern Fl_Value_Slider2 *sldrViewerSquelch;
extern Fl_Double_Window* createViewer();
extern Fl_Input2 *viewer_inp_seek;
extern pskBrowser *brwsViewer;
extern void openViewer();
extern void viewaddchr(int ch, int freq, char c, int md);
extern void viewerswap(int, int);
extern void initViewer();
extern void viewclearchannel(int ch);
extern void viewer_paste_freq(int freq);
extern void viewer_redraw();
#endif
| 1,630
|
C++
|
.h
| 44
| 35.886364
| 79
| 0.687144
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,340
|
audio_alert.h
|
w1hkj_fldigi/src/include/audio_alert.h
|
// Class Caudio_alert
//
// play various canned sounds or wav file using port audio interface
#ifndef AUDIO_ALERT_H
#define AUDIO_ALERT_H
#include "play.pa.h"
#define STEAM_TRAIN_SIZE 50225
extern int int_steam_train[];
#define BARK_SIZE 1501
extern int int_audio_bark[];
#define CHECKOUT_SIZE 11424
extern int int_audio_checkout[];
#define DOESNOT_SIZE 9927
extern int int_audio_doesnot[];
#define DIESEL_SIZE 7621
extern int int_audio_diesel[];
#define DINNER_BELL 15287
extern int int_dinner_bell[];
#define TTY_BELL 4763
extern int int_tty_bell[];
class Caudio_alert {
private:
static int int_phone_ring[];
static int int_audio_beeboo[];
c_portaudio *sc_audio;
void create_beeboo();
void create_phonering();
public:
void bark();
void checkout();
void doesnot();
void diesel();
void steam_train();
void beeboo();
void phone();
void dinner_bell();
void tty_bell();
void standard_tone();
void file(std::string sndfile);
void alert(std::string s);
void monitor(double *buffer, int len, int _sr);
void monitor(cmplx *z, int len, double wf, int _sr);
Caudio_alert();
~Caudio_alert();
int open() {
if (sc_audio) return sc_audio->open();
return 0;
}
void close() {
if (sc_audio) sc_audio->close();
}
c_portaudio *pa() { return sc_audio; }
void init_filter() { sc_audio->init_filter(); }
};
extern Caudio_alert *audio_alert;
extern void reset_audio_alerts();
extern void center_rxfilt_at_track();
#endif
| 1,457
|
C++
|
.h
| 58
| 23.137931
| 68
| 0.733091
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,341
|
debug_dialog.h
|
w1hkj_fldigi/src/include/debug_dialog.h
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#ifndef debug_dialog_h
#define debug_dialog_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Choice.H>
#include "debug.h"
extern Fl_Choice *mnu_debug_level;
#include <FL/Fl_Button.H>
extern Fl_Button *btn_clear_debug;
#include <FL/Fl_Check_Button.H>
extern Fl_Check_Button *source_code[15];
#include <FL/Fl_Browser.H>
extern Fl_Browser *btext;
Fl_Double_Window* debug_dialog();
#endif
| 506
|
C++
|
.h
| 17
| 28.705882
| 73
| 0.764344
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,342
|
ifkp.h
|
w1hkj_fldigi/src/include/ifkp.h
|
// ----------------------------------------------------------------------------
// ifkp.h -- BASIS FOR ALL MODEMS
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _IFKP_H
#define _IFKP_H
#include <string>
#include "trx.h"
#include "modem.h"
#include "complex.h"
#include "filters.h"
#include "picture.h"
#include <FL/Fl_Shared_Image.H>
class ifkp : public modem {
#define IFKP_FFTSIZE 4096
#define IFKP_SYMLEN 4096
#define IFKP_BLOCK_SIZE IFKP_FFTSIZE
#define IFKP_SHIFT_SIZE (IFKP_SYMLEN / 16)
//#define IFKP_SR 8000 //16000
#define IFKP_SPACING 3
#define IFKP_OFFSET 1
#define IFKP_NUMBINS 151 // 3 bin spacing
#define IMAGESPP 8 //16 , 12, 8
enum IFKP_STATE {TEXT, IMAGE_START, IMAGE_SYNC, IMAGE};
public:
int symlen;
protected:
// Rx
double rx_stream[IFKP_BLOCK_SIZE + IFKP_SHIFT_SIZE];
cmplx fft_data[2*IFKP_FFTSIZE];
double a_blackman[IFKP_BLOCK_SIZE];
C_FIR_filter *rxfilter;
double tones[IFKP_NUMBINS];
Cmovavg *binfilt[IFKP_NUMBINS];
int movavg_size;
int bkptr;
g_fft<double> *fft;
Cmovavg *snfilt;
double val;
double max;
double noise;
double noisepower;
int peak;
int prev_peak;
int last_peak;
int peak_counter;
int peak_hits;
int symbol;
int prev_symbol;
int curr_nibble;
int prev_nibble;
int nibbles[199];
void process_symbol(int);
void parse_pic(int);
double s2n;
char szestimate[40];
std::string station_calling;
std::string rx_text;
std::string toprint;
std::string pic_str;
IFKP_STATE state;
// Tx
// C_FIR_filter *xmtfilt;
double baud;
int tone;
int prevtone;
double txphase;
bool send_bot;
void transmit(double *buf, int len);
void send_char (int);
void send_idle ();
void send_symbol(int sym);
void send_tone(int tone);
std::string xmt_string;
double xmtdelay();
// RxTx
int basetone;
double metric;
bool ch_sqlch_open;
std::string mycall;
void show_mode();
void process_tones();
bool valid_char(int);
std::string heard_log_fname;
std::string audit_log_fname;
std::ofstream heard_log;
std::ofstream audit_log;
static std::string imageheader;
static std::string avatarheader;
public:
//----
// virtual in base class
ifkp (trx_mode md);
~ifkp ();
void init ();
void rx_init ();
void rx_reset ();
void restart ();
void tx_init ();
int rx_process (const double *buf, int len);
int tx_process ();
void set_freq(double);
void init_nibbles();
//----
// support for ifkp image transfers
private:
double pixel;
double sync;
bool TX_IMAGE;
bool TX_AVATAR;
unsigned char tx_pixel;
int tx_pixelnbr;
int image_mode;
bool b_ava;
public:
int byte;
double picf;
double picpeak;
C_FIR_filter *picfilter;
Cmovavg *pixfilter;
Cmovavg *ampfilter;
Cmovavg *syncfilter;
double phidiff;
double phase;
cmplx prevz;
cmplx currz;
double image_freq[10];
int image_counter;
int picW;
int picH;
int row;
int col;
int rgb;
int pixelnbr;
static int IMAGEspp;
int TXspp;
void recvpic(double smpl);
void send_image();
void send_avatar();
void ifkp_send_avatar();
void m_ifkp_send_avatar();
void ifkp_send_image(std::string s = "", bool grey = false);
void toggle_logs();
};
#endif
| 3,999
|
C++
|
.h
| 162
| 22.882716
| 79
| 0.680829
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,343
|
misc.h
|
w1hkj_fldigi/src/include/misc.h
|
// ----------------------------------------------------------------------------
// misc.h -- Miscellaneous helper functions
//
// Copyright (C) 2006-2008
// Dave Freese, W1HKJ
//
// This file is part of fldigi. These filters were adapted from code contained
// in the gmfsk source code distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _MISC_H
#define _MISC_H
#include <cmath>
extern unsigned long hweight32(unsigned long w);
extern unsigned short int hweight16(unsigned short int w);
extern unsigned char hweight8(unsigned char w);
extern int parity(unsigned long w);
extern unsigned long rbits32(unsigned long w);
extern unsigned short int rbits16(unsigned short int w);
extern unsigned char rbits8(unsigned char w);
extern unsigned int log2u(unsigned int x);
extern unsigned char graydecode(unsigned char data);
extern unsigned char grayencode(unsigned char data);
extern void MilliSleep(long msecs);
inline double sinc(double x)
{
return (fabs(x) < 1e-10) ? 1.0 : (sin(M_PI * x) / (M_PI * x));
}
inline double cosc(double x)
{
return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x));
}
inline double clamp(double x, double min, double max)
{
return (x < min) ? min : ((x > max) ? max : x);
}
/// This is always called with an int weight
inline double decayavg(double average, double input, int weight)
{
if (weight <= 1) return input;
return ( ( input - average ) / (double)weight ) + average ;
}
// following are defined inline to provide best performance
inline double blackman(double x)
{
return (0.42 - 0.50 * cos(2 * M_PI * x) + 0.08 * cos(4 * M_PI * x));
}
inline double hamming(double x)
{
return 0.54 - 0.46 * cos(2 * M_PI * x);
}
inline double hanning(double x)
{
return 0.5 - 0.5 * cos(2 * M_PI * x);
}
inline double rcos( double t, double T, double alpha=1.0 )
{
if( t == 0 ) return 1.0;
double taT = T / (2.0 * alpha);
if( fabs(t) == taT ) return ((alpha/2.0) * sin(M_PI/(2.0*alpha)));
return (sin(M_PI*t/T)/(M_PI*t/T))*cos(alpha*M_PI*t/T)/(1.0-(t/taT)*(t/taT));
}
// ----------------------------------------------------------------------------
// Rectangular - no pre filtering of data array
template <class X>
void RectWindow(X *array, int n) {
for (int i = 0; i < n; i++)
array[i] = 1.0;
}
// Hamming - used by gmfsk
template <class X>
void HammingWindow(X *array, int n) {
double pwr = 0.0;
double inv_n = 1.0 / (double)n;
for (int i = 0; i < n; i++) {
array[i] = hamming((double)i * inv_n);
pwr += array[i] * array[i];
}
pwr = sqrt((double)n/pwr);
for (int i = 0; i < n; i++)
array[i] *= pwr;
}
// Hanning - used by winpsk
template <class X>
void HanningWindow(X *array, int n) {
double pwr = 0.0;
double inv_n = 1.0 / (double)n;
for (int i = 0; i < n; i++) {
array[i] = hanning((double)i * inv_n);
pwr += array[i] * array[i];
}
pwr = sqrt((double)n/pwr);
for (int i = 0; i < n; i++)
array[i] *= pwr;
}
// Best lob suppression - least in band ripple
template <class X>
void BlackmanWindow(X *array, int n) {
double pwr = 0.0;
double inv_n = 1.0 / (double)n;
for (int i = 0; i < n; i++) {
array[i] = blackman((double)i * inv_n);
pwr += array[i] * array[i];
}
pwr = sqrt((double)n/pwr);
for (int i = 0; i < n; i++)
array[i] *= pwr;
}
// Simple about effective as Hamming or Hanning
template <class X>
void TriangularWindow(X *array, int n) {
double pwr = 0.0;
for (int i = 0; i < n; i++) array[i] = 1.0;
double inv_n = 1.0 / (double)n;
for (int i = 0; i < n / 4; i++) {
array[i] = 4.0 * (double)i * inv_n ;
array[n-i] = array[i];
}
for (int i = 0; i < n; i++) pwr += array[i] * array[i];
pwr = sqrt((double)n/pwr);
for (int i = 0; i < n; i++)
array[i] *= pwr;
}
#endif
| 4,386
|
C++
|
.h
| 136
| 30.536765
| 80
| 0.622459
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,344
|
contest.h
|
w1hkj_fldigi/src/include/contest.h
|
// ----------------------------------------------------------------------------
// contest.h
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _CONTEST_H
#define _CONTEST_H
#include <string>
enum CONTEST_FIELD {
cCALL, cMODE, cNAME, cQTH,
cSTATE, cVE_PROV, cDIST,
cGRIDSQUARE, cCNTY, cCOUNTRY,
cCQZ, cDXCC, cIOTA, cITUZ, cCONT,
cSRX, cXCHG1,
cSS_SERNO, cSS_PREC, cSS_CHK, cSS_SEC,
cROOKIE, cCHECK,
cKD_XCHG, cARR_XCHG,
c1010, cRST, cNUMERIC,
cCLASS, cFD_CLASS, cWFD_CLASS, cASCR_CLASS,
cARRL_SECT, cFD_SECTION,
cITALIAN
};
struct CONTESTS {
std::string name;
std::string notes;
};
// Contest, ST, TEST, rRST , rST, rCY, rSERNO, rXCHG, rNAME, rCAT, rSTCTY, Notes
struct QSOP {
const char *contest;
const char *state;
const char *instate;
const char *rst;
const char *st;
const char *cnty;
const char *serno;
const char *xchg;
const char *name;
const char *cat;
const char *stcty;
const char *notes;
};
class Ccontests {
private:
public:
static struct QSOP qso_parties[];
Ccontests() {};
~Ccontests() {};
const std::string names();
char rst(std::string party);
char st(std::string party);
char cnty(std::string party);
char serno(std::string party);
char sect(std::string party);
char xchg(std::string party);
char name(std::string party);
char cat(std::string party);
char stcty(std::string party);
const char *notes(std::string party);
};
extern Ccontests QSOparties;
extern bool cut_numeric_test(std::string s);
extern std::string cut_to_numeric(std::string s);
extern int check_field(std::string s1, CONTEST_FIELD, std::string s2="");
extern void adjust_for_contest(void *);
extern CONTESTS contests[];
extern std::string contest_names();
extern std::string country_match;
extern bool state_test(std::string s);
extern bool province_test(std::string s);
extern bool country_test(std::string s);
extern bool county_test(std::string st, std::string cty);
extern bool section_test(std::string s);
#endif
| 2,758
|
C++
|
.h
| 91
| 28.835165
| 80
| 0.702489
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,345
|
newinstall.h
|
w1hkj_fldigi/src/include/newinstall.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef NEW_INSTALL_H
#define NEW_INSTALL_H
extern void create_new_macros();
extern void create_new_palettes();
extern void show_wizard(int argc = 0, char** argv = NULL);
#endif
| 1,070
|
C++
|
.h
| 25
| 41.68
| 79
| 0.632438
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,349
|
fd_logger.h
|
w1hkj_fldigi/src/include/fd_logger.h
|
// ----------------------------------------------------------------------------
// fd_logger.h -- constants, variables, arrays & functions that need to be
// outside of any thread
//
// Copyright (C) 2006-2007
// Dave Freese, W1HKJ
// Copyright (C) 2007-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi. Adapted in part from code contained in gmfsk
// source code distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include "qso_db.h"
extern void FD_init(void);
extern void FD_close(void);
extern void FD_disconnect();
extern void FD_logoff();
extern void FD_add_record();
extern void FD_mode_check();
extern void FD_band_check();
extern int FD_dupcheck();
extern bool FD_connected;
extern bool FD_logged_on;
| 1,429
|
C++
|
.h
| 36
| 38.527778
| 79
| 0.657534
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,350
|
wefax_map.h
|
w1hkj_fldigi/src/include/wefax_map.h
|
// ----------------------------------------------------------------------------
// wefax_map.h
//
// Copyright (C) 2006-2017
// Dave Freese, W1HKJ
// Copyright (C) 2008
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef wefax_map_H
#define wefax_map_H
#include <FL/Fl_Widget.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Image.H>
class wefax_map : public Fl_Widget {
private:
unsigned char *vidbuf;
int bufsize;
int width;
int height;
int numcol;
int slantdir;
void slant_corr(int x, int y);
void slant_undo();
int zoom ;
int background ;
bool binary ;
unsigned char binary_threshold ;
inline unsigned char pix2bin( unsigned char x ) const {
return x < binary_threshold ? 0 : 255 ;
}
static void draw_cb(void *data, int x, int y, int w, uchar *buf);
void resize_zoom(int, int, int, int);
public:
wefax_map(int, int, int, int, int bg_col = 0);
~wefax_map();
void video(unsigned char const *, int);
void pixel(unsigned char data, int pos) {
if (pos < 0 || pos >= bufsize) {
return ;
}
vidbuf[pos] = data;
if (pos % (width * depth) == 0)
redraw();
}
unsigned char pixel(int);
int handle(int);
void draw();
void clear();
void image(Fl_Image *img) {Fl_Widget::image(img);}
void resize(int, int, int, int);
void resize_height(int new_height, bool clear_img);
void shift_horizontal_center(int hShift);
void stretch(double the_ratio);
int save_png(const char * filename, const char * extra_comments = NULL);
void set_zoom(int the_zoom);
void set_binary(bool bin_mode) { binary = bin_mode ;}
int pix_width(void) const {
return width ;
}
int pix_height(void) const {
return height ;
}
const unsigned char * buffer(void) const {
return vidbuf;
}
/// Sometimes the row number goes back of one due to rounding error.
/// If this happens, noise removal does not work.
static const int noise_height_margin = 5 ;
void remove_noise( int row, int half_len, int noise_margin );
static const int depth = 3;
private:
bool restore( int row, int margin );
public:
void erosion( int row );
void set_binary_threshold(unsigned char thres) {
binary_threshold = thres ;
}
unsigned char get_binary_threshold() const {
return binary_threshold ;
}
};
class wefax_picbox : public Fl_Box
{
public:
wefax_picbox(int x, int y, int w, int h, const char* l = 0)
: Fl_Box(x, y, w, h, l) { }
int handle(int event);
};
#endif
| 3,127
|
C++
|
.h
| 104
| 28.211538
| 79
| 0.670315
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,351
|
crc8.h
|
w1hkj_fldigi/src/include/crc8.h
|
#ifndef __CRC8_H
#define __CRC8_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
class CRC8 {
private:
unsigned char val;
unsigned char table[256];
char ss[3];
public:
CRC8() {
val = 0x00;
unsigned char crc;
for ( int i = 0; i < 256; i++) {
crc = i;
for (int j = 0; j < 8; j++)
crc = (crc << 1) ^ ((crc & 0x80) ? 0x07 : 0);
table[i] = crc & 0xFF;
}
}
~CRC8() {};
std::string sval(std::string s) {
val = 0x00;
for ( size_t i = 0; i < s.length(); i++ ) {
val = table[(val) ^ s[i]];
val &= 0xFF;
}
snprintf(ss, sizeof(ss), "%02x", val);
return ss;
}
};
#endif
| 637
|
C++
|
.h
| 34
| 16.264706
| 49
| 0.562604
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,352
|
progress.h
|
w1hkj_fldigi/src/include/progress.h
|
//
// progress.h
//
// Progress bar widget routines.
//
// Based on Fl_Progress widget, Copyright 2000-2005 by Michael Sweet.
//
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _Progress_H_
# define _Progress_H_
//
// Include necessary headers.
//
#include <FL/Fl_Widget.H>
//
// Progress class...
//
class Progress : public Fl_Widget
{
public:
enum PTYPE {HORIZONTAL, VERTICAL};
private:
double value_,
minimum_,
maximum_;
PTYPE direction;
protected:
virtual void draw();
public:
Progress(int x, int y, int w, int h, const char *l = 0);
void type(PTYPE direc) { direction = direc;}
void maximum(double v) { maximum_ = v; redraw(); }
double maximum() const { return (maximum_); }
void minimum(double v) { minimum_ = v; redraw(); }
double minimum() const { return (minimum_); }
void value(double v) { value_ = v; redraw(); }
double value() const { return (value_); }
};
#endif // !_Progress_H_
| 1,780
|
C++
|
.h
| 57
| 29.596491
| 79
| 0.643988
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,353
|
arq_io.h
|
w1hkj_fldigi/src/include/arq_io.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef ARQIO_H
#define ARQIO_H
class Socket;
extern void WriteARQsocket(unsigned char* data, size_t len);
extern bool Socket_arqRx();
extern void AbortARQ();
extern void pskmail_notify_rsid(trx_mode mode);
extern void pskmail_notify_s2n(double s2n_count, double s2n_avg, double s2n_stddev);
extern void flush_arq_tx_buffer(void);
class ARQ_SOCKET_Server
{
public:
static bool start(const char* node, const char* service);
static void stop(void);
private:
ARQ_SOCKET_Server();
~ARQ_SOCKET_Server();
ARQ_SOCKET_Server(const ARQ_SOCKET_Server&);
ARQ_SOCKET_Server operator=(const ARQ_SOCKET_Server&);
static void* thread_func(void*);
private:
static ARQ_SOCKET_Server* inst;
bool run;
Socket* server_socket;
};
#endif // ARQIO_H
| 1,632
|
C++
|
.h
| 45
| 34.911111
| 84
| 0.683112
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,354
|
n3fjp_logger.h
|
w1hkj_fldigi/src/include/n3fjp_logger.h
|
#ifndef N3FJP_LOGGER_H
#define N3FJP_LOGGER_H
#include <string>
#include "qso_db.h"
extern std::string n3fjp_serno;
extern void get_n3fjp_udp();
extern void *n3fjp_loop(void *args);
extern void n3fjp_init(void);
extern void n3fjp_start();
extern void n3fjp_restart();
extern void n3fjp_close(void);
extern int n3fjp_dupcheck();
extern void n3fjp_add_record(cQsoRec &rec);
extern void n3fjp_get_record(std::string rec);
extern void n3fjp_set_freq(long f);
extern void n3fjp_set_ptt(int on);
extern void n3fjp_clear_record();
extern bool n3fjp_connected;
extern bool n3fjp_calltab;
#endif // N3FJP_LOGGER_H
| 613
|
C++
|
.h
| 20
| 29.3
| 46
| 0.78157
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,355
|
smeter.h
|
w1hkj_fldigi/src/include/smeter.h
|
//
// smeter.h
//
// Smeter bar widget routines.
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef SMETER
#define SMETER
//
// Include necessary headers.
//
#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
//
// Smeter class...
//
class Smeter : public Fl_Widget
{
private:
double value_,
minimum_,
maximum_;
int sval; // Size of sval bar...
int bx, by, bw, bh; // Box areas...
int tx, tw; // Temporary X + width
int ty, th; // Temporary Y + height
int sx; // meter left offset
int meter_width;
int meter_height;
Fl_Color bgnd_;
Fl_Color fgnd_;
Fl_Color scale_color;
static const char *meter_face;
void (*cbFunc)(Fl_Widget *, void *);
protected:
virtual void draw();
public:
Smeter(int x, int y, int w, int h, const char *l = 0);
void maximum(double v) { maximum_ = v; redraw(); }
double maximum() const { return (maximum_); }
void minimum(double v) { minimum_ = v; redraw(); }
double minimum() const { return (minimum_); }
void value(double v) {
value_ = v;
if (value_ < minimum_) value_ = minimum_;
if (value_ > maximum_) value_ = maximum_;
redraw();
}
double value() const { return (value_); }
void resize(int x, int y, int w, int h);
int handle(int);
void set_background(Fl_Color c1) { bgnd_ = c1; redraw(); }
void set_metercolor(Fl_Color c2) { fgnd_ = c2; redraw(); }
void set_scalecolor(Fl_Color c3) { scale_color = c3; redraw(); }
void callback (void (*cbf)(Fl_Widget *, void *) ){ cbFunc = cbf;}
void do_callback() {
if (cbFunc) cbFunc(this, (void*)0);
}
};
#endif // !smeter
| 2,412
|
C++
|
.h
| 77
| 29.454545
| 79
| 0.630829
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,356
|
modem.h
|
w1hkj_fldigi/src/include/modem.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _MODEM_H
#define _MODEM_H
#include <string>
#include "threads.h"
#include "sound.h"
#include "digiscope.h"
#include "globals.h"
#include "morse.h"
#include "ascii.h"
#include "filters.h"
#include "plot_xy.h"
#define OUTBUFSIZE 65536 // needed for 5 WPM Farsnworth CW buffers
// Constants for signal searching & s/n threshold
#define SIGSEARCH 5
// How many samples to average the signal-quality value over
#define QUALITYDEPTH 5
#define TWOPI (2.0 * M_PI)
class modem {
public:
static double frequency;
static double tx_frequency;
static bool freqlock;
static unsigned long tx_sample_count;
static unsigned int tx_sample_rate;
static bool XMLRPC_CPS_TEST;
protected:
cMorse *morse;
trx_mode mode;
SoundBase *scard;
bool stopflag;
int fragmentsize;
int samplerate;
bool reverse;
int sigsearch;
bool sig_start;
bool sig_stop;
double bandwidth;
double freqerr;
double rx_corr;
double tx_corr;
double PTTphaseacc;
double PTTchannel[OUTBUFSIZE];
// for CW modem use only
bool cwTrack;
bool cwLock;
double cwRcvWPM;
double cwXmtWPM;
double squelch;
double metric;
double syncpos;
int backspaces;
unsigned char *txstr;
unsigned char *txptr;
double outbuf[OUTBUFSIZE];
bool historyON;
Digiscope::scope_mode scopemode;
int scptr;
// extended s/n reporting
double s2n_ncount, s2n_sum, s2n_sum2, s2n_metric;
bool s2n_valid;
unsigned cap;
// Audio output
std::string audio_filename;
bool play_audio;
// CWID
bool CW_EOT;
public:
modem();
virtual ~modem(){
delete morse;
}
// these processes must be declared in the derived class
virtual void init();
virtual void tx_init () = 0;
virtual void rx_init () = 0;
virtual void restart () = 0;
virtual void rx_flush() {};
virtual int tx_process ();
virtual int rx_process (const double *, int len) = 0;
virtual void Audio_filename(std::string nm) { audio_filename = nm; play_audio = true; }
virtual void shutdown(){};
virtual void set1(int, int){};
virtual void set2(int, int){};
virtual void makeTxViewer(int W, int H){};
virtual void searchDown() {};
virtual void searchUp() {};
void HistoryON(bool val) {historyON = val;}
bool HistoryON() const { return historyON;}
/// Inlined const getters are faster and smaller.
trx_mode get_mode() const { return mode; };
const char *get_mode_name() const { return mode_info[get_mode()].sname;}
unsigned int iface_io() const { return mode_info[get_mode()].iface_io;}
virtual void set_freq(double);
/// Inlining small formulas is still faster and shorter.
int get_freq() const { return (int)( frequency + 0.5 ); }
void init_freqlock();
void set_freqlock(bool);
void set_sigsearch(int n) { sigsearch = n; freqerr = 0.0;};
bool freqlocked() const { return freqlock;}
/// Getters are semantically const.
double get_txfreq() const;
double get_txfreq_woffset() const;
void set_metric(double);
void display_metric(double);
double get_metric() const { return metric;}
void set_reverse(bool on);
bool get_reverse() const { return reverse;}
double get_bandwidth() const { return bandwidth;}
void set_bandwidth(double);
int get_samplerate() const { return samplerate;}
void set_samplerate(int);
void init_queues();
void ModulateXmtr(double *, int);
void ModulateStereo(double *, double *, int, bool sample_flag = true);
void ModulateVideo(double *, int);
void ModulateVideoStereo(double *, double *, int, bool sample_flag = true);
void videoText();
void pretone();
virtual void send_color_image(std::string) {}
virtual void send_Grey_image(std::string) {}
virtual void ifkp_send_image(std::string s = "", bool grey = false){}
virtual void ifkp_send_avatar(){}
virtual void m_ifkp_send_avatar(){}
virtual void thor_send_image(std::string s = "", bool grey = false){}
virtual void thor_send_avatar(){}
virtual void m_thor_send_avatar(){}
void set_stopflag(bool b) { stopflag = b;};
bool get_stopflag() const { return stopflag; };
unsigned get_cap(void) const { return cap; }
enum { CAP_AFC = 1 << 0, CAP_AFC_SR = 1 << 1, CAP_REV = 1 << 2,
CAP_IMG = 1 << 3, CAP_BW = 1 << 4, CAP_RX = 1 << 5,
CAP_TX = 1 << 6
};
// for CW modem use only
bool get_cwTrack();
void set_cwTrack(bool);
bool get_cwLock();
void set_cwLock(bool);
double get_cwXmtWPM();
void set_cwXmtWPM(double);
double get_cwRcvWPM();
virtual void CW_KEYLINE(bool) {};
virtual void incWPM() {};
virtual void decWPM() {};
virtual void toggleWPM() {};
virtual void sync_parameters() {};
virtual void reset_rx_filter() {};
virtual void update_Status() {};
// for waterfall id transmission
private:
static double wfid_w[];
static double wfid_outbuf[];
int vidwidth;
void wfid_make_tones(int numchars);
void wfid_send(int numchars);
void wfid_sendchars(std::string s);
double PTTnco();
public:
std::string macro_video_text;
void wfid_text(const std::string& s);
// for CW ID transmission
private:
double cwid_keyshape[128];
double cwid_phaseacc;
int RT;
int cwid_symbollen;
int cwid_lastsym;
public:
void cwid_makeshape();
double cwid_nco(double freq);
void cwid_send_symbol(int bits);
void cwid_send_ch(int ch);
void cwid_sendtext (const std::string& s);
void cwid();
void set_CW_EOT() { CW_EOT = true; }
void clear_CW_EOT() { CW_EOT = false; }
double calWPM() {return 20;}
void calWPM(double) {};
// for FSK keyline
void resetFSK() {};
// for fft scan modem
public:
virtual void refresh_scope() {}
// for multi-channel modems
public:
virtual void clear_viewer() {}
virtual void clear_ch(int n) {}
virtual int viewer_get_freq(int n) {return 0; }
// for noise tests
private:
void add_noise(double *, int);
double sigmaN (double es_ovr_n0);
double gauss(double sigma);
protected:
virtual void s2nreport(void);
// JD & DF for multiple carriers
public:
int numcarriers; //Number of parallel carriers for M CAR PSK and PSKR and QPSKR
int symbols; //JD for multiple carriers
int acc_symbols;
int char_symbols;
int xmt_symbols;
int ovhd_symbols;
int acc_samples;
int char_samples;
int xmt_samples;
int ovhd_samples;
// analysis / fmt modes
PLOT_XY *unk_pipe;
PLOT_XY *ref_pipe;
bool write_to_csv;
virtual void reset_unknown() {}
virtual void reset_reference() {}
virtual void clear_ref_pipe() {}
virtual void clear_unk_pipe() {}
virtual void start_csv() {}
virtual void stop_csv() {}
// fsq mode
bool fsq_tx_image;
std::string xmt_string;
virtual double fsq_xmtdelay() {return 0;};
virtual void send_ack(std::string relay) {};
virtual void fsq_send_image(std::string s){}
virtual std::string fsq_mycall() {return "";}
virtual bool fsq_squelch_open() {return false;}
virtual void fsq_transmit(void *) {}
// modem decode-quality data and statistics
public:
int update_quality(int value, int mode=0); // for displaying signal-quality in the GUI
int get_quality(int mode=0); // return an average of the quality values
private:
int quality[QUALITYDEPTH]; // array containining a 0-100 number representing the signal-quality
};
extern modem *null_modem;
extern modem *cw_modem;
extern modem *mfsk8_modem;
extern modem *mfsk16_modem;
extern modem *mfsk32_modem;
// experimental modes
extern modem *mfsk4_modem;
extern modem *mfsk11_modem;
extern modem *mfsk22_modem;
extern modem *mfsk31_modem;
extern modem *mfsk64_modem;
extern modem *mfsk128_modem;
extern modem *mfsk64l_modem;
extern modem *mfsk128l_modem;
extern modem *wefax576_modem;
extern modem *wefax288_modem;
extern modem *navtex_modem;
extern modem *sitorb_modem;
extern modem *mt63_500S_modem;
extern modem *mt63_1000S_modem;
extern modem *mt63_2000S_modem;
extern modem *mt63_500L_modem;
extern modem *mt63_1000L_modem;
extern modem *mt63_2000L_modem;
extern modem *feld_modem;
extern modem *feld_slowmodem;
extern modem *feld_x5modem;
extern modem *feld_x9modem;
extern modem *feld_FMmodem;
extern modem *feld_FM105modem;
extern modem *feld_80modem;
extern modem *feld_CMTmodem;
extern modem *psk31_modem;
extern modem *psk63_modem;
extern modem *psk63f_modem;
extern modem *psk125_modem;
extern modem *psk250_modem;
extern modem *psk500_modem;
extern modem *psk1000_modem;
extern modem *qpsk31_modem;
extern modem *qpsk63_modem;
extern modem *qpsk125_modem;
extern modem *qpsk250_modem;
extern modem *qpsk500_modem;
extern modem *_8psk125_modem;
extern modem *_8psk250_modem;
extern modem *_8psk500_modem;
extern modem *_8psk1000_modem;
extern modem *_8psk1200_modem;
extern modem *_8psk125fl_modem;
extern modem *_8psk125f_modem;
extern modem *_8psk250fl_modem;
extern modem *_8psk250f_modem;
extern modem *_8psk500f_modem;
extern modem *_8psk1000f_modem;
extern modem *_8psk1200f_modem;
extern modem *ofdm_500f_modem;
extern modem *ofdm_750f_modem;
extern modem *ofdm_2000f_modem;
extern modem *ofdm_2000_modem;
extern modem *ofdm_3500_modem;
extern modem *psk125r_modem;
extern modem *psk250r_modem;
extern modem *psk500r_modem;
extern modem *psk1000r_modem;
extern modem *psk800_c2_modem;
extern modem *psk800r_c2_modem;
extern modem *psk1000_c2_modem;
extern modem *psk1000r_c2_modem;
extern modem *psk63r_c4_modem;
extern modem *psk63r_c5_modem;
extern modem *psk63r_c10_modem;
extern modem *psk63r_c20_modem;
extern modem *psk63r_c32_modem;
extern modem *psk125r_c4_modem;
extern modem *psk125r_c5_modem;
extern modem *psk125r_c10_modem;
extern modem *psk125_c12_modem;
extern modem *psk125r_c12_modem;
extern modem *psk125r_c16_modem;
extern modem *psk250r_c2_modem;
extern modem *psk250r_c3_modem;
extern modem *psk250r_c5_modem;
extern modem *psk250_c6_modem;
extern modem *psk250r_c6_modem;
extern modem *psk250r_c7_modem;
extern modem *psk500_c2_modem;
extern modem *psk500_c4_modem;
extern modem *psk500r_c2_modem;
extern modem *psk500r_c3_modem;
extern modem *psk500r_c4_modem;
extern modem *rtty_modem;
//extern modem *pkt_modem;
extern modem *olivia_modem;
extern modem *olivia_4_125_modem;
extern modem *olivia_4_250_modem;
extern modem *olivia_4_500_modem;
extern modem *olivia_4_1000_modem;
extern modem *olivia_4_2000_modem;
extern modem *olivia_8_125_modem;
extern modem *olivia_8_250_modem;
extern modem *olivia_8_500_modem;
extern modem *olivia_8_1000_modem;
extern modem *olivia_8_2000_modem;
extern modem *olivia_16_500_modem;
extern modem *olivia_16_1000_modem;
extern modem *olivia_16_2000_modem;
extern modem *olivia_32_1000_modem;
extern modem *olivia_32_2000_modem;
extern modem *olivia_64_500_modem;
extern modem *olivia_64_1000_modem;
extern modem *olivia_64_2000_modem;
extern modem *contestia_modem;
extern modem *contestia_4_125_modem;
extern modem *contestia_4_250_modem;
extern modem *contestia_4_500_modem;
extern modem *contestia_4_1000_modem;
extern modem *contestia_4_2000_modem;
extern modem *contestia_8_125_modem;
extern modem *contestia_8_250_modem;
extern modem *contestia_8_500_modem;
extern modem *contestia_8_1000_modem;
extern modem *contestia_8_2000_modem;
extern modem *contestia_16_250_modem;
extern modem *contestia_16_500_modem;
extern modem *contestia_16_1000_modem;
extern modem *contestia_16_2000_modem;
extern modem *contestia_32_1000_modem;
extern modem *contestia_32_2000_modem;
extern modem *contestia_64_500_modem;
extern modem *contestia_64_1000_modem;
extern modem *contestia_64_2000_modem;
extern modem *thormicro_modem;
extern modem *thor4_modem;
extern modem *thor5_modem;
extern modem *thor8_modem;
extern modem *thor11_modem;
extern modem *thor16_modem;
extern modem *thor22_modem;
extern modem *thor25x4_modem;
extern modem *thor50x1_modem;
extern modem *thor50x2_modem;
extern modem *thor100_modem;
extern modem *dominoexmicro_modem;
extern modem *dominoex4_modem;
extern modem *dominoex5_modem;
extern modem *dominoex8_modem;
extern modem *dominoex11_modem;
extern modem *dominoex16_modem;
extern modem *dominoex22_modem;
extern modem *dominoex44_modem;
extern modem *dominoex88_modem;
extern modem *throb1_modem;
extern modem *throb2_modem;
extern modem *throb4_modem;
extern modem *throbx1_modem;
extern modem *throbx2_modem;
extern modem *throbx4_modem;
extern modem *wwv_modem;
extern modem *anal_modem;
extern modem *fmt_modem;
extern modem *ssb_modem;
extern modem *fsq_modem;
extern modem *ifkp_modem;
#endif
| 13,143
|
C++
|
.h
| 417
| 29.810552
| 97
| 0.746972
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,357
|
counties.h
|
w1hkj_fldigi/src/include/counties.h
|
// ----------------------------------------------------------------------------
// states.h
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
// Extracted from FIPS 2010 census data
#ifndef _COUNTIES_H
#define _COUNTIES_H
#include <string>
#include <vector>
struct STATE_COUNTY_QUAD {
std::string state; // state long name
std::string ST; // state abbreviated
std::string county; // county long name
std::string CTY; // county abbreviated
};
class Cstates {
private:
size_t next;
public:
Cstates() {}
~Cstates(){}
// static struct STATE_COUNTY_QUAD vec_SQSO[];
bool valid_county( std::string st, std::string cty );
const std::string names();
const std::string counties(std::string st);
const std::string county(std::string st, std::string cnty);
const std::string cnty_short(std::string st, std::string cnty);
const std::string state(std::string ST);
const std::string state_short(std::string ST);
};
extern Cstates states;
extern const std::string counties();
//extern const std::string six_qp_counties();
//extern const std::string seven_qp_counties();
extern void load_counties();
extern void save_counties();
extern std::vector<STATE_COUNTY_QUAD> vec_SQSO;
extern std::vector<STATE_COUNTY_QUAD> vec_6QP;
extern std::vector<STATE_COUNTY_QUAD> vec_7QP;
extern const char *szSQSO;
extern const char *sz7QP;
extern const char *szNEQP;
#endif
| 2,178
|
C++
|
.h
| 62
| 33.693548
| 79
| 0.691393
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,358
|
fft-monitor.h
|
w1hkj_fldigi/src/include/fft-monitor.h
|
// ----------------------------------------------------------------------------
// fftmon.h -- frequency fftmon modem
//
// Copyright (C) 2017
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _fftmon_H
#define _fftmon_H
#include <stdio.h>
#include <string>
#include <ctime>
#include <complex>
#include "filters.h"
#include "fftfilt.h"
#include "modem.h"
#include "mbuffer.h"
#include "gfft.h"
extern void writeFile();
class fftmon : public modem {
friend void toggle_scans(void *);
public:
#define fftmonFFT_LEN 8192 // approximately 1 sec of bpf'd audio stream
#define LENdiv2 4096
private:
double *fftbuff;
double *dftbuff;
double *buffer;
cmplx *cmplxbuf;
Cmovavg *fftfilt[LENdiv2];
double bshape[fftmonFFT_LEN];
int fftmon_sr;
g_fft<double> *scanfft;
bool scans_stable;
int numscans;
inline double blackman(double x) {
return (0.42 - 0.50 * cos(2 * M_PI * x) + 0.08 * cos(4 * M_PI * x));
}
void update_fftscope();
public:
fftmon();
~fftmon();
void init();
void rx_init() {}
void tx_init() {}
void restart();
int rx_process(const double *buf, int len);
int cmplx_process(const cmplx *buf, int len);
int tx_process() { return -1; }
};
#endif
| 1,928
|
C++
|
.h
| 65
| 27.984615
| 79
| 0.663049
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,359
|
ascii.h
|
w1hkj_fldigi/src/include/ascii.h
|
// ----------------------------------------------------------------------------
// ascii.h -- ASCII table
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
// gmfsk Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef ASCII_H
#define ASCII_H
extern const char *ascii[];
extern const char *ascii2[];
extern const char *ascii3[];
#define SOH 0x01 // SOH ascii character
#define EOT 0x04 // EOT ascii character
#endif
| 1,290
|
C++
|
.h
| 34
| 36.794118
| 82
| 0.650958
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,360
|
trx.h
|
w1hkj_fldigi/src/include/trx.h
|
// ----------------------------------------------------------------------------
// trx.h
//
// Copyright (C) 2006-2009
// Dave Freese, W1HKJ
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef TRX_H
#define TRX_H
#include "threads.h"
#include "modem.h"
#include "sound.h"
#include "globals.h"
#include "rsid.h"
// ----------------------------------------------------------------------------
extern void trx_start_modem(modem* m, int f = 0);
extern void trx_start(void);
extern void trx_close(void);
extern void trx_transmit_psm(void);
extern void trx_transmit(void);
extern void trx_tune(void);
extern void trx_receive(void);
extern void trx_reset(void);
extern void trx_wait_state(void);
extern state_t trx_state;
extern modem *active_modem;
extern cRsId *ReedSolomon;
extern SoundBase *RXscard;
extern SoundBase *TXscard;
extern bool bHistory;
extern bool bHighSpeed;
extern bool rx_only;
#define TRX_WAIT(s_, code_) \
do { \
ENSURE_NOT_THREAD(TRX_TID); \
code_; \
while (trx_state != s_) \
trx_wait_state(); \
} while (0)
void trx_xmit_wfall_queue(int samplerate, const double* buf, size_t len);
#endif
| 1,972
|
C++
|
.h
| 58
| 32.568966
| 81
| 0.648947
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,361
|
adif_io.h
|
w1hkj_fldigi/src/include/adif_io.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef ADIFIO
#define ADIFIO
#include <cstdio>
#include <cstring>
#include <string>
#include "qso_db.h"
#define ADIF_VERS "2.2.7"
class cAdifIO {
private:
bool write_all;
cQsoRec *adifqso;
FILE *adiFile;
char *fillfield(int, int, char *);
static int instances;
public:
cAdifIO ();
~cAdifIO ();
int readAdifRec () {return 0;};
int writeAdifRec (cQsoRec *rec, const char *fname);
void readFile (const char *, cQsoDb *);
void do_readfile(const char *, cQsoDb *);
void do_writelog();
std::string adif_record(cQsoRec *rec);
int writeFile (const char *, cQsoDb *);
int writeLog (const char *, cQsoDb *, bool b = true);
bool log_changed(const char *fname);
};
// crc 16 cycle redundancy check sum
class Ccrc16 {
private:
unsigned int crcval;
char ss[5];
public:
Ccrc16() { crcval = 0xFFFF; }
~Ccrc16() {};
void reset() { crcval = 0xFFFF;}
unsigned int val() {return crcval;}
std::string sval() {
snprintf(ss, sizeof(ss), "%04X", crcval);
return ss;
}
void update(char c) {
crcval ^= c & 255;
for (int i = 0; i < 8; ++i) {
if (crcval & 1)
crcval = (crcval >> 1) ^ 0xA001;
else
crcval = (crcval >> 1);
}
}
unsigned int crc16(char c) {
update(c);
return crcval;
}
unsigned int crc16(std::string s) {
reset();
for (size_t i = 0; i < s.length(); i++)
update(s[i]);
return crcval;
}
std::string scrc16(std::string s) {
crc16(s);
return sval();
}
};
#endif
| 2,319
|
C++
|
.h
| 85
| 25.282353
| 79
| 0.638489
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,362
|
drag_btn.h
|
w1hkj_fldigi/src/include/drag_btn.h
|
#ifndef _HAVE_DRAG_BTN_HDR_
#define _HAVE_DRAG_BTN_HDR_
#include <FL/Fl_Box.H>
class drag_btn : public Fl_Box
{
private:
int x1, y1; // click posn., used for dragging and docking checks
int xoff, yoff; // origin used for dragging calcs
int was_docked; // used in handle to note that we have just undocked
protected:
// override box draw method to do our textured dragger look
void draw();
// override handle method to catch drag/dock operations
int handle(int event);
public:
// basic constructor
drag_btn(int x, int y, int w, int h, const char *l = 0);
};
#endif // _HAVE_DRAG_BTN_HDR_
/* End of File */
| 622
|
C++
|
.h
| 20
| 29.3
| 69
| 0.72437
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,363
|
nls.h
|
w1hkj_fldigi/src/include/nls.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef NLS_H_
#define NLS_H_
#include "config.h"
#include <cstdio>
#include <cstring>
#include <string>
#if ENABLE_NLS && defined(__WOE32__)
struct lang_def_t {
const char* lang;
const char* lang_region;
const char* native_name;
};
extern struct lang_def_t ui_langs[];
int get_ui_lang(const char* homedir = NULL);
void set_ui_lang(int lang, const char* homedir = NULL);
#endif
#endif // NLS_H_
| 1,294
|
C++
|
.h
| 36
| 34.666667
| 79
| 0.641886
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,365
|
squelch_status.h
|
w1hkj_fldigi/src/include/squelch_status.h
|
// ----------------------------------------------------------------------------
//
// squelch_status.h
//
// Copyright (C) 2021
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef MODE_STATUS_H
#define MODE_STATUS_H
#include "globals.h"
enum SQL_STATE { STATE_OFF, STATE_ON };
struct struct_mode_state {
trx_mode mode;
int squelch_level;
int squelch_state;
int tx_atten;
int afc_state;
int reverse;
};
extern void set_mode_squelch( trx_mode mode, double sqlch);
extern double get_mode_squelch( trx_mode mode );
extern void set_mode_squelch_onoff( trx_mode mode, int sql);
extern int get_mode_squelch_onoff( trx_mode mode );
extern void set_mode_txlevel( trx_mode mode, double sqlch);
extern double get_mode_txlevel( trx_mode mode );
extern void set_mode_afc( trx_mode mode, int sql);
extern int get_mode_afc( trx_mode mode );
extern void set_mode_reverse( trx_mode mode, int rev );
extern int get_mode_reverse( trx_mode mode );
extern void save_mode_state();
extern void load_mode_state();
#endif
| 1,782
|
C++
|
.h
| 47
| 36.553191
| 79
| 0.669954
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,366
|
fontdef.h
|
w1hkj_fldigi/src/include/fontdef.h
|
// ------------------------------------------------------------------------------
//
// fontdef.h -- FELDHELL modem
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi. Adapted from code contained in gmfsk source code
// distribution.
// gmfsk Copyright (C) 2001, 2002, 2003
// Tomi Manninen (oh2bns@sral.fi)
// Copyright (C) 2004
// Lawrence Glaister (ve7it@shaw.ca)
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _FONTDEF_H
#define _FONTDEF_H
struct fntchr { char c; int byte[14]; };
extern fntchr feld7x7_14[];
extern fntchr feld7x7n_14[];
extern fntchr feldDx_14[];
extern fntchr feldfat_14[];
extern fntchr feldhell_12[];
extern fntchr feldlittle_12[];
extern fntchr feldlo8_14[];
extern fntchr feldlow_14[];
extern fntchr feldmodern_14[];
extern fntchr feldmodern8_14[];
extern fntchr feldnarr_14[];
extern fntchr feldreal_14[];
extern fntchr feldstyl_14[];
extern fntchr feldvert_14[];
extern fntchr feldwide_14[];
extern char szFeldFonts[];
#endif
| 1,676
|
C++
|
.h
| 47
| 34.489362
| 82
| 0.677559
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,367
|
Fl_Tile_Check.h
|
w1hkj_fldigi/src/include/Fl_Tile_Check.h
|
// ----------------------------------------------------------------------------
// Fl_Tile_Check.h
//
// Copyright (C) 2007
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef Fl_Tile_Check_h_
#define Fl_Tile_Check_h_
#include <FL/Fl_Group.H>
class Tile_ : public Fl_Group {
public:
int handle(int);
Tile_(int X,int Y,int W,int H,const char*l=0) : Fl_Group(X,Y,W,H,l) {
clip_children(true);
}
void resize(int, int, int, int);
void position(int, int, int, int);
void newx(int, int);
};
/// A version of Fl_Tile that runs check callbacks and moves the boundary
/// between its child widgets only all resize checks return true.
class Fl_Tile_Check : public Tile_
{
public:
typedef bool (*resize_check_func)(void *, int, int);
Fl_Tile_Check(int x, int y, int w, int h, const char* l = 0);
int handle(int event);
void add_resize_check(resize_check_func f, void *a);
void remove_resize_check(resize_check_func f, void *a);
void remove_checks(void);
bool do_checks(int xd, int yd);
protected:
int xstart, ystart;
resize_check_func resize_checks[8];
void *resize_args[8];
};
#endif // Fl_Tile_Check_h_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 1,940
|
C++
|
.h
| 56
| 33.160714
| 79
| 0.656533
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,369
|
stacktrace.h
|
w1hkj_fldigi/src/include/stacktrace.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef STACKTRACE_H
#define STACKTRACE_H
void pstack_maybe(void);
void diediedie(void);
void handle_unexpected(void);
void handle_signal(int s);
#endif // STACKTRACE_H
| 1,061
|
C++
|
.h
| 26
| 39.692308
| 79
| 0.637597
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,370
|
status_box.h
|
w1hkj_fldigi/src/include/status_box.h
|
//
// status_box.h
//
// status_box bar widget routines.
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _status_box_H
#define _status_box_H
//
// Include necessary headers.
//
#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Group.H>
//
// status_box class...
//
class status_box : public Fl_Box {
private:
void (*cbFunc)(Fl_Widget *, void *);
protected:
public:
status_box(int x, int y, int w, int h, const char *label = "")
: Fl_Box(x,y,w,h,label)
{ };
int handle(int e) {
if (Fl::event_inside( this )) {
if (e == FL_RELEASE) {
do_callback();
return 1;
}
}
return 0;
}
void callback (void (*cbf)(Fl_Widget *, void *) ){ cbFunc = cbf;}
void do_callback() {
if (cbFunc) cbFunc(this, (void*)0);
}
};
#endif // !status_box
| 1,625
|
C++
|
.h
| 57
| 26.754386
| 79
| 0.614103
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,372
|
timeops.h
|
w1hkj_fldigi/src/include/timeops.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef TIMEOPS_H_
#define TIMEOPS_H_
#include <config.h>
#include <time.h>
#include <sys/time.h>
#ifdef __MINGW32__
# include <pthread.h>
#endif
#if !HAVE_CLOCK_GETTIME
# ifndef __clockid_t_defined
typedef int clockid_t;
#define __clockid_t_defined 1
# endif /* __clockid_t_defined */
# ifndef CLOCK_REALTIME
# define CLOCK_REALTIME 0
# endif
# ifndef CLOCK_MONOTONIC
# define CLOCK_MONOTONIC 1
# endif
int clock_gettime(clockid_t clock_id, struct timespec* tp);
#endif /* !HAVE_CLOCK_GETTIME */
struct timespec operator+(const struct timespec &t0, const double &t);
struct timespec operator-(const struct timespec &t0, const struct timespec &t1);
struct timespec& operator-=(struct timespec &t0, const struct timespec &t1);
bool operator>(const struct timespec &t0, const struct timespec &t1);
bool operator==(const struct timespec &t0, const struct timespec &t1);
struct timeval operator+(const struct timeval &t0, const double &t);
struct timeval operator-(const struct timeval &t0, const struct timeval &t1);
struct timeval& operator-=(struct timeval &t0, const struct timeval &t1);
bool operator>(const struct timeval &t0, const struct timeval &t1);
bool operator==(const struct timeval &t0, const struct timeval &t1);
#ifndef GMTIME_R
extern struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf);
extern struct tm *localtime_r(const time_t *_Time,struct tm *_Tm);
#endif
#endif // TIMEOPS_H_
| 2,313
|
C++
|
.h
| 55
| 40.763636
| 80
| 0.700045
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,373
|
wwv.h
|
w1hkj_fldigi/src/include/wwv.h
|
// ----------------------------------------------------------------------------
// wwv.h -- wwv receive only modem
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _wwv_H
#define _wwv_H
//#include "complex.h"
#include "modem.h"
#include "filters.h"
#include "fftfilt.h"
#include "mbuffer.h"
#define wwvSampleRate 8000
#define MaxSymLen 512
// lp filter #1
//#define DEC_1 40
#define DEC_1 8
#define FIRLEN_1 512
#define BW_1 20
// lp filter #2
#define DEC_2 5
#define FIRLEN_2 256
#define BW_2 100
// wwv function return status codes.
#define wwv_SUCCESS 0
#define wwv_ERROR -1
class wwv : public modem {
protected:
double phaseacc;
double phaseincr;
int smpl_ctr; // sample counter for timing wwv rx
double agc; // threshold for tick detection
C_FIR_filter *hilbert;
C_FIR_filter *lpfilter;
Cmovavg *vidfilter;
mbuffer<double, 1000, 2> buffer; // storage for 1000 samples/sec video
unsigned int buffptr;
int sync;
int sync0;
int ticks;
int x1;
int y1;
int x2;
int y2;
bool calc;
bool zoom;
double keyshape[32]; // 4 msec rise and fall time for pulse
double audio[400];
double quiet[400];
double play[400];
double nco(double freq);
void makeshape();
void makeaudio();
public:
wwv();
~wwv();
void init();
void rx_init();
void tx_init();
void restart() {};
int rx_process(const double *buf, int len);
int tx_process();
void update_syncscope();
void set1(int x, int y);
void set2(int x, int y);
};
#endif
| 2,258
|
C++
|
.h
| 83
| 25.578313
| 79
| 0.6642
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,374
|
ringbuffer.h
|
w1hkj_fldigi/src/include/ringbuffer.h
|
// ----------------------------------------------------------------------------
// ringbuffer.h
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// C++ version of PortAudio's ringbuffer code. The copying read/write methods
// use memcpy, so it generally safe to use them only for POD types. Thread safe
// for one reader and one writer.
//
// Licensed according to original copyright notice:
//
// Author: Phil Burk, http://www.softsynth.com
// modified for SMP safety on OS X by Bjorn Roche.
// also allowed for const where possible.
// Note that this is safe only for a single-thread reader
// and a single-thread writer.
//
// This program is distributed with the PortAudio Portable Audio Library.
// For more information see: http://www.portaudio.com
// Copyright (c) 1999-2000 Ross Bencina and Phil Burk
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files
// (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/**
The class template ringbuffer is used to transport data elements between
different execution contexts (threads, OS callbacks, interrupt handlers)
without requiring the use of any locks. This only works when there is
a single reader and a single writer (ie. one thread or callback writes
to the ring buffer, another thread or callback reads from it).
The ringbuffer class manages a first-in-first-out buffer containing N
elements, where N must be a power of two. An element may be any size
(specified in bytes).
Buffer storage is instantiated when the class Type is created and
released when the class Type is deleted.
*/
#ifndef RINGBUFFER_H
#define RINGBUFFER_H
#include <cassert>
#include <cstring>
#include "util.h"
template <typename T>
class ringbuffer
{
protected:
size_t size, // size of buffer, a power of two
big_mask, // Used for wrapping indices with extra bit to distinguish full/empty.
small_mask; // Used for fitting indices to buffer.
T* buf; // Pointer to the buffer containing the actual data.
volatile size_t ridx; // Index of next readable element.
volatile size_t widx; // Index of next writable element.
public:
typedef T value_type;
typedef struct { value_type* buf; size_t len; } vector_type;
public:
// Instantiate ringbuffer to empty state ready to have elements written to it.
// buffer size, s, must be a power of two
ringbuffer(size_t s) : ridx(0), widx(0) {
assert(powerof2(s));
size = s;
big_mask = size * 2 - 1;
small_mask = size - 1;
buf = new T[2 * size];
}
// Delete ringbuffer and all internal storage
~ringbuffer() {
delete [] buf;
}
// number of elements available for reading.
size_t read_space(void) {
read_memory_barrier();
return (widx - ridx) & big_mask;
}
// number of elements available for writing.
size_t write_space(void) {
return size - read_space();
}
// advance read index by n number of elements
void read_advance(size_t n) {
write_memory_barrier();
ridx = (ridx + n) & big_mask;
}
// advance write index by n number of elements
void write_advance(size_t n) {
write_memory_barrier();
widx = (widx + n) & big_mask;
}
size_t get_rv(vector_type v[2], size_t n = 0) {
size_t rspace = read_space();
size_t index = ridx & small_mask;
if (n == 0 || n > rspace)
n = rspace;
if (index + n > size) { // two part vector
v[0].buf = buf + index;
v[0].len = size - index;
v[1].buf = buf;
v[1].len = n - v[0].len;
} else {
v[0].buf = buf + index;
v[0].len = n;
v[1].len = 0;
}
return n;
}
// read n elements from buffer, constrained by read/write indices
size_t read(T* dst, size_t n) {
vector_type v[2] = { {0,0}, {0,0} };
n = get_rv(v, n);
memcpy(dst, v[0].buf, v[0].len * sizeof(T));
if (v[1].len)
memcpy(dst + v[0].len, v[1].buf, v[1].len * sizeof(T));
read_advance(n);
return n;
}
size_t peek(T* dst, size_t n) {
vector_type v[2] = { {0,0}, {0,0} };
n = get_rv(v, n);
memcpy(dst, v[0].buf, v[0].len * sizeof(T));
if (v[1].len)
memcpy(dst + v[0].len, v[1].buf, v[1].len * sizeof(T));
return n;
}
size_t get_wv(vector_type v[2], size_t n = 0) {
size_t wspace = write_space();
size_t index = widx & small_mask;
if (n == 0 || n > wspace)
n = wspace;
if (index + n > size) { // two part vector
v[0].buf = buf + index;
v[0].len = size - index;
v[1].buf = buf;
v[1].len = n - v[0].len;
} else {
v[0].buf = buf + index;
v[0].len = n;
v[1].len = 0;
}
return n;
}
// write n elements to buffer, constrained by read/write indices
size_t write(const T* src, size_t n) {
vector_type v[2] = { {0,0}, {0,0} };
n = get_wv(v, n);
memcpy(v[0].buf, src, v[0].len * sizeof(T));
if (v[1].len)
memcpy(v[1].buf, src + v[0].len, v[1].len * sizeof(T));
write_advance(n);
return n;
}
// fill buffer with elements with value v
void fill(const value_type& v) {
reset();
for (size_t i = 0; i < size; i++)
buf[i] = v;
write_advance(size);
}
// fill buffer with elements whose value is zero
void zero(void) {
reset();
memset(buf, 0, size * sizeof(T));
write_advance(size);
}
// reset the read/write indices
void reset(void) {
ridx = widx = 0;
}
// return maximum number of T elements that buffer can contain
size_t length(void) {
return size;
}
// return number of memory bytes used by ringbuffer buffer store
size_t bytes(void) {
return size * sizeof(T);
}
size_t rbr_index() { return ridx; }
size_t rbw_index() { return widx; }
};
#endif // RINGBUFFER_H
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 6,512
|
C++
|
.h
| 198
| 30.550505
| 84
| 0.678293
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,375
|
font_browser.h
|
w1hkj_fldigi/src/include/font_browser.h
|
// ----------------------------------------------------------------------------
// Font_Browser.h v 0.0.1 2005-10-17
//
// for the Fast Light Tool Kit (FLTK) 1.1.x .
//
// David Freese, w1hkj@w1hkj.com
// based on similar widget by Mariwan Jalal
//
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FONTBROWSER_H
#define FONTBROWSER_H
#include <string>
#include <FL/Enumerations.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Check_Button.H>
#include "flslider2.h"
// Preview box for showing font
class Preview_Box : public Fl_Widget
{
private:
int fontName;
int fontSize;
Fl_Color fontColor;
void draw();
public:
Preview_Box(int x, int y, int w, int h, const char* l);
void SetFont( int fontname, int fontsize, Fl_Color c);
};
// Font browser widget
class Font_Browser : public Fl_Window
{
friend void *find_fixed_fonts(void *);
public:
struct font_pair {
int nbr;
std::string *name;
font_pair() {
nbr = 0;
name = 0;
}
~font_pair() {
if (name) delete name;
}
};
enum filter_t { FIXED_WIDTH, VARIABLE_WIDTH, ALL_TYPES };
// these are shared by all instances of Font_Browser
// created for instance 1 and deleted for instance 0
static int *fixed;
static font_pair *font_pairs;
static int instance;
static int numfonts;
private:
Fl_Font fontnbr;
int fontsize;
Fl_Color fontcolor;
filter_t filter;
void *data_;
Fl_Browser *lst_Font;
Fl_Browser *lst_Size;
Fl_Value_Input2 *txt_Size;
Fl_Return_Button *btn_OK;
Fl_Button *btn_Cancel;
Fl_Button *btn_Color;
Fl_Check_Button *btn_fixed;
Preview_Box *box_Example;
Fl_Callback* callback_;
public:
Font_Browser(int x = 100, int y = 100, int w = 430, int h = 225, const char *lbl = "Font Browser");
~Font_Browser();
void callback(Fl_Callback* cb, void *d = 0) { callback_ = cb; data_ = d; }
static void fb_callback(Fl_Widget* w, void* arg);
void FontNameSelect();
void ColorSelect();
int numFonts() { return numfonts; }
void fontNumber(Fl_Font n);
Fl_Font fontNumber() { return fontnbr; }
void fontSize(int s);
int fontSize() { return fontsize; }
void fontColor(Fl_Color c);
Fl_Color fontColor() { return fontcolor; };
const char *fontName() { return lst_Font->text(lst_Font->value()); }
void fontName(const char* n);
static bool fixed_width(Fl_Font f);
void fontFilter(filter_t filter);
};
extern Font_Browser* font_browser;
#endif
| 3,366
|
C++
|
.h
| 109
| 29.091743
| 100
| 0.659351
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,376
|
test_signal.h
|
w1hkj_fldigi/src/include/test_signal.h
|
// ----------------------------------------------------------------------------
// test_signal.h
//
// Copyright (C) 2017
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef TEST_SIGNAL_H
#define TEST_SIGNAL_H
#include <config.h>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cctype>
#include <cstdlib>
#ifdef __MINGW32__
# include <windows.h>
#endif
#include "testsigs.h"
extern Fl_Double_Window* test_signal_window;
extern void show_testdialog(void);
#endif
| 1,250
|
C++
|
.h
| 38
| 31.684211
| 79
| 0.657807
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,377
|
configuration.h
|
w1hkj_fldigi/src/include/configuration.h
|
// ----------------------------------------------------------------------------
// configuration.h
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
// Copyright (C) 2008-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _CONFIGURATION_H
#define _CONFIGURATION_H
#include <string>
#include <math.h>
#include "rtty.h"
#include "waterfall.h"
#include "lookupcall.h"
#include "psk_browser.h"
#if defined(__linux__)
# define DEFAULT_PTTDEV "/dev/ttyS0"
# define DEFAULT_CWFSKPORT "/dev/ttyS1"
# define DEFAULT_HAMRIGDEVICE "/dev/ttyS0"
#elif defined(__FreeBSD__)
# define DEFAULT_PTTDEV "/dev/ttyd0"
# define DEFAULT_CWFSKPORT "/dev/ttyd1"
# define DEFAULT_HAMRIGDEVICE "/dev/ttyd0"
#elif defined(__NetBSD__)
# define DEFAULT_PTTDEV "/dev/tty00"
# define DEFAULT_CWFSKPORT "/dev/tty01"
# define DEFAULT_HAMRIGDEVICE "/dev/tty00"
#elif defined(__OpenBSD__)
# define DEFAULT_PTTDEV "/dev/tty00"
# define DEFAULT_CWFSKPORT "/dev/tty01"
# define DEFAULT_HAMRIGDEVICE "/dev/tty00"
#elif defined(__WOE32__)
# define DEFAULT_PTTDEV "COM1"
# define DEFAULT_CWFSKPORT "COM2"
# define DEFAULT_HAMRIGDEVICE "COM1"
#else // not sure
# define DEFAULT_PTTDEV "/dev/ptt"
# define DEFAULT_CWFSKPORT "/dev/fsk"
# define DEFAULT_HAMRIGDEVICE "/dev/rig"
#endif
// Format: ELEM_(TYPE, VARIABLE-NAME, TAG-STRING, DOC-STRING, DEFAULT-VALUE)
// Variables that are not saved to the xml file have empty TAG-STRINGs and DOC-STRINGs
//
// No preprocessor directives or C++ comments inside this macro!
// Indent with spaces only.
// The 'comments' field should not contain either '<' or '>' characters!
#ifdef ELEM_
# error ELEM_ should not be defined at this point
#endif
#define CONFIG_LIST \
ELEM_(bool, confirmExit, "CONFIRMEXIT", \
"Ensure user wants to leave flgidi", \
true) \
ELEM_(bool, show_tx_timer, "SHOW_TX_TIMER", \
"Show tx timer on menu bar", \
true) \
ELEM_(int, tx_timeout, "TX_TIMEOUT", \
"TX deadman timeout in minutes", \
5) \
ELEM_(bool, SaveConfig, "SAVECONFIG", \
"Save current configuration on exit", \
true) \
ELEM_(bool, noise, "NOISETEST", \
"Noise test on/off", \
false) \
ELEM_(double, s2n, "SIGNAL2NOISE", \
"Signal to Noise ratio for test", \
+20.0) \
ELEM_(bool, rsidWideSearch, "RSIDWIDESEARCH", \
"RSID detector searches the entire passband", \
false) \
ELEM_(int, rsid_squelch, "RSIDSQUELCH", \
"RSID detection opens squelch for nn seconds", \
5) \
ELEM_(bool, rsid, "RECEIVERSID", \
"Enable Reed Soloman ID decoding", \
false) \
ELEM_(bool, TransmitRSid, "TRANSMITRSID", \
"Send RSID at beginning and end of transmission", \
false) \
ELEM_(bool, rsid_mark, "RSIDMARK", \
"Append marker (for the previous modem and frequency) to the RX text\n" \
"widget before changing to the new modem and/or frequency", \
true) \
ELEM_(bool, rsid_notify_only, "RSIDNOTIFYONLY", \
"Trigger RSID notifications but do not change modem and frequency", \
false) \
ELEM_(bool, rsid_eot_squelch, "RSIDEOTSQUELCH", \
"restore squelch upon decode of RSID_EOT signal", \
false) \
ELEM_(bool, rsid_auto_disable, "RSIDAUTODISABLE", \
"Disable RSID detection when RsID signal is detected", \
false) \
ELEM_(bool, rsid_post, "RSIDPOST", \
"Transmit an RSID signal when modem data is concluded", \
false) \
ELEM_(mode_set_t, rsid_rx_modes, "RSIDRXMODESEXCLUDE", \
"Mode names for which RSID reception is disabled", \
mode_set_t()) \
ELEM_(mode_set_t, rsid_tx_modes, "RSIDTXMODESEXCLUDE", \
"Mode names for which RSID transmission is disabled", \
mode_set_t()) \
ELEM_(int, RsID_label_type, "RSID_ERRORS", \
"values (low, medium, high) 0, 1, 2", \
1) \
ELEM_(bool, disable_rsid_warning_dialog_box, "DISABLE_RSID_WARNING_DIALOG_BOX", \
"disable displaying the rsid warning dialog box", \
false) \
ELEM_(bool, slowcpu, "SLOWCPU", \
"Disable expensive processing in some decoders", \
true) \
ELEM_(bool, disable_rsid_freq_change, "DISABLERSIDFREQCHANGE", \
"disable changing frequency on rsid modem change/reset", \
false) \
ELEM_(bool, retain_freq_lock, "RETAINFREQLOCK", \
"retain frequency lock on rsid modem change/reset", \
true) \
ELEM_(bool, changed, "", "", false) \
\
ELEM_(double, normal_signal_level, "normal_signal_level", \
"Input signal level transition (dB); -90 to 0", \
-60.0) \
ELEM_(double, high_signal_level, "high_signal_level", \
"Input signal level transition (dB); -90 to 0", \
-6.0) \
ELEM_(double, over_signal_level, "over_signal_level", \
"Input signal level transition (dB); -90 to 0", \
-3.0) \
\
ELEM_(double, wfRefLevel, "WFREFLEVEL", \
"Waterfall reference level (dB)", \
0.0) \
ELEM_(double, wfAmpSpan, "WFAMPSPAN", \
"Waterfall amplitude span (dB)", \
60.0) \
ELEM_(bool, WF_UIrev, "WF_UIREV", \
"WF_UI - enable reverse button", \
true) \
ELEM_(bool, WF_UIx1, "WF_UIX1", \
"WF_UI - enable scale multiplication button", \
true) \
ELEM_(int, drop_speed, "DROP_SPEED", \
"DROP_SPEED - slow rate waterfall drop speed", \
8) \
ELEM_(bool, WF_UIwfcarrier, "WF_UIWFCARRIER", \
"WF_UI - enable wf carrier button", \
true) \
ELEM_(bool, WF_UIwfshift, "WF_UIWFSHIFT", \
"WF_UI - enable wf shift buttons", \
true) \
ELEM_(bool, WF_UIwfreflevel, "WF_UIWFREFLEVEL", \
"WF_UI - enable rf level and range controls", \
true) \
ELEM_(bool, WF_UIwfdrop, "WF_UIWFDROP", \
"WF_UI - enable wf drop rate control", \
true) \
ELEM_(bool, WF_UIwfampspan, "WF_UIWFAMPSPAN", \
"WF_UI - enable wf amp span control", \
true) \
ELEM_(bool, WF_UIwfstore, "WF_UIWFSTORE", \
"WF_UI - enable wf memory store button", \
true) \
ELEM_(bool, WF_UIwfmode, "WF_UIWFMODE", \
"WF_UI - enable wf mode control", \
true) \
ELEM_(bool, WF_UIqsy, "WF_UIQSY", \
"WF_UI - enable wf qsy button", \
true) \
ELEM_(bool, WF_UIxmtlock, "WF_UIXMTLOCK", \
"WF_UI - enable wf transmit lock button", \
true) \
ELEM_(int, LowFreqCutoff, "LOWFREQCUTOFF", \
"Lowest frequency shown on waterfall (Hz)", \
0) \
ELEM_(int, HighFreqCutoff, "HIGHFREQCUTOFF", \
"Highest frequency shown on waterfall (Hz)", \
3000) \
ELEM_(double, CWsweetspot, "CWSWEETSPOT", \
"Default CW tracking point (Hz)", \
1500) \
ELEM_(double, RTTYsweetspot, "RTTYSWEETSPOT", \
"Default RTTY tracking point (Hz)", \
1500) \
ELEM_(double, PSKsweetspot, "PSKSWEETSPOT", \
"Default tracking point for all other modems (Hz)", \
1500) \
ELEM_(bool, StartAtSweetSpot, "STARTATSWEETSPOT", \
"Always start new modems at sweet spot frequencies", \
true) \
ELEM_(bool, CWOffset, "CWOFFSET", \
"Select if waterfall should compensate for BFO offset in CW", \
false) \
ELEM_(bool, CWIsLSB, "CWISLSB", \
"Select if BFO is injected as LSB instead of USB", \
false) \
ELEM_(bool, CW_backslash, "CW_blackslash", \
"encode/decode backslash character", \
true) \
ELEM_(bool, CW_single_quote, "CW_single_quote", \
"encode/decode single_quote character", \
true) \
ELEM_(bool, CW_dollar_sign, "CW_dollar_sign", \
"encode/decode dollar_sign character", \
true) \
ELEM_(bool, CW_open_paren, "CW_open_paren", \
"encode/decode open_paren character", \
true) \
ELEM_(bool, CW_close_paren, "CW_close_paren", \
"encode/decode close_paren character", \
true) \
ELEM_(bool, CW_colon, "CW_colon", \
"encode/decode colon character", \
true) \
ELEM_(bool, CW_semi_colon, "CW_semi_colon", \
"encode/decode semi_colon character", \
true) \
ELEM_(bool, CW_underscore, "CW_underscore", \
"encode/decode underscore character", \
true) \
ELEM_(bool, CW_at_symbol, "CW_at_symbol", \
"encode/decode at_symbol character", \
true) \
ELEM_(bool, CW_exclamation, "CW_exclamation", \
"encode/decode exclamation character", \
true) \
ELEM_(int, CW_noise, "CW_noise", \
"use CW_noise character to display invalid CW decodes", \
'*') \
ELEM_(std::string, CW_KEYLINE_serial_port_name, "CW_KEYLINE_SERIAL_PORT_NAME", \
"Independent serial port used for keying DTR or RTS as keyline", \
"") \
ELEM_(int, CW_KEYLINE, "CWKEYLINE", \
"0 - none, 1 - RTS, 2 - DTR", \
0) \
ELEM_(bool, use_KNWDkeying, "USE_KYWDKEYING", \
"0 - false, 1 - true; Kenwood xcvrs", \
0) \
ELEM_(bool, use_ELCTkeying, "USE_ELCTKEYING", \
"0 - false, 1 - true; Elecraft xcvrs", \
0) \
ELEM_(bool, use_ICOMkeying, "USE_ICOMKEYING", \
"0 - false, 1 - true", \
0) \
ELEM_(std::string, ICOMcivaddr, "ICOMcivaddr", \
"Icom transceiver CIV address", \
"") \
ELEM_(bool, use_YAESUkeying, "USE_YAESUKEYING", \
"0 - false, 1 - true", \
0) \
ELEM_(int, CATkeying_compensation, "CATKEYINGCOMP", \
"compensate delays in CW CAT keying (msecs)", \
0) \
ELEM_(bool, CATkeying_disable_ptt, "CATKEYING_disable_ptt", \
"disable CAT ptt for text string CW", \
0) \
ELEM_(int, cwio_comp, "cwio_comp", \
"compensate delays in set/clr DTR/RTS serial line\n" \
"most likely required for Windows operating system\n" \
"compensation value in msec", \
0) \
ELEM_(int, use_FLRIGkeying, "use_FLRIGkeying", \
"flrig DTR/RTS keying", \
0) \
ELEM_(int, PTT_KEYLINE, "PTTKEYLINE", \
"0 - none, 1 - RTS, 2 - DTR", \
0) \
ELEM_(bool, CW_KEYLINE_changed, "CW_KEYLINE_CHANGED", \
"serial keyline parameter changed", \
0) \
ELEM_(bool, CW_KEYLINE_on_cat_port, "CW_KEYLINE_on_cat_port", \
"DTR/RTS keying shares RigCat serial port", \
false) \
ELEM_(bool, CW_KEYLINE_on_ptt_port, "CW_KEYLINE_on_ptt_port", \
"DTR/RTS keying shares ptt serial port\n" \
"Note: ptt on DTR, keying on RTS or\n" \
" ptt on RTS, keying on DTR", \
false) \
ELEM_(double, CWkeycomp, "CWkeycomp", \
"Dot to Space ratio compensate for transceiver keying delays\n" \
"in millisecond. (-) decrease dot, (+) increase dot\n" \
"limited to 1/2 default dot / space interval", \
0.0) \
ELEM_(bool, WaterfallHistoryDefault, "WATERFALLHISTORYDEFAULT", \
"Replay audio history when changing frequency by clicking on\n" \
"the waterfall", \
false) \
ELEM_(bool, WaterfallQSY, "WATERFALLQSY", \
"Change rig frequency by dragging the mouse cursor on the waterfall\n" \
"frequency scale area", \
false) \
ELEM_(bool, WaterfallClickInsert, "WATERFALLCLICKINSERT", \
"Insert text to the RX text widget when changing frequency by left\n" \
"clicking on the waterfall", \
false) \
ELEM_(std::string, WaterfallClickText, "WATERFALLCLICKTEXT", \
"Waterfall left click text for WATERFALLCLICKINSERT", \
"\n<FREQ>\n") \
ELEM_(int, WaterfallWheelAction, "WATERFALLWHEELACTION", \
"Describes how waterfall mouse wheel events are handled\n" \
" 0: do nothing; 1: change AFC width or decoder bandwidth;\n" \
" 2: signal search; 3: change squelch level; 4: change modem carrier;\n" \
" 5: change modem; 6: scroll visible area. The default is 4.", \
waterfall::WF_CARRIER) \
ELEM_(bool, rx_lowercase, "RX_LOWERCASE", \
"Print Rx in lowercase for CW, RTTY, CONTESTIA and THROB", \
false) \
ELEM_(bool, tx_lowercase, "TX_LOWERCASE", \
"Transmit all text in lowercase", \
false) \
/* PSK, filter can be 0, 1, 2 */ \
ELEM_(int, PSK_filter, "PSKFILTER", \
"0 - PskCore filter\n" \
"1 - Raised cosine / sinc filter\n" \
"2 - G3PLX (gmfsk) filter", \
0) \
ELEM_(bool, pskbrowser_on, "PSKBROWSER_ON", \
"Enable psk multi-channel detector - disable for very slow cpus", \
true) \
/* PSK / PSKmail interface */ \
ELEM_(int, SearchRange, "PSKSEARCHRANGE", \
"PSK signal acquisition search range (Hz)", \
50) \
ELEM_(bool, pskpilot, "PSKPILOT", \
"Vestigial pilot tone on = 1, off = 0", \
false) \
ELEM_(double, pilot_power, "PILOT_POWER", \
"Pilot tone relative power level", \
-30.0) \
ELEM_(double, ACQsn, "ACQSN", \
"PSK signal acquisition S/N (dB)", \
9.0) \
ELEM_(bool, Pskmails2nreport, "PSKMAILS2NREPORT", \
"Send s2n report to pskmail client/server", \
false) \
ELEM_(bool, StatusDim, "STATUSDIM", \
"Behaviour of status (S/N and IMD) fields:\n" \
" 0: Clear after timeout\n" \
" 1: Dim after timeout\n", \
true) \
ELEM_(double, StatusTimeout, "STATUSTIMEOUT", \
"Dim or Clear timeout (seconds)", \
15.0) \
ELEM_(bool, PSKmailSweetSpot, "PSKMAILSWEETSPOT", \
"Reset to carrier when no signal is present", \
false) \
ELEM_(int, ServerOffset, "PSKSERVEROFFSET", \
"Listen for signals within this range (Hz)", \
50) \
ELEM_(int, ServerCarrier, "PSKSERVERCARRIER", \
"Default PSKMail listen / transmit frequency", \
1500) \
ELEM_(int, ServerAFCrange, "PSKSERVERAFCRANGE", \
"Limit AFC movement to this range (Hz)", \
25) \
ELEM_(double, ServerACQsn, "PSKSERVERACGSN", \
"Acquisition S/N (dB)", \
9.0) \
/* RTTY */ \
ELEM_(int, kahn_demod, "KAHNDEMOD", \
"1 - use Kahn power demodulator\n" \
"0 - use ATC (Kok Chen) demodulator", \
1) \
ELEM_(bool, true_scope, "TRUESCOPE", \
"Enabled - XY scope displays Mark/Space channel signals\n" \
"Disabled - XY scope displays pseudo M/S signals", \
true) \
ELEM_(int, rtty_shift, "RTTYSHIFT", \
"Carrier shift (Hz). Values are as follows:\n" \
" 0: 23; 1: 85; 2: 160; 3: 170; 4: 182; 5: 200; 6: 240; 7: 350;\n" \
" 8: 425; 9: 850; -1: custom", \
3) /* 170 */ \
ELEM_(int, rtty_custom_shift, "RTTYCUSTOMSHIFT", \
"Custom shift (Hz)", \
450) \
ELEM_(double, RTTY_BW, "RTTYBW", \
"Receive filter bandwidth (Hz)", \
68.0) \
ELEM_(int, rtty_cwi, "RTTYCWI", \
"Selective decoding of mark/space tones\n" \
"0 - both\n" \
"1 - mark only\n" \
"2 - space only", \
0) \
ELEM_(double, rtty_filter, "RTTYFILTER", \
"Rtty Rx Filter shape factor, K * (t/T)\n" \
"You may alter this value using a text editor\n" \
"change will be effective when restarting fldigi\n" \
"K = 1.25; best for W1HKJ (default)\n" \
"K = 1.5 - best for DO2SMF", \
1.25) \
ELEM_(int, rtty_baud, "RTTYBAUD", \
"Carrier baud rate. Values are as follows:\n" \
" 1: 45; 1: 45.45; 2: 50; 3: 56; 4: 75; 5: 100; 6: 110; 7: 150; \n" \
" 8: 200; 9: 300", \
0) /* 45 */ \
ELEM_(int, rtty_bits, "RTTYBITS", \
"Bits per character. Values are as follows:\n" \
" 0: 5 (baudot); 1: 7 (ascii); 2: 8 (ascii)", \
0) /* 5 */ \
ELEM_(int, rtty_parity, "RTTYPARITY", \
"Parity. Values are as folows:\n" \
" 0: none; 1: even; 2: odd: 3: zero; 4: one", \
rtty::RTTY_PARITY_NONE) \
ELEM_(int, rtty_stop, "RTTYSTOP", \
"Stop bits. Values are as folows:\n" \
" 0: 1; 1: 1.5; 2: 2", \
1) /* 1.5 */ \
ELEM_(bool, rtty_reverse, "RTTYREVERSE", \
"This setting is currently unused", \
false) \
ELEM_(bool, rtty_msbfirst, "RTTYMSBFIRST", \
"This setting is currently unused", \
false) \
ELEM_(bool, rtty_crcrlf, "RTTYCRCLF", \
"Use \"CR CR LF\" for \"CR LF\"", \
false) \
ELEM_(bool, rtty_autocrlf, "RTTYAUTOCRLF", \
"Automatically add CRLF after `page width' characters", \
true) \
ELEM_(int, rtty_autocount, "RTTYAUTOCOUNT", \
"Page width for RTTYAUTOCRLF", \
72) \
ELEM_(int, rtty_afcspeed, "RTTYAFCSPEED", \
"AFC tracking speed. Values are as follows:\n" \
" 0: slow; 1: normal; 2: fast", \
1) /* normal */ \
ELEM_(bool, PreferXhairScope, "PREFERXHAIRSCOPE", \
"Default to crosshair digiscope", \
false) \
ELEM_(bool, PseudoFSK, "PSEUDOFSK", \
"Generate Pseudo-FSK signal on right audio channel", \
false) \
/* FSK interface elements */ \
ELEM_(bool, useFSK, "USEFSK", \
"TRUE if DTR/RTS keying for RTTY", \
false) \
ELEM_(bool, fsk_shares_port, "FSK_SHARES_PORT", \
"FSK signal generator shares rigio serial port for DTR/RTS control", \
false) \
ELEM_(std::string, fsk_port, "FSK_PORT", \
"FSK serial port device name", \
"") \
ELEM_(bool, fsk_reverse, "FSK_REVERSE", \
"Reverse Mark/Space signaling", \
false) \
ELEM_(bool, fsk_on_dtr, "FSK_ON_DTR", \
"Use DTR signal line for FSK control", \
false) \
ELEM_(bool, fsk_shift_on_space, "FSK_SHIFT_ON_SPACE", \
"Always send shift char before space", \
false) \
ELEM_(bool, fsk_STOPBITS, "FSK_STOPBITS", \
"True - 1.5 stop bits; False - 2 stop bits", \
true) \
ELEM_(bool, use_FLRIG_FSK, "FLRIG_FSK", \
"True - enable; False - disable", \
false) \
ELEM_(double, flrig_poll, "FLRIG_POLL", \
"range 50 to 5000 msecs", \
200) \
/* end of FSK elements */ \
ELEM_(bool, kml_enabled, "KMLSERVER_ENABLED", \
"Enable kml server threads", \
true) \
ELEM_(bool, SynopAdifDecoding, "SYNOPADIFDECODING", \
"Decoding of Synop weather information on RTTY to ADIF log", \
false) \
ELEM_(bool, SynopKmlDecoding, "SYNOPKMLDECODING", \
"Decoding of Synop weather information on RTTY to KML file", \
false) \
ELEM_(bool, SynopInterleaved, "SYNOPINTERLEAVED", \
"Decoding of Synop interleaved with coded text, or replaces it", \
false) \
ELEM_(bool, UOSrx, "UOSRX", \
"Revert to unshifted chars on a space (RX)", \
true) \
ELEM_(bool, UOStx, "UOSTX", \
"Revert to unshifted chars on a space (TX)", \
true) \
ELEM_(bool, useMARKfreq, "USEMARKFREQ", \
"Use MARK frequency for logging", \
true) \
ELEM_(bool, visibleBELL, "visibleBELL", \
"Show <BEL> in Rx panel when \a decoded", \
true) \
ELEM_(bool, audibleBELL, "audibleBELL", \
"Ring TTY bell tone when \a decoded", \
true) \
/* CW */ \
ELEM_(double, CWspeed, "CWSPEED", \
"Transmit speed (WPM)", \
18) \
ELEM_(double, CWfarnsworth, "CWFARNSWORTH", \
"Speed for Farnsworth timing (WPM)", \
18) \
ELEM_(bool, CWusefarnsworth, "CWUSEFARNSWORTH", \
"Use Farnsworth timing", \
false) \
ELEM_(double, defCWspeed, "CWDEFSPEED", \
"Default speed (WPM)", \
24) \
ELEM_(int, CWbandwidth, "CWBANDWIDTH", \
"Filter bandwidth (Hz)", \
150) \
ELEM_(double, CWlower, "CWLOWER", \
"Detector hysterisis, lower threshold", \
0.4) \
ELEM_(double, CWupper, "CWUPPER", \
"Detector hysterisis, upper threshold", \
0.6) \
ELEM_(int, CWmfiltlen, "CWMFILTLEN", \
"Matched Filter length", \
100) \
ELEM_(bool, CWtrack, "CWTRACK", \
"Automatic receive speed tracking", \
true) \
ELEM_(bool, CWmfilt, "CWMFILT", \
"Matched Filter in use", \
false) \
ELEM_(bool, CWuseSOMdecoding, "CWUSESOMDECODING", \
"Self Organizing Map decoding", \
false) \
ELEM_(int, CWrange, "CWRANGE", \
"Tracking range for CWTRACK (WPM)", \
10) \
ELEM_(int, CWlowerlimit, "CWLOWERLIMIT", \
"Lower RX limit (WPM)", \
5) \
ELEM_(int, CWupperlimit, "CWUPPERLIMIT", \
"Upper TX limit (WPM)", \
50) \
ELEM_(int, cwrx_attack, "CWRX_ATTACK", \
"rx squelch attack timing\n" \
"SLOW = 0 (100)\nMEDIUM = 1 (50)\nFAST = 2 (25)", \
1) \
ELEM_(int, cwrx_decay, "CWRX_DECAY", \
"rx squelch decay timing\n" \
"SLOW = 0 (1000)\nMEDIUM = 1 (500)\nFAST = 2 (250)", \
1) \
ELEM_(double, CWdash2dot, "CWDASH2DOT", \
"Dash to dot ratio", \
3.0) \
ELEM_(bool, QSK, "QSK", \
"Generate QSK signal on right audio channel", \
false) \
ELEM_(double, QSKfrequency, "QSKfrequency", \
"QSK square wave fundamental frequency", \
2000) \
ELEM_(double, CWpre, "CWPRE", \
"Pre-keydown timing (milliseconds)", \
4.0) \
ELEM_(double, QSKamp, "QSKAMP", \
"Right channel QSK signal amplitude", \
0.8) \
ELEM_(double, CWpost, "CWPOST", \
"Post-keydown timing (milliseconds)", \
4.0) \
ELEM_(bool, CWid, "CWID", \
"Send callsign in CW at the end of every transmission", \
false) \
ELEM_(int, CWIDwpm, "IDWPM", \
"CW ID speed (WPM)", \
18) \
ELEM_(mode_set_t, cwid_modes, "CWIDMODESEXCLUDE", \
"Mode names for which CWID transmission is disabled", \
mode_set_t()) \
ELEM_(bool, QSKadjust, "QSKADJUST", \
"Send a continuous stream of test characters as the QSK signal", \
false) \
ELEM_(int, TestChar, "TESTCHAR", \
"Test character for QSKADJUST (ASCII value)", \
0) \
ELEM_(int, QSKshape, "QSKSHAPE", \
"QSK edge shape. Values are as follows:\n" \
" 0: Hanning; 1: Blackman;" \
"Raised cosine = Hanning.", \
0) /* Hanning */ \
ELEM_(double, QSKrisetime, "QSKrisetime", \
"Leading and trailing edge rise times (milliseconds)", \
4.0) \
ELEM_(double, CWrisetime, "CWRISETIME", \
"Leading and trailing edge rise times (milliseconds)", \
4.0) \
ELEM_(bool, CW_bpf_on, "CW_BPF_ON", \
"Enable filtering of transmit audio", \
false) \
ELEM_(double, CW_bpf, "CW_BPF", \
"Transmit filter hi cutoff frequency\n" \
"f0 +/- CW_bpf/2", \
100.0) \
ELEM_(bool, CWnarrow, "CWNARROW", \
"Weight decreases with increasing edge timing", \
false) \
ELEM_(bool, CW_use_paren, "CWUSEPAREN", \
"Use open paren character; typically used in MARS ops", \
false) \
ELEM_(std::string, CW_prosigns, "CWPROSIGNS", \
"CW prosigns BT AA AS AR SK KN INT HM VE", \
"=~<>%+&{}") \
ELEM_(bool, CW_prosign_display, "CW_prosign_display", \
"Display decoded prosign as assigned short cut key", \
false) \
ELEM_(int, CW_cal_speed, "CWCALSPEED", \
"CW calibrate speed in WPM", \
20) \
ELEM_(bool, A_umlaut, "A_umlaut", \
"Use Ä extended CW character", \
true) \
ELEM_(bool, A_aelig, "A_aelig", \
"Use Æ extended CW character", \
false) \
ELEM_(bool, A_ring, "A_ring", \
"Use Ä extended CW character", \
true) \
ELEM_(bool, C_cedilla, "C_cedilla", \
"Use Ç extended CW character", \
true) \
ELEM_(bool, E_grave, "E_grave", \
"Use È extended CW character", \
true) \
ELEM_(bool, E_acute, "E_acute", \
"Use É extended CW character", \
true) \
ELEM_(bool, O_acute, "O_acute", \
"Use Ó extended CW character", \
false) \
ELEM_(bool, O_umlaut, "O_umlaut", \
"Use Ö extended CW character", \
true) \
ELEM_(bool, O_slash, "O_slash", \
"Use Ø extended CW character", \
false) \
ELEM_(bool, N_tilde, "N_tilde", \
"Use Ñ extended CW character", \
true) \
ELEM_(bool, U_umlaut, "U_umlaut", \
"Use Ü extended CW character", \
true) \
ELEM_(bool, U_circ, "U_circ", \
"Use Û extended CW character", \
false) \
ELEM_(bool, WK_K3NGsketch, "WK_K3NGsketch", \
"Mortty loaded with K3NG WinKeyer emulator sketch", \
false) \
/* FELD HELL */ \
ELEM_(double, HELL_BW, "HELL_BW0", "Feld Hell working bandwidth", 245.0) \
ELEM_(double, HELL_BW_FH, "HELL_BW1", "FH bandwidth", 245.0) \
ELEM_(double, HELL_BW_SH, "HELL_BW2", "Slow Hell bandwidth", 30.0) \
ELEM_(double, HELL_BW_X5, "HELL_BW3", "X5 Hell bandwidth", 1225.) \
ELEM_(double, HELL_BW_X9, "HELL_BW4", "X9 Hell bandwidth", 2205.0) \
ELEM_(double, HELL_BW_FSKH245, "HELL_BW5", "FSKH-245 bandwidth", 250.0) \
ELEM_(double, HELL_BW_FSKH105, "HELL_BW6", "FSKH-105 Hell bandwidth", 120.0) \
ELEM_(double, HELL_BW_HELL80, "HELL_BW7", "HELL-80 bandwidth", 450.0) \
ELEM_(int, HellRcvWidth, "HELLRCVWIDTH", \
"Horizontal size multiplier for each hell character, 1, 2, or 3", \
2) \
ELEM_(int, HellRcvHeight, "HELLRCVHEIGHT", \
"Vertical char size in pixels", \
20) \
ELEM_(bool, HellBlackboard, "HELLBLACKBOARD", \
"Display RX in reverse video", \
false) \
ELEM_(bool, HellMarquee, "HELLMARQUEE", \
"Display RX as scrolling marquee", \
false) \
ELEM_(int, HellXmtWidth, "HELLXMTWIDTH", \
"Transmit width (number of multiple scans per character line)", \
1) \
ELEM_(bool, HellXmtIdle, "HELLXMTIDLE", \
"Transmit periods (.) when idle", \
false) \
ELEM_(int, HellPulseFast, "HELLPULSEFAST", \
"Raised cosine pulse shape factor. Values are as follows:\n" \
" 0: slow (4 ms)\n" \
" 1: med (2 ms)\n" \
" 2: fast (1 ms)\n" \
" 3: Hard (off)", \
1) /* slow */ \
ELEM_(int, hellagc, "HELLAGC", \
"1 - slow, 2 - medium, 3 - fast", \
2) \
/* OLIVIA */ \
ELEM_(int, oliviatones, "OLIVIATONES", \
"Number of tones. Values are as follows:\n" \
" 0: 2; 1: 4; 2: 8; 3: 16; 4: 32; 5: 64; 6: 128; 7: 256", \
2) /* 8 */ \
ELEM_(int, oliviabw, "OLIVIABW", \
"Bandwidth (Hz). Values are as follows:\n" \
" 0: 125; 1: 250; 2: 500; 3: 1000; 4: 2000.", \
2) /* 500 */ \
ELEM_(int, oliviasmargin, "OLIVIASMARGIN", \
"Tune margin (tone frequency spacing)", \
8) \
ELEM_(int, oliviasinteg, "OLIVIASINTEG", \
"Integration period (FEC blocks)", \
4) \
ELEM_(bool, olivia_reset_fec, "OLIVIARESETFEC", \
"Force Integration (FEC) depth to be reset when new BW/Tones selected", \
false) \
ELEM_(bool, olivia8bit, "OLIVIA8BIT", \
"8-bit extended characters", \
true) \
ELEM_(bool, olivia_start_tones, "OLIVIASTARTTONES", \
"Send start/stop tones", \
true) \
/* CONTESTIA */ \
ELEM_(int, contestiatones, "CONTESTIATONES", \
"Number of tones. Values are as follows:\n" \
" 0: 2; 1: 4; 2: 8; 3: 16; 4: 32; 5: 64; 6: 128; 7: 256", \
2) /* 8 */ \
ELEM_(int, contestiabw, "CONTESTIABW", \
"Bandwidth (Hz). Values are as follows:\n" \
" 0: 125; 1: 250; 2: 500; 3: 1000; 4: 2000.", \
2) /* 500 */ \
ELEM_(int, contestiasmargin, "CONTESTIASMARGIN", \
"Tune margin (tone frequency spacing)", \
8) \
ELEM_(int, contestiasinteg, "CONTESTIASINTEG", \
"Integration period (FEC blocks)", \
4) \
ELEM_(bool, contestia8bit, "CONTESTIA8BIT", \
"8-bit extended characters", \
true) \
ELEM_(bool, contestia_reset_fec, "CONTESTIARESETFEC", \
"Force Integration (FEC) depth to be reset when new BW/Tones selected", \
false) \
ELEM_(bool, contestia_start_tones, "CONTESTIASTARTTONES", \
"Send start/stop tones", \
true) \
/* THOR */ \
ELEM_(double, THOR_BW, "THORBW", \
"Filter bandwidth factor (bandwidth relative to signal width)", \
2.0) \
ELEM_(bool, THOR_FILTER, "THORFILTER", \
"Enable filtering before decoding", \
true) \
ELEM_(std::string, THORsecText, "THORSECTEXT", \
"Secondary text (sent during keyboard idle times)", \
"") \
ELEM_(int, THOR_PATHS, "THORPATHS", \
"This setting is currently unused", \
5) \
ELEM_(double, ThorCWI, "THORCWI", \
"CWI threshold (CWI detection and suppression)", \
0.0) \
ELEM_(bool, THOR_PREAMBLE, "THORPREAMBLE", \
"Detect THOR preamble (and flush Rx pipeline)", \
true) \
ELEM_(bool, THOR_SOFTSYMBOLS, "THORSOFTSYMBOLS", \
"Enable Soft-symbol decoding", \
true) \
ELEM_(bool, THOR_SOFTBITS, "THORSOFTBITS", \
"Enable Soft-bit decoding", \
true) \
ELEM_(bool, PKT_RXTimestamp, "PKTRXTIMESTAMP", \
"No timestamps on RX packets by default", \
false) \
ELEM_(bool, PKT_expandMicE, "PKTEXPANDMICE", \
"decode received Mic-E data", \
false) \
ELEM_(bool, PKT_expandPHG, "PKTEXPANDPHG", \
"decode received PHG data", \
false) \
ELEM_(bool, PKT_expandCmp, "PKTEXPANDCMP", \
"decode received Compressed Position data", \
false) \
ELEM_(bool, PKT_unitsSI, "PKTUNITSSI", \
"display decoded data in SI units", \
false) \
ELEM_(bool, PKT_unitsEnglish, "PKTUNITSENGLISH", \
"display decoded data in English units", \
false) \
/* DOMINOEX */ \
ELEM_(double, DOMINOEX_BW, "DOMINOEXBW", \
"Filter bandwidth factor (bandwidth relative to signal width)", \
2.0) \
ELEM_(std::string, secText, "SECONDARYTEXT", \
"Secondary text (sent during keyboard idle times)", \
"") \
ELEM_(bool, DOMINOEX_FILTER, "DOMINOEXFILTER", \
"Enable filtering before decoding", \
true) \
ELEM_(bool, DOMINOEX_FEC, "DOMINOEXFEC", \
"Enable MultiPSK-compatible FEC", \
false) \
ELEM_(int, DOMINOEX_PATHS, "DOMINOEXPATHS", \
"This setting is currently unused", \
5) \
ELEM_(double, DomCWI, "DOMCWI", \
"CWI threshold (CWI detection and suppression)", \
0.0) \
/* MT63 */ \
ELEM_(bool, mt63_8bit, "MT638BIT", \
"8-bit extended characters", \
true) \
ELEM_(bool, mt63_rx_integration, "MT63INTEGRATION", \
"Long receive integration", \
false) \
ELEM_(bool, mt63_twotones, "MT63TWOTONES", \
"Also transmit upper start tone (only if MT63USETONES is enabled)", \
true) \
ELEM_(bool, mt63_usetones, "MT63USETONES", \
"Transmit lower start tone", \
true) \
ELEM_(int, mt63_tone_duration, "MT63TONEDURATION", \
"Tone duration (seconds)", \
4) \
ELEM_(bool, mt63_at500, "MT63AT500", \
"Always transmit lowest tone at 500 Hz", \
false) \
ELEM_(bool, mt63_centered, "MT63CENTERED", \
"Always transmit centered at 1500 Hz (SHARES requirement)", \
false) \
/* FSQ */ \
ELEM_(int, fsq_frequency, "FSQFREQUENCY", \
"0 - 1150 Hz, 1 - 1500 Hz, 2 - Variable", \
1) \
ELEM_(int, fsq_movavg, "FSQMOVAVG", \
"size of moving average filter for bin filtering\n" \
"value 2 to 8", \
4) \
ELEM_(double, fsq_img_filter, "FSQIMGFILTER", \
"0 - 300 Hz, 1 - 400 Hz, 2 - 500 Hz (default)", \
2) \
ELEM_(double, fsqbaud, "FSQBAUD", \
"6, 4.5, 3 or 2 baud", \
4.5) \
ELEM_(int, fsqhits, "FSQHITS", \
"3 / 6", \
3) \
ELEM_(bool, fsq_directed, "FSQDIRECTED", \
"FSQCALL directed mode", \
false) \
ELEM_(bool, fsq_show_monitor, "FSQSHOWMONITOR", \
"Show fsq monitor text panel", \
false) \
ELEM_(bool, fsq_fastavg, "FSQFASTAVG", \
"Symbol averaging: true = fast, false = slow", \
true) \
ELEM_(std::string, fsqQTCtext, "FSQQTCTEXT", \
"QTC text string", \
"cq cq cq de nocall") \
ELEM_(int, fsq_heard_aging, "FSQHEARDAGING", \
"0 - NEVER (default)\n" \
"1 - 1 minute, 2 - 5 minutes, 3 - 10 minutes\n" \
"4 - 20 minutes, 5 - 30 minutes", \
0) \
ELEM_(int, fsq_sounder, "FSQSOUNDER", \
"0 - OFF (default)\n" \
"1 - 1 minute, 2 - 10 minutes, 3 - 30 minutes", \
0) \
ELEM_(bool, fsq_lowercase, "FSQLOWERCASE", \
"0 - NO, 1 - YES\n" \
"convert operator MYCALL to lower case for directed call triggers", \
0) \
ELEM_(int, fsq_time_out, "FSQTIMEOUT", \
"Time out auto replies after XX seconds", \
6) \
ELEM_(int, fsq_notify_time_out, "FSQNOTIFYTIMEOUT", \
"FSQ notifier dialog time out XX seconds\n" \
"00 == no time out", \
10) \
ELEM_(bool, fsq_enable_heard_log, "FSQ_ENABLE_HEARD_LOG", \
"FSQ enable heard log file", \
1) \
ELEM_(std::string, fsq_heard_log, "FSQ_HEARD_LOG", \
"FSQ heard log pathname", \
"fsq_heard_log.txt") \
ELEM_(bool, fsq_enable_audit_log, "FSQ_ENABLE_AUDIT_LOG", \
"FSQ enable audit log file", \
1) \
ELEM_(std::string, fsq_audit_log, "FSQ_AUDIT_LOG", \
"FSQ audit log pathname", \
"fsq_audit_log.txt") \
ELEM_(Fl_Color, fsq_xmt_color, "FSQXMTCOLOR", \
"Color for FSQ xmt text", \
FL_RED) \
ELEM_(Fl_Color, fsq_directed_color, "FSQDIRECTEDCOLOR", \
"Color for FSQ directed text", \
FL_BLUE) \
ELEM_(Fl_Color, fsq_undirected_color, "FSQUNDIRECTEDCOLOR", \
"Color for FSQ undirected text", \
FL_DARK_GREEN) \
ELEM_(bool, add_fsq_msg_dt, "ADDFSQMSGDT", \
"Add date-time stamp to each # type received message", \
1) \
ELEM_(bool, always_append, "ALWAYS_APPEND", \
"Enable to always append # directive messages to named file", \
1) \
/* IFKP */ \
ELEM_(int, ifkp_baud, "IFKPBAUD", \
"1, 2, 3", \
1) \
ELEM_(bool, ifkp_enable_heard_log, "IFKP_ENABLE_HEARD_LOG", \
"IFKP enable heard log file", \
1) \
ELEM_(std::string, ifkp_heard_log, "IFKP_HEARD_LOG", \
"IFKP heard log pathname", \
"ifkp_heard_log.txt") \
ELEM_(bool, ifkp_enable_audit_log, "IFKP_ENABLE_AUDIT_LOG", \
"IFKP enable audit log file", \
1) \
ELEM_(std::string, ifkp_audit_log, "IFKP_AUDIT_LOG", \
"IFKP audit log pathname", \
"ifkp_audit_log.txt") \
ELEM_(bool, ifkp_lowercase, "IFKPLOWERCASE", \
"0 - NO, 1 - YES\n" \
"convert operator MYCALL to lower case for all IFKP macros", \
1) \
ELEM_(bool, ifkp_lowercase_call, "IFKPCALLLOWERCASE", \
"0 - NO, 1 - YES\n" \
"convert other CALLSIGN to lower case for all IFKP macros", \
1) \
ELEM_(bool, ifkp_freqlock, "IFKPFREQLOCK", \
"0 - NO, 1 - YES\n" \
"Always t/r at 1500 Hz", \
1) \
/* Waterfall & UI */ \
ELEM_(uchar, red, "", "", 0) \
ELEM_(uchar, green, "", "", 255) \
ELEM_(uchar, blue, "", "", 255) \
ELEM_(bool, MultiColorWF, "", "", false) \
ELEM_(int, wfPreFilter, "WFPREFILTER", \
"Waterfal FFT prefilter window function. Values are as follows:\n" \
" 0: Rectangular; 1: Blackman; 2: Hamming; 3: Hanning; 4: Triangular", \
1) /* Blackman */ \
ELEM_(bool, WFaveraging, "WFAVERAGING", \
"Use FFT averaging to decrease waterfall noise", \
true) \
ELEM_(int, wf_latency, "WF_LATENCY", \
"Waterfal latency, 1...16", \
8) \
ELEM_(bool, UseCursorLines, "USECURSORLINES", \
"Draw cursor with vertical lines", \
true) \
ELEM_(bool, UseCursorCenterLine, "USECURSORCENTERLINE", \
"Draw cursor center line", \
true) \
ELEM_(bool, UseBWTracks, "USEBWTRACKS", \
"Draw bandwidth marker with vertical lines", \
true) \
ELEM_(bool, UseWideTracks, "USEWIDETRACKS", \
"Draw bandwidth marker with 3x vertical lines", \
false) \
ELEM_(bool, UseWideCursor, "USEWIDECURSOR", \
"Draw cursor with 3x vertical lines", \
false) \
ELEM_(bool, UseWideCenter, "USEWIDECENTER", \
"Draw center line marker with 3x vertical lines", \
false) \
ELEM_(RGBI, cursorLineRGBI, "CLCOLORS", \
"Color of cursor lines (RGBI)", \
{255, 255, 0, 255}) \
ELEM_(RGBI, cursorCenterRGBI, "CCCOLORS", \
"Color of cursor center line (RGBI)", \
{255, 255, 255, 255}) \
ELEM_(RGBI, bwTrackRGBI, "BWTCOLORS", \
"Color of bandwidth marker (RGBI)", \
{255, 0, 0, 255}) \
ELEM_(RGBI, notchRGBI, "NOTCHCOLORS", \
"Color of notch marker (RGBI)", \
{255, 255, 255, 255}) \
ELEM_(RGBI, rttymarkRGBI, "RTTYMARKRGBI", \
"Color of RTTY MARK freq marker (RGBI)", \
{255, 120, 0, 255}) \
ELEM_(int, feldfontnbr, "FELDFONTNBR", \
"Index of raster font used for transmission", \
4) \
ELEM_(bool, viewXmtSignal, "VIEWXMTSIGNAL", \
"Show transmit signal on waterfall", \
true) \
ELEM_(bool, sendid, "SENDID", \
"Send video ID containing modem name", \
false) \
ELEM_(bool, macroid, "MACROID", \
"This setting is currently unused", \
false) \
ELEM_(bool, sendtextid, "SENDTEXTID", \
"Send video ID containing arbitrary text", \
false) \
ELEM_(std::string, strTextid, "STRTEXTID", \
"Video ID text for SENDTEXTID (keep short!)", \
"CQ") \
ELEM_(double, pretone, "PRETONE", \
"Single tone at center of modem BW, carrier detect for amplifiers", \
0.0) \
ELEM_(bool, macroCWid, "", "", false) \
ELEM_(std::string, DTMFstr, "", "", "") \
ELEM_(bool, DTMFdecode, "DTMFDECODE", \
"Decode received DTMF tones", \
false) \
ELEM_(int, videowidth, "VIDEOWIDTH", \
"Video ID text width (characters per row)", \
1) \
ELEM_(bool, vidlimit, "VIDLIMIT", \
"Limit video width to 500 Hz", \
true) \
ELEM_(bool, vidmodelimit, "VIDMODELIMIT", \
"Limit video width to mode bandwidth", \
true) \
ELEM_(bool, ID_SMALL, "IDSMALL", \
"Use small video ID font", \
true) \
ELEM_(mode_set_t, videoid_modes, "VIDEOIDMODESEXCLUDE", \
"Mode names for which Video ID transmission is disabled", \
mode_set_t()) \
ELEM_(bool, macrotextid, "", "", false) \
ELEM_(bool, docked_rig_control, "DOCKEDRIGCONTROL", \
"Docked rig control", \
true) \
ELEM_(int, wfheight, "WFHEIGHT", \
"Waterfall height (pixels)", \
125) \
ELEM_(bool, tooltips, "TOOLTIPS", \
"Show tooltips", \
true) \
ELEM_(bool, NagMe, "NAGME", \
"Prompt to save log", \
true) \
ELEM_(bool, ClearOnSave, "CLEARONSAVE", \
"Clear log fields on save", \
false) \
ELEM_(bool, sort_date_time_off, "SORTDATEOFF", \
"Sort log by date/time off", \
true) \
ELEM_(bool, force_date_time, "FORCEDATETIME", \
"Force date/time ON == OFF", \
false) \
ELEM_(bool, menuicons, "MENUICONS", \
"Show menu icons", \
true) \
ELEM_(mode_set_t, visible_modes, "VISIBLEMODES", \
"Modes that are not shown in the opmodes menu", \
mode_set_t()) \
ELEM_(bool, rxtext_clicks_qso_data, "RXTEXTCLICKS", \
"Double-click on RX text enters QSO data", \
true) \
ELEM_(bool, rxtext_tooltips, "RXTEXTTOOLTIPS", \
"Show callsign tooltips in received text", \
true) \
ELEM_(bool, autofill_qso_fields, "AUTOFILLQSO", \
"Auto-fill Country and Azimuth QSO fields", \
false) \
ELEM_(bool, calluppercase, "CALLUPPERCASE", \
"Convert callsign field to upper case", \
true) \
ELEM_(bool, RSTdefault, "RSTDEFAULT", \
"Default outgoing RST to 599/59", \
true) \
ELEM_(bool, RSTin_default, "RSTINDEFAULT", \
"Default incoming RST to 599/59", \
true) \
ELEM_(bool, autoextract, "AUTOEXTRACT", \
"Enable detection and extraction of \"wrapped\" text", \
true) \
ELEM_(bool, open_flmsg, "OPEN_FLMSG", \
"Open flmsg with the autoextract file", \
true) \
ELEM_(bool, flmsg_transfer_direct, "FLMSG_TRANSFER_DIRECT", \
"Transfer incoming flmsg autosend file to open flmsg application", \
true) \
ELEM_(bool, open_flmsg_print, "OPEN_FLMSG_PRINT", \
"Open flmsg with the autoextract file\nprint to browser\nclose flmsg", \
true) \
ELEM_(bool, open_nbems_folder, "OPEN_NBEMS_FOLDER", \
"Open NBEMS folder upon receipt of an autoextract file", \
false) \
ELEM_(std::string, flmsg_pathname, "FLMSG_PATHNAME", \
"Full pathname to the flmsg executable", \
"") \
ELEM_(std::string, BWSR_REGEX_MATCH, "BWSR_REGEX_MATCH", \
"audio alert audio clip name / file", \
"dinner_bell") \
ELEM_(int, REGEX_ALERT_MENU, "REGEX_ALERT_MENU", \
"menu selector", \
8) \
ELEM_(bool, ENABLE_BWSR_REGEX_MATCH, "ENABLE_BWSR_REGEX_MATCH", \
"enable audio alert when regex match is detected in browser", \
false) \
ELEM_(std::string, BWSR_MYCALL_MATCH, "BWSR_MYCALL_MATCH", \
"audio alert audio clip name / file", \
"dinner_bell") \
ELEM_(int, MYCALL_ALERT_MENU, "MYCALL_ALERT_MENU", \
"menu selector", \
8) \
ELEM_(bool, ENABLE_BWSR_MYCALL_MATCH, "ENABLE_BWSR_MYCALL_MATCH", \
"enable audio alert when MYCALL is detected in browser", \
false) \
ELEM_(double, extract_timeout, "EXTRACT_TIMEOUT", \
"Abort message extraction after nn.n seconds of inactivity", \
2.0) \
ELEM_(std::string, RX_EXTRACT_MSG_RCVD, "RX_EXTRACT_MSG_RCVD", \
"audio alert audio clip name / file", \
"phone") \
ELEM_(int, RX_EXTRACT_ALERT_MENU, "RX_EXTRACT_ALERT_MENU", \
"menu selector", \
7) \
ELEM_(bool, ENABLE_RX_EXTRACT_MSG_RCVD, "ENABLE_RX_EXTRACT_MSG_RCVD", \
"enable audio alert when flmsg received", \
false) \
ELEM_(std::string, RX_EXTRACT_TIMED_OUT, "RX_EXTRACT_TIMED_OUT", \
"audio alert audio clip name / file", \
"beeboo") \
ELEM_(int, TIMED_OUT_ALERT_MENU, "TIMED_OUT_ALERT_MENU", \
"menu selector", \
6) \
ELEM_(bool, ENABLE_RX_EXTRACT_TIMED_OUT, "ENABLE_RX_EXTRACT_TIMED_OUT", \
"enable audio alert when flmsg reception times out", \
false) \
ELEM_(std::string, RSID_MATCH, "RSID_MATCH", \
"audio alert audio clip name / file", \
"phone") \
ELEM_(int, RSID_ALERT_MENU, "RSID_ALERT_MENU", \
"menu selector", \
7) \
ELEM_(bool, ENABLE_RSID_MATCH, "ENABLE_RSID_MATCH", \
"enable audio alert when RsID is detected", \
false) \
ELEM_(std::string, BELL_RING, "BELL_RING", \
"RTTY bell ring audio clip name / file", \
"rtty_bell") \
ELEM_(int, BELL_RING_MENU, "BELL_RING_MENU", \
"menu selector", \
9) \
ELEM_(int, alert_volume, "alert_volume", \
"Audio alert stream volume", \
50) \
ELEM_(int, mon_xcvr_audio, "mon_xcvr_audio", \
"monitor transceiver audio on alert audio device", \
0) \
ELEM_(int, mon_dsp_audio, "mon_dsp_audio", \
"monitor dsp filter output for selected modem @ waterfall frequency", \
0) \
ELEM_(int, RxFilt_vol, "RxFilt_vol", \
"Audio stream volume", \
50) \
ELEM_(int, RxFilt_bw, "RxFilt_bw", \
"DSP audio stream filter bandwidth", \
500) \
ELEM_(int, RxFilt_mid, "RxFilt_mid", \
"DSP audio stream filter mid frequency", \
1500) \
ELEM_(int, RxFilt_low, "RxFilt_low", \
"DSP audio stream filter low frequency cutoff", \
1250) \
ELEM_(int, RxFilt_high, "RxFilt_high", \
"DSP audio stream filter high frequency cutoff", \
1750) \
ELEM_(int, RxFilt_track_wf, "RxFilt_track_wf", \
"Rx filter tracks waterfall cursor movement", \
0) \
ELEM_(std::string, cty_dat_pathname, "CTYDAT_PATHNAME", \
"Full pathname to the cty.dat data file", \
"") \
ELEM_(bool, speak, "SPEAK", \
"Capture text to file 'talk/textout.txt'", \
false) \
ELEM_(bool, auto_talk, "AUTO_TALK", \
"Connect to Digitalk socket server during program initialization", \
false) \
/* QRZ */ \
ELEM_(int, QRZXML, "QRZXMLTYPE", \
"Callsign xml query type. Values are as follows:\n" \
" 0: none; 1: QRZ (paid sub.); 2: QRZ cdrom; 3: HamCall (paid sub.);\n" \
" 4: callook free US calls xml service; 5: hamQTH free xml service.\n" \
" The default is none.", \
QRZXMLNONE) \
ELEM_(std::string, hamcallurl, "HAMCALLURL", \
"web address of hamcall", \
"https://www.hamcall.net/") \
ELEM_(std::string, hamqthurl, "HAMQTHURL", \
"web address of hamqth", \
"https://www.hamqth.com/") \
ELEM_(std::string, qrzurl, "QRZURL", \
"web address of QRZ.com", \
"http://www.qrz.com/") \
ELEM_(std::string, callookurl, "CALLOOKURL", \
"web address of callook", \
"https://callook.info/") \
ELEM_(int, QRZWEB, "QRZWEBTYPE", \
"Callsign browser query type. Values are as follows:\n" \
" 0: none; 1: QRZ web browser; 2: HamCall web browser\n" \
" 3: hamQTH web browser.\n The default is none.", \
QRZWEBNONE) \
ELEM_(std::string, QRZpathname, "QRZPATHNAME", \
"QRZ cdrom path", \
"") \
ELEM_(std::string, QRZusername, "QRZUSER", \
"QRZ or HamCall subscriber username", \
"") \
ELEM_(std::string, QRZuserpassword, "QRZPASSWORD", \
"QRZ or HamCall subscriber password", \
"") \
ELEM_(bool, notes_address, "NOTES_ADDRESS", \
"Populate logbook notes (comment) field with mailing address", \
false) \
ELEM_(bool, clear_notes, "CLEAR_NOTES", \
"Clear notes control when making a new QRZ query", \
true) \
ELEM_(bool, QRZchanged, "", "", false) \
/* eQSL */ \
ELEM_(std::string, eqsl_www_url, "EQSL_url", \
"eQSL web site", \
"http://www.eqsl.cc/qslcard/importADIF.cfm?ADIFdata=") \
ELEM_(std::string, eqsl_id, "EQSL_ID", \
"eQSL login id", \
"") \
ELEM_(std::string, eqsl_pwd, "EQSL_PASSWORD", \
"eQSL login password", \
"") \
ELEM_(std::string, eqsl_nick, "EQSL_NICKNAME", \
"eQSL nickname", \
"") \
ELEM_(std::string, eqsl_default_message, "EQSL_DEF_MSG", \
"eQSl default message", \
"") \
ELEM_(bool, eqsl_when_logged, "EQSL_WHEN_LOGGED", \
"Send eQSL when other log action invoked", \
false) \
ELEM_(bool, eqsl_datetime_off, "EQSL_DATETIME_OFF", \
"Send logbook date/time off vice date on (default)", \
false) \
ELEM_(bool, eqsl_show_delivery, "EQSL_SHOW_DELIVERY", \
"Show timed delivery message for successful eQSL upload", \
true) \
/* tqsl automatic log submission */ \
ELEM_(bool, submit_lotw, "SUBMIT_LOTW", \
"Send adif record to LoTW", \
false) \
ELEM_(bool, lotw_quiet_mode, "LOTW_QUIET_MODE", \
"Add -q to tqsl command line parameters", \
true) \
ELEM_(std::string, lotw_pathname, "LOTW_PATHNAME", \
"Path-name of tqsl executable", \
"") \
ELEM_(std::string, lotw_pwd, "LOTW_PASSWORD", \
"Password to access tqsl executable", \
"") \
ELEM_(bool, submit_lotw_password, "SUBMIT_LOTW_PASSWORD", \
"Send -p <password> with each upload ", \
true) \
ELEM_(bool, lotw_show_delivery, "LOTW_SHOW_DELIVERY", \
"Show timed delivery message for successful LoTW upload", \
true) \
ELEM_(std::string, lotw_location, "LOTW_LOCATION", \
"Tqsl station location for uploading records", \
"") \
ELEM_(int, tracefile_timeout, "tracefile_timeout", \
"Tqsl trace file timeout in seconds", \
15) \
/* MacLogger interface */ \
ELEM_(bool, connect_to_maclogger, "CONNECT_TO_MACLOGGER", \
"Connect to MacLogger UDP server on 255.255.255.255 / 9932", \
false) \
ELEM_(bool, capture_maclogger_radio, "CAPTURE_MACLOGGER_RADIO", \
"Capture and use UDP Radio Report data", \
true) \
ELEM_(bool, capture_maclogger_spot_tune, "CAPTURE_MACLOGGER_SPOT_TUNE", \
"Capture and use UDP Spot Tune data", \
false) \
ELEM_(bool, capture_maclogger_spot_report, "CAPTURE_MACLOGGER_SPOT_REPORT", \
"Capture and use UDP Spot Report data", \
false) \
ELEM_(bool, capture_maclogger_log, "CAPTURE_MACLOGGER_LOG", \
"Capture and use UDP Log Report data", \
false) \
ELEM_(bool, capture_maclogger_lookup, "CAPTURE_MACLOGGER_LOOKUP", \
"Capture and use UDP Lookup Report data", \
false) \
ELEM_(bool, enable_maclogger_log, "ENABLE_MACLOGGER_LOG", \
"Enable UDP string capture to file", \
false) \
ELEM_(bool, maclogger_spot_rx, "MACLOGGER_SPOT_RX", \
"true - tune to spot Rx frequency\n" \
"false - tune to spot Tx frequency\n", \
true) \
ELEM_(std::string, maclogger_log_filename, "MACLOGGER_LOG_FILENAME", \
"Filename for maclogger UDP datastream file", \
"maclogger_udp_strings.txt") \
/* N3FJP tcpip interface */ \
ELEM_(std::string, N3FJP_address, "N3FJP_ADDRESS", \
"IP Address of N3FJP socket", \
"127.0.0.1") \
ELEM_(std::string, N3FJP_port, "N3FJP_PORT", \
"IP port number of N3FJP socket", \
"1100") \
ELEM_(bool, enable_N3FJP_log, "ENABLE_N3FJP_LOG", \
"Enable data stream logging.", \
true) \
ELEM_(bool, connect_to_n3fjp, "CONNECT_TO_N3FJP", \
"Connect to the N3FJP log server", \
false) \
ELEM_(bool, N3FJP_sweet_spot, "N3FJP_SWEET_SPOT", \
"Use N3FJP spot report as signal center freq.\n" \
"Center the target at mode sweet spot", \
false) \
ELEM_(bool, N3FJP_modem_carrier, "N3FJP_MODEM_CARRIER", \
"Use actual modem carrier frequency for logging", \
true) \
ELEM_(bool, enable_N3FJP_RIGTX, "N3FJP_RIGTX", \
"Use RIGTX/RX vice CWCOMPORTKEYDOWN/CWCOMPORTKEYUP", \
false) \
/* Rig control */ \
ELEM_(bool, flrig_keys_modem, "FLRIG_KEYS_MODEM", \
"PTT change at flrig changes Rx/Tx state\n" \
"set to false if multple instance of fldigi used with single flrig", \
false) \
ELEM_(bool, fldigi_client_to_flrig, "CLIENT_TO_FLRIG", \
"True if flrig xmlrpc server is used for xcvr control", \
false) \
ELEM_(bool, flrig_auto_shutdown, "FLRIG_AUTO_SHUTDOWN", \
"True to shutdown flrig when closing fldigi", \
false) \
ELEM_(bool, btnusb, "BTNUSB", \
"This setting is currently unused", \
true) \
ELEM_(bool, RTSptt, "RTSPTT", \
"RTS is PTT signal line", \
false) \
ELEM_(bool, DTRptt, "DTRPTT", \
"DTR is PTT signal line", \
false) \
ELEM_(bool, RTSplus, "RTSPLUS", \
"Initial voltage on RTS is +V", \
false) \
ELEM_(bool, DTRplus, "DTRPLUS", \
"Initial voltage on DTR is +V", \
false) \
ELEM_(bool, SCU_17, "SCU_17", \
"Serial port is SCU-17 (requires 0 stop bits", \
false) \
ELEM_(bool, PTTrightchannel, "PTTRIGHTCHANNEL", \
"Generate PTT signal on right audio channel", \
false) \
ELEM_(int, chkUSEHAMLIBis, "CHKUSEHAMLIBIS", \
"Use Hamlib rig control", \
0) \
ELEM_(int, chkUSERIGCATis, "CHKUSERIGCATIS", \
"Use RigCAT rig control", \
0) \
ELEM_(int, chkUSEXMLRPCis, "CHKUSEXMLRPCIS", \
"Use XML-RPC rig control", \
0) \
ELEM_(std::string, PTTdev, "PTTDEV", \
"PTT device", \
DEFAULT_PTTDEV) \
ELEM_(std::string, CWFSKport, "", "", DEFAULT_CWFSKPORT) \
ELEM_(std::string, HamRigDevice, "HAMRIGDEVICE", \
"Hamlib rig device", \
DEFAULT_HAMRIGDEVICE) \
ELEM_(std::string, HamRigName, "HAMRIGNAME", \
"Hamlib rig name", \
"") \
ELEM_(int, HamRigModel, "HAMRIGMODEL", \
"Hamlib rig model", \
0) \
ELEM_(std::string, HamConfig, "HAMCONFIG", \
"Hamlib configuration (param=val, ...)", \
"") \
ELEM_(int, HamRigBaudrate, "HAMRIGBAUDRATE", \
"Hamlib rig baud rate. Values are as follows:\n" \
" 0: 300; 1: 600; 2: 1200; 3: 2400; 4: 4800; 5: 9600; 6: 19200;\n" \
" 7: 38400; 8: 57600; 9: 115200; 10: 230400; 11: 460800.", \
1) /* 600 baud */ \
ELEM_(int, HamRigStopbits, "HAMRIGSTOPBITS", \
"Hamlib stopbits <1/2>.", \
2) /* 600 baud */ \
ELEM_(int, HamRigPollrate, "HAMRIGPOLLRATE", \
"250 - 2000 in 50 msec increments", \
250) \
ELEM_(int, hamlib_ptt_on_data, "HAMLIBPTTONDATA", \
"Hamlib PTT for xmt audio on data port", \
1) \
ELEM_(bool, hamlib_cw_islsb, "HAMLIB_CW_ISLSB", \
"Hamlib xcvr uses LSB for CW", \
false) \
ELEM_(bool, hamlib_rtty_isusb, "HAMLIB_RTTY_ISUSB", \
"Hamlib xcvr uses USB for RTTY", \
false) \
ELEM_(int, hamlib_mode_delay, "HAMRIG_MODE_DELAY", \
"wait NN msec after sending mode change\n" \
"before next transceiver CAT query\n" \
"0 - 2000 in 100 msec increments", \
200) \
ELEM_(std::string, XmlRigFilename, "XMLRIGFILENAME", \
"RigCAT XML file name", \
"") \
ELEM_(std::string, XmlRigDevice, "XMLRIGDEVICE", \
"RigCAT device", \
DEFAULT_HAMRIGDEVICE) \
ELEM_(int, XmlRigBaudrate, "XMLRIGBAUDRATE", \
"RigCAT rig baud rate. See HAMRIGBAUDRATE.", \
1) /* 600 baud */ \
ELEM_(int, RigCatStopbits, "RIGCATSTOPBITS", \
"RigCAT stopbits. <1/2>", \
2) /* 600 baud */ \
ELEM_(bool, TTYptt, "TTYPTT", \
"Use separate device for PTT", \
false) \
ELEM_(bool, HamlibCMDptt, "HAMLIBCMDPTT", \
"PTT via Hamlib command", \
false) \
ELEM_(bool, RigCatCMDptt, "RIGCATCMDPTT", \
"PTT via RigCAT command", \
false) \
ELEM_(bool, UseUHrouterPTT, "USEUHROUTERPTT", \
"Use uHRouter PTT (OS X only)", \
false) \
ELEM_(bool, UsePPortPTT, "USEPPORTPTT", \
"Use parallel port PTT", \
false) \
/* GPIO parameters */ \
ELEM_(bool, gpio_ptt, "USE_GPIO_PTT", \
"use GPIO for ptt (pi3/4)", \
false) \
ELEM_(long, enable_gpio, "ENABLE_GPIO", \
"GPIO enable\n" \
"bits 0 - 16; bit 0 : gpio pin N", \
0) \
ELEM_(long, gpio_on, "GPIO_STATE", \
"GPIO State\n" \
"bits 0 - 16; bit 0 : PTT ON state on pin N", \
0) \
ELEM_(int, gpio_pulse_width, "GPIO_PULSE_WIDTH", \
"GPIO pulse width setting for PiHpSDR PTT", \
0) \
/* cmedia parameters */ \
ELEM_(std::string, cmedia_device, "CMEDIA_DEVICE", \
"DRA-xx device name", \
"NONE") /* NONE */ \
ELEM_(bool, cmedia_ptt, "CMEDIA-PTT", \
"Use cmedia PTT", \
false) \
ELEM_(std::string, cmedia_gpio_line, "CMEDIA_GPIO_LINE", \
"cmedia GPIO pin assignment for PTT", \
"GPIO-3") /* pin 13 on cmedia, default for DRA-30 */ \
/* RigCAT parameters */ \
ELEM_(bool, RigCatRTSplus, "RIGCATRTSPLUS", \
"Initial state of RTS", \
false) \
ELEM_(bool, RigCatDTRplus, "RIGCATDTRPLUS", \
"Initial state of DTR", \
false) \
ELEM_(bool, RigCatRTSptt, "RIGCATRTSPTT", \
"Toggle RTS for PTT", \
false) \
ELEM_(bool, RigCatDTRptt, "RIGCATDTRPTT", \
"Toggle DTR for PTT", \
false) \
ELEM_(bool, RigCatRTSCTSflow, "RIGCATRTSCTSFLOW", \
"RTS/CTS flow control", \
false) \
ELEM_(int, RigCatRetries, "RIGCATRETRIES", \
"Number of retries before giving up", \
2) \
ELEM_(int, RigCatTimeout, "RIGCATTIMEOUT", \
"Retry interval (milliseconds)", \
10) \
ELEM_(int, RigCatWait, "RIGCATWAIT", \
"Write delay (milliseconds)", \
50) \
ELEM_(int, RigCatInitDelay, "RIGCATINITDELAY", \
"Wait delay (milliseconds) on first command to serial device", \
200) \
ELEM_(bool, RigCatECHO, "RIGCATECHO", \
"Commands are echoed", \
false) \
ELEM_(bool, RigCatVSP, "RIGCATVSP", \
"VSP support enabled", \
false) \
ELEM_(bool, RigCatRestoreTIO, "RIGCATRESTORETIO", \
"Restore original state of comm port when closing", \
false) \
/* Hamlib parameters */ \
ELEM_(bool, HamlibRTSplus, "HAMLIBRTSPLUS", \
"RTS +12", \
false) \
ELEM_(bool, HamlibDTRplus, "HAMLIBDTRPLUS", \
"DTR +12", \
false) \
ELEM_(bool, HamlibRTSCTSflow, "HAMLIBRTSCTSFLOW", \
"RTS/CTS flow control", \
false) \
ELEM_(bool, HamlibXONXOFFflow, "HAMLIBXONXOFFFLOW", \
"XON/XOFF flow control", \
false) \
ELEM_(int, HamlibRetries, "HAMLIBRETRIES", \
"Number of times to resend command before giving up", \
2) \
ELEM_(int, HamlibTimeout, "HAMLIBTIMEOUT", \
"Retry interval (milliseconds)", \
200) \
ELEM_(int, HamlibWait, "HAMLIBWAIT", \
"Wait interval before reading response (milliseconds)", \
5) \
ELEM_(int, HamlibWriteDelay, "HAMLIBWRITEDELAY", \
"Write delay (milliseconds)", \
0) \
ELEM_(int, HamlibSideband, "HAMLIBSIDEBAND", \
"Force the rig sideband (for the purpose of calculating frequencies).\n" \
"Values are as follows: 0: as reported by rig; 1: LSB; 2: USB.", \
0) /* SIDEBAND_RIG */ \
/* nanoIO interface parameters */ \
ELEM_(std::string, nanoIO_serial_port_name, "NANOSERIALPORTNAME", \
"nanoIO serial device", \
"NONE") \
ELEM_(int, nanoIO_baud, "NANOIOBAUD", \
"0 - 45.45, 1 - 50, 2 - 75, 3 - 100 baud", \
0) \
ELEM_(int, nanoIO_polarity, "NANOIOPOLARITY", \
"MARK polarity 0 - high, 1 - low", \
1) \
ELEM_(int, nanoIO_serbaud, "NANOIO_SERBAUD", \
"0/1200, 1/4800, 2/9600, 3/19200, 4/38400, 5/57600, 6/115200", \
6) \
ELEM_(int, nanoIO_CW_incr, "NANOIOCWINCR", \
"^ ' increment/decrement value\n" \
"range '1' to '5'", \
'2') \
ELEM_(int, CW_keyspeed, "NANOCWKEYSPEED", \
"Paddle keyer WPM (0...100)", \
18) \
ELEM_(int, nanoIO_CW_keyer, "NANOIOCWKEYER", \
"0 - IambicA, 1 - IambicB, 2 - Straight", \
0) \
ELEM_(bool, disable_CW_PTT, "disable_CW_PTT", \
"Disable CAT PTT signal during CW ops with expernal h/w", \
0) \
ELEM_(int, nanoIO_speed_pot, "nanoIO_speed_pot", \
"Enable speed pot in nanoIO circuit / script", \
1) \
ELEM_(int, nanoCW_test_wpm, "nanoCW_test_wpm", \
"test wpm setting", \
24) \
ELEM_(int, usec_correc, "usec_corr", \
"Correct CW unit timing by this amount in usec", \
0) \
/* TTY h/w interface */ \
ELEM_(int, xcvr_FSK_sideband, "XCVRFSKSIDEBAND", \
"0 = LSB | 1 = USB", \
0) \
ELEM_(int, xcvr_FSK_MARK, "XCVRFSKMARK", \
"typical values: 1275, 1615 or 2125 for 170 Hz shift, IC7200", \
2125) \
ELEM_(int, TTY_LTRS, "TTYLTRS", \
"0 to 10, number of LTRS bytes send at beginning of xmt", \
2) \
/* Navigator interface */ \
ELEM_(std::string, Nav_FSK_port, "NAVFSKPORT", \
"Nav FSK serial device", \
"NONE") \
ELEM_(std::string, Nav_config_port, "NAVCONFIGPORT", \
"Nav config serial device", \
"NONE") \
ELEM_(int, Nav_FSK_baud, "NAVFSKBAUD", \
"0 - 45.45, 1 - 75, 2 - 100 baud", \
0) \
ELEM_(int, Nav_FSK_sidetone, "NAVFSKSIDETONE", \
"0 = Off | 1 = On", \
0) \
ELEM_(int, Nav_FSK_ptt, "NAVFSKPTT", \
"0 = Off | 1 = On", \
0) \
ELEM_(int, Nav_FSK_polarity, "NAVFSKPOLARITY", \
"0 = Normal | 1 = Reversed", \
0) \
ELEM_(int, Nav_FSK_stopbits, "NAVFSKSTOPBITS", \
"0 = 1 | 1 = 1.5 | 2 = 2", \
1) \
ELEM_(int, Nav_channel_2_att, "NAVCH2ATT", \
"0 = 15 db, 1 = None", \
1) \
ELEM_(int, Nav_channel_1_att, "NAVCH1ATT", \
"0 = 15 db, 1 = None", \
1) \
ELEM_(int, Nav_rf_att, "NAVRFATT", \
"0 = 20 db, 1 = None", \
1) \
ELEM_(int, Nav_led, "NAVLED", \
"0 = Off | 1 = On", \
0) \
ELEM_(int, Nav_cat_led, "NAVCATLED", \
"0 = Off | 1 = On", \
0) \
ELEM_(int, Nav_wk_ptt, "NAVWKPTT", \
"0 = Off | 1 = On", \
0) \
/* Operator */ \
ELEM_(std::string, myCall, "MYCALL", \
"Station callsign", \
"") \
ELEM_(std::string, myQth, "MYQTH", \
"Operator QTH", \
"") \
ELEM_(std::string, myName, "MYNAME", \
"Operator name", \
"") \
ELEM_(std::string, myLocator, "MYLOC", \
"Operator Maidenhead locator", \
"") \
ELEM_(std::string, myAntenna, "MYANTENNA", \
"Antenna description (keep short!)", \
"") \
/* Sound card */ \
ELEM_(std::string, operCall, "OPERCALL", \
"Operator call sign, if distinct from the station call MYCALL", \
"") \
ELEM_(int, btnAudioIOis, "AUDIOIO", \
"Audio subsystem. Values are as follows:\n" \
" 0: OSS; 1: PortAudio; 2: PulseAudio; 3: File I/O", \
SND_IDX_NULL) \
ELEM_(std::string, OSSdevice, "OSSDEVICE", \
"OSS device name", \
"") \
ELEM_(std::string, PAdevice, "PADEVICE", \
"For compatibility with older versions", \
"") \
ELEM_(std::string, PortInDevice, "PORTINDEVICE", \
"PortAudio input device name", \
"") \
ELEM_(int, PortInIndex, "PORTININDEX", \
"PortAudio input device index", \
-1) \
ELEM_(std::string, PortOutDevice, "PORTOUTDEVICE", \
"PortAudio output device name", \
"") \
ELEM_(int, PortOutIndex, "PORTOUTINDEX", \
"PortAudio input device index", \
-1) \
ELEM_(std::string, AlertDevice, "ALERTDEVICE", \
"PortAudio alert device name", \
"") \
ELEM_(int, AlertIndex, "ALERTINDEX", \
"Alert output device index", \
-1) \
ELEM_(bool, enable_audio_alerts, "ENABLE_AUDIO_ALERTS", \
"1 - enable audio stream, 0 - disable audio stream", \
false) \
ELEM_(int, PortFramesPerBuffer, "", "", 0) \
ELEM_(std::string, PulseServer, "PULSESERVER", \
"PulseAudio server string", \
"") \
ELEM_(bool, is_full_duplex, "IS_FULL_DUPLEX", \
"Audio codec supports full duplex operation", \
true) \
ELEM_(bool, sig_on_right_channel, "SIGONRIGHTCHANNEL", \
"Duplicate modem signal on left & right", \
true) \
ELEM_(bool, ReverseAudio, "REVERSEAUDIO", \
"Reverse left-right rx audio channels", \
false) \
ELEM_(bool, ReverseRxAudio, "REVERSERXAUDIO", \
"Reverse left-right rx audio channels", \
false) \
ELEM_(int, sample_rate, "SAMPLERATE", \
"For compatibility with older versions", \
SAMPLE_RATE_UNSET) \
ELEM_(int, in_sample_rate, "INSAMPLERATE", \
"Input sample rate", \
SAMPLE_RATE_UNSET) \
ELEM_(int, out_sample_rate, "OUTSAMPLERATE", \
"Output sample rate", \
SAMPLE_RATE_UNSET) \
ELEM_(int, sample_converter, "SAMPLECONVERTER", \
"Sample rate conversion type. Values are as follows:\n" \
" 0: Best SINC; 1: Medium SINC; 2: Fastest SINC; 3: ZOH; 4: Linear.\n" \
"The default is 2.", \
SRC_SINC_FASTEST) \
ELEM_(int, RX_corr, "RXCORR", \
"Input (RX) sample rate correction (PPM)", \
0) \
ELEM_(int, TX_corr, "TXCORR", \
"Output (TX) sample rate correction (PPM)", \
0) \
ELEM_(int, TxOffset, "TXOFFSET", \
"Difference between RX and TX freq (rig offset)", \
0) \
ELEM_(double, RIT, "RIT", \
"Linear frequency correction applied to frequency analysis", \
0) \
ELEM_(int, wavSampleRate, "WAV_SAMPLERATE", \
"Wave file record sample rate\n" \
"0 - 8000, 1 - 11025, 2 - 16000, 3 - 22050\n" \
"4 - 24000, 5 - 44100, 6 - 48000", \
0) \
ELEM_(bool, record_both_channels, "RECORD_BOTH_CHANNELS", \
"Enabled - record wav file in stereo\n" \
"Disabled - record wav file in monaural (left channel only)", \
false) \
ELEM_(bool, loop_playback, "LOOPPLAYBACK", \
"true = continuous loop of sound file playback\n" \
"false = single pass through playback file.", \
false) \
ELEM_(int, PTT_on_delay, "PTTONDELAY", \
"Start of transmit delay before sending audio", \
0) \
ELEM_(int, PTT_off_delay, "PTTOFFDELAY", \
"End of transmit delay before disabling PTT", \
0) \
ELEM_(double, rx_gain, "RX_GAIN", \
"gain factor to compensate for low level output on USB A/D in dB\n" \
"minimum -10.0, maximum + 10.0", \
0.0) \
/* Contest controls and Logbook */ \
ELEM_(std::string, logbookfilename, "LOGBOOKFILENAME", \
"Logbook file name", \
"") \
ELEM_(bool, DisplayLogbookRead, "LOGBOOKREADDISPLAY", \
"Display read # recs and logbook name on program start", \
0) \
ELEM_(bool, fixed599, "FIXED599", \
"Force RST in/out to 599", \
true) \
ELEM_(bool, UseLeadingZeros, "USELEADINGZEROS", \
"Insert leading zeros into transmitted serial number (contest)", \
true) \
ELEM_(bool, cutnbrs, "CUTNBRS", \
"Send CW cut numbers", \
false) \
ELEM_(bool, clear_fields, "CLEARFIELDS", \
"clear logging fields upon transfer of CALL from Rx panel", \
true) \
ELEM_(RGB, bwsrSliderColor, "BWSRSLIDERCOLOR", \
"Background color of signal browser detect level", \
{185, 211, 238}) \
ELEM_(RGB, bwsrSldrSelColor,"BWSRSLDRSELCOLOR", \
"Button highlight color, signal browser detect level", \
{54, 100, 139}) \
ELEM_(int, bwsrHiLight1, "BWSRHILIGHT1", \
"View Browser highlight color 1, default Dark Red", \
FL_RED) \
ELEM_(int, bwsrHiLight2, "BWSRHILIGHT2", \
"View Browser highlight color 2, default Dark Green", \
FL_GREEN) \
ELEM_(int, bwsrBackgnd1, "BWSRBACKGND1", \
"View Browser background odd lines", \
55) \
ELEM_(int, bwsrBackgnd2, "BWSRBACKGND2", \
"View Browser background odd lines", \
53) \
ELEM_(int, bwsrSelect, "BWSRSELECT", \
"View Browser line select color", \
FL_BLUE) \
ELEM_(RGB, dup_color, "dupcolor", \
"Callsign background color when duplicate detected", \
{255, 110, 180}) \
ELEM_(RGB, possible_dup_color, "duppossiblecolor", \
"Callsign background color when possible duplicate detected", \
{255, 255, 150}) \
ELEM_(bool, EnableDupCheck, "ENABLEDUPCHECK", \
"Check for duplicates (contest)", \
true) \
ELEM_(bool, dupmode, "DUPMODE", \
"Predicate for ENABLEDUPCHECK (mode must match)", \
true) \
ELEM_(bool, dupband, "DUPBAND", \
"Predicate for ENABLEDUPCHECK (band must match)", \
true) \
ELEM_(bool, dupstate, "DUPSTATE", \
"Predicate for ENABLEDUPCHECK (state must match)", \
false) \
ELEM_(bool, dupxchg1, "DUPXCHG1", \
"Predicate for ENABLEDUPCHECK (exchange must match)", \
false) \
ELEM_(bool, duptimespan, "DUPTIMESPAN", \
"Predicate for ENABLEDUPCHECK (QSO inside timespan)", \
false) \
ELEM_(int, timespan, "TIMESPAN", \
"Time for DUPTIMESPAN (minutes)", \
120) \
ELEM_(int, ContestStart, "CONTESTSTART", \
"Contest starting number", \
1) \
ELEM_(int, ContestDigits, "CONTESTDIGITS", \
"Number of digits in serial number", \
4) \
ELEM_(std::string, nonwordchars, "NONWORDCHARS", \
"Additional characters used to delimit WORDS", \
"*,-.;") \
ELEM_(std::string, myXchg, "MYXCGH", \
"Free form exchange", \
"") \
ELEM_(std::string, mytxpower, "TXPOWER", \
"TX power used for logbook entries", \
"") \
ELEM_(std::string, my_FD_call, "FD_CALL", \
"Field Day call sign", \
"") \
ELEM_(std::string, fd_op_call, "FD_OP_CALL", \
"Field Day (w1hkj) server position operator call", \
"") \
ELEM_(std::string, my_FD_class, "FDCLASS", \
"Field Day class", \
"") \
ELEM_(std::string, my_FD_section, "FDSECTION", \
"Field Day section", \
"") \
ELEM_(std::string, my_FD_mult, "FDMULT", \
"Field Day multiplier", \
"5") \
ELEM_(std::string, my_SCR_class, "MY_SCR_CLASS", \
"School Round Up Class", \
"") \
ELEM_(std::string, my_JOTA_troop, "MY_JOTA_TROOP", \
"Jamboree On The Air Troop", \
"") \
ELEM_(std::string, my_JOTA_scout, "MY_JOTA_SCOUT", \
"JOTA scout operator", \
"") \
ELEM_(int, logging, "LOGGING", \
"Logging for:\n" \
" 0 - generic QSO\n" \
" 1 - generic contest\n" \
" 2 - BART\n" \
" 3 - Field Day\n" \
" 4 - Winter Field Day\n" \
" 5 - Kids Day\n" \
" 6 - Rookie Roundup\n" \
" 7 - ARRY RTTY\n" \
" 8 - School Round UP\n" \
" 9 - Jamboree On The Air\n" \
" 10 - CQ WPX\n" \
" 11 - CQWW RTTY\n" \
" 12 - Italian ARI International DX\n" \
" 13 - North American QSO Party\n" \
" 14 - North American Sprint\n" \
" 15 - Sweepstakes\n" \
" 16 - State QSO Parties\n" \
" 17 - Ten Ten\n" \
" 18 - Africa All Mode\n" \
" 19 - VHF\n" \
" 20 - Worked All Europe", \
0) \
ELEM_(int, SQSOcontest, "SQSOcontest", \
"SQSO contest", \
0) \
ELEM_(std::string, CONTESTnotes, "CONTESTnotes", \
"Notes for specfied contest", \
"CALL if (RSTr), if (LOCATOR), NAME, QTH") \
ELEM_(int, SQSOinstate, "SQSOinstate", \
"SQSO in-state", \
0) \
ELEM_(int, SQSOstate, "SQSOstate", \
"SQSO state", \
0) \
ELEM_(int, SQSOcounty, "SQSOcounty", \
"SQSO county", \
0) \
ELEM_(int, SQSOlogstate, "SQSOlogstate", \
"SQSO log state", \
0) \
ELEM_(int, SQSOlogcounty, "SQSOlogcounty", \
"SQSO log county", \
0) \
ELEM_(int, SQSOlogserno, "SQSOlogserno", \
"SQSO log serno", \
0) \
ELEM_(int, SQSOlogxchg, "SQSOlogxchg", \
"SQSO log exchange", \
0) \
ELEM_(int, SQSOlogname, "SQSOlogname", \
"SQSO log name", \
0) \
ELEM_(int, SQSOlogstcty, "SQSOlogstcty", \
"SQSO parse STCTY", \
0) \
ELEM_(int, SQSOlogctyst, "SQSOlogctyst", \
"SQSO parse CTYST", \
0) \
ELEM_(int, SQSOlogrst, "SQSOlogrst", \
"SQSO log rst", \
0) \
ELEM_(int, SQSOlogcat, "SQSlogcat", \
"State of Maryland ... peculiar folks living there", \
0) \
ELEM_(bool, connect_to_fdserver, "CONNECT_TO_FDSERVER", \
"Connect to field day server", \
false) \
ELEM_(std::string, fd_tcpip_addr, "FD_TCPIP_ADDR", \
"Field Day (w1hkj) server tcpip address", \
"127.0.0.1") \
ELEM_(std::string, fd_tcpip_port, "FD_TCPIP_PORT", \
"Field Day (w1hkj) server tcpip port", \
"20001") \
/* Macro controls */ \
/* DX Cluster */ \
ELEM_(std::string, dxcc_host_url, "DXCC_HOST_URL", \
"DXCC cluster tcpip address", \
"") \
ELEM_(std::string, dxcluster_hosts, "DXCLUSTER_HOSTS", \
"Array of dxcluster host-port-user lines\n" \
"Fields separated by : character\n" \
"Lines separated by | character", \
"w3nr.ddns.net:7300::|dx.n8noe.us:7373::|w0mw.dynip.com:23::|") \
ELEM_(RGB, DX_Color, "DX_COLOR", \
"RX text font color (RGB)", \
{ 0, 0, 130 }) \
ELEM_(Fl_Color, DXC_even_color, "DXC_EVEN_COLOR", \
"Even line background color in dxcluster dialog", \
7) \
ELEM_(Fl_Color, DXC_odd_color, "DXC_ODD_COLOR", \
"Odd line background color in dxcluster dialog", \
246) \
ELEM_(Fl_Color, DXC_textcolor, "DXC_TEXTCOLOR", \
"Text color in dxcluster dialog", \
FL_YELLOW) \
ELEM_(std::string, DXC_textname, "DXC_TEXTNAME", \
"DX cluster browser font name", \
"") \
ELEM_(Fl_Font, DXC_textfont, "DXC_TEXTFONT", \
"DX cluster browsers font number", \
FL_COURIER) \
ELEM_(int, DXC_textsize, "DXC_TEXTSIZE", \
"DX cluster browsers font size", \
14) \
ELEM_(Fl_Color, DXfontcolor, "DXFONTCOLOR", \
"Text color in dxcluster stream", \
FL_YELLOW) \
ELEM_(Fl_Color, DXalt_color, "DXALT_COLOR", \
"Alternate text color in dxcluster stream", \
FL_DARK_RED) \
ELEM_(std::string, DXfontname, "DXFONTNAME", \
"DX cluster stream font name", \
"") \
ELEM_(Fl_Font, DXfontnbr, "DXFONTNBR", \
"DX cluster stream font number", \
FL_COURIER) \
ELEM_(int, DXfontsize, "DXFONTSIZE", \
"DX cluster stream font size", \
14) \
ELEM_(std::string, dxcc_host_port, "DXCC_HOST_PORT", \
"DXCC cluster tcpip port number", \
"") \
ELEM_(std::string, dxcc_login, "DXCC_LOGIN", \
"DXCC cluster login call sign", \
"") \
ELEM_(std::string, dxcc_password, "DXCC_PASSWORD", \
"DXCC cluster login password", \
"") \
ELEM_(std::string, dxcm_label_1, "DXC_ML1", \
"DXC Macro Label 1", \
"Show DX") \
ELEM_(std::string, dxcm_text_1, "DXC_MACRO1", \
"DXC Macro 1", \
"SH/DX") \
ELEM_(std::string, dxcm_label_2, "DXC_ML2", \
"DXC Macro Label 2", \
"dxcm 2") \
ELEM_(std::string, dxcm_text_2, "DXC_MACRO2", \
"DXC Macro 2", \
"") \
ELEM_(std::string, dxcm_label_3, "DXC_ML3", \
"DXC Macro Label 3", \
"dxcm 3") \
ELEM_(std::string, dxcm_text_3, "DXC_MACRO3", \
"DXC Macro 3", \
"") \
ELEM_(std::string, dxcm_label_4, "DXC_ML4", \
"DXC Macro Label 4", \
"dxcm 4") \
ELEM_(std::string, dxcm_text_4, "DXC_MACRO4", \
"DXC Macro 4", \
"") \
ELEM_(std::string, dxcm_label_5, "DXC_ML5", \
"DXC Macro Label 5", \
"dxcm 5") \
ELEM_(std::string, dxcm_text_5, "DXC_MACRO5", \
"DXC Macro 5", \
"") \
ELEM_(std::string, dxcm_label_6, "DXC_ML6", \
"DXC Macro Label 6", \
"dxcm 6") \
ELEM_(std::string, dxcm_text_6, "DXC_MACRO6", \
"DXC Macro 6", \
"") \
ELEM_(std::string, dxcm_label_7, "DXC_ML7", \
"DXC Macro Label 7", \
"dxcm 7") \
ELEM_(std::string, dxcm_text_7, "DXC_MACRO7", \
"DXC Macro 7", \
"") \
ELEM_(std::string, dxcm_label_8, "DXC_ML8", \
"DXC Macro Label 8", \
"dxcm 8") \
ELEM_(std::string, dxcm_text_8, "DXC_MACRO8", \
"DXC Macro 8", \
"") \
ELEM_(bool, dxc_topline, "DXC_TOPLINE", \
"DXC report order; true = new record on top line", \
true) \
ELEM_(bool, spot_when_logged, "SPOT_WHEN_LOGGED", \
"Create spot Cmd: string when logging contact", \
false) \
ELEM_(bool, dxc_auto_connect, "DXC_AUTO_CONNECT", \
"Connect to HOST when starting fldigi", \
false) \
ELEM_(bool, dxc_hertz, "DXC_HERTZ", \
"Add 0..99 Hertz audio frequency factor [nn] to DX report/notes", \
false) \
ELEM_(bool, UseLastMacro, "USELASTMACRO", \
"Load last used macro file on startup", \
true) \
ELEM_(double, mbw, "MBW", \
"Delay between execution of RIGMODE and FILWID\n" \
"when in the same macro definition\n" \
"range 0.1 to 2.0, default = 0.5", \
0.5) \
ELEM_(bool, DisplayMacroFilename, "DISPLAYMACROFILENAME", \
"Display macro filename on startup", \
true) \
ELEM_(bool, SaveMacros, "SAVEMACROS", \
"Save current macros on exit", \
true) \
ELEM_(bool, macro_wheel, "MACROWHEEL", \
"Enable mouse wheel rotation to control visible macro set", \
false) \
ELEM_(int, mbar_scheme, "MBARSCHEME", \
"# and position of macro bars\n" \
"0..12, 1 = default", \
1) \
ELEM_(bool, four_bar_position, "FOURBARPOSITION", \
"Position 4 bar macro sat below Tx panel\n" \
"Default is above Rx panel", \
false) \
ELEM_(bool, macro_post, "MACROPOST", \
"expand ^! macro tags in Rx panel when executed", \
false) \
ELEM_(double, txlevel, "TXATTEN", \
"TX attenuator (db) -30 .. 0", \
-3.0) \
ELEM_(double, TxMonitorLevel, "TXMONITORLEVEL", \
"Level for monitored (on waterfall) transmit signal", \
0.2) \
/* Waterfall palette */ \
ELEM_(std::string, PaletteName, "PALETTENAME", \
"Waterfall color palette file name", \
"default.pal") \
ELEM_(RGB, cfgpal0, "PALETTE0", \
"Custom palette 0", \
{ 0,0,0 }) \
ELEM_(RGB, cfgpal1, "PALETTE1", \
"Custom palette 1", \
{ 0,0,136 }) \
ELEM_(RGB, cfgpal2, "PALETTE2", \
"Custom palette 2", \
{ 0,19,198 }) \
ELEM_(RGB, cfgpal3, "PALETTE3", \
"Custom palette 3", \
{ 0,32,239 }) \
ELEM_(RGB, cfgpal4, "PALETTE4", \
"Custom palette 4", \
{ 172,167,105 }) \
ELEM_(RGB, cfgpal5, "PALETTE5", \
"Custom palette 5", \
{ 194,198,49 }) \
ELEM_(RGB, cfgpal6, "PALETTE6", \
"Custom palette 6", \
{ 225,228,107 }) \
ELEM_(RGB, cfgpal7, "PALETTE7", \
"Custom palette 7", \
{ 255,255,0 }) \
ELEM_(RGB, cfgpal8, "PALETTE8", \
"Custom palette 8", \
{ 251,51,0 }) \
/* Palettes for macro button groups */ \
ELEM_(bool, useGroupColors, "USEGROUPCOLORS", \
"Use macro group colors", \
true) \
ELEM_(RGB, btnGroup1, "FKEYGROUP1", \
"Macro group 1 color", \
{ 80, 144, 144 }) \
ELEM_(RGB, btnGroup2, "FKEYGROUP2", \
"Macro group 2 color", \
{ 144, 80, 80 }) \
ELEM_(RGB, btnGroup3, "FKEYGROUP3", \
"Macro group 3 color", \
{ 80, 80, 144 }) \
ELEM_(RGB, btnFkeyTextColor, "FKEYTEXTCOLOR", \
"Macro button foreground ", \
{ 255, 255, 255 }) \
/* RX / TX / Waterfall text widgets */ \
ELEM_(std::string, charset_name, "CHARSET_NAME", \
"Default character set", \
"UTF-8") \
ELEM_(bool, RxFontWarn, "RXFONTWARN", \
"Enable RX font warnings", \
true) \
ELEM_(std::string, RxFontName, "RXFONTNAME", \
"RX text font name", \
"") \
ELEM_(Fl_Font, RxFontnbr, "RXFONTNBR", \
"RX text font index", \
FL_HELVETICA) \
ELEM_(int, RxFontsize, "RXFONTSIZE", \
"RX text font size", \
16) \
ELEM_(Fl_Color, RxFontcolor, "RXFNTCOLOR", \
"RX text font color", \
FL_BLACK) \
ELEM_(std::string, MacroBtnFontName, "MACROBTNFONTNAME", \
"Macro Btn Font Name", \
"") \
ELEM_(Fl_Font, MacroBtnFontnbr, "MACROBTNFONTNBR", \
"Macro Btn font index", \
FL_HELVETICA) \
ELEM_(int, MacroBtnFontsize, "MACROBTNFONTSIZE", \
"Macro btn font size", \
12) \
ELEM_(Fl_Color, MacroBtnFontcolor, "MACROBTNFONTCOLOR", \
"Macro btn font color", \
FL_WHITE) \
ELEM_(Fl_Color, RxTxSelectcolor, "RXTXSELCOLOR", \
"RX/TX text select color", \
FL_MAGENTA) \
ELEM_(bool, TxFontWarn, "TXFONTWARN", \
"Enable TX font warnings", \
true) \
ELEM_(std::string, TxFontName, "TXFONTNAME", \
"TX text font name", \
"") \
ELEM_(Fl_Font, TxFontnbr, "TXFONTNBR", \
"TX text font index", \
FL_HELVETICA) \
ELEM_(int, TxFontsize, "TXFONTSIZE", \
"TX text font size", \
16) \
ELEM_(Fl_Color, TxFontcolor, "TXFNTCOLOR", \
"TX text font color", \
FL_BLACK) \
ELEM_(RGB, RxColor, "RXFONTCOLOR", \
"RX text font color (RGB)", \
{ 255, 242, 190 }) \
ELEM_(RGB, TxColor, "TXFONTCOLOR", \
"TX text font color (RGB)", \
{ 200, 235, 255 }) \
ELEM_(Fl_Color, XMITcolor, "XMITCOLOR", \
"Color for Transmit text style", \
FL_RED) \
ELEM_(Fl_Color, CTRLcolor, "CTRLCOLOR", \
"Color for Control text style", \
FL_DARK_GREEN) \
ELEM_(Fl_Color, SKIPcolor, "SKIPCOLOR", \
"Color for Skipped text style", \
FL_BLUE) \
ELEM_(Fl_Color, ALTRcolor, "ALTRCOLOR", \
"Color for Alternate text style", \
FL_DARK_MAGENTA) \
ELEM_(Fl_Color, LowSignal, "LOWSIGNAL", \
"Color for low signal level", \
FL_BLACK) \
ELEM_(Fl_Color, NormSignal, "NORMSIGNAL", \
"Color for normal signal level", \
FL_GREEN) \
ELEM_(Fl_Color, HighSignal, "HIGHSIGNAL", \
"Color for high signal level", \
FL_YELLOW) \
ELEM_(Fl_Color, OverSignal, "OVERSIGNAL", \
"Color for over driven signal", \
FL_RED) \
ELEM_(std::string, WaterfallFontName, "WATERFALLFONTNAME", \
"Waterfall font name", \
"") \
ELEM_(Fl_Font, WaterfallFontnbr, "WATERFALLFONTNBR", \
"Waterfall font number", \
FL_HELVETICA) \
ELEM_(int, WaterfallFontsize, "WATERFALLFONTSIZE", \
"Waterfall font size", \
12) \
ELEM_(Fl_Color, LOGGINGtextcolor, "LOGGINGTEXTCOLOR", \
"Text color in logging controls", \
FL_BLACK) \
ELEM_(Fl_Color, LOGGINGcolor, "LOGGINGCOLOR", \
"Background color in logging controls", \
FL_BACKGROUND2_COLOR) \
ELEM_(std::string, LOGGINGfontname, "LOGGINGTEXTNAME", \
"LOGGING text font name", \
"") \
ELEM_(Fl_Font, LOGGINGtextfont, "LOGGINGTEXTFONT", \
"Logging Controls font number", \
FL_HELVETICA) \
ELEM_(int, LOGGINGtextsize, "LOGGINGTEXTSIZE", \
"Logging Controls font size", \
12) \
ELEM_(Fl_Color, LOGBOOKtextcolor, "LOGBOOKTEXTCOLOR", \
"Text color in logbook dialog", \
FL_BLACK) \
ELEM_(Fl_Color, LOGBOOKcolor, "LOGBOOKCOLOR", \
"Background color in logbook dialog", \
FL_BACKGROUND2_COLOR) \
ELEM_(std::string, LOGBOOKtextname, "LOGBOOKTEXTNAME", \
"Logbook text font name", \
"") \
ELEM_(Fl_Font, LOGBOOKtextfont, "LOGBOOKTEXTFONT", \
"Logbook dialog controls font number", \
FL_HELVETICA) \
ELEM_(int, LOGBOOKtextsize, "LOGBOOKTEXTSIZE", \
"Logbook dialog controls font size", \
12) \
ELEM_(std::string, FreqControlFontName, "FREQCONTROLFONTNAME", \
"Frequency Control font name", \
"") \
ELEM_(Fl_Font, FreqControlFontnbr, "FREQCONTROLFONTNBR", \
"Frequency Control font number", \
FL_HELVETICA) \
ELEM_(std::string, ui_scheme, "UISCHEME", \
"FLTK UI scheme (none or base, gtk+, plastic)", \
"gtk+") \
ELEM_(int, ui_language, "UILANGUAGE", \
"UI language", \
0) \
ELEM_(bool, wf_audioscale, "WFAUDIOSCALE", \
"Always show audio frequencies on waterfall", \
true) \
/* Freq Display colors */ \
ELEM_(RGB, FDbackground, "FDBACKGROUND", \
"Frequency display background color", \
{ 255, 253, 222 }) \
ELEM_(RGB, FDforeground, "FDFOREGROUND", \
"Frequency display foreground color", \
{ 0, 0, 0 }) \
/* S-meter and Power-meter */ \
ELEM_(RGB, Smeter_bg_color, "SMETERBG", \
"S-meter background color", \
{ 255, 253, 222 }) \
ELEM_(RGB, Smeter_scale_color, "SMETERSCALECOLOR", \
"S-meter scale color", \
{ 0, 0, 0 }) \
ELEM_(RGB, Smeter_meter_color, "SMETERMETERCOLOR", \
"S-meter meter color", \
{ 0, 200, 0 }) \
ELEM_(RGB, PWRmeter_bg_color, "PWRMETERBGD", \
"Power meter background color", \
{ 255, 253, 222 }) \
ELEM_(RGB, PWRmeter_scale_color, "PWRMETERSCALECOLOR", \
"Power meter scale color", \
{ 0, 0, 0 }) \
ELEM_(RGB, PWRmeter_meter_color, "PWRMETERMETERCOLOR", \
"Power meter meter color", \
{ 200, 0, 0 }) \
ELEM_(int, PWRselect, "PWRSELECT", \
"Power meter type:\n" \
" 0: 25 W, 1: 50 W, 2: 100 W, 3: 200 W, 4: AUTO", \
4) \
/* Tab selection color */ \
ELEM_(Fl_Color, TabsColor, "TABSCOLOR", \
"UI tabs color", \
FL_BACKGROUND2_COLOR) \
/* Signal Viewer */ \
ELEM_(bool, VIEWERascend, "VIEWERASCEND", \
"Low frequency on bottom of viewer", \
true) \
ELEM_(bool, VIEWERmarquee, "VIEWERMARQUEE", \
"Signal Viewer text continuous scrolling", \
true) \
ELEM_(bool, VIEWERsort, "VIEWERSORT", \
"Signal Viewer sort after channel changes- unused", \
false) \
ELEM_(bool, VIEWERhistory, "VIEWERHISTORY", \
"Signal Viewer playback history on select", \
false) \
ELEM_(bool, VIEWERfixed, "VIEWERfixed", \
"Signal Viewer data displayed on fixed 100 Hz intervals", \
true) \
ELEM_(int, VIEWERlabeltype, "VIEWERSHOWFREQ", \
"Signal Viewer label type. Values are as follows:\n" \
" 0: None; 1: Audio freq; 2: Radio freq; 2: Channel #.", \
VIEWER_LABEL_RF) \
ELEM_(int, VIEWERchannels, "VIEWERCHANNELS", \
"Number of Signal Viewer Channels", \
30) \
ELEM_(int, VIEWERwidth, "VIEWERWIDTH", \
"Width of viewer (% of full panel width)", \
25) \
ELEM_(int, VIEWERtimeout, "VIEWERTIMEOUT", \
"Signal Viewer inactivity timeout (to clear text)", \
15) \
ELEM_(std::string, ViewerFontName, "VIEWERFONTNAME", \
"Signal Viewer font name", \
"") \
ELEM_(Fl_Font, ViewerFontnbr, "VIEWERFONTNBR", \
"Signal Viewer font index", \
FL_HELVETICA) \
ELEM_(int, ViewerFontsize, "VIEWERFONTSIZE", \
"Signal Viewer font size", \
FL_NORMAL_SIZE) \
\
ELEM_(Fl_Color, Sql1Color, "SQL1COLOR", \
"UI SQL button select color 1", \
FL_YELLOW) \
ELEM_(Fl_Color, Sql2Color, "SQL2COLOR", \
"UI SQL button select color 2", \
FL_GREEN) \
ELEM_(Fl_Color, AfcColor, "AFCCOLOR", \
"UI AFC button select color", \
FL_GREEN) \
ELEM_(Fl_Color, LkColor, "LKCOLOR", \
"UI Lk xmt frequ select color", \
FL_GREEN) \
ELEM_(Fl_Color, RevColor, "REVCOLOR", \
"UI Rev select color", \
FL_GREEN) \
ELEM_(Fl_Color, XmtColor, "XMTCOLOR", \
"UI T/R select color", \
FL_RED) \
ELEM_(Fl_Color, SpotColor, "SPOTCOLOR", \
"UI Spot select color", \
FL_GREEN) \
ELEM_(Fl_Color, RxIDColor, "RXIDCOLOR", \
"UI RxID select color", \
FL_GREEN) \
ELEM_(Fl_Color, RxIDwideColor, "RXIDWIDECOLOR", \
"UI RxID WIDE search select color", \
FL_DARK_RED) \
ELEM_(Fl_Color, TxIDColor, "TXIDCOLOR", \
"UI TxID select color", \
FL_GREEN) \
ELEM_(Fl_Color, TuneColor, "TUNECOLOR", \
"UI Tune select color", \
FL_RED) \
ELEM_(Fl_Color, default_btn_color, "DEFAULTBTNCOLOR", \
"Default color of lighted buttons", \
FL_YELLOW) \
/* XMLRPC LOGBOOK server */ \
ELEM_(bool, xml_logbook, "XML_LOGBOOK", \
"Try to open remote xml logbook", \
false) \
ELEM_(std::string, xmllog_address, "XMLLOG_ADDRESS", \
"Logbook server address", \
"127.0.0.1") \
ELEM_(std::string, xmllog_port, "XMLLOG_PORT", \
"Logbook server port", \
"8421") \
\
ELEM_(bool, check_for_updates, "CHECK_FOR_UPDATES", \
"Check for updates when starting program", \
false) \
/* XML-RPC/ARQ/KISS servers */ \
ELEM_(std::string, xmlrpc_address, "XMLRPC_ADDRESS", \
"IP Address of XMLRPC Socket", \
DEFAULT_XMLPRC_IP_ADDRESS) \
ELEM_(std::string, xmlrpc_port, "XMLRPC_PORT", \
"IP port number of XMLRPC socket", \
DEFAULT_XMLRPC_IP_PORT) \
ELEM_(std::string, xmlrpc_allow, "", "", "") \
ELEM_(std::string, xmlrpc_deny, "", "", "") \
ELEM_(int, rx_msgid, "", "", 9876) \
ELEM_(int, tx_msgid, "", "", 6789) \
ELEM_(std::string, arq_address, "ARQ_ADDRESS", \
"IP Address of ARQ socket", \
DEFAULT_ARQ_IP_ADDRESS) \
ELEM_(std::string, arq_port, "ARQ_PORT", \
"IP port number of ARQ socket", \
DEFAULT_ARQ_IP_PORT) \
ELEM_(std::string, kiss_address, "KISS_ADDRESS", \
"IP Address of KISS socket", \
DEFAULT_KISS_IP_ADDRESS) \
ELEM_(std::string, kiss_io_port, "KISS_IO_PORT", \
"IP port number of KISS socket", \
DEFAULT_KISS_IP_IO_PORT) \
ELEM_(std::string, kiss_out_port, "KISS_OUT_PORT", \
"Out udp port used when ip address is the same", \
DEFAULT_KISS_IP_OUT_PORT) \
ELEM_(int, kiss_dual_port_enabled, "KISS_DUAL_PORT_ENABLED", \
"Required when same IP address is used.", \
0) \
ELEM_(int, data_io_enabled, "DATA_IO_ENABLED", \
"Disabled (0) ARQ socket enabled (1) KISS socket enabled (2)", \
1) \
ELEM_(bool, ax25_decode_enabled, "AX25_DECODE_ENABLED", \
"Dissasemble AX25 packet into human readable form", \
false) \
ELEM_(bool, enableBusyChannel, "ENABLE_BUSY_CHANNEL", \
"Detect busy channel and wait for a period of time before txing", \
false) \
ELEM_(int, busyChannelSeconds, "BUSY_CHANNEL_SECONDS", \
"Number of seconds to wait before transmit resume", \
3) \
ELEM_(bool, show_psm_btn, "SHOW_PSM_BTN", \
"Display / Enable PSM button on main dialog", \
false) \
ELEM_(int, kpsql_attenuation, "KPSQL_ATTENUATION", \
"KPSQL Attenuation in 1/n of 1:1 Gain", \
2) \
ELEM_(bool, csma_enabled, "CSMA_ENABLED", \
"Use CSMA on heavy traffic channels (AX25)", \
true) \
ELEM_(bool, kiss_tcp_io, "KISS_TCP_IO", \
"Connect kiss io via TCP/IP vise UDP/IP", \
false) \
ELEM_(bool, kiss_tcp_listen, "KISS_TCP_LISTEN", \
"Listen for TCP connection (Server mode)", \
false) \
ELEM_(bool, kpsql_enabled, "KPSQL_ENABLED", \
"Enable/Disable PSM", \
false) \
ELEM_(bool, tcp_udp_auto_connect, "TCP_UDP_AUTO_CONNECT", \
"Make Connect Attemp on Fldigi Start", \
false) \
ELEM_(int, csma_persistance, "CSMA_PERSISTANCE", \
"CSMA Persistance", \
63) \
ELEM_(int, csma_slot_time, "CSMA_SLOT_TIME", \
"CSMA Slot Time", \
10) \
ELEM_(int, csma_transmit_delay, "CSMA_TRANSMIT_DELAY", \
"CSMA Transit Delay", \
50) \
ELEM_(int, psm_flush_buffer_timeout, "PSM_FLUSH_BUFFER_TIMEOUT", \
"Flush buffer timout", \
15) \
ELEM_(int, psm_minimum_bandwidth, "PSM_MINIMUM_BANDWIDTH", \
"PSM minimum measured bandwidth", \
100) \
ELEM_(int, psm_minimum_bandwidth_margin, "PSM_MINIMUM_BANDWIDTH_MARGIN", \
"PSM minimum measured bandwidth margin", \
10) \
ELEM_(bool, psm_use_histogram, "PSM_USE_HISTOGRAM", \
"Histogram threshold", \
false) \
ELEM_(int, psm_histogram_offset_threshold, "PSM_HISTOGRAM_OFFSET_THRESHOLD", \
"Histogram theshold referece level", \
3) \
ELEM_(int, psm_hit_time_window, "PSM_HIT_TIME_WINDOW", \
"Valid signal test rate (milliseconds)", \
15) \
ELEM_(int, tx_buffer_timeout, "TX_BUFFER_TIMEOUT", \
"Transmit buffer timeout (minutes)", \
15) \
ELEM_(bool, kiss_io_modem_change_inhibit, "KISS_IO_MODEM_CHANGE_INHIBIT", \
"Enable/Disable Modem Change to a non 8 bit when KISS IO is in use", \
false) \
ELEM_(std::string, flrig_ip_address, "FLRIG_IP_ADDRESS", \
"IP Address of flrig server", \
DEFAULT_FLRIG_IP_ADDRESS) \
ELEM_(std::string, flrig_ip_port, "FLRIG_IP_PORT", \
"IP port number of flrig server", \
DEFAULT_FLRIG_IP_PORT) \
ELEM_(bool, show_all_codes, "SHOW_ALL_CODES", \
"Display all rx char's using ascii3 table", \
false) \
/* PSK reporter */ \
ELEM_(bool, pskrep_autostart, "PSKREP_AUTOSTART", \
"Enable to start pskrep interface when starting fldigi", \
false) \
ELEM_(bool, usepskrep, "USEPSKREP", \
"(Set by fldigi)", \
false) \
ELEM_(bool, pskrep_auto, "PSKREPAUTO", \
"Report callsigns spotted in received text", \
false) \
ELEM_(bool, pskrep_log, "PSKREPLOG", \
"Report callsigns in logged QSOs", \
false) \
ELEM_(bool, pskrep_qrg, "PSKREPQRG", \
"Include rig frequency in reception report", \
false) \
ELEM_(bool, report_when_visible, "REPORTWHENVISIBLE", \
"Enable Reporter ONLY when a signal browser is visible", \
false) \
ELEM_(std::string, pskrep_host, "PSKREPHOST", \
"Reception report server address", \
"report.pskreporter.info") \
ELEM_(std::string, pskrep_port, "PSKREPPORT", \
"Reception report server port", \
"4739") \
/* WEFAX configuration items */ \
ELEM_(double, wefax_slant, "WEFAXSLANT", \
"Slant correction for wefax Rx", \
0.0) \
ELEM_(std::string, wefax_save_dir, "WEFAXSAVEDIR", \
"Target directory for storing automatically received images storage", \
"") \
ELEM_(std::string, wefax_load_dir, "WEFAXLOADDIR", \
"Source directory for sending images", \
"") \
ELEM_(int, wefax_filter, "WEFAXFILTER", \
"Input filter for image reception", \
0) \
ELEM_(bool, wefax_autocenter, "WEFAX_AUTOCENTER", \
"Enable image autocentering", \
true) \
ELEM_(bool, WEFAX_HideTx, "WEFAXHIDETX", \
"Hide transmission window", \
true) \
ELEM_(int, WEFAX_Shift, "WEFAXSHIFT", \
"Shift (Standard 800Hz)", \
800 ) \
ELEM_(int, WEFAX_Center, "WEFAXCENTER", \
"Signal centered on freq (Standard 1900Hz)", \
1900 ) \
ELEM_(int, WEFAX_MaxRows, "WEFAXMAXROWS", \
"Received fax maximum number of rows\n" \
"1200 rows standard for IOC576 transmission.", \
4000 ) \
ELEM_(int, WEFAX_NoiseMargin, "WEFAXNOISEMARGIN", \
"Pixel margin for noise removal", \
1 ) \
ELEM_(int, WEFAX_NoiseThreshold, "WEFAXNOISETHRESHOLD", \
"Threshold level for noise detection and removal", \
5 ) \
ELEM_(double, wefax_correlation, "WEFAX_CORRELATION", \
"Threshold level for signal detection", \
0.05 ) \
ELEM_(int, wefax_correlation_rows, "WEFAX_CORR_ROWS", \
"Compute correlation on NN (2 ... 25)", \
15 ) \
ELEM_(bool, WEFAX_AdifLog, "WEFAXADIFLOG", \
"Logs wefax file names in Adif log file", \
false) \
ELEM_(int, wefax_auto_after, "WEFAX_auto_after", \
"Enable autoalign after NN rows", \
30 ) \
ELEM_(int, wefax_align_stop, "WEFAX_align_stop", \
"Stop auto alignment after NN rows", \
500 ) \
ELEM_(int, wefax_align_rows, "WEFAX_align_rows", \
"Enable autoalign every NN rows", \
10 ) \
/* NAVTEX configuration items */ \
ELEM_(bool, NVTX_AdifLog, "NAVTEXADIFLOG", \
"Logs Navtex messages in Adig log file", \
false) \
ELEM_(bool, NVTX_KmlLog, "NAVTEXKMLLOG", \
"Logs Navtex messages to KML document", \
false) \
ELEM_(int, NVTX_MinSizLoggedMsg, "NAVTEXMINSIZLOGGEDMSG", \
"Minimum length of logged messages", \
0 ) \
/* WX fetch from NOAA */ \
ELEM_(std::string, wx_url, "WX_URL", \
"Internet URL used to fetch METAR data using wget symbology", \
"http://tgftp.nws.noaa.gov/data/observations/metar/decoded/" ) \
ELEM_(std::string, wx_eoh, "WX_EOH", \
"Text at end of METAR report header\n" \
"default = Connection: close", \
"Connection: close") \
ELEM_(std::string, wx_sta, "WX_STA", \
"4 letter specifier for wx station", \
"KMDQ") \
ELEM_(bool, wx_condx, "WX_CONDX", \
"Weather conditions", \
true) \
ELEM_(bool, wx_fahrenheit, "WX_FAHRENHEIT", \
"Report in Fahrenheit", \
true) \
ELEM_(bool, wx_celsius, "WX_CELSIUS", \
"Report in Celsius", \
true) \
ELEM_(bool, wx_mph, "WX_MPH", \
"Report speed in miles per hour", \
true) \
ELEM_(bool, wx_kph, "WX_KPH", \
"Report speed in kilometers per hour", \
true) \
ELEM_(bool, wx_inches, "WX_INCHES", \
"Report pressure in inches of mercury", \
true) \
ELEM_(bool, wx_mbars, "WX_MBARS", \
"Report pressure in millibars", \
true) \
ELEM_(bool, wx_full, "WX_FULL", \
"Use complete METAR report", \
true) \
ELEM_(bool, wx_station_name, "WX_STATION_NAME", \
"Report station noun name", \
true) \
/* KML Keyhole Markup Language */ \
ELEM_(bool, kml_purge_on_startup, "KML_PURGE_ON_STARTUP", \
"Purge KML data at startup", \
false) \
ELEM_(std::string, kml_save_dir, "KML_SAVE_DIR", \
"Destination directory for generated KML documents", \
"") \
ELEM_(std::string, kml_command, "KML_COMMAND", \
"Command executed when creating KML files", \
"") \
ELEM_(int, kml_merge_distance, "KML_MERGE_DISTANCE", \
"Minimum distance for splitting alias nodes", \
10000) \
ELEM_(int, kml_retention_time, "KML_RETENTION_TIME", \
"Number of hours for keeping data in each node", \
0) \
ELEM_(int, kml_refresh_interval, "KML_REFRESH_INTERVAL", \
"Refresh interval written in KML files (In seconds)", \
120) \
ELEM_(int, kml_balloon_style, "KML_BALLOON_STYLE", \
"KML balloons data displayed as text, HTML tables, HTML single matrix", \
2) \
ELEM_(double, cnt_dft_range, "cnt_dft_range", \
"Display range in dB for dft scan modem", \
60.0) \
ELEM_(int, cnt_dft_scans, "cnt_dft_scans", \
"Number of scans over which the average signal level is measured.", \
100) \
ELEM_(bool, dft_relative, "dft_relative", \
"Plot vertical scale as dB relative to maximum value", \
false) \
ELEM_(std::string, auto_flrig_pathname, "AUTO_FLRIG_PATHNAME", \
"Full pathname to the flrig executable", \
"") \
ELEM_(std::string, auto_flamp_pathname, "AUTO_FLAMP_PATHNAME", \
"Full pathname to the flamp executable", \
"") \
ELEM_(std::string, auto_flnet_pathname, "AUTO_FLNET_PATHNAME", \
"Full pathname to the flnet executable", \
"") \
ELEM_(std::string, auto_fllog_pathname, "AUTO_FLLOG_PATHNAME", \
"Full pathname to the fllog executable", \
"") \
ELEM_(std::string, auto_prog1_pathname, "AUTO_PROG1_PATHNAME", \
"Full pathname to the prog1 executable", \
"") \
ELEM_(std::string, auto_prog2_pathname, "AUTO_PROG2_PATHNAME", \
"Full pathname to the prog2 executable", \
"") \
ELEM_(std::string, auto_prog3_pathname, "AUTO_PROG3_PATHNAME", \
"Full pathname to the prog3 executable", \
"") \
ELEM_(bool, flrig_auto_enable, "FLRIG_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, flnet_auto_enable, "FLNET_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, fllog_auto_enable, "FLLOG_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, flamp_auto_enable, "FLAMP_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, prog1_auto_enable, "PROG1_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, prog2_auto_enable, "PROG2_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(bool, prog3_auto_enable, "PROG3_AUTO_ENABLE", \
"Enable on program start", \
false) \
ELEM_(int, sel_lsd, "SEL_LSD", \
"Frequency control by keyboard arrow keys\n" \
"Least significant digit are left/right keys\n" \
"0 : 1 Hz, 1 : 10 Hz, 2 : 100 Hz, 3 : 1000 Hz", \
0) \
ELEM_(int, macro_height, "MACRO_HEIGHT", \
"Height of macro bar\n" \
"22 .. 66, default = 22, step size 2", \
22) \
ELEM_(bool, rxtx_swap, "RXTX_SWAP", \
"Enabled, Tx above Rx panel\n" \
"Disable, Rx above Tx panel (default", \
false) \
ELEM_(bool, view_smeter, "VIEW_SMETER", \
"Enabled, View smeter & power meter\n" \
"Disable, (default)", \
false) \
ELEM_(std::string, MacroEditFontName, "MACROEDITORFONTNAME", \
"Macro editor font name", \
"") \
ELEM_(Fl_Font, MacroEditFontnbr, "MACROEDITFONTNBR", \
"RX text font index", \
FL_HELVETICA) \
ELEM_(bool, us_units, "US_UNITS", \
"Use US units of distance for QRB", \
false) \
ELEM_(int, MacroEditFontsize, "MACROEDITFONTSIZE", \
"RX text font size", \
16) \
ELEM_(bool, psk8DCDShortFlag, "PSK8DCDSHORTFLAG", \
"Flag: Change DCD pre-ample length", \
false) \
ELEM_(bool, display_48macros, "DISPLAY_48MACROS", \
"Allow dockable macros", \
false) \
ELEM_(double, fftviewer_maxdb, "fftviewer_maxdb", \
"Upper axis in dB for spectrum viewer", \
0.0) \
ELEM_(double, fftviewer_range, "fftviewer_range", \
"Display range in dB for spectrum viewer", \
60.0) \
ELEM_(int, fftviewer_scans, "fftviewer_scans", \
"Number of scans over which the average signal level is measured.", \
100) \
ELEM_(double, fftviewer_fcenter, "fftviewer_fcenter", \
"Scan center frequency in Hertz", \
2000.0) \
ELEM_(double, fftviewer_frng, "fftviewer_frng", \
"Frequency scan range in Hertz", \
4000.0) \
ELEM_(int, wf_spectrum_range, "wf_spectrum_range", \
"Initial spectrum range", \
500) \
ELEM_(bool, wf_spectrum_center, "wf_spectrum_center", \
"left click on waterfall transfers to spectrum center", \
true) \
ELEM_(bool, wf_spectrum_modem_scale, "wf_spectrum_modem_scale", \
"scale spectrum display frequency linked to modem bandwidth", \
true) \
ELEM_(int, wf_spectrum_scale_factor, "spectrum_scale_factor", \
"scale factor for spectrum display linked to modem bandwidth", \
5) \
ELEM_(bool, wf_spectrum_dbvals, "wf_spectrum_dbvals", \
"use waterfall db range and offset values for spectrum scope", \
true) \
ELEM_(int, FMT_sr, "FMT_sr", \
"FMT sample rate\n" \
"0:8000, 1:11025, 2:12000, 3:16000, 4:22050, 5:32000, 6:44100, 7:48000", \
1) \
ELEM_(int, FMT_dft_rate, "FMT_dft_rate", \
"FMT DFT conversions per second", \
3) \
ELEM_(bool, FMT_reverse, "FMT_reverse", \
"Reverse time axis", \
false) \
ELEM_(bool, FMT_thick_lines, "FMT_thick_lines", \
"Plot axis/lines with 2 pixel width", \
false) \
ELEM_(bool, FMT_plot_over_axis, "FMT_plot_over_axis", \
"Plot points lie on top of axis graticule", \
false) \
ELEM_(double, FMT_freq_corr, "FMT_freq_corr", \
"FMT freq track correction in Hertz", \
0.0) \
ELEM_(double, FMT_filter, "FMT_filter", \
"FMT FIR lpf 3db cutoff in Hertz", \
4.0) \
ELEM_(double, FMT_bpf_width, "FMT_bpf_width", \
"FMT FIR bpf 3db cutoff in Hertz", \
20.0) \
ELEM_(bool, FMT_unk_bpf_on, "FMT_unk_bpf_on", \
"Enable unknown bandpass filter", \
false) \
ELEM_(bool, FMT_ref_bpf_on, "FMT_ref_bpf_on", \
"Enable reference bandpass filter", \
false) \
ELEM_(double, FMT_movavg_len, "FMT_movavg_len", \
"FMT moving average filter length in seconds", \
4.0) \
ELEM_(double, FMT_prefilter, "FMT_prefilter", \
"Experimental first-order prefilter", \
0.95) \
ELEM_(bool, FMT_prefilter_on, "FMT_prefilter_on", \
"Enable FMT prefilter", \
false) \
ELEM_(double, FMT_cull_level, "FMT_cull_level", \
"Experimental data culling", \
10.0) \
ELEM_(bool, FMT_cull_on, "FMT_cull_on", \
"Enable data culling", \
false) \
ELEM_(double, FMT_HL_level, "FMT_HL_level", \
"Experimental DFT hardlimit level", \
1.0) \
ELEM_(bool, FMT_HL_on, "FMT_HL_on", \
"Enable DFT hardlimiter", \
false) \
ELEM_(bool, FMT_dft_cull_on, "FMT_dft_cull_on", \
"Enable DFT culling", \
false) \
ELEM_(Fl_Color, FMT_background, "FMT_background", \
"Color for FMT plot background", \
FL_BACKGROUND2_COLOR) \
ELEM_(Fl_Color, FMT_unk_color, "FMT_unk_color", \
"Color for FMT unknown data plot", \
FL_DARK_BLUE) \
ELEM_(Fl_Color, FMT_ref_color, "FMT_ref_color", \
"Color for FMT reference data plot", \
FL_GREEN) \
ELEM_(Fl_Color, FMT_legend_color, "FMT_legend_color", \
"Color for FMT legends", \
FL_BLACK) \
ELEM_(Fl_Color, FMT_axis_color, "FMT_axis_color", \
"Color for FMT plot axis", \
FL_BLACK) \
ELEM_(bool, FMT_use_tabs, "fmt_use_tabs", \
"Use TAB delimiters in exported csv file", \
false) \
ELEM_(bool, fmt_center_on_unknown, "fmt_center_on_unknown", \
"Waterfall centered on unknown", \
false) \
ELEM_(bool, fmt_center_on_reference, "fmt_center_on_reference", \
"Waterfall centered on reference", \
false) \
ELEM_(bool, fmt_center_on_median, "fmt_center_on_median", \
"Waterfall centered on median", \
true) \
ELEM_(bool, fmt_sync_wav_file, "fmt_sync_wav_file", \
"Sound wav file record sync'd to csv file", \
false) \
ELEM_(double, FMT_freq_err, "FMT_freq_err", \
"limit to frequency error before automatic reset", \
2.0) \
/* save operating parameters by mode */ \
ELEM_(bool, sqlch_by_mode, "SQLCH_BY_MODE", \
"Save/restore SQUELCH on per mode basis", \
false) \
ELEM_(bool, txlevel_by_mode, "TXLEVEL_BY_MODE", \
"Save/restore TXLEVEL on per mode basis", \
false) \
ELEM_(bool, afc_by_mode, "AFC_BY_MODE", \
"Save/restore AFC on per mode basis", \
false) \
ELEM_(bool, reverse_by_mode, "REVERSE_BY_MODE", \
"Save/restore REVERSE on per mode basis", \
false) \
// declare the struct
#define ELEM_DECLARE_CONFIGURATION(type_, var_, tag_, ...) type_ var_;
#undef ELEM_
#define ELEM_ ELEM_DECLARE_CONFIGURATION
struct configuration
{
CONFIG_LIST
void writeDefaultsXML();
void storeDefaults();
bool readDefaultsXML();
void loadDefaults();
void saveDefaults();
int setDefaults();
void resetDefaults(void);
static void reset(void);
void initInterface();
void testCommPorts();
const char* strBaudRate();
int BaudRate(size_t);
int nBaudRate(const char *);
void initFonts(void);
};
extern configuration progdefaults;
extern Fl_Font font_number(const char* name);
enum { SAMPLE_RATE_UNSET = -1, SAMPLE_RATE_AUTO, SAMPLE_RATE_NATIVE, SAMPLE_RATE_OTHER };
#endif
| 251,228
|
C++
|
.h
| 2,847
| 75.597822
| 90
| 0.246349
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,378
|
lgbook.h
|
w1hkj_fldigi/src/include/lgbook.h
|
// generated by Fast Light User Interface Designer (fluid) version 1.0305
#ifndef lgbook_h
#define lgbook_h
#include <FL/Fl.H>
#include "flinput2.h"
// Avoid 'nitems' macro collision between FreeBSD's sys/params.h and fltk's
// FL/Fl_Check_Browser.H (http://www.fltk.org/str.php?L2984)
#undef nitems
#include <FL/Fl_Check_Browser.H>
#define FLTK_nitems nitems
#undef nitems
// ^^^ Avoid 'nitems' macro collision
extern Fl_Check_Browser *chkExportBrowser;
#include <FL/Fl_Double_Window.H>
extern Fl_Double_Window *wExport;
#include <FL/Fl_Group.H>
#include <FL/Fl_Check_Browser.H>
extern Fl_Check_Browser *chkExportBrowser;
#include <FL/Fl_Button.H>
extern Fl_Button *btnClearAll;
extern Fl_Button *btnCheckAll;
#include "calendar.h"
extern Fl_DateInput *inp_export_start_date;
extern Fl_DateInput *inp_export_stop_date;
#include <FL/Fl_Check_Button.H>
extern Fl_Check_Button *btn_export_by_date;
extern Fl_Check_Button *btnSelectCall;
extern Fl_Check_Button *btnSelectName;
extern Fl_Check_Button *btnSelectFreq;
extern Fl_Check_Button *btnSelectBand;
extern Fl_Check_Button *btnSelectMode;
extern Fl_Check_Button *btnSelectQSOdateOn;
extern Fl_Check_Button *btnSelectQSOdateOff;
extern Fl_Check_Button *btnSelectTimeON;
extern Fl_Check_Button *btnSelectTimeOFF;
extern Fl_Check_Button *btnSelectTX_pwr;
extern Fl_Check_Button *btnSelectRSTsent;
extern Fl_Check_Button *btnSelectRSTrcvd;
extern Fl_Check_Button *btnSelectQth;
extern Fl_Check_Button *btnSelectLOC;
extern Fl_Check_Button *btnSelectState;
extern Fl_Check_Button *btnSelectAge;
extern Fl_Check_Button *btnSelectStaCall;
extern Fl_Check_Button *btnSelectStaCity;
extern Fl_Check_Button *btnSelectStaGrid;
extern Fl_Check_Button *btnSelectOperator;
extern Fl_Check_Button *btnSelectProvince;
extern Fl_Check_Button *btnSelectCountry;
extern Fl_Check_Button *btnSelectNotes;
extern Fl_Check_Button *btnSelectQSLrcvd;
extern Fl_Check_Button *btnSelectQSLsent;
extern Fl_Check_Button *btnSelecteQSLrcvd;
extern Fl_Check_Button *btnSelecteQSLsent;
extern Fl_Check_Button *btnSelectLOTWrcvd;
extern Fl_Check_Button *btnSelectLOTWsent;
extern Fl_Check_Button *btnSelectQSL_VIA;
extern Fl_Check_Button *btnSelectSerialIN;
extern Fl_Check_Button *btnSelectSerialOUT;
extern Fl_Check_Button *btnSelectCheck;
extern Fl_Check_Button *btnSelectXchgIn;
extern Fl_Check_Button *btnSelectMyXchg;
extern Fl_Check_Button *btnSelectCNTY;
extern Fl_Check_Button *btnSelectCONT;
extern Fl_Check_Button *btnSelectCQZ;
extern Fl_Check_Button *btnSelectDXCC;
extern Fl_Check_Button *btnSelectIOTA;
extern Fl_Check_Button *btnSelectITUZ;
extern Fl_Check_Button *btnSelectClass;
extern Fl_Check_Button *btnSelectSection;
extern Fl_Check_Button *btnSelect_cwss_serno;
extern Fl_Check_Button *btnSelect_cwss_prec;
extern Fl_Check_Button *btnSelect_cwss_check;
extern Fl_Check_Button *btnSelect_cwss_section;
extern Fl_Check_Button *btnSelect_1010;
extern Fl_Button *btnClearAllFields;
extern Fl_Button *btnCheckAllFields;
extern Fl_Button *btnSetFieldDefaults;
extern Fl_Button *btnSetLoTWfields;
#include <FL/Fl_Return_Button.H>
extern Fl_Return_Button *btnOK;
extern Fl_Button *btnCancel;
extern Fl_Double_Window *dlgLogbook;
extern Fl_DateInput *inpDate_log;
extern Fl_Input2 *inpTimeOn_log;
extern Fl_Input2 *inpCall_log;
extern Fl_Input2 *inpName_log;
extern Fl_Input2 *inpRstR_log;
extern Fl_Input2 *txtNbrRecs_log;
extern Fl_DateInput *inpDateOff_log;
extern Fl_Input2 *inpTimeOff_log;
extern Fl_Input2 *inpFreq_log;
extern Fl_Input2 *inpMode_log;
extern Fl_Input2 *inpTX_pwr_log;
extern Fl_Input2 *inpLoc_log;
extern Fl_Input2 *inpRstS_log;
extern Fl_Input2 *inpQth_log;
extern Fl_Input2 *inpState_log;
extern Fl_Input2 *inpVE_Prov_log;
extern Fl_Input2 *inpCountry_log;
extern Fl_Group *grpTabsSearch;
#include <FL/Fl_Tabs.H>
extern Fl_Tabs *Tabs;
extern Fl_Group *tab_log_qsl;
extern Fl_DateInput *inpQSLrcvddate_log;
extern Fl_DateInput *inpEQSLrcvddate_log;
extern Fl_DateInput *inpLOTWrcvddate_log;
extern Fl_DateInput *inpQSLsentdate_log;
extern Fl_DateInput *inpEQSLsentdate_log;
extern Fl_DateInput *inpLOTWsentdate_log;
extern Fl_Input2 *inpQSL_VIA_log;
extern Fl_Group *tab_log_other;
extern Fl_Input2 *inpCNTY_log;
extern Fl_Input2 *inpIOTA_log;
extern Fl_Input2 *inpCQZ_log;
extern Fl_Input2 *inpCONT_log;
extern Fl_Input2 *inpITUZ_log;
extern Fl_Input2 *inpDXCC_log;
extern Fl_Group *tab_log_notes;
extern Fl_Input2 *inpNotes_log;
extern Fl_Group *tab_log_my_station;
extern Fl_Input2 *inp_log_sta_call;
extern Fl_Input2 *inp_log_op_call;
extern Fl_Input2 *inp_log_sta_qth;
extern Fl_Input2 *inp_log_sta_loc;
extern Fl_Group *tab_log_contest;
extern Fl_Input2 *inpSerNoOut_log;
extern Fl_Input2 *inpMyXchg_log;
extern Fl_Input2 *inpSerNoIn_log;
extern Fl_Input2 *inpXchgIn_log;
extern Fl_Input2 *inpClass_log;
extern Fl_Input2 *inpSection_log;
extern Fl_Input2 *inp_age_log;
extern Fl_Input2 *inp_1010_log;
extern Fl_Input2 *inpBand_log;
extern Fl_Input2 *inp_check_log;
extern Fl_Group *tab_log_cwss;
extern Fl_Input2 *inp_log_cwss_serno;
extern Fl_Input2 *inp_log_cwss_sec;
extern Fl_Input2 *inp_log_cwss_prec;
extern Fl_Input2 *inp_log_cwss_chk;
extern Fl_Group *tab_log_jota;
extern Fl_Input2 *inp_log_troop_s;
extern Fl_Input2 *inp_log_troop_r;
extern Fl_Input2 *inp_log_scout_s;
extern Fl_Input2 *inp_log_scout_r;
extern Fl_Group *grpCallSearch;
extern Fl_Input2 *inpSearchString;
extern void cb_search(Fl_Button*, void*);
extern Fl_Button *bSearchPrev;
extern Fl_Button *bSearchNext;
extern void cb_btnRetrieve(Fl_Button*, void*);
extern Fl_Button *bRetrieve;
extern Fl_Group *grpFileButtons;
extern void cb_btnNewSave(Fl_Button*, void*);
extern Fl_Button *bNewSave;
extern void cb_btnUpdateCancel(Fl_Button*, void*);
extern Fl_Button *bUpdateCancel;
extern void cb_btnDelete(Fl_Button*, void*);
extern Fl_Button *bDelete;
#include <FL/Fl_Output.H>
extern Fl_Output *txtLogFile;
#include "table.h"
extern Table *wBrowser;
extern Fl_Double_Window *wCabrillo;
extern Fl_Check_Browser *chkCabBrowser;
extern Fl_Button *btnCabClearAll;
extern Fl_Button *btnCabCheckAll;
extern Fl_Return_Button *btnCabOK;
extern Fl_Button *btnCabCancel;
#include "combo.h"
extern void setContestType();
extern Fl_ComboBox *cboContest;
extern Fl_Check_Button *btnCabCall;
extern Fl_Check_Button *btnCabFreq;
extern Fl_Check_Button *btnCabMode;
extern Fl_Check_Button *btnCabQSOdate;
extern Fl_Check_Button *btnCabTimeOFF;
extern Fl_Check_Button *btnCabRSTsent;
extern Fl_Check_Button *btnCabRSTrcvd;
extern Fl_Check_Button *btnCabSerialIN;
extern Fl_Check_Button *btnCabSerialOUT;
extern Fl_Check_Button *btnCabXchgIn;
extern Fl_Check_Button *btnCabMyXchg;
extern Fl_Check_Button *btnCabState;
extern Fl_Check_Button *btnCabCounty;
extern Fl_Button *btnCabClearAllFields;
extern Fl_Button *btnCabCheckAllFields;
void create_logbook_dialogs();
#endif
| 6,793
|
C++
|
.h
| 189
| 34.931217
| 75
| 0.815993
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,379
|
FTextView.h
|
w1hkj_fldigi/src/include/FTextView.h
|
// ----------------------------------------------------------------------------
// FTextView.h
//
// Copyright (C) 2007-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FTextView_H_
#define FTextView_H_
#include <stddef.h>
#include <string>
#include <FL/Fl.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Tile.H>
#include "Fl_Text_Editor_mod.H"
///
/// The text widgets base class.
/// This class implements a basic text editing widget based on Fl_Text_Editor_mod.
///
class FTextBase : public Fl_Text_Editor_mod
{
public:
// CLICK_START: same as first clickable style
// NATTR: number of styles (last style + 1)
enum TEXT_ATTR { RECV, XMIT, CTRL, SKIP, ALTR,
FSQ_TX, FSQ_DIR, FSQ_UND,
CLICK_START, QSY = CLICK_START, /* FOO, BAR, ..., */
NATTR };
FTextBase(int x, int y, int w, int h, const char *l = 0);
virtual ~FTextBase() { delete tbuf; delete sbuf; }
#if FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR >= 3
virtual void add(unsigned int c, int attr = RECV);
#else
virtual void add(unsigned char c, int attr = RECV);
#endif
virtual void add(const char *text, int attr = RECV);
void addstr(std::string text, int attr = RECV) { add(text.c_str(), attr); }
void addchr(unsigned char c, int attr = RECV) { add(c, attr); }
virtual int handle(int event);
virtual void handle_context_menu(void) { }
virtual void clear(void);//{ tbuf->text(""); sbuf->text(""); }
void set_word_wrap(bool b, bool b2 = false);
bool get_word_wrap(void) { return wrap; }
virtual void setFont(Fl_Font f, int attr = NATTR);
void setFontSize(int s, int attr = NATTR);
void setFontColor(Fl_Color c, int attr = NATTR);
// Override Fl_Text_Display, which stores the font number in an unsigned
// character and therefore cannot represent all fonts
Fl_Font textfont(void) { return styles[0].font; }
void textfont(Fl_Font f) { setFont(f); }
void textfont(uchar s) { textfont((Fl_Font)s); }
void cursorON(void) { show_cursor(); }
virtual void resize(int X, int Y, int W, int H);
static bool wheight_mult_tsize(void *arg, int xd, int yd);
protected:
void set_style(int attr, Fl_Font f, int s, Fl_Color c,
int set = SET_FONT | SET_SIZE | SET_COLOR);
int readFile(const char* fn = 0);
void saveFile(void);
char* get_word(int x, int y, const char* nwchars = "", int n = 1, bool ontext = true);
void init_context_menu(void);
void show_context_menu(void);
virtual void menu_cb(size_t item) { }
int reset_wrap_col(void);
void reset_styles(int set);
private:
FTextBase();
FTextBase(const FTextBase &t);
protected:
enum { FTEXT_DEF = 'A' };
enum set_style_op_e { SET_FONT = 1 << 0, SET_SIZE = 1 << 1, SET_COLOR = 1 << 2 };
Fl_Text_Buffer_mod *tbuf; ///< text buffer
Fl_Text_Buffer_mod *sbuf; ///< style buffer
Fl_Text_Display_mod::Style_Table_Entry styles[NATTR];
Fl_Menu_Item *context_menu;
int popx, popy;
bool wrap;
int wrap_col;
int max_lines;
bool scroll_hint;
bool restore_wrap;
// bool wrap_restore;
private:
int oldw, oldh, olds;
Fl_Font oldf;
};
///
/// A TextBase subclass to display received & transmitted text
///
class FTextView : public FTextBase
{
public:
FTextView(int x, int y, int w, int h, const char *l = 0);
~FTextView() { }
virtual int handle(int event);
protected:
enum {
VIEW_MENU_COPY, VIEW_MENU_CLEAR, VIEW_MENU_SELECT_ALL,
VIEW_MENU_SAVE, VIEW_MENU_WRAP
};
virtual void handle_context_menu(void);
virtual void menu_cb(size_t item);
static void changed_cb(int pos, int nins, int ndel, int nsty,
const char *dtext, void *arg);
void change_keybindings(void);
private:
FTextView();
FTextView(const FTextView &t);
protected:
static Fl_Menu_Item menu[];
bool quick_entry;
};
///
/// A FTextBase subclass to display and edit text to be transmitted
///
class FTextEdit : public FTextBase
{
public:
FTextEdit(int x, int y, int w, int h, const char *l = 0);
virtual int handle(int event);
protected:
enum {
EDIT_MENU_CUT, EDIT_MENU_COPY, EDIT_MENU_PASTE, EDIT_MENU_CLEAR,
EDIT_MENU_READ, EDIT_MENU_WRAP
};
virtual int handle_key(int key);
int handle_key_ascii(int key);
virtual int handle_dnd_drag(int pos);
int handle_dnd_drop(void);
virtual void handle_context_menu(void);
virtual void menu_cb(size_t item);
static void changed_cb(int pos, int nins, int ndel, int nsty,
const char *dtext, void *arg);
private:
FTextEdit();
FTextEdit(const FTextEdit &t);
protected:
static Fl_Menu_Item menu[];
char ascii_cnt;
unsigned ascii_chr;
bool dnd_paste;
};
#endif // FTextView_H_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 5,443
|
C++
|
.h
| 162
| 31.580247
| 88
| 0.677395
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,380
|
status.h
|
w1hkj_fldigi/src/include/status.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _status_H
#define _status_H
#include <string>
#include "globals.h"
#include "squelch_status.h"
struct status {
trx_mode lastmode;
std::string mode_name;
int mainX;
int mainY;
int mainW;
int mainH;
bool WF_UI;
bool NO_RIGLOG;
bool Rig_Log_UI;
bool Rig_Contest_UI;
bool DOCKEDSCOPE;
bool tbar_is_docked;
// int RxTextHeight;
int tiled_group_x;
bool show_channels;
int rigX;
int rigY;
int rigW;
int rigH;
int carrier;
int noCATfreq;
std::string noCATmode;
std::string noCATwidth;
int mag;
int offset;
int speed;
double reflevel;
int int_reflevel;
double ampspan;
int int_ampspan;
unsigned int VIEWERxpos;
unsigned int VIEWERypos;
unsigned int VIEWERwidth;
unsigned int VIEWERheight;
double VIEWER_psksquelch;
int int_VIEWER_psksquelch;
double VIEWER_rttysquelch;
int int_VIEWER_rttysquelch;
double VIEWER_cwsquelch;
int int_VIEWER_cwsquelch;
bool VIEWERvisible;
unsigned int fsqMONITORxpos;
unsigned int fsqMONITORypos;
unsigned int fsqMONITORwidth;
unsigned int fsqMONITORheight;
int tile_x;
int tile_w;
int tile_y;
int tile_h;
double tile_y_ratio;
double fsq_ratio;
double ifkp_ratio;
int int_tile_y_ratio;
int int_fsq_ratio;
int int_ifkp_ratio;
bool LOGenabled;
double sldrSquelchValue;
int int_sldrSquelchValue;
double sldrPwrSquelchValue;
int int_sldrPwrSquelchValue;
bool afconoff;
bool sqlonoff;
bool reverse;
double txlevel;
int scopeX;
int scopeY;
bool scopeVisible;
int scopeW;
int scopeH;
int svX; // spectrum viewer X, Y, W, H
int svY;
int svW;
int svH;
bool x_graticule;
bool y_graticule;
bool xy_graticule;
int repeatMacro;
float repeatIdleTime;
int timer;
int timerMacro;
bool skip_sked_macro;
std::string LastMacroFile;
int n_rsids;
bool spot_recv;
bool spot_log;
bool contest;
bool quick_entry;
bool rx_scroll_hints;
bool rx_word_wrap;
bool tx_word_wrap;
bool cluster_connected;
int logbook_x;
int logbook_y;
int logbook_w;
int logbook_h;
bool logbook_reverse;
int logbook_col_0;
int logbook_col_1;
int logbook_col_2;
int logbook_col_3;
int logbook_col_4;
int logbook_col_5;
int dxdialog_x;
int dxdialog_y;
int dxdialog_w;
int dxdialog_h;
// Contestia, Olivia, RTTY state values
int contestiatones;
int contestiabw;
int contestiamargin;
int contestiainteg;
bool contestia8bit;
int oliviatones;
int oliviabw;
int oliviamargin;
int oliviainteg;
bool olivia8bit;
int rtty_shift;
int rtty_custom_shift;
int rtty_baud;
int rtty_bits;
int rtty_parity;
int rtty_stop;
bool rtty_reverse;
bool rtty_crcrlf;
bool rtty_autocrlf;
int rtty_autocount;
int rtty_afcspeed;
bool rtty_filter_changed;
bool PreferXhairScope;
bool shaped_rtty;
bool UOSrx;
bool UOStx;
// end Contestia, Olivia, RTTY state values
std::string xmlrpc_address;
std::string xmlrpc_port;
std::string arq_address;
std::string arq_port;
std::string kiss_address;
std::string kiss_io_port;
std::string kiss_out_port;
int kiss_dual_port_enabled;
int data_io_enabled;
bool ax25_decode_enabled;
bool enableBusyChannel;
int busyChannelSeconds;
int kpsql_attenuation;
bool csma_enabled;
bool kiss_tcp_io;
bool kiss_tcp_listen;
bool kpsql_enabled;
int csma_persistance;
int csma_slot_time;
int csma_transmit_delay;
int psm_flush_buffer_timeout;
int psm_minimum_bandwidth;
int psm_minimum_bandwidth_margin;
bool psm_use_histogram;
int psm_histogram_offset_threshold;
int psm_hit_time_window;
int tx_buffer_timeout;
bool kiss_io_modem_change_inhibit;
bool ip_lock;
double squelch_value;
int int_squelch_value;
bool psk8DCDShortFlag;
std::string browser_search;
bool meters;
bool fsq_rx_abort;
bool ifkp_rx_abort;
//----------------------------------------------------------------------
// winkeyer status values
//----------------------------------------------------------------------
std::string WK_serial_port_name;
int WK_comm_baudrate;
int WK_stopbits;
int WK_comm_retries;
int WK_comm_wait;
int WK_comm_timeout;
bool WK_comm_echo;
// wkeyer values
unsigned char WK_mode_register;
unsigned char WK_speed_wpm;
unsigned char WK_sidetone;
unsigned char WK_weight;
unsigned char WK_lead_in_time;
unsigned char WK_tail_time;
unsigned char WK_min_wpm;
unsigned char WK_rng_wpm;
unsigned char WK_first_extension;
unsigned char WK_key_compensation;
unsigned char WK_farnsworth_wpm;
unsigned char WK_paddle_setpoint;
unsigned char WK_dit_dah_ratio;
unsigned char WK_pin_configuration;
unsigned char WK_dont_care;
bool WK_cut_zeronine;
unsigned char WK_cmd_wpm;
bool WK_use_pot;
bool WK_online;
int WK_version;
int WKFSK_mode; // 0 = cw, 1 = fsk/cw
int WKFSK_baud;
int WKFSK_stopbits;
int WKFSK_ptt;
int WKFSK_polarity;
int WKFSK_sidetone;
int WKFSK_auto_crlf;
int WKFSK_diddle;
int WKFSK_diddle_char;
int WKFSK_usos;
int WKFSK_monitor;
bool Nav_online;
bool Nav_config_online;
bool nanoCW_online;
bool nanoFSK_online;
bool useCW_KEYLINE;
//----------------------------------------------------------------------
// FMT saved controls
double FMT_ref_freq;
int int_FMT_ref_freq;
double FMT_unk_freq;
int int_FMT_unk_freq;
int FMT_rec_interval;
int FMT_trk_scale;
int FMT_minutes;
//----------------------------------------------------------------------
int debug_mask;
int debug_level;
//----------------------------------------------------------------------
int vumeter_shown;
//----------------------------------------------------------------------
bool bLastStateRead;
void initLastState();
void saveLastState();
void loadLastState();
};
extern status progStatus;
#endif
| 6,702
|
C++
|
.h
| 264
| 23.268939
| 79
| 0.67827
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,381
|
hid_mac.h
|
w1hkj_fldigi/src/include/hid_mac.h
|
/***********************************************************************
HIDAPI - Multi-Platform library for communication with HID devices.
hid_mac.h
Alan Ott
Signal 11 Software
Copyright 2009, All Rights Reserved.
C++ implementation
* Copyright 2021
* David Freese, W1HKJ
* for use in fldigi
This software is licensed under the terms of the GNU General Public
License v3.
***********************************************************************/
/** @file
* @defgroup API hidapi API
*/
#ifndef HIDAPI_H__
#define HIDAPI_H__
#include <cstring>
#include <cstdio>
#include <string>
#include <wchar.h>
#include <locale.h>
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
#include <dlfcn.h>
#include <IOKit/hid/IOHIDManager.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <IOKit/IOKitLib.h>
#include <CoreFoundation/CoreFoundation.h>
/* Linked List of input reports received from the device. */
class input_report {
public:
uint8_t *data;
size_t len;
input_report *next;
};
/* Barrier implementation because Mac OSX doesn't have pthread_barrier.
It also doesn't have clock_gettime(). So much for POSIX and SUSv2.
This implementation came from Brent Priddy and was posted on
StackOverflow. It is used with his permission. */
typedef int pthread_barrierattr_t;
typedef struct pthread_barrier {
pthread_mutex_t mutex;
pthread_cond_t cond;
int count;
int trip_count;
} pthread_barrier_t;
extern int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count);
extern int pthread_barrier_destroy(pthread_barrier_t *barrier);
extern int pthread_barrier_wait(pthread_barrier_t *barrier);
class hid_device {
public:
IOHIDDeviceRef device_handle;
int blocking;
int uses_numbered_reports;
int disconnected;
CFStringRef run_loop_mode;
CFRunLoopRef run_loop;
CFRunLoopSourceRef source;
uint8_t *input_report_buf;
CFIndex max_input_report_len;
input_report *input_reports;
pthread_t thread;
pthread_mutex_t mutex; /* Protects input_reports */
pthread_cond_t condition;
pthread_barrier_t barrier; /* Ensures correct startup sequence */
pthread_barrier_t shutdown_barrier; /* Ensures correct shutdown sequence */
int shutdown_thread;
hid_device() {
device_handle = NULL;
blocking = 1;
uses_numbered_reports = 0;
disconnected = 0;
run_loop_mode = NULL;
run_loop = NULL;
source = NULL;
input_report_buf = NULL;
input_reports = NULL;
shutdown_thread = 0;
/* Thread objects */
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&condition, NULL);
pthread_barrier_init(&barrier, NULL, 2);
pthread_barrier_init(&shutdown_barrier, NULL, 2);
}
~hid_device() {
hid_close();
}
/** @brief Write an Output report to a HID device.
The first byte of @p data[] must contain the Report ID. For
devices which only support a single report, this must be set
to 0x0. The remaining bytes contain the report data. Since
the Report ID is mandatory, calls to hid_write() will always
contain one more byte than the report contains. For example,
if a hid report is 16 bytes long, 17 bytes must be passed to
hid_write(), the Report ID (or 0x0, for devices with a
single report), followed by the report data (16 bytes). In
this example, the length passed in would be 17.
hid_write() will send the data on the first OUT endpoint, if
one exists. If it does not, it will send the data through
the Control Endpoint (Endpoint 0).
@ingroup API
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send.
@returns
This function returns the actual number of bytes written and
-1 on error.
*/
int hid_write(const unsigned char *data, size_t length);
/** @brief Read an Input report from a HID device with timeout.
Input reports are returned
to the host through the INTERRUPT IN endpoint. The first byte will
contain the Report number if the device uses numbered reports.
@ingroup API
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with multiple
reports, make sure to read an extra byte for the report number.
@param milliseconds timeout in milliseconds or -1 for blocking wait.
@returns
This function returns the actual number of bytes read and
-1 on error. If no packet was available to be read within
the timeout period, this function returns 0.
*/
int hid_read_timeout(unsigned char *data, size_t length, int milliseconds);
/** @brief Read an Input report from a HID device.
Input reports are returned
to the host through the INTERRUPT IN endpoint. The first byte will
contain the Report number if the device uses numbered reports.
@ingroup API
@param device A device handle returned from hid_open().
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with
multiple reports, make sure to read an extra byte for
the report number.
@returns
This function returns the actual number of bytes read and
-1 on error. If no packet was available to be read and
the handle is in non-blocking mode, this function returns 0.
*/
int hid_read(unsigned char *data, size_t length);
/** @brief Get a feature report from a HID device.
Set the first byte of @p data[] to the Report ID of the
report to be read. Make sure to allow space for this
extra byte in @p data[]. Upon return, the first byte will
still contain the Report ID, and the report data will
start in data[1].
@ingroup API
@param device A device handle returned from hid_open().
@param data A buffer to put the read data into, including
the Report ID. Set the first byte of @p data[] to the
Report ID of the report to be read, or set it to zero
if your device does not use numbered reports.
@param length The number of bytes to read, including an
extra byte for the report ID. The buffer can be longer
than the actual report.
@returns
This function returns the number of bytes read plus
one for the report ID (which is still in the first
byte), or -1 on error.
*/
int hid_get_feature_report(unsigned char *data, size_t length);
/** @brief Set the device handle to be non-blocking.
In non-blocking mode calls to hid_read() will return
immediately with a value of 0 if there is no data to be
read. In blocking mode, hid_read() will wait (block) until
there is data to read before returning.
Nonblocking can be turned on and off at any time.
@ingroup API
@param device A device handle returned from hid_open().
@param nonblock enable or not the nonblocking reads
- 1 to enable nonblocking
- 0 to disable nonblocking.
@returns
This function returns 0 on success and -1 on error.
*/
int hid_set_nonblocking(int nonblock);
/** @brief Send a Feature report to the device.
Feature reports are sent over the Control endpoint as a
Set_Report transfer. The first byte of @p data[] must
contain the Report ID. For devices which only support a
single report, this must be set to 0x0. The remaining bytes
contain the report data. Since the Report ID is mandatory,
calls to hid_send_feature_report() will always contain one
more byte than the report contains. For example, if a hid
report is 16 bytes long, 17 bytes must be passed to
hid_send_feature_report(): the Report ID (or 0x0, for
devices which do not use numbered reports), followed by the
report data (16 bytes). In this example, the length passed
in would be 17.
@ingroup API
@param device A device handle returned from hid_open().
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send, including
the report number.
@returns
This function returns the actual number of bytes written and
-1 on error.
*/
int hid_send_feature_report(const unsigned char *data, size_t length);
int cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime);
int return_data(unsigned char *data, size_t length);
int set_report(IOHIDReportType type, const unsigned char *data, size_t length);
void register_error(const char *op);
void hid_close();
const char* hid_error();
};
/// hidapi info structure
class hid_device_info {
public:
std::string path;
unsigned short vendor_id;
unsigned short product_id;
unsigned short release_number;
std::string str_serial_number;
std::string str_manufacturer_string;
std::string str_product_string;
unsigned short usage_page; // Usage Page for this Device/Interface (Windows/Mac only).
unsigned short usage;// Usage for this Device/Interface (Windows/Mac only).*/
/** The USB interface which this logical device
represents. Valid on both Linux implementations
in all cases, and valid on the Windows implementation
only if the device contains more than one interface. */
int interface_number;
hid_device_info *next;
hid_device_info() {
}
~hid_device_info() {
}
};
/** @brief Initialize the HIDAPI library.
This function initializes the HIDAPI library. Calling it is not
strictly necessary, as it will be called automatically by
hid_enumerate() and any of the hid_open_*() functions if it is
needed. This function should be called at the beginning of
execution however, if there is a chance of HIDAPI handles
being opened by different threads simultaneously.
@ingroup API
@returns
This function returns 0 on success and -1 on error.
*/
int hid_init(void);
/** @brief Finalize the HIDAPI library.
This function frees all of the static data associated with
HIDAPI. It should be called at the end of execution to avoid
memory leaks.
@ingroup API
@returns
This function returns 0 on success and -1 on error.
*/
int hid_exit(void);
/** @brief Enumerate the HID Devices.
This function returns a linked list of all the HID devices
attached to the system which match vendor_id and product_id.
If @p vendor_id is set to 0 then any vendor matches.
If @p product_id is set to 0 then any product matches.
If @p vendor_id and @p product_id are both set to 0, then
all HID devices will be returned.
@ingroup API
@param vendor_id The Vendor ID (VID) of the types of device
to open.
@param product_id The Product ID (PID) of the types of device to open.
@returns
This function returns a pointer to a linked list of type
struct #hid_device, containing information about the HID devices
attached to the system, or NULL in the case of failure. Free
this linked list by calling hid_free_enumeration().
*/
hid_device_info *hid_enumerate(unsigned short vendor_id, unsigned short product_id);
/** @brief Free an enumeration Linked List
This function frees a linked list created by hid_enumerate().
@ingroup API
@param devs Pointer to a list of struct_device returned from
hid_enumerate().
*/
void hid_free_enumeration(hid_device_info *devs);
/** @brief Open a HID device using a Vendor ID (VID), Product ID
(PID) and optionally a serial number.
If @p serial_number is NULL, the first device with the
specified VID and PID is opened.
@ingroup API
@param vendor_id The Vendor ID (VID) of the device to open.
@param product_id The Product ID (PID) of the device to open.
@param serial_number The Serial Number of the device to open
(Optionally NULL).
@returns
This function returns a pointer to a #hid_device object on
success or NULL on failure.
*/
hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, std::string serial_number = "");
/** @brief Open a HID device by its path name.
The path name be determined by calling hid_enumerate(), or a
platform-specific path name can be used (eg: /dev/hidraw0 on
Linux).
@ingroup API
@param path The path name of the device to open
@returns
This function returns a pointer to a #hid_device object on
success or NULL on failure.
*/
hid_device * hid_open_path(std::string path);
/** @brief Close a HID device.
@ingroup API
@param device A device handle returned from hid_open().
*/
#endif
| 12,109
|
C++
|
.h
| 310
| 36.741935
| 115
| 0.753585
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,382
|
viewpsk.h
|
w1hkj_fldigi/src/include/viewpsk.h
|
// ----------------------------------------------------------------------------
// viewpsk.h -- psk modem
//
// Copyright (C) 2008
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _VIEWPSK_H
#define _VIEWPSK_H
#include "complex.h"
#include "modem.h"
#include "globals.h"
#include "filters.h"
#include "pskeval.h"
#include "viterbi.h"
#include "mfskvaricode.h"
#include "interleave.h"
//=====================================================================
#define VPSKSAMPLERATE (8000)
#define VAFCDECAY 8
#define MAXCHANNELS 30
#define VSEARCHWIDTH 70
#define VSIGSEARCH 5
#define VWAITCOUNT 4
#define NULLFREQ 1e6
//=====================================================================
struct CHANNEL {
double phaseacc;
cmplx prevsymbol;
cmplx quality;
unsigned int shreg;
unsigned int shreg2;
double metric;
double frequency;
double freqerr;
double phase;
double syncbuf[16];
double averageamp;
C_FIR_filter *fir1;
C_FIR_filter *fir2;
viterbi *dec;
viterbi *dec2;
unsigned int bitshreg;
int rxbitstate;
unsigned char symbolpair[2];
int fecmet;
int fecmet2;
interleave *Rxinlv;
interleave *Rxinlv2;
int bits;
double bitclk;
unsigned int dcdshreg;
unsigned int dcdshreg2;
int dcd;
int waitcount;
int timeout;
bool reset;
int acquire;
};
class viewpsk {
private:
trx_mode viewmode;
int symbollen;
int symbits;
double bandwidth;
int dcdbits;
int fa;
int fb;
int ftest;
double test_peak_amp;
time_t now;
bool reset_all;
bool tracked;
bool browser_changed;
CHANNEL channel[MAXCHANNELS];
int nchannels;
int lowfreq;
bool _pskr;
bool _qpsk;
pskeval* evalpsk;
void rx_symbol(int ch, cmplx symbol);
void rx_bit(int ch, int bit);
void findsignal(int);
void afc(int);
void rx_bit2(int ch, int bit);
void rx_pskr(int ch, unsigned char symbol);
void rx_qpsk(int ch, int bits);
bool is_valid_char(int &c);
inline void timeout_check();
inline void insert();
public:
viewpsk(pskeval* eval, trx_mode mode);
~viewpsk();
void init();
void restart(trx_mode mode);
void rx_init() {};
void tx_init() {};
void restart() {};
int rx_process(const double *buf, int len);
int get_freq(int n);
void set_freq(int n, double f) { channel[n].frequency = f; }
void findsignals();
void clearch(int n);
void clear();
};
extern viewpsk *pskviewer;
#endif
| 3,141
|
C++
|
.h
| 121
| 24.140496
| 79
| 0.653641
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,384
|
nullmodem.h
|
w1hkj_fldigi/src/include/nullmodem.h
|
// ----------------------------------------------------------------------------
// NULLMODEM.h -- BASIS FOR ALL MODEMS
//
// Copyright (C) 2006
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _NULLMODEM_H
#define _NULLMODEM_H
#include "trx.h"
#include "modem.h"
#define NULLMODEMSampleRate 8000
class NULLMODEM : public modem {
protected:
public:
NULLMODEM();
~NULLMODEM();
void init();
void rx_init();
void restart();
void tx_init();
int rx_process(const double *buf, int len);
int tx_process();
};
#endif
| 1,254
|
C++
|
.h
| 39
| 30.794872
| 79
| 0.645161
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,385
|
macroedit.h
|
w1hkj_fldigi/src/include/macroedit.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef MACROEDIT_H
#define MACROEDIT_H
#include <FL/Fl_Widget.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Hold_Browser.H>
#include <FL/Fl_Pixmap.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
#include "flinput2.h"
extern void loadBrowser(Fl_Widget *widget);
extern Fl_Button *btnMacroEditOK;
extern Fl_Button *btnMacroEditCancel;
extern Fl_Hold_Browser *macroDefs;
extern Fl_Button *btnInsertMacro;
extern Fl_Input2 *macrotext;
extern Fl_Input2 *labeltext;
extern Fl_Double_Window *MacroEditDialog;
extern Fl_Double_Window* make_macroeditor();
enum { MACRO_EDIT_BUTTON, MACRO_EDIT_INPUT };
extern void editMacro(int b, int t = MACRO_EDIT_BUTTON, Fl_Input* in = 0);
extern void update_macro_button(int iMacro, const char *text, const char *name);
extern void update_macroedit_font();
#endif
| 1,732
|
C++
|
.h
| 43
| 39.069767
| 80
| 0.68869
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,386
|
psk_browser.h
|
w1hkj_fldigi/src/include/psk_browser.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef PSK_BROWSER_H
#define PSK_BROWSER_H
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Hold_Browser.H>
#include <string>
#include <config.h>
#include "viewpsk.h"
#include "globals.h"
#include "charsetdistiller.h"
#include "re.h"
#define BWSR_BORDER 2
class pskBrowser : public Fl_Hold_Browser{
private:
static std::string hilite_color_1;
static std::string hilite_color_2;
static std::string white;
static std::string bkgnd[];
std::string fline;
std::string nuline;
std::string bwsrline[MAXCHANNELS];
int bwsrfreq[MAXCHANNELS];
struct {bool regex_alert; bool mycall_alert;} alerted[MAXCHANNELS];
CharsetDistiller *cdistiller;
int labelwidth[VIEWER_LABEL_NTYPES];
Fl_Font fnt;
Fl_Color HiLite_1;
Fl_Color HiLite_2;
Fl_Color BkSelect;
Fl_Color Backgnd1;
Fl_Color Backgnd2;
int siz;
int cols[2];
char szLine[32];
public:
static int cwidth;
static int cheight;
static int sbarwidth;
long long rfc;
bool usb;
fre_t *seek_re;
public:
pskBrowser(int x, int y, int w, int h, const char *l = "");
~pskBrowser();
void makecolors();
void evalcwidth();
void setfont(Fl_Font font, int sz) { fnt = font; siz = sz; evalcwidth();}
void HighLight_1(Fl_Color clr) { HiLite_1 = clr; }
Fl_Color HighLight_1() { return HiLite_1; }
void HighLight_2(Fl_Color clr) { HiLite_2 = clr; }
Fl_Color HighLight_2() { return HiLite_2; }
void SelectColor(Fl_Color clr) { BkSelect = clr; }
Fl_Color SelectColor() { return BkSelect; }
void Background1(Fl_Color clr) { Backgnd1 = clr; }
Fl_Color Background1() { return Backgnd1; }
void Background2(Fl_Color clr) { Backgnd2 = clr; }
Fl_Color Background2() { return Backgnd2; }
void columns(int a) { cols[0] = a; cols[1] = 0; column_widths(cols); }
void resize(int x, int y, int w, int h);
void addchr(int ch, int freq, unsigned char c, int md, bool alert = false);
void set_input_encoding(int encoding_id);
std::string freqformat (int i);
void set_freq(int i, int freq);
void clearline(int i) { bwsrline[i] = ""; }
std::string line(int i) { return (i < 1 ? "" : i > MAXCHANNELS ? "" : bwsrline[i - 1]); }
int freq(int i);
void clear();
void clearch(int n, int freq);
void swap(int, int);
};
#endif
| 3,122
|
C++
|
.h
| 91
| 32.538462
| 90
| 0.68215
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,387
|
hamlib.h
|
w1hkj_fldigi/src/include/hamlib.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _HAMLIB_H
#define _HAMLIB_H
#include <hamlib/rig.h>
extern void hamlib_get_rigs(void);
extern size_t hamlib_get_index(rig_model_t model);
extern rig_model_t hamlib_get_rig_model(size_t i);
extern rig_model_t hamlib_get_rig_model_compat(const char* name);
extern void hamlib_get_rig_str(int (*func)(const char*));
extern void hamlib_close();
extern bool hamlib_init(bool bPtt);
extern void hamlib_set_ptt(int);
extern void hamlib_set_qsy(long long f);
extern int hamlib_setfreq(long int);
extern int hamlib_setmode(rmode_t);
extern rmode_t hamlib_getmode();
extern int hamlib_setwidth(pbwidth_t);
extern pbwidth_t hamlib_getwidth();
extern void hamlib_get_defaults();
extern void hamlib_init_defaults();
#endif
| 1,613
|
C++
|
.h
| 39
| 40.205128
| 79
| 0.684311
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,388
|
xmlrpc.h
|
w1hkj_fldigi/src/include/xmlrpc.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef XMLRPC_H
#define XMLRPC_H
#include <iosfwd>
#include <string>
#include <xmlrpcpp/XmlRpcServer.h>
#include <xmlrpcpp/XmlRpcServerMethod.h>
#include <xmlrpcpp/XmlRpcValue.h>
#include "threads.h"
struct XmlRpcImpl;
class XML_RPC_Server
{
public:
static void start(const char* node, const char* service);
static void stop(void);
static std::ostream& list_methods(std::ostream& out);
private:
XML_RPC_Server();
~XML_RPC_Server();
XML_RPC_Server(const XML_RPC_Server&);
XML_RPC_Server operator=(const XML_RPC_Server&);
static void add_methods(void);
static void* thread_func(void*);
private:
static XML_RPC_Server* inst;
bool run;
XmlRpcImpl* server_impl;
};
extern void xmlrpc_set_qsy(long long rfc);
extern int xmltest_char();
extern bool xmltest_char_available;
extern void reset_xmlchars();
extern int number_of_samples(std::string s);
extern bool flmsg_is_online;
extern std::string flmsg_data;
extern pthread_mutex_t* server_mutex;
#endif // XMLRPC_H
| 1,871
|
C++
|
.h
| 55
| 32.618182
| 79
| 0.694906
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,389
|
macros.h
|
w1hkj_fldigi/src/include/macros.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _MACROS_H
#define _MACROS_H
#include <string>
#define NUMMACKEYS 12
#define NUMKEYROWS 2
#define MAXKEYROWS 4
#define MAXMACROS (MAXKEYROWS * NUMMACKEYS)
extern void CPS_report(int);
extern bool PERFORM_CPS_TEST;
extern int num_cps_chars;
extern struct timeval tv_cps_start;
struct CONTESTCNTR {
int count;
char szCount[20];
char szDisp[40];
std::string fmt;
CONTESTCNTR() {
count = 0;
fmt = "%04d";
}
void Format(int ndigits, bool lz) {
char c;
fmt = '%';
if (lz) fmt = fmt + '0';
c = '0' + ndigits;
fmt = fmt + c;
fmt = fmt + 'd';
}
};
struct MACROTEXT {
bool changed;
std::string name[MAXMACROS];
std::string text[MAXMACROS];
int loadMacros(const std::string& filename);
void loadDefault();
void openMacroFile();
void writeMacroFile();
void saveMacroFile();
void saveMacros(const std::string& fname);
std::string expandMacro(std::string &s, bool recurse);
void execute(int n);
void repeat(int n);
void timed_execute();
MACROTEXT();
private:
std::string expanded;
void loadnewMACROS(std::string& s, size_t &i, size_t endbracket);
void savecurrentMACROS(std::string& s, size_t &i, size_t endbracket);
};
extern MACROTEXT macros;
extern CONTESTCNTR contest_count;
extern std::string info1msg;
extern std::string info2msg;
extern std::string qso_time;
extern std::string qso_exchange;
extern std::string exec_date;
extern std::string exec_time;
extern std::string exec_string;
extern std::string text2repeat;
extern std::string macrochar;
extern bool local_timed_exec;
extern bool macro_idle_on;
extern size_t repeatchar;
extern bool do_tune_on;
void set_macro_env(void);
void queue_reset();
void Tx_queue_execute();
void Rx_queue_execute();
bool queue_must_rx();
void idleTimer(void *);
extern void TxQueINSERTIMAGE(std::string s);
extern void clear_buffered_text();
extern char next_buffered_macro_char();
#endif
| 2,772
|
C++
|
.h
| 93
| 28.204301
| 79
| 0.703829
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,390
|
YAESUkeying.h
|
w1hkj_fldigi/src/include/YAESUkeying.h
|
// ----------------------------------------------------------------------------
// FTkeying.h serial string CW interface to Elecraft transceivers
//
// Copyright (C) 2020
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _FTKEYING_H
#define _FTKEYING_H
extern bool use_FTkeyer;
extern int FTwpm;
extern void set_FTkeyer();
extern void FTkeyer_send_char(int);
#endif
| 1,099
|
C++
|
.h
| 28
| 38.107143
| 79
| 0.649485
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,392
|
fl_digi.h
|
w1hkj_fldigi/src/include/fl_digi.h
|
// ----------------------------------------------------------------------------
//
// fl_digi.h
//
// Copyright (C) 2006-2010
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FL_DIGI_H
#define FL_DIGI_H
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Pack.H>
#include <string>
#include "combo.h"
//#include "Fl_Tile_Check.h"
#include "Panel.h"
#include "FTextRXTX.h"
#include "raster.h"
#include "waterfall.h"
#include "digiscope.h"
#include "globals.h"
#include "progress.h"
#include "FreqControl.h"
#include "flinput2.h"
#include "flslider2.h"
#include "psk_browser.h"
#include "re.h"
#include "smeter.h"
#include "pwrmeter.h"
#include "picture.h"
#include "qso_db.h"
#include "vumeter.h"
#include "status_box.h"
#include <FL/Fl_Progress.H>
extern fre_t seek_re;
extern Fl_Double_Window *fl_digi_main;
extern Fl_Double_Window *scopeview;
extern Fl_Double_Window *dlgRecordLoader;
extern Fl_Double_Window *dxcluster_viewer;
extern Fl_Double_Window *rxaudio_dialog;
extern Fl_Double_Window *fsqMonitor;
extern Fl_Double_Window *fsqDebug;
extern Fl_Double_Window *fsqpicRxWin;
extern Fl_Double_Window *fsqpicTxWin;
extern Fl_Double_Window *ifkppicRxWin;
extern Fl_Double_Window *ifkppicTxWin;
extern Fl_Double_Window *notify_window;
extern Fl_Double_Window *dxcc_window;
extern Fl_Double_Window *dxcluster_viewer;
extern Fl_Double_Window *rxaudio_dialog;
extern bool first_use;
extern bool bEXITING;
extern FTextRX *ReceiveText;
extern FTextTX *TransmitText;
extern Raster *FHdisp;
extern pskBrowser *mainViewer;
extern Fl_Input2 *txtInpSeek;
extern Fl_Box *hideViewer;
extern Fl_Group *mvgroup;
extern Fl_Group *text_group;
extern Fl_Group *wefax_group;
extern Panel *text_panel;
extern Fl_Box *minbox;
extern int oix;
extern Fl_Box *Status2;
extern Fl_Box *Status1;
extern status_box *StatusBar;
extern vumeter *VuMeter;
extern Fl_Box *VuBox;
extern void VuMeter_cb(vumeter *vu, void *d);
extern void StatusBar_cb(Fl_Box *bx, void *d);
extern Fl_Counter2 *cntCW_WPM;
extern Fl_Counter2 *cntTxLevel;
extern Fl_Button *MODEstatus;
extern Fl_Slider2 *sldrSquelch;
extern Progress *pgrsSquelch;
extern Smeter *smeter;
extern PWRmeter *pwrmeter;
extern Fl_Value_Slider2 *pwr_level;
extern Fl_Group *pwrlevel_grp;
extern Fl_Button *btnMacro[];
extern Fl_Button *btnAltMacros1;
extern Fl_Button *btnAltMacros2;
extern Fl_Button *btnDockMacro[];
extern Fl_Button *btnMacroTimer;
extern Fl_Group *macroFrame1;
extern Fl_Group *macroFrame2;
extern Fl_Input2 *inpFreq;
extern Fl_Input2 *inpTimeOff;
extern Fl_Input2 *inpTimeOff1;
extern Fl_Input2 *inpTimeOff2;
extern Fl_Input2 *inpTimeOff3;
extern Fl_Input2 *inpTimeOn;
extern Fl_Input2 *inpTimeOn1;
extern Fl_Input2 *inpTimeOn2;
extern Fl_Input2 *inpTimeOn3;
extern Fl_Input2 *inpTimeOn4;
extern Fl_Input2 *inpTimeOn5;
extern Fl_Input2 *inpCall;
extern Fl_Input2 *inpName;
extern Fl_Input2 *inpRstIn;
extern Fl_Input2 *inpRstIn1;
extern Fl_Input2 *inpRstIn2;
extern Fl_Input2 *inpRstIn3;
extern Fl_Input2 *inpRstIn4;
extern Fl_Input2 *inpRstOut;
extern Fl_Input2 *inpRstOut1;
extern Fl_Input2 *inpRstOut2;
extern Fl_Input2 *inpRstOut3;
extern Fl_Input2 *inpRstOut4;
extern Fl_Input2 *inpQTH;
extern Fl_Input2 *inpQth;
extern Fl_Input2 *inpState;
extern Fl_Input2 *inpState1;
extern Fl_ComboBox *cboCountry;
extern Fl_Input2 *inpCounty;
extern Fl_ComboBox *cboCountryQSO;
extern Fl_ComboBox *cboCountyQSO;
extern Fl_Input2 *inpSerNo;
extern Fl_Input2 *inpSerNo1;
extern Fl_Input2 *inpSerNo2;
extern Fl_Input2 *inpSerNo3;
extern Fl_Input2 *inpSerNo4;
extern Fl_Input2 *outSerNo;
extern Fl_Input2 *outSerNo1;
extern Fl_Input2 *outSerNo2;
extern Fl_Input2 *outSerNo3;
extern Fl_Input2 *outSerNo4;
extern Fl_Input2 *inpXchgIn;
extern Fl_Input2 *inpXchgIn1;
extern Fl_Input2 *inpXchgIn2;
extern Fl_Input2 *inpVEprov;
extern Fl_Input2 *inpLoc;
extern Fl_Input2 *inpLoc1;
extern Fl_Input2 *inpNotes;
extern Fl_Input2 *inpAZ; // WA5ZNU
extern Fl_Button *qsoSave;
extern Fl_Box *txtRigName;
extern cFreqControl *qsoFreqDisp1;
extern cFreqControl *qsoFreqDisp2;
extern cFreqControl *qsoFreqDisp3;
extern Fl_Input2 *inpFreq2;
extern Fl_Input2 *inpCall1;
extern Fl_Input2 *inpCall2;
extern Fl_Input2 *inpCall3;
extern Fl_Input2 *inpCall4;
extern Fl_Input2 *inpName1;
extern Fl_Input2 *inpName2;
extern Fl_Group *QsoInfoFrame1B;
extern Fl_Group *qsoFrameView;
extern Fl_Group *QsoInfoFrame;
extern cFreqControl *qsoFreqDisp;
extern Fl_Group *qso_combos;
extern Fl_ListBox *qso_opMODE;
extern Fl_Group *qso_opGROUP;
extern Fl_ListBox *qso_opBW;
extern Fl_Button *qso_btnBW1;
extern Fl_ListBox *qso_opBW1;
extern Fl_Button *qso_btnBW2;
extern Fl_ListBox *qso_opBW2;
extern Fl_Button *qso_opPICK;
extern Fl_Browser *qso_opBrowser;
extern Fl_Group *fsq_group;
extern FTextRX *fsq_rx_text;
extern FTextTX *fsq_tx_text;
extern Fl_Browser *fsq_heard;
extern FTextRX *fsq_monitor;
extern FTextRX *fsq_que;
extern Fl_Double_Window *create_fsqMonitor();
extern void open_fsqMonitor();
extern void close_fsqMonitor();
extern Fl_Double_Window *create_fsqDebug();
extern void open_fsqDebug();
extern void close_fsqDebug();
extern void write_fsqDebug(int ch, int style = FTextBase::RECV);
extern void write_fsqDebug(std::string s, int style = FTextBase::RECV);
extern void fsq_que_clear();
extern void write_fsq_que(std::string s);
extern Fl_Box *tx_timer;
extern void start_tx_timer();
extern void stop_tx_timer();
extern void fsq_disableshift();
extern void fsq_enableshift();
extern void fsq_updateRxPic(unsigned char data, int pos);
extern void fsq_createRxViewer();
extern void fsq_showRxViewer(int W, int H, char c);
extern int fsq_load_image(const char *n, int W = 320, int H = 240);
extern void fsq_updateTxPic(unsigned char data, int pos);
extern void cb_fsqpicTxLoad(Fl_Widget *, void *);
extern void cb_fsqpicTxClose( Fl_Widget *w, void *);
extern int fsqpic_TxGetPixel(int pos, int color);
extern void cb_fsqpicTxSendColor( Fl_Widget *w, void *);
extern void cb_fsqpicTxSendGrey( Fl_Widget *w, void *);
extern void cb_fsqpicTxSendAbort( Fl_Widget *w, void *);
extern void cb_fsqpicTxSPP( Fl_Widget *w, void *);
extern void fsq_createTxViewer();
extern void fsq_TxViewerResize(int W, int H);
extern void fsq_showTxViewer(char c);
extern void fsq_deleteTxViewer();
extern void fsq_deleteRxViewer();
extern int fsq_print_time_left(float time_sec, char *str, size_t len,
const char *prefix, const char *suffix);
extern void fsq_transmit(void *);
extern Fl_Light_Button *btn_FSQCALL;
extern Fl_Light_Button *btn_SELCAL;
extern Fl_Light_Button *btn_MONITOR;
extern Fl_Button *btn_FSQQTH;
extern Fl_Button *btn_FSQQTC;
extern Progress *ind_fsq_speed;
extern Progress *ind_fsq_s2n;
extern std::string fsq_selected_call;
extern bool in_heard(std::string);
extern void cb_fsq_heard(Fl_Browser*, void*);
extern std::string heard_list();
extern void clear_heard_list();
extern void age_heard_list();
extern void add_to_heard_list(std::string, std::string);
extern void fsq_transmit_string(std::string s);
extern void fsq_xmt_mt(void *s);
extern void fsq_xmt(std::string s);
extern void fsq_repeat_last_heard();
extern void fsq_repeat_last_command();
extern void display_fsq_rx_text(std::string text, int style = FTextBase::SKIP);
extern void display_fsq_mon_text(std::string text, int style = FTextBase::SKIP);
extern void combo_color_font(Fl_ComboBox *cbo);
extern Fl_Group *ifkp_group;
extern Fl_Group *ifkp_upper;
extern Fl_Group *ifkp_upper_left;
extern FTextRX *ifkp_rx_text;
extern Fl_Group *ifkp_upper_right;
extern Fl_Browser *ifkp_heard;
extern Progress *ifkp_s2n_progress;
extern Fl_Group *ifkp_lower;
extern FTextTX *ifkp_tx_text;
extern picture *ifkp_avatar;
extern int ifkp_load_avatar(std::string image_fname = "", int W=59, int H=74);
extern void ifkp_clear_avatar();
extern void ifkp_update_avatar(unsigned char data, int pos);
extern int ifkp_get_avatar_pixel(int pos, int color);
extern void cb_ifkp_send_avatar( Fl_Widget *w, void *);
extern void ifkp_load_raw_video();
extern void activate_ifkp_image_item(bool);
extern void cb_ifkp_heard(Fl_Browser*, void*);
extern void enableSELCAL();
extern unsigned char tux_img[59*74*3];
extern void cbFSQQTC(Fl_Widget *w, void *d);
extern void cbFSQQTH(Fl_Widget *w, void *d);
extern void cbFSQCQ(Fl_Widget *w, void *d);
extern void cbMONITOR(Fl_Widget *w, void *d);
extern void cbSELCAL(Fl_Widget *w, void *d);
extern void cbFSQCALL(Fl_Widget *w, void *d);
extern void ifkp_showTxViewer(char C = 'S');
extern void ifkp_load_scaled_image(std::string, bool gray = false);
#include <FL/Fl_Bitmap.H>
extern Fl_Bitmap image_s2n;
//------------------------------------------------------------------------------
// fsq images
//------------------------------------------------------------------------------
extern Fl_Double_Window *picRxWin;
extern picture *picRx;
extern Fl_Button *btnpicRxSave;
extern Fl_Button *btnpicRxAbort;
extern Fl_Button *btnpicRxClose;
extern Fl_Double_Window *picTxWin;
extern picture *picTx;
extern Fl_Button *btnpicTxSPP;
extern Fl_Button *btnpicTxSendColor;
extern Fl_Button *btnpicTxSendGrey;
extern Fl_Button *btnpicTxSendAbort;
extern Fl_Button *btnpicTxLoad;
extern Fl_Button *btnpicTxClose;
//------------------------------------------------------------------------------
extern Fl_Value_Slider2 *mvsquelch;
extern Fl_Light_Button *btnAFC;
extern Fl_Light_Button *btnSQL;
extern Fl_Light_Button *btnPSQL;
extern Fl_Box *rsid_status;
extern Fl_Light_Button *btnRSID;
extern Fl_Light_Button *btnTxRSID;
extern Fl_Light_Button *btnTune;
extern Fl_Light_Button *btnAutoSpot;
extern bool bWF_only;
extern int altMacros;
extern waterfall *wf;
extern Digiscope *digiscope;
extern std::string argv_window_title;
extern std::string main_window_title;
extern std::string xcvr_title;
extern int Qwait_time;
extern int Qidle_time;
extern bool idling;
extern bool csma_idling;
extern void toggleRSID();
extern int rightof(Fl_Widget* w);
extern int leftof(Fl_Widget* w);
extern int above(Fl_Widget* w);
extern int below(Fl_Widget* w);
extern void set_menus();
extern void create_fl_digi_main(int argc, char** argv);
extern void update_main_title();
extern void activate_rig_menu_item(bool b);
extern void activate_test_menu_item(bool b);
extern void activate_mfsk_image_item(bool b);
extern void activate_wefax_image_item(bool b);
extern void activate_thor_image_item(bool b);
extern void WF_UI();
extern void set_macroLabels();
extern void UI_select();
extern void cb_mnuVisitURL(Fl_Widget*, void* arg);
extern void put_freq(double frequency);
extern void put_Bandwidth(int bandwidth);
extern void callback_set_metric(double metric);
extern void put_cwRcvWPM(double wpm);
extern void set_scope_mode(Digiscope::scope_mode md);
extern void set_scope(double *data, int len, bool autoscale = true);
extern void set_phase(double phase, double quality, bool highlight);
extern void set_rtty(double, double, double);
extern void set_video(double *, int, bool = true);
extern void set_zdata(cmplx *, int);
extern void set_scope_xaxis_1(double y1);
extern void set_scope_xaxis_2(double y2);
extern void set_scope_yaxis_1(double x1);
extern void set_scope_yaxis_2(double x2);
extern void set_scope_clear_axis();
extern void set_CWwpm();
extern void put_rx_char(unsigned int data, int style = FTextBase::RECV);
extern void put_rx_processed_char(unsigned int data, int style = FTextBase::RECV);
extern void put_sec_char( char chr );
enum status_timeout {
STATUS_CLEAR,
STATUS_DIM,
STATUS_NUM
};
extern const char *zshowtime();
extern void put_status(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR);
extern void clear_StatusMessages();
extern void put_MODEstatus(const char* fmt, ...) format__(printf, 1, 2);
extern void put_MODEstatus(trx_mode mode);
extern void put_Status1(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR);
extern void put_Status2(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR);
extern void show_clock(bool);
extern void show_frequency(long long);
extern void show_mode(const std::string sMode);
extern void show_bw(const std::string sWidth);
extern void show_bw1(const std::string sVal);
extern void show_bw2(const std::string sVal);
extern void show_spot(bool v);
extern void showMacroSet();
extern void setwfrange();
extern void showDTMF(const std::string s);
extern void * set_xmtrcv_button_false(void);
extern void * set_xmtrcv_button_true(void);
extern void * set_xmtrcv_selection_color_pending(void);
extern void * set_xmtrcv_selection_color_transmitting(void);
extern void xmtrcv_selection_color(Fl_Color clr);
extern void xmtrcv_selection_color();
extern void rev_selection_color();
extern void xmtlock_selection_color();
extern void sql_selection_color();
extern void afc_selection_color();
extern void rxid_selection_color();
extern void txid_selection_color();
extern void tune_selection_color();
extern void spot_selection_color();
extern void set_default_btn_color();
extern void put_WARNstatus(double);
extern void qsoSave_cb(Fl_Widget *b, void *);
extern bool que_ok;
extern bool tx_queue_done;
extern void post_queue_execute(void*);
extern void queue_execute_after_rx(void*);
extern time_t program_start_time;
extern bool xmlrpc_address_override_flag;
extern bool xmlrpc_port_override_flag;
extern bool arq_address_override_flag;
extern bool arq_port_override_flag;
extern bool kiss_address_override_flag;
extern std::string override_xmlrpc_address;
extern std::string override_xmlrpc_port;
extern std::string override_arq_address;
extern std::string override_arq_port;
extern std::string override_kiss_address;
extern std::string override_kiss_io_port;
extern std::string override_kiss_out_port;
extern int override_kiss_dual_port_enabled;
extern int override_data_io_enabled;
extern int rxtx_charset;
extern void put_rx_data(int *data, int len);
// Values returned by get_tx_char() to signal various conditions to the
// modems. These values need to be negative so they don't interfere with
// normal TX data (which is always byte-sized and positive).
#define GET_TX_CHAR_NODATA -1 // no data available
#define GET_TX_CHAR_ETX -3 // end of transmission requested
// Last single macro bar option index
#define MACRO_SINGLE_BAR_MAX 2
extern int get_tx_char();
extern int get_secondary_char();
extern void put_echo_char(unsigned int data, int style = FTextBase::XMIT);
extern char *get_rxtx_data();
extern char *get_rx_data();
extern char *get_tx_data();
extern void resetRTTY();
extern void resetFSK();
extern void resetOLIVIA();
extern void resetCONTESTIA();
extern void resetTHOR();
extern void resetDOMEX();
extern void updatePACKET();
extern void resetSoundCard();
extern void restoreFocus(int n = 0);
extern void setReverse(int);
extern void clearQSO();
extern void clear_log_fields();
extern void set_log_colors();
extern void closeRigDialog();
extern void CloseQsoView();
extern void setAfcOnOff(bool b);
extern void setSqlOnOff(bool b);
extern bool QueryAfcOnOff();
extern bool QuerySqlOnOff();
extern void init_modem(trx_mode mode, int freq = 0);
extern void init_modem_sync(trx_mode mode, int freq = 0);
extern void init_modem_squelch(trx_mode mode, int freq = 0);
extern void rsid_eot_squelch();
extern void start_tx();
extern void abort_tx();
extern void set_rx_tx();
extern void set_rx_only();
extern void connect_to_fdserver(bool);
extern void LOGGING_colors_font();
extern void LOGBOOK_colors_font();
extern void colorize_macro(int i);
extern void colorize_macros();
extern void set_rtty_tab_widgets();
extern void set_olivia_tab_widgets();
extern void set_olivia_default_integ();
extern void set_dominoex_tab_widgets();
extern void set_contestia_tab_widgets();
extern void set_contestia_default_integ();
extern void startMacroTimer();
extern void stopMacroTimer();
extern void macro_timer(void *);
extern void macro_timed_execute(void *);
extern void startTimedExecute(std::string &);
extern void cb_ResetSerNbr();
extern void updateOutSerNo();
extern void connect_to_log_server(void *p = NULL);
extern void set_server_label(bool);
extern void activate_menu_item(const char *caption, bool val);
extern int xml_check_dup();
extern bool xml_get_record(const char *);
extern cQsoRec* search_fllog(const char *callsign);
extern void xml_update_eqsl();
extern void xml_update_lotw();
extern const char* zdate(void);
extern const char* ztime(void);
extern const char* ldate(void);
extern const char* ltime(void);
//extern void ztimer(void* first_call);
extern const double zusec(void);
extern const timeval tmval(void);
extern const unsigned long zmsec(void);
extern void start_macro_time();
extern int stop_macro_time();
extern void setTabColors();
extern void toggle_visible_modes(Fl_Widget*, void*);
extern void qsy(long long rfc, int fmid = -1);
extern void note_qrg(bool no_dup = true, const char* prefix = " ", const char* suffix = " ",
trx_mode mode = NUM_MODES, long long rfc = 0LL, int afreq = 0);
extern void set_olivia_bw(int bw);
extern void set_olivia_tones(int tones);
extern void set_contestia_bw(int bw);
extern void set_contestia_tones(int tones);
extern void set_rtty_shift(int shift);
extern void set_rtty_baud(float baud);
extern void set_rtty_bits(int bits);
extern void set_rtty_bw(float bw);
extern void enable_rtty_quickchange();
extern void disable_rtty_quickchange();
extern void sync_cw_parameters();
extern void open_recv_folder(const char *fname);
extern void reset_mnuPlayback();
// character set
extern void set_charset_listbox(Fl_Widget *, void *charset);
extern void cb_listbox_charset(Fl_Widget *, void *);
extern void populate_charset_listbox(void);
extern void set_default_charset(void);
// set notch parameter on flrig
extern int notch_frequency;
extern void notch_on(int);
extern void notch_off();
// Set IO port
extern void enable_kiss(void);
extern void enable_arq(void);
// PSM Configuration.
extern void psm_set_defaults(void);
extern void update_csma_io_config(int which);
// thread terminators
extern void ADIF_RW_close(void);
extern void EQSL_close(void);
extern void cb_mnuCheckUpdate(Fl_Widget *, void *);
bool ask_dir_creation( const std::string & dir );
extern void set_CSV(int how);
extern void set_freq_control_lsd();
extern void set_smeter_colors();
extern void log_callback(Fl_Widget *);
extern void set599();
// thor images
extern void thor_showTxViewer(char C = 'S');
extern Fl_Double_Window *thorpicRxWin;
extern Fl_Double_Window *thorpicTxWin;
extern int thor_load_avatar(std::string image_fname = "", int W=59, int H=74);
extern void thor_clear_avatar();
extern void thor_update_avatar(unsigned char data, int pos);
extern int thor_get_avatar_pixel(int pos, int color);
extern void cb_thor_send_avatar( Fl_Widget *w, void *);
extern picture *thor_avatar;
extern void thor_load_scaled_image(std::string fname, bool gray = false);
extern void thor_load_raw_video();
// field day
extern Fl_Input2 *inpClass;
extern Fl_Input2 *inpSection;
extern Fl_Input2 *inp_FD_class1;
extern Fl_Input2 *inp_FD_section1;
extern Fl_Input2 *inp_FD_class2;
extern Fl_Input2 *inp_FD_section2;
// CQWW DX
extern Fl_Input2 *inp_CQDX_RSTin2;
extern Fl_Input2 *inp_CQDX_RSTout2;
extern Fl_ComboBox *cboCountryCQDX2;
extern Fl_Input2 *inp_CQDXzone1;
extern Fl_Input2 *inp_CQDXzone2;
// CQWW RTTY
extern Fl_Input2 *inp_CQzone;
extern Fl_Input2 *inp_CQzone1;
extern Fl_Input2 *inp_CQzone2;
extern Fl_Input2 *inp_CQstate;
extern Fl_Input2 *inp_CQstate1;
extern Fl_Input2 *inp_CQstate2;
extern Fl_ComboBox *cboCountryCQ2;
extern Fl_Input2 *inp_CQ_RSTin2;
extern Fl_Input2 *inp_CQ_RSTout2;
// CW Sweepstakes
extern Fl_Input2 *inp_SS_SerialNoR;
extern Fl_Input2 *inp_SS_Precedence;
extern Fl_Input2 *inp_SS_Check;
extern Fl_Input2 *inp_SS_Section;
// LOG_ARR
extern Fl_Input2 *inp_ARR_check;
extern Fl_Input2 *inp_ARR_check1;
extern Fl_Input2 *inp_ARR_check2;
extern Fl_Input2 *inp_ARR_XchgIn1;
extern Fl_Input2 *inp_ARR_XchgIn2;
extern Fl_Input2 *inp_ARR_Name2;
// LOG_KD
extern Fl_Input2 *inp_KD_age;
extern Fl_Input2 *inp_KD_XchgIn1;
extern Fl_Input2 *inp_KD_XchgIn2;
extern Fl_Input2 *inp_KD_state1;
extern Fl_Input2 *inp_KD_state2;
extern Fl_Input2 *inp_KD_VEprov1;
extern Fl_Input2 *inp_KD_VEprov2;
// LOG_1010
extern Fl_Input2 *inp_1010_nr;
extern Fl_Input2 *inp_1010_name2;
extern Fl_Input2 *inp_1010_XchgIn1;
extern Fl_Input2 *inp_1010_XchgIn2;
// LOG_ASCR
extern Fl_Input2 *inp_ASCR_class1;
extern Fl_Input2 *inp_ASCR_XchgIn1;
extern Fl_Input2 *inp_ASCR_name2;
extern Fl_Input2 *inp_ASCR_class2;
extern Fl_Input2 *inp_ASCR_XchgIn2;
extern Fl_Input2 *inp_ASCR_RSTin2;
extern Fl_Input2 *inp_ASCR_RSTout2;
// LOG_NAQP
extern Fl_Input2 *inpSPCnum;
extern Fl_Input2 *inpSPCnum_NAQP1;
extern Fl_Input2 *inpSPCnum_NAQP2;
extern Fl_Input2 *inpNAQPname2;
// LOG_RTTY
extern Fl_Input2 *inpRTU_stpr1;
extern Fl_Input2 *inpRTU_stpr2;
extern Fl_ComboBox *cboCountryRTU2;
extern Fl_Input2 *inpRTU_RSTin2;
extern Fl_Input2 *inpRTU_RSTout2;
extern Fl_Input2 *inpRTU_serno1;
extern Fl_Input2 *inpRTU_serno2;
// LOG_JOTA
extern Fl_Input2 *inpRstIn4;
extern Fl_Input2 *inpRstOut4;
extern Fl_Input2 *inp_JOTA_scout;
extern Fl_Input2 *inp_JOTA_scout1;
extern Fl_Input2 *inp_JOTA_scout2;
extern Fl_Input2 *inp_JOTA_troop;
extern Fl_Input2 *inp_JOTA_troop1;
extern Fl_Input2 *inp_JOTA_troop2;
extern Fl_Input2 *inp_JOTA_spc;
extern Fl_Input2 *inp_JOTA_spc1;
extern Fl_Input2 *inp_JOTA_spc2;
// LOG_AICW
extern Fl_Input2 *inpSPCnum_AICW1;
extern Fl_Input2 *inpSPCnum_AICW2;
extern Fl_Input2 *inpRstIn_AICW2;
extern Fl_Input2 *inpRstOut_AICW2;
extern Fl_ComboBox *cboCountryAICW2;
//LOG_AIDX
extern Fl_ComboBox *cboCountryAIDX;
extern Fl_ComboBox *cboCountryAIDX2;
// LOG_IARI - Italian International DX
extern Fl_Input2 *inp_IARI_PR1;
extern Fl_Input2 *inp_IARI_RSTin2;
extern Fl_Input2 *inp_IARI_RSTout2;
extern Fl_Input2 *out_IARI_SerNo1;
extern Fl_Input2 *inp_IARI_SerNo1;
extern Fl_Input2 *out_IARI_SerNo2;
extern Fl_Input2 *inp_IARI_SerNo2;
extern Fl_Input2 *inp_IARI_PR2;
extern Fl_ComboBox *cboCountryIARI2;
// LOG_WPX
extern Fl_Input2 *inpSerNo_WPX1;
extern Fl_Input2 *inpSerNo_WPX2;
extern Fl_Input2 *outSerNo_WPX1;
extern Fl_Input2 *outSerNo_WPX2;
extern Fl_Input2 *inpRstIn_WPX2;
extern Fl_Input2 *inpRstOut_WPX2;
// LOG_SQSO
extern Fl_Input2 *inpSQSO_state1;
extern Fl_Input2 *inpSQSO_state2;
extern Fl_Input2 *inpSQSO_county1;
extern Fl_Input2 *inpSQSO_county2;
extern Fl_Input2 *inpSQSO_serno1;
extern Fl_Input2 *inpSQSO_serno2;
extern Fl_Input2 *inpSQSO_name2;
extern Fl_Input2 *outSQSO_serno1;
extern Fl_Input2 *outSQSO_serno2;
extern Fl_Input2 *inpRstIn_SQSO2;
extern Fl_Input2 *inpRstOut_SQSO2;
extern Fl_Input2 *inpSQSO_category;
extern Fl_Input2 *inpSQSO_category1;
extern Fl_Input2 *inpSQSO_category2;
extern Fl_Double_Window *nano_calibration_dialog();;
// TOD clock
extern void TOD_init();
extern void TOD_close();
extern void start_deadman();
extern void stop_deadman();
extern void disable_deadman();
//======================================================================
//FeldHell resizable Rx character height
//======================================================================
extern void FHdisp_char_height();
extern bool clean_exit(bool);
#endif
| 24,218
|
C++
|
.h
| 669
| 35.008969
| 101
| 0.757713
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,394
|
pskrep.h
|
w1hkj_fldigi/src/include/pskrep.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef PSKREP_H_
#define PSKREP_H_
bool pskrep_start(void);
void pskrep_stop();
const char* pskrep_error(void);
unsigned pskrep_count(void);
// The regular expression that matches the spotter's buffer when it calls us.
// It must define at least two capturing groups, the second of which is the
// spotted callsign.
#define CALLSIGN_RE "[[:alnum:]]?[[:alpha:]/]+[[:digit:]]+[[:alnum:]/]+"
#define PSKREP_RE "(de|cq|qrz)[^[:alnum:]/\n]+" "(" CALLSIGN_RE ")" " +(.* +)?\\2[^[:alnum:]]+$"
#define PSKREP_RE_INDEX 2
#endif // PSKREP_H_
| 1,428
|
C++
|
.h
| 32
| 43.5
| 98
| 0.631466
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,395
|
rigCAT.h
|
w1hkj_fldigi/src/include/rigCAT.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef RIGCAT_H_
#define RIGCAT_H_
#ifndef RIGCATTEST
# error FIXME: file should not have been included
#endif
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <iostream>
#include <fstream>
#include <string>
extern Fl_Double_Window *window;
extern char *homedir;
extern string xmlfname;
extern void MilliSleep(long msecs);
#endif
| 1,239
|
C++
|
.h
| 34
| 35.264706
| 79
| 0.658048
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,396
|
logbook.h
|
w1hkj_fldigi/src/include/logbook.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FL_LOGBOOK_H
#define FL_LOGBOOK_H
#include <cstring>
#include "lgbook.h"
#include "logsupport.h"
#include "threads.h"
extern std::string log_checksum;
extern pthread_t logbook_thread;
extern pthread_mutex_t logbook_mutex;
extern void start_logbook();
extern void close_logbook();
#endif
| 1,193
|
C++
|
.h
| 31
| 37.193548
| 79
| 0.653946
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,397
|
https.h
|
w1hkj_fldigi/src/include/https.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2019
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef HTTPS_CLIENT_HTTPS_H
#define HTTPS_CLIENT_HTTPS_H
/*
#include "mbedtls/net.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h"
#include "mbedtls/certs.h"
#define H_FIELD_SIZE 512
#define H_READ_SIZE 2048
//#undef TRUE
//#undef FALSE
//#define TRUE 1
//#define FALSE 0
//extern char ca_crt_rsa[];
//extern size_t ca_crt_rsa_size;
typedef struct
{
char method[8];
int status;
char content_type[H_FIELD_SIZE];
long content_length;
bool chunked;
bool close;
char location[H_FIELD_SIZE];
char referrer[H_FIELD_SIZE];
char cookie[H_FIELD_SIZE];
char boundary[H_FIELD_SIZE];
} HTTP_HEADER;
typedef struct
{
bool verify;
mbedtls_net_context ssl_fd;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
mbedtls_x509_crt cacert;
} HTTP_SSL;
typedef struct {
bool https;
char host[256];
char port[8];
char path[H_FIELD_SIZE];
} HTTP_URL;
typedef struct
{
HTTP_URL url;
HTTP_HEADER request;
HTTP_HEADER response;
HTTP_SSL tls;
long length;
char r_buf[H_READ_SIZE];
long r_len;
bool header_end;
char *body;
long body_size;
long body_len;
} HTTP_INFO;
*/
#endif //HTTPS_CLIENT_HTTPS_H
| 2,346
|
C++
|
.h
| 80
| 26.4625
| 79
| 0.623608
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,398
|
qso_db.h
|
w1hkj_fldigi/src/include/qso_db.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef QSO_DB
#define QSO_DB
#include <iosfwd>
#include <string>
#include <cstring>
#include "adif_def.h"
enum COMPTYPE {COMPTIME, COMPDATE, COMPCALL, COMPFREQ, COMPMODE};
class cQsoDb;
class cQsoRec;
class cQsoRec {
friend int compareCalls (const cQsoRec &, const cQsoRec &);
friend int compareDates (const cQsoRec &, const cQsoRec &);
friend int compareTimes (const cQsoRec &, const cQsoRec &);
friend int compareModes (const cQsoRec &, const cQsoRec &);
friend int compareFreqs (const cQsoRec &, const cQsoRec &);
friend std::ostream &operator<<( std::ostream &, const cQsoRec &);
friend std::istream &operator>>( std::istream &, cQsoRec & );
private:
std::string *qsofield[NUMFIELDS];
//bool normal; // sort ordering
public:
cQsoRec ();
~cQsoRec ();
void putField (int, const char *);
void putField (int, const char *, int);
void addtoField (int, const char *);
const char *getField (int) const;
void trimFields();
void clearRec ();
int validRec();
void checkBand();
void checkDateTimes();
void setDateTime(bool dtOn);
void setFrequency(long long freq);
// operator overloads
const cQsoRec &operator=(const cQsoRec &);
bool operator==(const cQsoRec &) const;
bool operator<(const cQsoRec &) const;
bool operator!=(const cQsoRec &right) const {
return !( *this == right);
}
bool operator<=(const cQsoRec &right) const {
if (*this < right || *this == right)
return true;
return false;
}
bool operator>(const cQsoRec &right) const {
return !(*this <= right);
}
};
class cQsoDb {
private:
cQsoRec * qsorec;
int maxrecs;
int nbrrecs;
int dirty;
static const int jdays[][13];
bool isleapyear( int y ) const;
int dayofyear (int year, int mon, int mday);
unsigned long epoch_dt (const char *szdate, const char *sztime);
public:
cQsoDb ();
cQsoDb (cQsoDb *);
~cQsoDb ();
static bool reverse;
void deleteRecs();
void clearDatabase();
void isdirty(int n) {dirty = n;}
int isdirty() const {return dirty;}
void qsoNewRec (cQsoRec *);
cQsoRec *newrec();
void qsoDelRec (int);
void qsoUpdRec (int, cQsoRec *);
int qsoFindRec (cQsoRec *);
cQsoRec *getRec (int n) {return &qsorec[n];};
int nbrRecs () const {return nbrrecs;};
bool qsoIsValidFile(const char *);
int qsoReadFile (const char *);
int qsoWriteFile (const char *);
void SortByDate(bool);
void SortByCall ();
void SortByMode ();
void SortByFreq ();
void sort_reverse(bool rev) { reverse = rev;}
const cQsoRec *recarray() { return qsorec; }
int duplicate(
const char *callsign,
const char *date = NULL,
const char *time = NULL,
unsigned int interval = 0,
bool chkdatetime = false,
const char *freq = NULL,
bool chkfreq = false,
const char *state = NULL,
bool chkstate = false,
const char *mode = NULL,
bool chkmode = false,
const char *xchg1 = NULL,
bool chkxchg1 = false);
int matched( cQsoRec *rec );
};
extern int comparebydate(const void *p1, const void *p2);
extern int comparebymode(const void *p1, const void *p2);
extern int comparebycall(const void *p1, const void *p2);
extern int comparebyfreq(const void *p1, const void *p2);
#endif
| 3,993
|
C++
|
.h
| 125
| 30.064
| 79
| 0.694783
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,399
|
qrzlib.h
|
w1hkj_fldigi/src/include/qrzlib.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef QRZHEADER
// To include the email code remove the comment specifier from the following line
#define HAVE_EMAIL
// QRZ CDROM data structures
/*
** Index Header Block Definition (Version 2)
** (applies to all QRZ CDROMS from Version 2 onward)
**
** This block is located at the start of each index
*/
typedef struct {
char dataname[16]; /* Name of the data file */
char bytesperkey[8]; /* Data Bytes per Index Item */
char numkeys[8]; /* Number of items in this index */
char keylen[8]; /* Length of each key item in bytes */
char version[8]; /* Database Version ID */
} index_header;
/*
Index Usage
The name index is set to a maximum of 16 characters with longer names
being truncated. Names are stored in last-first format with a space
between the names. The city/state index uses 12 characters per entry,
the callsign index 6 characters and the zip code index 5 characters.
The data which follows the header is simply a long list of single field
records. The records are tightly packed on 'bytesperkey' boundaries
without separators. There is no guarantee of a null terminator on any
index record entry.
When the program qrz.exe is run it first searches for a drive
containing the base directory \CALLBK . Next, it loads all four index
files (callbkc.idx, callbkn.idx, callbks.idx and callbkz.idx) into
tables in memory. These tables were kept small so as not to place an
undue RAM requirement on the user's system.
Next, when a user specifies a field and key to search, the program
searches the relevant index table and returns the closest match lower
(or equal to) the supplied key. The table position of this key is then
taken and multiplied by the 'bytesperkey' value to arrive at a database
file offset. This offset is then used to perform the first and only
seek into the database. Once on position within the file, a sequential
search is performed to return the match. The search terminates at the
next index key value if the field is not found.
The database files all have the same format. The records each consist
of comma separated fields which end with a single newline '\n' (ASCII
0xa) character. Blank fields are simply stored as a comma. Every
record has the same number of commas in it. Actual comma's in the data
field are stored as a semi-colon ';' which should be replaced by a
comma in the user's output formatting routine.
Example:
AA7BQ ,LLOYD,,FRED L,,53340,90009,00009,8215 E WOOD DR,SCOTTSDALE,AZ,
85260,E,KJ6RK,A
The callsign database is sorted by SUFFIX, AREA, PREFIX.
For example, the following order would be observed:
QE24AA
...
ZZ99ZZ
...
A 0A
...
AA0AAA
...
ZZ9ZZZ
This ordering also pertains to the index file since it is just a snaphot of
every nth record in the database.
*/
/*
** Standard Record Field Offsets
*/
#define QRZLIB_CALL 0
#define QRZLIB_LNAME 1
#define QRZLIB_JR 2
#define QRZLIB_FNAME 3
#define QRZLIB_MI 4
#define QRZLIB_DOB 5
#define QRZLIB_EFDATE 6
#define QRZLIB_EXPDATE 7
#define QRZLIB_MAIL_STR 8
#define QRZLIB_MAIL_CITY 9
#define QRZLIB_MAIL_ST 10
#define QRZLIB_MAIL_ZIP 11
#define QRZLIB_CLASS 12
#define QRZLIB_P_CALL 13
#define QRZLIB_P_CLASS 14
/*
The fields JR and MI were obsoleted by the FCC in July 1994.
The callsign fields are arranged in a strict "ccdccc" columnar format
where 'c' represents a letter and 'd' a digit. Callsigns which do not
conform to the "ccdccc" format are space filled in the relevant
positions. This field is rearranged to the proper layout by the user
program's output formatting routines.
All dates are stored in 5 character Julian format, e.g. 93003 equals
January 3, 1993. Dates before 1900 or after year 2000 must be
determined by their context usage. In other words, if the resultant
age does not make sense, then it's wrong. For example, all licenses
expire in the future so 02 is 2002. Birthdays are more difficult
but most can be determined to be greater than 10 years old. This is
not a perfect method, but it does yield satisfactory results.
Some folks may notice that the database no longer contains station
location information. This information is no longer supplied nor
available from the FCC since it is no longer a part of their record
keeping (See the May 1993 QST for more info).
Cross Reference Information
Callsigns in the database are now cross-referenced to both the current
and the previous call sign for each entry in which they are available.
A cross reference record takes the form of 'old,new' with no other
information in the record. A record can be identified as a cross
reference either one of two ways:
First, if the record length is less than 15 characters, then
it is a cross reference record.
Secondly, if the record contains only one comma "," , then
it is a cross reference record.
It is not necessary to test for both cases, either will do.
When a cross reference record is encountered, you must fetch the second
field and restart the search to return the primary reference.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
extern char *Composite( char * );
class QRZ
{
private:
char criteria;
index_header idxhdr;
char *data;
char *index;
char *top;
FILE *idxfile;
long idxsize;
FILE *datafile;
long dataoffset;
long databytesread;
char *dfptr;
char *endofline;
char *idxptr;
int found;
char recbuffer[512];
unsigned int datarecsize;
long numkeys;
int keylen;
void OpenQRZFiles( const char * );
int FindCallsign( char * );
int FindName( char * );
int FindState( char * );
int FindZip( char * );
int ReadDataBlock( long );
int nextrec();
bool hasImage;
char *Qcall;
char *Qlname;
char *Qfname;
char *Qdob;
char *Qefdate;
char *Qexpdate;
char *Qmail_str;
char *Qmail_city;
char *Qmail_st;
char *Qmail_zip;
char *Qopclass;
char *Qp_call;
char *Qimagefname;
char *Qp_class;
int QRZvalid;
public:
QRZ( const char * );
QRZ( const char *, char );
~QRZ();
int CallComp( char *, char * );
int CompState( const char *, const char *, const char * );
int getQRZvalid();
void NewDBpath( const char * );
int FindRecord( char * );
int NextRecord();
int ReadRec();
int GetCount( char * );
char *GetCall();
const char *GetLname();
const char *GetFname();
const char *GetDOB();
const char *GetEFdate();
const char *GetEXPdate();
const char *GetStreet();
const char *GetCity();
const char *GetState();
const char *GetZIP();
const char *GetOPclass();
const char *GetPriorCall();
const char *GetPriorClass();
const char *GetImageFileName();
char *CSV_Record();
char *Fmt_Record();
bool ImageExists();
const char *ImageFileName() {return Qimagefname;};
};
extern void SetQRZdirectory(char *dir);
extern int filename_expand(char *to,int tolen, const char *from);
#define QRZHEADER
#endif
| 8,341
|
C++
|
.h
| 215
| 36.083721
| 81
| 0.690228
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,400
|
nco.h
|
w1hkj_fldigi/src/include/nco.h
|
// ---------------------------------------------------------------------
// nco.h -- a generic NCO class
//
//
// This file is a proposed part of fldigi.
//
// Copyright (C) 2010
// Dave Freese, W1HKJ
// Chris Sylvain, KB3CS
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi; if not, write to the
//
// Free Software Foundation, Inc.
// 51 Franklin Street, Fifth Floor
// Boston, MA 02110-1301 USA.
//
// ---------------------------------------------------------------------
#ifndef NCO_H
#define NCO_H
#include "complex.h"
class NCO {
#define NCO_SINETABLE_LEN (1<<8) // == 256
private:
double SampleRate;
double Frequency;
double Phase;
double Phase_incr;
bool sinetable_ready;
double sinetable[NCO_SINETABLE_LEN+1];
public:
NCO() { sinetable_ready = false; }
~NCO() { };
void init(double freq, double phase, double sr) {
SampleRate = sr;
Frequency = freq;
Phase = phase / TWOPI; // normalize radians to [0,1]
Phase_incr = freq / sr;
if (sinetable_ready == false) {
double step = 1.0 / NCO_SINETABLE_LEN;
for (int i = 0; i < NCO_SINETABLE_LEN; i++)
sinetable[i] = sin(step * i * TWOPI);
sinetable[NCO_SINETABLE_LEN] = sinetable[0]; /* == 0.0 */
sinetable_ready = true;
}
}
inline void setfreq(double freq) {
Frequency = freq;
Phase_incr = freq / SampleRate;
}
inline double getfreq() { return Frequency; }
inline void setphase(double phase) { Phase = phase / TWOPI; }
inline double getphase() { return Phase * TWOPI; }
inline void setphaseacc(double phase) { Phase = phase; }
inline double getphaseacc() { return Phase; }
#ifndef NDEBUG
double interpolate(double phase) {
#else
inline double interpolate(double phase) {
#endif
int iphase;
double frac1, frac2;
iphase = (int) floor(phase * NCO_SINETABLE_LEN);
frac1 = (phase * NCO_SINETABLE_LEN) - iphase;
frac2 = 1.0 - frac1;
iphase %= NCO_SINETABLE_LEN;
return (sinetable[iphase] * frac2) + (sinetable[iphase+1] * frac1);
}
double sample() {
double sample = interpolate(Phase);
Phase += Phase_incr;
if (Phase > 1) {
Phase -= 1;
// Phase might be .le. abs(machine-epsilon)
if (Phase < 0.0) Phase = 0.0;
}
return sample;
}
cmplx cmplx_sample() {
cmplx sample;
// M_PI_2 / TWOPI = M_PI / 2 / 2 / M_PI = 1 / 4
double t = Phase + 0.25;
if (t > 1.0) {
t -= 1;
// Phase might be .le. abs(machine-epsilon)
if (t < 0.0) t = 0.0;
}
sample = cmplx(interpolate(t), interpolate(Phase));
Phase += Phase_incr;
if (Phase > 1.0) {
Phase -= 1;
if (Phase < 0.0) Phase = 0.0;
}
return sample;
}
};
#endif
| 3,209
|
C++
|
.h
| 107
| 26.925234
| 72
| 0.632042
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,402
|
debug.h
|
w1hkj_fldigi/src/include/debug.h
|
// ----------------------------------------------------------------------------
// debug.h
//
// Copyright (C) 2008
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _DEBUG_H_
#define _DEBUG_H_
#define DEBUG_PSKMAIL 0
#include <config.h>
#include <string>
#include <iostream>
#include "util.h"
extern void rotate_log(std::string);
class debug
{
public:
enum level_e {
QUIET_LEVEL, ERROR_LEVEL, WARN_LEVEL, INFO_LEVEL,
VERBOSE_LEVEL, DEBUG_LEVEL, LOG_NLEVELS
};
#ifdef FLARQ_DEBUG
enum source_e {
LOG_ARQCONTROL = 1 << 0,
LOG_RPC_SERVER = 1 << 1,
LOG_OTHER = 1 << 2
};
#else
enum source_e {
LOG_ARQCONTROL = 1 << 0,
LOG_AUDIO = 1 << 1,
LOG_MODEM = 1 << 2,
LOG_RIGCONTROL = 1 << 3,
LOG_RPC_CLIENT = 1 << 4,
LOG_RPC_SERVER = 1 << 5,
LOG_SPOTTER = 1 << 6,
LOG_DATASOURCES = 1 << 7,
LOG_SYNOP = 1 << 8,
LOG_KML = 1 << 9,
LOG_KISSCONTROL = 1 << 10,
LOG_MACLOGGER = 1 << 11,
LOG_FD = 1 << 12,
LOG_N3FJP = 1 << 13,
LOG_OTHER = 1 << 14
};
#endif
static void start(const char* filename);
static void stop(void);
static void hex_dump(const char * func, const char * data, int len);
static void log(level_e level, const char* func, const char* srcf, int line,
const char* format, ...) format__(printf, 5, 6);
static void elog(const char* func, const char* srcf, int line, const char* text);
static void show(void);
static level_e level;
static unsigned int mask;
private:
static void sync_text(void*);
debug(const char* filename);
debug(const debug&);
debug& operator=(const debug&);
~debug();
static debug* inst;
};
#define LOG(level__, source__, ...) \
do { \
if (level__ <= debug::level && source__ & debug::mask) \
debug::log(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \
} while (0)
#define LOG_DEBUG(...) LOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__)
#define LOG_VERBOSE(...) LOG(debug::VERBOSE_LEVEL, log_source_, __VA_ARGS__)
#define LOG_INFO(...) LOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__)
#define LOG_WARN(...) LOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__)
#define LOG_ERROR(...) LOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__)
#define LOG_HD(source__, a, b) \
do { \
if (source__ & debug::mask) \
debug::hex_dump(__func__, a, b); \
} while (0)
#define LOG_HEX(a,b) LOG_HD(log_source_, a, b)
#define LOG_PERROR(msg__) \
do { \
if (debug::ERROR_LEVEL <= debug::level && log_source_ & debug::mask) \
debug::elog(__func__, __FILE__, __LINE__, msg__); \
} while (0)
unused__ static unsigned int log_source_ = debug::LOG_OTHER;
#if defined(__GNUC__) && (__GNUC__ >= 3)
# define LOG_FILE_SOURCE(source__) \
__attribute__((constructor)) \
static void log_set_source_(void) { log_source_ = source__; }
#else
# define LOG_FILE_SOURCE(source__)
#endif
#define LOG_SET_SOURCE(source__) log_source_ = source__
extern void mnu_debug_level_cb();
extern void btn_debug_source_cb(int n);
extern void clear_debug();
extern void set_debug_mask(int mask);
#endif // _DEBUG_H_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 3,930
|
C++
|
.h
| 117
| 31.700855
| 82
| 0.613175
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,403
|
logger.h
|
w1hkj_fldigi/src/include/logger.h
|
// ----------------------------------------------------------------------------
// logger.h Remote Log Interface for fldigi
//
// Copyright W1HKJ, Dave Freese 2006
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _LOGGER_H
#define _LOGGER_H
// IPC interface to Xlog and fl_logbook
#define LOG_MVERSION "1"
#define LOG_MKEY 1238
#define LOG_MTYPE 88
#define LOG_MSG_LEN 1024
#include "qso_db.h"
typedef struct {
long mtype;
char mtext[LOG_MSG_LEN];
} msgtype;
extern void submit_log();
extern void submit_record(cQsoRec &);
extern char logdate[];
extern char logtime[];
extern char adifdate[];
extern const char *logmode;
extern std::string str_lotw;
#endif
| 1,377
|
C++
|
.h
| 40
| 33.125
| 79
| 0.670686
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,404
|
wefax-pic.h
|
w1hkj_fldigi/src/include/wefax-pic.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
// Remi Chateauneu
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _WEFAX_PIC_H
#define _WEFAX_PIC_H
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Light_Button.H>
class Fl_Menu_ ;
class wefax ;
class wefax_pic
{
public:
static void set_tx_pic(unsigned char data, int col, int row, bool is_color );
static int normalize_lpm( double the_lpm_value );
static int update_rx_pic_col(unsigned char data, int pos);
static void update_rx_pic_bw(unsigned char data, int pos);
static void tx_viewer_resize(int the_width, int the_height);
static void restart_tx_viewer(void);
static void abort_rx_viewer(void);
static void abort_tx_viewer(void);
static void resize_rx_viewer(int width_img);
static void set_rx_label(const std::string & win_label);
static void delete_rx_viewer(void);
static void delete_tx_viewer(void);
static void skip_rx_apt(void);
static void skip_rx_phasing(bool auto_center);
static void cb_mnu_pic_viewer_tx(Fl_Menu_ *, void *);
static void setwefax_map_link(wefax *me);
static void save_image(const std::string & fil_name, const std::string & extra_comments);
static void send_image( const std::string & fil_name );
static void set_manual( bool manual_mode );
static void update_auto_center( bool is_auto_center );
static void create_both( bool called_from_fl_digi );
// Fl_Group * create_wefax_rx_viewer(int wid_x, int wid_y,int wid_win, int hei_win);
// static void create_wefax_tx_viewer(int wid_x, int wid_y,int wid_win, int hei_win);
};
extern Fl_Double_Window *wefax_pic_tx_win;
extern Fl_Group *wefax_pic_rx_win;
extern Fl_Light_Button *wefax_round_rx_noise_removal;
extern Fl_Light_Button *wefax_round_rx_binary;
extern Fl_Light_Button *wefax_round_rx_non_stop;
extern void wefax_cb_rx_set_filter( Fl_Widget *, void * );
extern Fl_Group * create_wefax_rx_viewer(int wid_x, int wid_y,int wid_win, int hei_win);
extern void create_wefax_tx_viewer(int wid_x, int wid_y,int wid_win, int hei_win);
#endif // _WEFAX_PIC_H
| 2,836
|
C++
|
.h
| 62
| 44.193548
| 90
| 0.699746
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,405
|
synop.h
|
w1hkj_fldigi/src/include/synop.h
|
// ----------------------------------------------------------------------------
// synop.h -- SYNOP decoding
//
// Copyright (C) 2012
// Remi Chateauneu, F4ECW
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _SYNOP_H
#define _SYNOP_H
// This tells how Synop data are serialized.
class synop_callback {
public:
virtual ~synop_callback() {} ;
// These methods could as well be pure virtual.
virtual bool interleaved(void) const { return true; }
virtual void print( const char * str, size_t nb, bool ) const = 0;
virtual bool log_adif(void) const = 0;
virtual bool log_kml(void) const = 0 ;
};
// Implementation hidden in synop.cxx
class synop {
// When set, the output does not contain Synop sentences but only
// the name of the regular expression which matched. It helps
// for debugging because the output is independent of the locale.
static bool m_test_mode ;
public:
static const synop_callback * ptr_callback ;
template< class Callback >
static void setup()
{
static const Callback cstCall = Callback();
ptr_callback = &cstCall ;
};
static synop * instance();
static void regex_usage(void);
virtual ~synop() {};
// It is used as a global object, the constructor does not do anything.
virtual void init() = 0;
virtual void cleanup() = 0;
/// We should have a tempo as well.
virtual void add(char c) = 0;
// When Synop decoding is disabled.
virtual void flush(bool finish_decoding) = 0;
virtual bool enabled(void) const = 0;
static bool GetTestMode(void) { return m_test_mode ; };
static void SetTestMode(bool test_mode) { m_test_mode = test_mode ; };
};
// gathers the various data files used for Synop decoding.
struct SynopDB {
// Loads the files from s given directory.
static bool Init( const std::string & data_dir );
// For testing purpose.
static const std::string & IndicatorToName( int wmo_indicator );
static const std::string IndicatorToCoordinates( int wmo_indicator );
// To Test the reading of our weather stations data files.
static const std::string & BuoyToName( const char * buoy_id );
static const std::string & ShipToName( const char * ship_id );
static const std::string & JCommToName( const char * ship_id );
};
// ----------------------------------------------------------------------------
#endif // _SYNOP_H
| 3,009
|
C++
|
.h
| 75
| 38.293333
| 79
| 0.677309
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,407
|
hid_win.h
|
w1hkj_fldigi/src/include/hid_win.h
|
/*******************************************************
HIDAPI - Multi-Platform library for
communication with HID devices.
Alan Ott
Signal 11 Software
8/22/2009
Copyright 2009, All Rights Reserved.
At the discretion of the user of this library,
this software may be licensed under the terms of the
GNU General Public License v3, a BSD-Style license, or the
original HIDAPI license as outlined in the LICENSE.txt,
LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt
files located at the root of the source distribution.
These files may also be found in the public source
code repository located at:
https://github.com/libusb/hidapi .
********************************************************/
/** @file
* @defgroup API hidapi API
*/
#ifndef HIDAPI_H__
#define HIDAPI_H__
#include <string>
#include <cstring>
#include <wchar.h>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __MINGW32__
#include <ntdef.h>
#include <winbase.h>
# ifndef _NTDEF_
typedef LONG NTSTATUS;
# endif
//#include <hidsdi.h>
#endif
//#ifdef __CYGWIN__
//#include <ntdef.h>
//#define _wcsdup wcsdup
//#endif
/* The maximum number of characters that can be passed into the
HidD_Get*String() functions without it failing.*/
#define MAX_STRING_WCHARS 0xFFF
/*#define HIDAPI_USE_DDK*/
#ifdef __cplusplus
extern "C" {
#endif
#include <setupapi.h>
#include <winioctl.h>
#ifndef HIDAPI_USE_DDK
#include <hidsdi.h>
#endif
/* Copied from inc/ddk/hidclass.h, part of the Windows DDK. */
#define HID_OUT_CTL_CODE(id) \
CTL_CODE(FILE_DEVICE_KEYBOARD, (id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
#define IOCTL_HID_GET_FEATURE HID_OUT_CTL_CODE(100)
#define IOCTL_HID_GET_INPUT_REPORT HID_OUT_CTL_CODE(104)
#ifdef __cplusplus
} /* extern "C" */
#endif
/** @brief Static/compile-time major version of the library.
@ingroup API
*/
#define HID_API_VERSION_MAJOR 0
/** @brief Static/compile-time minor version of the library.
@ingroup API
*/
#define HID_API_VERSION_MINOR 10
/** @brief Static/compile-time patch version of the library.
@ingroup API
*/
#define HID_API_VERSION_PATCH 1
/* Helper macros */
#define HID_API_AS_STR_IMPL(x) #x
#define HID_API_AS_STR(x) HID_API_AS_STR_IMPL(x)
#define HID_API_TO_VERSION_STR(v1, v2, v3) HID_API_AS_STR(v1.v2.v3)
/** @brief Static/compile-time string version of the library.
@ingroup API
*/
#define HID_API_VERSION_STR HID_API_TO_VERSION_STR(HID_API_VERSION_MAJOR, HID_API_VERSION_MINOR, HID_API_VERSION_PATCH)
struct hid_api_version {
int major;
int minor;
int patch;
};
class hid_device {
public:
HANDLE device_handle;
BOOL blocking;
USHORT output_report_length;
unsigned char *write_buf;
size_t input_report_length;
USHORT feature_report_length;
unsigned char *feature_buf;
void *last_error_str;
DWORD last_error_num;
BOOL read_pending;
char *read_buf;
OVERLAPPED ol;
OVERLAPPED write_ol;
hid_device() {
device_handle = INVALID_HANDLE_VALUE;
blocking = TRUE;
output_report_length = 0;
write_buf = NULL;
input_report_length = 0;
feature_report_length = 0;
feature_buf = NULL;
last_error_str = NULL;
last_error_num = 0;
read_pending = FALSE;
read_buf = NULL;
memset(&ol, 0, sizeof(ol));
ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*initial state f=nonsignaled*/, NULL);
memset(&write_ol, 0, sizeof(write_ol));
write_ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*inital state f=nonsignaled*/, NULL);
}
~hid_device() {
CloseHandle(ol.hEvent);
CloseHandle(write_ol.hEvent);
CloseHandle(device_handle);
LocalFree(last_error_str);
free(write_buf);
free(feature_buf);
free(read_buf);
}
void register_error(const char *op);
int hid_write(const unsigned char *data, size_t length);
int hid_read_timeout(unsigned char *data, size_t length, int milliseconds);
int hid_read(unsigned char *data, size_t length);
int hid_set_nonblocking(int nonblock);
int hid_send_feature_report(const unsigned char *data, size_t length);
int hid_get_feature_report(unsigned char *data, size_t length);
int hid_get_input_report(unsigned char *data, size_t length);
void hid_close();
std::string hid_get_manufacturer_string();
std::string hid_get_product_string();
std::string hid_get_serial_number_string();
int hid_get_indexed_string(int string_index, std::string string, size_t maxlen);
const char * hid_error();
};
class hid_device_info {
public:
std::string path;
unsigned short vendor_id;
unsigned short product_id;
unsigned short release_number;
std::string str_serial_number;
std::string str_manufacturer_string;
std::string str_product_string;
unsigned short usage_page;
unsigned short usage;
int interface_number;
hid_device_info *next;
hid_device_info() {}
~hid_device_info() {}
};
hid_device * hid_open_path(std::string path);
hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, std::string serial_number);
hid_device_info *hid_enumerate(unsigned short vendor_id, unsigned short product_id);
void hid_free_enumeration(hid_device_info *devs);
int hid_init(void);
int hid_exit(void);
#endif
| 5,164
|
C++
|
.h
| 164
| 29.329268
| 119
| 0.720024
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,408
|
flmisc.h
|
w1hkj_fldigi/src/include/flmisc.h
|
// ----------------------------------------------------------------------------
// flmisc.h
//
// Copyright (C) 2009-2010
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef fl_misc_h_
#define fl_misc_h_
#include <config.h>
#include <FL/Enumerations.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Return_Button.H>
#include "flinput2.h"
unsigned quick_choice_menu(const char* title, unsigned sel, const Fl_Menu_Item* menu);
unsigned quick_choice(const char* title, unsigned sel, ...);
Fl_Color adjust_color(Fl_Color fg, Fl_Color bg);
void adjust_color_inv(unsigned char& bg1r, unsigned char& bg1g, unsigned char& bg1b,
Fl_Color bg2, Fl_Color def);
#if !defined(__APPLE__) && !defined(__WOE32__)
# include <FL/x.H>
void make_pixmap(Pixmap *xpm, const char **data, int argc, char** argv);
#endif
struct dialog_positions {
int used;
int X;
int Y;
};
class notify_dialog : public Fl_Window
{
friend void show_notifier(notify_dialog *nd);
Fl_Box icon;
Fl_Input2 message;
Fl_Dial dial;
Fl_Return_Button button;
Fl_Button *user_button;
Fl_Box resize_box;
double _timeout;
int dialog_number;
static dialog_positions positions[11];
public:
notify_dialog(int X = 0, int Y = 0);
~notify_dialog();
int handle(int event);
Fl_Button* make_button(int W, int H = 23);
void notify(const char* msg, double timeout);
private:
static void button_cb(Fl_Widget* w, void*);
static void dial_timer(void* arg);
int newx;
};
void show_notifier(notify_dialog *nd);
#ifdef BUILD_FLDIGI
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
// Avoid 'nitems' macro collision between FreeBSD's sys/params.h and fltk's
// FL/Fl_Check_Browser.H (http://www.fltk.org/str.php?L2984)
#undef nitems
#include <FL/Fl_Check_Browser.H>
#define FLTK_nitems nitems
#undef nitems
// ^^^ Avoid 'nitems' macro collision
#include "globals.h"
class Mode_Browser : public Fl_Double_Window
{
public:
Mode_Browser(void);
~Mode_Browser(void);
void show_(mode_set_t* b);
void callback(Fl_Callback* cb, void* args = 0);
private:
Fl_Button *close_button, *all_button, *none_button;
Fl_Check_Browser* modes;
mode_set_t* store;
Fl_Callback* changed_cb;
void* changed_args;
static void modes_cb(Fl_Widget* w, void* arg);
static void button_cb(Fl_Widget* w, void* arg);
};
#endif // BUILD_FLDIGI
#endif // fl_misc_h_
| 3,148
|
C++
|
.h
| 99
| 30.232323
| 86
| 0.697559
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,409
|
testmodem.h
|
w1hkj_fldigi/src/include/testmodem.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include "trx.h"
class psktest : public trx {
public:
psktest(char *dev) : trx(dev) {};
~psktest(){};
protected:
virtual void txinit (){};
virtual void rxinit (){};
virtual int txprocess (){};
virtual int rxprocess (unsigned char *, int len){};
};
| 1,146
|
C++
|
.h
| 30
| 36.9
| 79
| 0.621185
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,410
|
metar.h
|
w1hkj_fldigi/src/include/metar.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2019
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef METAR_H
#define METAR_H
#include "network.h"
class Metar {
Url url;
std::string _wx_text_full;
std::string _wx_text_parsed;
std::string _metar_station;
std::string _metar_text;
std::string _station_name;
std::string _field;
std::string _conditions;
std::string _temp;
std::string _winds;
std::string _baro;
bool _inches;
bool _mbars;
bool _fahrenheit;
bool _celsius;
bool _mph;
bool _kph;
bool _condx;
bool _name;
bool _debug;
public:
Metar() { init(); }
Metar(std::string _station) {
init();
_metar_station = _station;
}
~Metar() {}
void init() {
_metar_station.clear();
_metar_text.clear();
_wx_text_full.clear();
_wx_text_parsed.clear();
_station_name.clear();
_field.clear();
_conditions.clear();
_temp.clear();
_winds.clear();
_baro.clear();
_inches = _mbars =
_fahrenheit = _celsius =
_mph = _kph =
_condx = _name = true;
_debug = false;
}
void parse();
int get();
int get(std::string station) {
_metar_station = station;
return get();
}
void station(std::string s) { _metar_station = s; }
std::string station() { return _metar_station; }
std::string station_name() { return _station_name; }
std::string full() { return _wx_text_full; }
std::string parsed() { return _wx_text_parsed; }
void params( bool inches, bool mbars,
bool fahrenheit, bool celsius,
bool mph, bool kph,
bool condx, bool name)
{
_inches = inches;
_mbars = mbars;
_fahrenheit= fahrenheit;
_celsius = celsius;
_mph = mph;
_kph = kph;
_condx = condx;
_name = name;
}
void inches(bool b) { _inches = b; }
bool inches() { return _inches; }
void mbars(bool b) { _mbars = b; }
bool mbars() { return _mbars; }
void fahrenheit(bool b) { _fahrenheit = b; }
bool fahrenheit() { return _fahrenheit; }
void celsius(bool b) { _celsius = b; }
bool celsius() { return _celsius; }
void mph(bool b) { _mph = b; }
bool mph() { return _mph; }
void kph(bool b) { _kph = b; }
bool kph() { return _kph; }
void condx(bool b) { _condx = b; }
bool condx() { return _condx; }
void name(bool b) { _name = b; }
bool name() { return _name; }
void debug(bool on) { };//_debug = on; url.debug(on); }
};
#endif //METAR_H
| 3,112
|
C++
|
.h
| 111
| 25.684685
| 79
| 0.631048
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,412
|
re.h
|
w1hkj_fldigi/src/include/re.h
|
// ----------------------------------------------------------------------------
// re.h
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef RE_H_
#define RE_H_
#if HAVE_REGEX_H
# include <regex.h>
#else
# include "compat/regex.h"
#endif
#include <string>
#include <vector>
class re_t
{
public:
re_t(const char* pattern_ = "", int cflags_ = 0);
re_t(const re_t& re);
~re_t();
re_t& operator=(const re_t& rhs);
void recompile(const char* pattern_);
operator bool(void) const { return !error; }
bool operator==(const re_t& o) const { return o.cflags == cflags && o.pattern == pattern; }
bool match(const char* str, int eflags_ = 0);
const std::string& submatch(size_t n) const;
void suboff(size_t n, int* start, int* end) const;
const std::vector<regmatch_t>& suboff(void) const { return suboffsets; }
size_t nsub(void) const { return suboffsets.size(); }
const std::string& re(void) const { return pattern; }
int cf(void) const { return cflags; }
size_t hash(void) const;
protected:
void compile(void);
std::string pattern;
int cflags, eflags;
regex_t preg;
std::vector<regmatch_t> suboffsets;
std::vector<std::string> substrings;
bool error;
bool need_substr;
};
class fre_t : public re_t
{
public:
fre_t(const char* pattern_, int cflags_ = 0);
bool match(const char* str, int eflags_ = 0);
};
#endif // RE_H_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 2,195
|
C++
|
.h
| 69
| 30.304348
| 92
| 0.654537
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,413
|
winkeyer.h
|
w1hkj_fldigi/src/include/winkeyer.h
|
// ----------------------------------------------------------------------------
// winkeyer.h -- Interface to k1el WinKeyer hardware
//
// Copyright (C) 2017
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef _WINKEYER_H
#define _WINKEYER_H
extern void WK_change_btn_swap();
extern void WK_change_btn_auto_space();
extern void WK_change_btn_ct_space();
extern void WK_change_btn_paddledog();
extern void WK_change_btn_cut_zeronine();
extern void WK_change_btn_paddle_echo();
extern void WK_change_btn_serial_echo();
extern void WK_change_btn_sidetone_on();
extern void WK_change_btn_tone_on();
extern void WK_change_btn_ptt_on();
extern void WK_change_cntr_min_wpm();
extern void WK_change_cntr_rng_wpm();
extern void WK_change_cntr_farnsworth();
extern void WK_change_cntr_cmd_wpm();
extern void WK_change_cntr_ratio();
extern void WK_change_cntr_comp();
extern void WK_change_cntr_first_ext();
extern void WK_change_cntr_sample();
extern void WK_change_cntr_weight();
extern void WK_change_cntr_leadin();
extern void WK_change_cntr_tail();
extern void WK_change_choice_keyer_mode();
extern void WK_change_choice_hang();
extern void WK_change_choice_sidetone();
extern void WK_change_choice_output_pins();
extern void WK_use_pot_changed();
extern void WKCW_connect(bool start);
extern void WK_reset_timing();
extern void WK_set_comp();
extern int WK_send_char(int c);
extern void WK_set_wpm();
extern void WK_tune(bool on);
extern void WK_exit();
extern void WKFSK_init();
extern void WKFSK_connect(bool start);
extern void WKFSK_send_char(int ch);
#endif
| 2,293
|
C++
|
.h
| 60
| 37.116667
| 79
| 0.708577
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,414
|
lookupcall.h
|
w1hkj_fldigi/src/include/lookupcall.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef LOOKUPCALL_H
#define LOOKUPCALL_H
#include <cstring>
extern std::string lookup_latd;
extern std::string lookup_lond;
extern std::string lookup_addr1;
extern std::string lookup_addr2;
extern std::string lookup_qth;
extern std::string lookup_state;
extern std::string lookup_province;
extern std::string lookup_zip;
extern std::string lookup_country;
extern void clear_Lookup();
extern void CALLSIGNquery();
enum qrz_xmlquery_t {
QRZXML_EXIT = -1,
QRZXMLNONE,
QRZNET, QRZCD,
HAMCALLNET,
CALLOOK,
HAMQTH };
enum qrz_webquery_t {
QRZWEB_EXIT = -1,
QRZWEBNONE,
QRZHTML, HAMCALLHTML, HAMQTHHTML, CALLOOKHTML };
extern void sendEQSL(const char *url);
extern void makeEQSL(const char *msg);
#endif
| 1,604
|
C++
|
.h
| 47
| 32.765957
| 79
| 0.687984
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,415
|
xmlreader.h
|
w1hkj_fldigi/src/include/xmlreader.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#include <string>
#include "irrXML.h"
using namespace irr;
using namespace io;
class IIrrXMLStringReader: public IFileReadCallBack {
const char *s;
int len;
int p;
public:
IIrrXMLStringReader(const char *szStr) {
s = szStr;
len = strlen(s);
p=0;
}
IIrrXMLStringReader(const std::string &str) {
s=str.c_str();
len = strlen(s);
p=0;
}
int read(void * buffer, int sizeToRead) {
char *sss = (char *)buffer;
if (p >= len) return 0;
int j = 0;
for (int i = p; i < len && j < sizeToRead; ) {
sss[j++] = s[i++];
}
return 1;
}
int getSize() {
return len-p;
}
};
| 1,537
|
C++
|
.h
| 51
| 27.27451
| 79
| 0.604351
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,416
|
compat.h
|
w1hkj_fldigi/src/include/compat.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef COMPAT_H
#define COMPAT_H
/* adapted from compat.h in git-1.6.1.2 */
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
# define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
# define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _BSD_SOURCE 1
#include <config.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <sys/param.h>
#include <sys/types.h>
// this tests depends on a modified FL/filename.H in the Fltk-1.3.0
// change
//# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
// to
//# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) && !defined(__WOE32__)
#ifdef __MINGW32__
# if FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR < 3
# undef dirent
# include <dirent.h>
# else
# include <dirent.h>
# endif
#define WSA_MAJOR 2
#define WSA_MINOR 0
#else
# include <dirent.h>
#endif
#include <sys/time.h>
#include <time.h>
#include <signal.h>
#include <assert.h>
#include "compat/mingw.h"
#endif // MINGW32_H
| 2,170
|
C++
|
.h
| 65
| 32.230769
| 95
| 0.652983
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,417
|
fldigi-config.h
|
w1hkj_fldigi/src/include/fldigi-config.h
|
// ----------------------------------------------------------------------------
// fldigi-config.h -- user configuration items for fldigi
//
// Copyright (C) 2006-2009
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef FLDIGI_CONFIG_H
#define FLDIGI_CONFIG_H
//=============================================================================
// You can change the x1 width of the waterfall / spectrum display by modifying this
// constant.
// Suggest that you make the value a multiple of 100.
// DO NOT EXCEED 4000
// The larger the number the greater the cpu load will be for creating the
// waterfall display
//
// Setting the DEFAULT_IMAGE_WIDTH to 3200 will size the x1 waterfall to be
// 800 pixels wide. The x1 waterfall size is always DEFAULT_IMAGE_WIDTH / 4
// and the minimum width of main display would then be
//
// DEFAULT_IMAGE_WIDTH / 4 + 2 * BEZEL + 2 * DEFAULT_SW
//
// where BEZEL is set to 2 (border around the waterfall), and
// DEFAULT_SW is the width of the signal level and squelch controls
#define DEFAULT_IMAGE_WIDTH 3000
//=============================================================================
// widget sizes internal to the waterfall widget
#define BEZEL 2
#define WFTEXT 10
#define WFSCALE 10
#define WFMARKER 6
#define BTN_HEIGHT 20
#define DEFAULT_SW 16
//#define DEFAULT_HWFALL 144
#define DEFAULT_HWFALL 124
//#define DEFAULT_HNOM 500
#define WMIN 800
#define HMIN 460
//#define Wwfall (DEFAULT_HNOM + 2 * BEZEL)
//#define DEFAULT_WNOM (Wwfall + 2* DEFAULT_SW)
//#define EMC_HWFALL 144
//#define EMC_HNOM 500
//#define EMC_WNOM (500 + 2 * DEFAULT_SW + 2 * BEZEL)
extern int IMAGE_WIDTH;
extern int Hwfall;
extern int HNOM;
extern int WNOM;
extern int Wwfall;
extern int Haqsoframe;
extern int Hmenu;
extern int Hstatus;
extern int Hmacros;
//#define Htext (DEFAULT_HNOM - 4 - Hwfall - Hmenu - Hstatus - Hmacros - Hqsoframe)
//#define Hrcvtxt (Htext) / 2
//#define Hxmttxt (Htext - (Hrcvtxt))
#define Wmode 110
#define Ws2n 110
#define Wimd 110
#define Wwarn 16
#define bwTxLevel 120
#define bwAfcOnOff 60
#define bwSqlOnOff 60
#define bwPwrSqlOnOff 60
#define Wstatus (WNOM - Wmode - Ws2n - Wimd - bwAfcOnOff - bwSqlOnOff - bwPwrSqlOnOff - Wwarn)
#define SCOPEWIN_MIN_WIDTH 48
#define SCOPEWIN_MIN_HEIGHT 48
#endif // FLDIGI_CONFIG_H
| 3,037
|
C++
|
.h
| 82
| 35.890244
| 94
| 0.672443
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,418
|
dropwin.h
|
w1hkj_fldigi/src/include/dropwin.h
|
#ifndef _HAVE_DROP_WIN_HDR_
#define _HAVE_DROP_WIN_HDR_
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include "dock_gp.h"
class dropwin : public Fl_Double_Window
{
protected:
void init_dropwin(void);
dockgroup *dock;
int Wdrop;
int Hdrop;
public:
// Normal FLTK constructors
dropwin(int x, int y, int w, int h, const char *l = 0);
dropwin(int w, int h, const char *l = 0);
// The working area of this window
Fl_Group *workspace;
// override handle method to capture "drop" events
int handle(int);
// assign a dock widget to this window
void set_dock(dockgroup *d) {dock = d;}
// Resize the workspace area if the dock closes/opens
void dock_resize(int h);
void set_drop(int w, int h) { Wdrop = w; Hdrop = h; }
};
#endif // _HAVE_DROP_WIN_HDR_
| 783
|
C++
|
.h
| 27
| 26.962963
| 56
| 0.712366
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,419
|
notify.h
|
w1hkj_fldigi/src/include/notify.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef NOTIFY_H_
#define NOTIFY_H_
#include "globals.h"
extern void notify_start(void);
extern void notify_stop(void);
extern void notify_show(void);
extern void notify_dxcc_show(bool readonly = true);
extern void notify_change_callsign(void);
extern void notify_rsid(trx_mode mode, int afreq);
extern void notify_rsid_eot(trx_mode mode, int afreq);
extern void notify_create_rsid_event(bool val);
#endif // NOTIFY_H_
| 1,312
|
C++
|
.h
| 31
| 41.193548
| 79
| 0.663273
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,420
|
estrings.h
|
w1hkj_fldigi/src/include/estrings.h
|
#ifndef _WINERROR_STRINGS_H
#define _WINERROR_STRINGS_H
#ifdef __WIN32__
#include <winerror.h>
#include <string>
struct ESTRINGS {
long ecode;
std::string estring;
};
extern std::string &win_error_string(long err);
#endif
#endif
| 237
|
C++
|
.h
| 12
| 18.083333
| 47
| 0.767123
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,421
|
dominovar.h
|
w1hkj_fldigi/src/include/dominovar.h
|
/*
* varicode.h -- DominoEX Varicode
*
* Copyright (C) 2001, 2002, 2003
* Tomi Manninen (oh2bns@sral.fi)
*
* This file is part of fldigi.
*
* Fldigi is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fldigi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with fldigi. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _DOMVARICODE_H
#define _DOMVARICODE_H
#define MAX_VARICODE_LEN 3
extern unsigned char *dominoex_varienc(unsigned char c, int secondary);
extern int dominoex_varidec(unsigned int symbol);
#endif
| 1,034
|
C++
|
.h
| 28
| 35.035714
| 74
| 0.723553
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,422
|
soundconf.h
|
w1hkj_fldigi/src/include/soundconf.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014 David Freese, W1HKJ
// Copyright (C) 2015 Robert Stiles, KK5VD
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef SOUNDCONF_H
#define SOUNDCONF_H
enum { SND_IDX_UNKNOWN = -1, SND_IDX_OSS, SND_IDX_PORT,
SND_IDX_PULSE, SND_IDX_NULL, SND_IDX_END
};
enum {
FLDIGI_SRC_BEST,
FLDIGI_SRC_MEDIUM,
FLDIGI_SRC_FASTEST,
#if !(defined(__ppc__) || defined(__powerpc__) || defined(__PPC__))
FLDIGI_SRC_LINEAR,
#endif
FLDIGI_NUM_SRC
};
enum {
PA_DEV_NOT_FOUND = 0,
PA_DEV_FOUND,
PA_EXACT_DEV_FOUND
};
extern int sample_rate_converters[FLDIGI_NUM_SRC];
void sound_init(void);
void sound_close(void);
void sound_update(unsigned idx);
#include <string>
class Fl_Choice;
int pa_set_dev(Fl_Choice *choice, std::string dev_name, int dev_index);
extern std::string str_pa_devices;
#endif // SOUNDCONF_H
| 1,615
|
C++
|
.h
| 47
| 32.851064
| 79
| 0.666453
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,423
|
textio.h
|
w1hkj_fldigi/src/include/textio.h
|
// ----------------------------------------------------------------------------
// Copyright (C) 2014
// David Freese, W1HKJ
//
// This file is part of fldigi
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef MULTIPSK_H
#define MULTIPSK_H
#include "qso_db.h"
class cTextFile {
private:
char header[120];
void makeHeader();
char *adif_to_date( char *s);
char *adif_to_time( char *s);
public:
cTextFile () {};
~cTextFile () {};
void writeCSVHeader(FILE *);
int writeCSVFile (const char *, cQsoDb *);
void writeTXTHeader(FILE *);
int writeTXTFile (const char *, cQsoDb *);
};
#endif
| 1,292
|
C++
|
.h
| 37
| 33.27027
| 79
| 0.631495
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,424
|
spectrum_viewer.h
|
w1hkj_fldigi/src/include/spectrum_viewer.h
|
// ----------------------------------------------------------------------------
// spectrum_viewer.cxx -- spectrum dialog
//
// Copyright (C) 2017
// Dave Freese, W1HKJ
//
// This file is part of fldigi.
//
// Fldigi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef SPECTRUM_VIEWER_H
#define SPECTRUM_VIEWER_H
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Output.H>
#include "spectrum.h"
#include "digiscope.h"
//extern Digiscope *fftscope;
extern spectrum *fftscope;
extern Fl_Box *pause_label;
extern Fl_Output *values;
extern Fl_Output *db_diffs;
extern Fl_Output *f_diffs;
extern Fl_Double_Window *spectrum_viewer;
extern void open_spectrum_viewer();
extern void close_spectrum_viewer();
extern void recenter_spectrum_viewer();
#endif
| 1,441
|
C++
|
.h
| 39
| 35.717949
| 79
| 0.674803
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
751,425
|
socket.h
|
w1hkj_fldigi/src/include/socket.h
|
// ----------------------------------------------------------------------------
// socket.h
//
// Copyright (C) 2008-2009
// Stelios Bounanos, M0GLD
//
// This file is part of fldigi.
//
// fldigi is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// fldigi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
#ifndef SOCKET_H_
#define SOCKET_H_
#include <config.h>
#include <sys/time.h>
#ifndef __MINGW32__
# include <sys/socket.h>
# include <netdb.h>
# if defined(__OpenBSD__) && defined(nitems)
# undef nitems
# endif
# include <netinet/in.h>
#else
#undef _WINSOCKAPI_
# include <winsock2.h>
# include <windows.h>
# ifndef ENOTCONN
# define ENOTCONN WSAENOTCONN
# endif
#endif
#include <string>
#include <exception>
#include <cstring>
#define S_BUFSIZ 16384
class SocketException : public std::exception
{
public:
SocketException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { }
SocketException(const char* msg_) : err(1), msg(msg_) { }
SocketException(int err_, const std::string& prefix)
: err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { }
virtual ~SocketException() throw() { }
const char* what(void) const throw() { return msg.c_str(); }
int error(void) const { return err; }
protected:
const char* err_to_str(int e)
{
#if HAVE_GETADDRINFO
if (e < 0)
return gai_strerror(e);
else
#endif
return strerror(e);
}
int err;
std::string msg;
};
#if HAVE_GETADDRINFO
typedef struct addrinfo addr_info_t;
#else
struct addr_info_t {
int ai_family;
int ai_socktype;
int ai_protocol;
int ai_addrlen;
struct sockaddr * ai_addr;
};
#endif
class Address
{
public:
Address(const char* host = "", int port = 0, const char* proto_name = "tcp");
Address(const char* host, const char* port_name, const char* proto_name = "tcp");
Address(const Address& addr);
~Address();
Address& operator=(const Address& rhs);
size_t size(void) const;
const addr_info_t* get(size_t n = 0) const;
const addr_info_t* udp_get_recv_addr(void);
static std::string get_str(const addr_info_t* addr);
unsigned int get_udp_io_port() {return port_io;};
unsigned int get_udp_o_port() {return port_out;};
std::string get_service() {return service;};
std::string get_node() {return node;};
private:
void lookup(const char* proto_name);
std::string node;
std::string service;
unsigned int port_io;
unsigned int port_out;
#if HAVE_GETADDRINFO
struct addrinfo* info;
#else
struct hostent host_entry;
struct servent service_entry;
mutable addr_info_t addr;
mutable struct sockaddr_in saddr;
#endif
bool copied;
};
class Socket
{
public:
Socket(const Address& addr);
Socket(int fd = -1);
Socket(const Socket& s);
~Socket();
Socket& operator=(const Socket& rhs);
void open(const Address& addr);
void close(void);
bool wait(int dir);
// Server
void bind(void);
void bindUDP(void);
void listen(int backlog = SOMAXCONN);
Socket accept(void);
Socket accept1(void);
Socket * accept2(void);
// Client
int connect(const Address& addr);
int connect(void);
bool connect1(void);
// Data Transimission
size_t send(const void* buf, size_t len);
size_t send(const std::string& buf);
size_t recv(void* buf, size_t len);
size_t recv(std::string& buf);
// Unconnected Data Transmission
size_t sendTo(const void* buf, size_t len);
size_t sendTo(const std::string& buf);
size_t recvFrom(void* buf, size_t len);
size_t recvFrom(std::string& buf);
// Options
int get_bufsize(int dir);
void set_bufsize(int dir, int len);
void set_nonblocking(bool v = true);
void set_nodelay(bool v = true);
void set_timeout(const struct timeval& t);
void set_timeout(double t);
void set_autoclose(bool v) const;
void set_close_on_exec(bool v, int fd = -1);
void broadcast(bool flag);
// Other
unsigned int get_port(struct sockaddr *sa);
void set_port(struct sockaddr *sa, unsigned int port);
unsigned long get_address4(struct sockaddr *sa);
void dual_port(int * dual_port);
void set_dual_port_number(unsigned int dual_port_number);
void set_dual_port_number(std::string port);
unsigned int get_dual_port_number(void) { return dual_port_number; };
unsigned int get_local_port() { return (unsigned int) atoi(address.get_service().c_str()); };
unsigned long get_to_address(void);
int use_dual_port(void) { if(use_kiss_dual_port) return *use_kiss_dual_port; else return 0; };
bool is_connected(void);
int fd(void);
void shut_down(void);
private:
int sockfd;
Address address;
size_t anum;
const addr_info_t* ainfo;
char* buffer;
struct timeval timeout;
bool nonblocking;
mutable bool autoclose;
struct sockaddr_storage saddr;
struct sockaddr_storage saddr_dp;
unsigned int saddr_size;
int *use_kiss_dual_port;
unsigned int dual_port_number;
bool connected_flag;
};
#endif // SOCKET_H_
// Local Variables:
// mode: c++
// c-file-style: "linux"
// End:
| 5,588
|
C++
|
.h
| 187
| 27.700535
| 95
| 0.688512
|
w1hkj/fldigi
| 109
| 27
| 38
|
GPL-3.0
|
9/20/2024, 9:41:57 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.