master 0.73
John Wiseman 3 years ago
parent a3362dbe68
commit 71e21cd9c0

@ -29,6 +29,8 @@ extern QWidget * mythis;
extern int AGWEnable; extern int AGWEnable;
extern int AGWMonEnable; extern int AGWMonEnable;
extern int AGWLocalTime;
extern int AGWMonNodes;
extern char AGWTermCall[12]; extern char AGWTermCall[12];
extern char AGWBeaconDest[12]; extern char AGWBeaconDest[12];
extern char AGWBeaconPath[80]; extern char AGWBeaconPath[80];
@ -40,6 +42,8 @@ extern char AGWHost[128];
extern int AGWPortNum; extern int AGWPortNum;
extern int AGWPaclen; extern int AGWPaclen;
extern Ui_ListenSession * KISSMonSess;
extern char listenCText[4096]; extern char listenCText[4096];
extern int ConnectBeep; extern int ConnectBeep;
@ -137,6 +141,7 @@ void AGW_Process_Input(AGWUser * AGW);
void Send_AGW_X_Frame(QTcpSocket* socket, char * CallFrom); void Send_AGW_X_Frame(QTcpSocket* socket, char * CallFrom);
void Send_AGW_G_Frame(QTcpSocket* socket); void Send_AGW_G_Frame(QTcpSocket* socket);
void Send_AGW_m_Frame(QTcpSocket* socket); void Send_AGW_m_Frame(QTcpSocket* socket);
void Send_AGW_R_Frame(QTcpSocket* socket);
Ui_ListenSession * FindFreeWindow(); Ui_ListenSession * FindFreeWindow();
Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label = nullptr); Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label = nullptr);
@ -146,7 +151,7 @@ void AGW_frame_header(UCHAR * Msg, char AGWPort, char DataKind, unsigned char PI
void Debugprintf(const char * format, ...) void Debugprintf(const char * format, ...)
{ {
char Mess[10000]; char Mess[10000];
va_list(arglist); va_list arglist;
va_start(arglist, format); va_start(arglist, format);
vsprintf(Mess, format, arglist); vsprintf(Mess, format, arglist);
@ -448,7 +453,7 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState
tabWidget->setTabText(Sess->Tab, "Monitor"); tabWidget->setTabText(Sess->Tab, "Monitor");
else else
{ {
char Label[16]; char Label[32];
sprintf(Label, "Sess %d", Sess->Tab + 1); sprintf(Label, "Sess %d", Sess->Tab + 1);
tabWidget->setTabText(Sess->Tab, Label); tabWidget->setTabText(Sess->Tab, Label);
} }
@ -541,7 +546,7 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState
// for (Ui_ListenSession * S: _sessions) // for (Ui_ListenSession * S: _sessions)
// { // {
if ((S->SessionType == Mon) && S->clientSocket == NULL && S->AGWSession == NULL && S->KISSSession == NULL) if ((S->SessionType == Mon) && S->clientSocket == NULL && S->AGWSession == NULL && S->KISSSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
{ {
Sess = S; Sess = S;
break; break;
@ -563,7 +568,7 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState
{ {
S = _sessions.at(i); S = _sessions.at(i);
if (S->clientSocket == NULL && S->AGWSession == NULL) if (S->clientSocket == NULL && S->KISSSession == NULL && S->AGWSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
{ {
Sess = S; Sess = S;
break; break;
@ -574,7 +579,7 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState
{ {
S = _sessions.at(0); S = _sessions.at(0);
if (S->clientSocket == NULL && S->AGWSession == NULL && S->KISSSession == NULL) if (S->clientSocket == NULL && S->AGWSession == NULL && S->KISSSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
Sess = S; Sess = S;
} }
@ -606,6 +611,10 @@ void QtTermTCP::onAGWSocketStateChanged(QAbstractSocket::SocketState socketState
connectMenu->setEnabled(false); connectMenu->setEnabled(false);
} }
Sess->mlocaltime = AGWLocalTime;
Sess->MonitorNODES = AGWMonNodes;
Send_AGW_R_Frame(sender); // Request Version
Send_AGW_m_Frame(sender); // Request Monitor Frames Send_AGW_m_Frame(sender); // Request Monitor Frames
} }
} }
@ -735,10 +744,31 @@ void Send_AGW_m_Frame(QTcpSocket* socket)
{ {
UCHAR Msg[512]; UCHAR Msg[512];
AGW_frame_header(Msg, 0, 'm', 0, "", "", 0); // Request Monitoring. Add Extended form if connected to BPQ
AGW_frame_header(Msg, 0, 'm', 0, "", "", 12);
Msg[AGWHDDRRLEN] = AGWLocalTime;
Msg[AGWHDDRRLEN + 1] = AGWMonNodes;
Msg[AGWHDDRRLEN + 2] = AGWMonEnable;
Msg[AGWHDDRRLEN + 3] = 0;
memcpy(&Msg[AGWHDDRRLEN + 4], (void *)&AGWUsers->MonSess->portmask, 8);
socket->write((char *)Msg, AGWHDDRRLEN + 12);
}
void Send_AGW_R_Frame(QTcpSocket* socket)
{
UCHAR Msg[512];
// Request Version
AGW_frame_header(Msg, 0, 'R', 0, "", "", 0);
socket->write((char *)Msg, AGWHDDRRLEN); socket->write((char *)Msg, AGWHDDRRLEN);
} }
/* /*
@ -1034,6 +1064,8 @@ void on_AGW_C_frame(AGWUser * AGW, struct AGWHeader * Frame, byte * Msg)
{ {
sprintf(Title, "Connected to %s", CallFrom); sprintf(Title, "Connected to %s", CallFrom);
QApplication::alert(mythis, 0);
if (TermMode == MDI) if (TermMode == MDI)
{ {
Sess->setWindowTitle(Title); Sess->setWindowTitle(Title);
@ -1073,7 +1105,7 @@ void on_AGW_C_frame(AGWUser * AGW, struct AGWHeader * Frame, byte * Msg)
char Msg[80]; char Msg[80];
sprintf(Msg, "Incoming Connect from %s\r\r", CallFrom); sprintf(Msg, "Incoming AGW Connection from %s\r\r", CallFrom);
WritetoOutputWindow(Sess, (unsigned char *)Msg, (int)strlen(Msg)); WritetoOutputWindow(Sess, (unsigned char *)Msg, (int)strlen(Msg));
return; return;
@ -1121,21 +1153,27 @@ void on_AGW_D_frame(int snd_ch, char * CallFrom, char * CallTo, byte * Msg, int
} }
} }
extern "C" void WritetoMonWindow(Ui_ListenSession * Sess, unsigned char * Msg, int len);
void on_AGW_Mon_frame(byte * Msg, int Len, char Type) void on_AGW_Mon_frame(byte * Msg, int Len, char Type)
{ {
if (AGWUsers && AGWUsers->MonSess && AGWUsers->MonSess->monWindow) if (AGWUsers && AGWUsers->MonSess && AGWUsers->MonSess->monWindow)
{ {
unsigned char copy[512];
copy[0] = 0x1b;
if (Type == 'T') if (Type == 'T')
WritetoOutputWindowEx(AGWUsers->MonSess, Msg, Len, copy[1] = 91;
AGWUsers->MonSess->monWindow, &AGWUsers->MonSess->OutputSaveLen, AGWUsers->MonSess->OutputSave, monTxText); // Red
else else
WritetoOutputWindowEx(AGWUsers->MonSess, Msg, Len, copy[1] = 17;
AGWUsers->MonSess->monWindow, &AGWUsers->MonSess->OutputSaveLen, AGWUsers->MonSess->OutputSave, monRxText); // Blue
memcpy(&copy[2], Msg, Len);
WritetoMonWindow(AGWUsers->MonSess, copy, Len + 2);
} }
} }
void on_AGW_Ds_frame(int AGWChan, char * CallFrom, char * CallTo, struct AGWHeader * Frame) void on_AGW_Ds_frame(int AGWChan, char * CallFrom, char * CallTo, struct AGWHeader * Frame)
{ {
TAGWPort * AX25Sess; TAGWPort * AX25Sess;
@ -1170,7 +1208,7 @@ void on_AGW_Ds_frame(int AGWChan, char * CallFrom, char * CallTo, struct AGWHead
tabWidget->setTabText(Sess->Tab, "Monitor"); tabWidget->setTabText(Sess->Tab, "Monitor");
else else
{ {
char Label[16]; char Label[32];
sprintf(Label, "Sess %d", Sess->Tab + 1); sprintf(Label, "Sess %d", Sess->Tab + 1);
tabWidget->setTabText(Sess->Tab, Label); tabWidget->setTabText(Sess->Tab, Label);
} }

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>558</width> <width>554</width>
<height>461</height> <height>433</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -16,8 +16,8 @@
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>86</x> <x>94</x>
<y>373</y> <y>376</y>
<width>351</width> <width>351</width>
<height>33</height> <height>33</height>
</rect> </rect>
@ -162,7 +162,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>24</x> <x>24</x>
<y>267</y> <y>263</y>
<width>107</width> <width>107</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -171,21 +171,11 @@
<string>Interval .wav File</string> <string>Interval .wav File</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="intervalFile">
<property name="geometry">
<rect>
<x>200</x>
<y>267</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>24</x> <x>24</x>
<y>292</y> <y>288</y>
<width>169</width> <width>169</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -198,7 +188,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>24</x> <x>24</x>
<y>317</y> <y>313</y>
<width>165</width> <width>165</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -220,37 +210,17 @@
<string>Keyword File</string> <string>Keyword File</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="connectFile">
<property name="geometry">
<rect>
<x>200</x>
<y>292</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="keywordWAV">
<property name="geometry">
<rect>
<x>200</x>
<y>317</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>130</y> <y>134</y>
<width>465</width> <width>465</width>
<height>65</height> <height>65</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>The System Beep function doesn't work on all platform, so you can configure QtTermTCP to play a sound file instead of using Beep. You can set different files for each event if you wish. Some sample wav files are provided. </string> <string>The System Beep function doesn't work on all platform, so you can configure QtTermTCP to play a sound file instead of using Beep. You can set different files for each event if you wish. Select from the supplied sounds or choose your own .wav files. </string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
@ -260,7 +230,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>416</x> <x>416</x>
<y>267</y> <y>263</y>
<width>61</width> <width>61</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -273,7 +243,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>416</x> <x>416</x>
<y>292</y> <y>288</y>
<width>61</width> <width>61</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -286,7 +256,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>416</x> <x>416</x>
<y>317</y> <y>313</y>
<width>61</width> <width>61</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -308,21 +278,11 @@
<string>Use Bells (ascii BELL char makes a sound)</string> <string>Use Bells (ascii BELL char makes a sound)</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="bellsFile">
<property name="geometry">
<rect>
<x>200</x>
<y>242</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="chooseBells"> <widget class="QPushButton" name="chooseBells">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>416</x> <x>416</x>
<y>242</y> <y>238</y>
<width>61</width> <width>61</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -335,7 +295,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>24</x> <x>24</x>
<y>242</y> <y>238</y>
<width>107</width> <width>107</width>
<height>20</height> <height>20</height>
</rect> </rect>
@ -344,6 +304,238 @@
<string>Bells .wav File</string> <string>Bells .wav File</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" name="TestInbound">
<property name="geometry">
<rect>
<x>484</x>
<y>288</y>
<width>47</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Test</string>
</property>
</widget>
<widget class="QPushButton" name="testInterval">
<property name="geometry">
<rect>
<x>484</x>
<y>263</y>
<width>47</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Test</string>
</property>
</widget>
<widget class="QPushButton" name="TestKeyAlert">
<property name="geometry">
<rect>
<x>484</x>
<y>313</y>
<width>47</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Test</string>
</property>
</widget>
<widget class="QPushButton" name="testBells">
<property name="geometry">
<rect>
<x>484</x>
<y>238</y>
<width>47</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Test</string>
</property>
</widget>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>36</x>
<y>336</y>
<width>471</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>It may take a second or two for sound to play after pressing Test button</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QComboBox" name="bellsFile">
<property name="geometry">
<rect>
<x>200</x>
<y>238</y>
<width>207</width>
<height>20</height>
</rect>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<item>
<property name="text">
<string>:/PCBeep</string>
</property>
</item>
<item>
<property name="text">
<string>:/LowTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/HighTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ring</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ding</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="intervalFile">
<property name="geometry">
<rect>
<x>200</x>
<y>264</y>
<width>207</width>
<height>20</height>
</rect>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<item>
<property name="text">
<string>:/PCBeep</string>
</property>
</item>
<item>
<property name="text">
<string>:/LowTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/HighTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ring</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ding</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="connectFile">
<property name="geometry">
<rect>
<x>200</x>
<y>288</y>
<width>207</width>
<height>20</height>
</rect>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<item>
<property name="text">
<string>:/PCBeep</string>
</property>
</item>
<item>
<property name="text">
<string>:/LowTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/HighTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ring</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ding</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="keywordWAV">
<property name="geometry">
<rect>
<x>200</x>
<y>314</y>
<width>207</width>
<height>20</height>
</rect>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<item>
<property name="text">
<string>:/PCBeep</string>
</property>
</item>
<item>
<property name="text">
<string>:/LowTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/HighTone</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ring</string>
</property>
</item>
<item>
<property name="text">
<string>:/Ding</string>
</property>
</item>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>432</width> <width>432</width>
<height>286</height> <height>319</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,7 +17,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>40</x> <x>40</x>
<y>238</y> <y>262</y>
<width>351</width> <width>351</width>
<height>33</height> <height>33</height>
</rect> </rect>
@ -58,7 +58,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>96</y> <y>120</y>
<width>401</width> <width>401</width>
<height>57</height> <height>57</height>
</rect> </rect>
@ -69,7 +69,7 @@
<widget class="QLineEdit" name="Host"> <widget class="QLineEdit" name="Host">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>90</x> <x>78</x>
<y>20</y> <y>20</y>
<width>111</width> <width>111</width>
<height>22</height> <height>22</height>
@ -79,7 +79,7 @@
<widget class="QLineEdit" name="Port"> <widget class="QLineEdit" name="Port">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>330</x> <x>290</x>
<y>21</y> <y>21</y>
<width>47</width> <width>47</width>
<height>22</height> <height>22</height>
@ -102,7 +102,7 @@
<widget class="QLabel" name="label_21"> <widget class="QLabel" name="label_21">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>280</x> <x>222</x>
<y>24</y> <y>24</y>
<width>47</width> <width>47</width>
<height>13</height> <height>13</height>
@ -139,8 +139,8 @@
<widget class="QGroupBox" name="groupBox_5"> <widget class="QGroupBox" name="groupBox_5">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>10</x>
<y>46</y> <y>70</y>
<width>411</width> <width>411</width>
<height>51</height> <height>51</height>
</rect> </rect>
@ -151,7 +151,7 @@
<widget class="QComboBox" name="SerialPort"> <widget class="QComboBox" name="SerialPort">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>138</x>
<y>20</y> <y>20</y>
<width>111</width> <width>111</width>
<height>22</height> <height>22</height>
@ -174,7 +174,7 @@
<widget class="QLabel" name="label_23"> <widget class="QLabel" name="label_23">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>280</x> <x>276</x>
<y>20</y> <y>20</y>
<width>47</width> <width>47</width>
<height>22</height> <height>22</height>
@ -187,7 +187,7 @@
<widget class="QLineEdit" name="Speed"> <widget class="QLineEdit" name="Speed">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>335</x> <x>328</x>
<y>21</y> <y>21</y>
<width>51</width> <width>51</width>
<height>22</height> <height>22</height>
@ -201,9 +201,9 @@
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>12</x>
<y>12</y> <y>12</y>
<width>161</width> <width>149</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -214,7 +214,7 @@
<widget class="QCheckBox" name="KISSEnable"> <widget class="QCheckBox" name="KISSEnable">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>150</x> <x>158</x>
<y>10</y> <y>10</y>
<width>23</width> <width>23</width>
<height>25</height> <height>25</height>
@ -230,7 +230,7 @@
<widget class="QLabel" name="label_22"> <widget class="QLabel" name="label_22">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>230</x> <x>214</x>
<y>13</y> <y>13</y>
<width>61</width> <width>61</width>
<height>17</height> <height>17</height>
@ -243,7 +243,7 @@
<widget class="QLineEdit" name="MYCALL"> <widget class="QLineEdit" name="MYCALL">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>300</x> <x>286</x>
<y>10</y> <y>10</y>
<width>91</width> <width>91</width>
<height>22</height> <height>22</height>
@ -254,7 +254,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>
<y>168</y> <y>192</y>
<width>47</width> <width>47</width>
<height>13</height> <height>13</height>
</rect> </rect>
@ -266,8 +266,8 @@
<widget class="QLineEdit" name="Paclen"> <widget class="QLineEdit" name="Paclen">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>98</x>
<y>165</y> <y>189</y>
<width>47</width> <width>47</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -276,8 +276,8 @@
<widget class="QLabel" name="label_26"> <widget class="QLabel" name="label_26">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>265</x> <x>213</x>
<y>168</y> <y>192</y>
<width>66</width> <width>66</width>
<height>16</height> <height>16</height>
</rect> </rect>
@ -289,8 +289,8 @@
<widget class="QLineEdit" name="Maxframe"> <widget class="QLineEdit" name="Maxframe">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>340</x> <x>288</x>
<y>165</y> <y>189</y>
<width>47</width> <width>47</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -300,7 +300,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>
<y>202</y> <y>226</y>
<width>47</width> <width>47</width>
<height>13</height> <height>13</height>
</rect> </rect>
@ -312,8 +312,8 @@
<widget class="QLineEdit" name="Frack"> <widget class="QLineEdit" name="Frack">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>98</x>
<y>199</y> <y>223</y>
<width>36</width> <width>36</width>
<height>22</height> <height>22</height>
</rect> </rect>
@ -322,8 +322,8 @@
<widget class="QLabel" name="label_28"> <widget class="QLabel" name="label_28">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>265</x> <x>213</x>
<y>201</y> <y>225</y>
<width>47</width> <width>47</width>
<height>13</height> <height>13</height>
</rect> </rect>
@ -335,13 +335,42 @@
<widget class="QLineEdit" name="Retries"> <widget class="QLineEdit" name="Retries">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>340</x> <x>288</x>
<y>198</y> <y>222</y>
<width>36</width> <width>36</width>
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>12</x>
<y>38</y>
<width>149</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Allow incoming connects</string>
</property>
</widget>
<widget class="QCheckBox" name="KISSListen">
<property name="geometry">
<rect>
<x>158</x>
<y>38</y>
<width>23</width>
<height>21</height>
</rect>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>

@ -1,121 +0,0 @@
[General]
HostParams0=nottm.g8bpq.net|8011|gm8bpq|password|5 1 1 0 1 0 0 1\r|Pogo4
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x2\x32\0\0\0\xa8\0\0\x5>\0\0\x3\x61\0\0\x2\x32\0\0\0\xa8\0\0\x5>\0\0\x3\x61\0\0\0\0\0\0\0\0\a\x80\0\0\x2\x32\0\0\0\xa8\0\0\x5>\0\0\x3\x61)
HostParams1=192.168.1.63|8011|john|password||Pogo2
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\r\0\0\x2\xa4\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x3\0\0\0\x1\0\0\0\x16\0m\0\x61\0i\0n\0T\0o\0o\0l\0\x62\0\x61\0r\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
HostParams2=127.0.0.1|8011|gm8bpq|password|c000000100000000 1 1 0 1 0 0 1\r|
HostParams3=192.168.1.131|8011|john|password|1 1 1 0 1 0 0 1\r|Slack
HostParams4=127.0.0.1|8021|john|password|c000000100000006 1 1 0 1 0 0 1\r|LinBPQ
HostParams5=192.168.1.18|8011|john|password|c00000010000002e 1 1 0 1 0 0 1\r|
HostParams6=127.0.0.1|8121|john|password|3 1 1 0 1 0 0 1\r|CB
HostParams7=|0||||
HostParams8=|0||||
HostParams9=|0||||
HostParams10=|0||||
HostParams11=|0||||
HostParams12=|0||||
HostParams13=|0||||
HostParams14=|0||||
HostParams15=|0||||
Split=41
ChatMode=1
AutoTeletext=1
Bells=1
StripLF=1
AlertBeep=1
ConnectBeep=1
CurrentHost=6
YAPPPath=
listenPort=8015
listenEnable=1
listenCText=[PMS-2.3-C]\rHello>\r
convUTF8=0
PTT=None
PTTBAUD=0
PTTMode=1
CATHex=1
PTTOffString=
PTTOnString=
pttGPIOPin=17
pttGPIOPinR=17
CM108Addr=0xD8C:0x08
HamLibPort=4532
HamLibHost=127.0.0.1
FLRigPort=12345
FLRigHost=127.0.0.1
AGWEnable=0
AGWMonEnable=1
AGWTermCall=G8BPQ
AGWBeaconDest=
AGWBeaconPath=
AGWBeaconInterval=0
AGWBeaconPorts=
AGWBeaconText=
AGWHost=127.0.0.1
AGWPort=8001
AGWPaclen=80
AGWToCalls=G8BPQ-2, SWITCH,
KISSEnable=0
MYCALL=GM8BPQ
KISSHost=127.0.0.1
KISSMode=0
KISSPort=8110
KISSSerialPort=TCP
KISSBAUD=19200
VARAEnable=0
VARATermCall=G8BPQ
VARAHost=127.0.0.1
VARAPort=8310
VARAPath=C:\\VARA\\VARA.exe
VARAHostHF=127.0.0.1
VARAPortHF=8310
VARAPathHF=C:\\VARA\\VARA.exe
VARAHostFM=127.0.0.1
VARAPortFM=8300
VARAPathFM=C:\\VARA\\VARAFM.exe
VARAHostSAT=127.0.0.1
VARAPortSAT=8300
VARAPathSAT=C:\\VARA\\VARASAT.exe
VARA500=0
VARA2300=1
VARA2750=0
VARAHF=1
VARAFM=0
VARASAT=0
TabType=1 3 1 1 1 1 1 2 2 0
monBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
monRxText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
monTxText=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
monOtherText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
termBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
outputText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
EchoText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
WarningText=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
inputBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
inputText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
TermMode=2
singlemodeFormat=3
FontFamily=Courier
PointSize=10
Weight=50
Sessions="1|1, 17, 40, 205, 625, 990|"
VARAInit="P2P SESSION,WINLINK SESSION"
[AX25_A]
Retries=10
Maxframe=4
Paclen=128
FrackTime=8
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
IPOLL=80
MyDigiCall=

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
// Qt Version of BPQTermTCP // Qt Version of BPQTermTCP
#define VersionString "0.0.0.69" #define VersionString "0.0.0.71"
// .12 Save font weight // .12 Save font weight
@ -88,6 +88,16 @@
// Allow use of WAV files instead of Beep sound for sound alerts // Allow use of WAV files instead of Beep sound for sound alerts
// Enable an alarm to be sounded when one of a list of words or phrases is received. // Enable an alarm to be sounded when one of a list of words or phrases is received.
// .70 October 2023
// Include some .wav files in resources
// Add Test button to Alert setup dialog
// .71 October 2023
// Add option to use local time
// Fixes for Mac OS
#define _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS
@ -155,7 +165,6 @@ char monStyleSheet[128] = "background-color: rgb(0,255,255)";
char termStyleSheet[128] = "background-color: rgb(255,0,255);"; char termStyleSheet[128] = "background-color: rgb(255,0,255);";
char inputStyleSheet[128] = "color: rgb(255, 0, 0); background-color: rgb(255,255,0);"; char inputStyleSheet[128] = "color: rgb(255, 0, 0); background-color: rgb(255,255,0);";
QColor monBackground = qRgb(0, 255, 255); QColor monBackground = qRgb(0, 255, 255);
QColor monRxText = qRgb(0, 0, 255); QColor monRxText = qRgb(0, 0, 255);
QColor monTxText = qRgb(255, 0, 0); QColor monTxText = qRgb(255, 0, 0);
@ -250,6 +259,8 @@ extern int AutoTeletext;
int AGWEnable = 0; int AGWEnable = 0;
int AGWMonEnable = 0; int AGWMonEnable = 0;
int AGWLocalTime = 0;
int AGWMonNodes = 0;
char AGWTermCall[12] = ""; char AGWTermCall[12] = "";
char AGWBeaconDest[12] = ""; char AGWBeaconDest[12] = "";
char AGWBeaconPath[80] = ""; char AGWBeaconPath[80] = "";
@ -257,17 +268,39 @@ int AGWBeaconInterval = 0;
char AGWBeaconPorts[80]; char AGWBeaconPorts[80];
char AGWBeaconMsg[260] = ""; char AGWBeaconMsg[260] = "";
char AGWHost[128] = "127.0.0.1"; char AGWHost[128] = "127.0.0.1";
int AGWPortNum = 8000; int AGWPortNum = 8000;
int AGWPaclen = 80; int AGWPaclen = 80;
extern char * AGWPortList; extern char * AGWPortList;
extern myTcpSocket * AGWSock; extern myTcpSocket * AGWSock;
typedef struct AGWUser_t
{
QTcpSocket *socket;
unsigned char data_in[8192];
int data_in_len;
unsigned char AGW_frame_buf[512];
int Monitor;
int Monitor_raw;
Ui_ListenSession * MonSess; // Window for Monitor info
} AGWUser;
extern AGWUser *AGWUsers; // List of currently connected clients
void Send_AGW_m_Frame(QTcpSocket* socket);
QStringList AGWToCalls; QStringList AGWToCalls;
// KISS Interface // KISS Interface
int KISSEnable = 0; int KISSEnable = 0;
extern "C" int KISSMonEnable;
extern "C" int KISSLocalTime;
extern "C" int KISSMonNodes;
extern "C" int KISSListen;
char SerialPort[80] = ""; char SerialPort[80] = "";
char KISSHost[128] = "127.0.0.1"; char KISSHost[128] = "127.0.0.1";
int KISSPortNum = 1000; int KISSPortNum = 1000;
@ -284,7 +317,7 @@ extern "C" void * KISSSockCopy[4];
int KISSConnected = 0; int KISSConnected = 0;
int KISSConnecting = 0; int KISSConnecting = 0;
Ui_ListenSession * KISSMonSess; Ui_ListenSession * KISSMonSess = nullptr;
QSerialPort * m_serial = nullptr; QSerialPort * m_serial = nullptr;
@ -401,6 +434,9 @@ QMenu * YAPPMenu;
QMenu *connectMenu; QMenu *connectMenu;
QMenu *disconnectMenu; QMenu *disconnectMenu;
QAction *EnableMonitor;
QAction *EnableMonLog;
QAction *MonLocalTime;
QAction *MonTX; QAction *MonTX;
QAction *MonSup; QAction *MonSup;
QAction *MonNodes; QAction *MonNodes;
@ -860,6 +896,7 @@ QAction * setupMenuLine(QMenu * Menu, char * Label, QObject * parent, int State)
// This now creates all window types - Term, Mon, Combined, Listen // This now creates all window types - Term, Mon, Combined, Listen
int xCount = 0; int xCount = 0;
int sessNo = 0;
Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label) Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label)
{ {
@ -884,6 +921,7 @@ Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label)
Sess->portmask = 0; Sess->portmask = 0;
Sess->portmask = 1; Sess->portmask = 1;
Sess->mtxparam = 1; Sess->mtxparam = 1;
Sess->mlocaltime = 0;
Sess->mcomparam = 1; Sess->mcomparam = 1;
Sess->monUI = 0; Sess->monUI = 0;
Sess->MonitorNODES = 0; Sess->MonitorNODES = 0;
@ -901,7 +939,12 @@ Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label)
Sess->pageBuffer[0] = 0; Sess->pageBuffer[0] = 0;
Sess->Tab = 0; Sess->Tab = 0;
_sessions.push_back(Sess); Sess->LogMonitor = false;
Sess->monSpan = (char *) "<span style=white-space:pre>";
Sess->monLogfile = nullptr;
Sess->sessNo = sessNo++;
_sessions.append(Sess);
// Sess->TT = new Ui_TeleTextDialog(); // Sess->TT = new Ui_TeleTextDialog();
@ -1065,6 +1108,8 @@ Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label)
return Sess; return Sess;
} }
QByteArray timeLoaded = QDateTime::currentDateTime().toString("yymmdd_hhmmss").toUtf8();
QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent) QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
{ {
int i; int i;
@ -1143,13 +1188,20 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
int index = 0; int index = 0;
tabWidget = new QTabWidget(this); tabWidget = new QTabWidget(this);
QTabBar* tabBar = tabWidget->tabBar();
// QString style1 = "QTabWidget::tab-bar{left:0;}"; // for Mac
// tabWidget->setStyleSheet(style1);
QString style = "QTabBar::tab:selected{background-color: #d0d0d0;} QTabBar::tab:!selected{background-color: #f0f0f0;}";
tabBar->setStyleSheet(style);
tabWidget->setContextMenuPolicy(Qt::CustomContextMenu); tabWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(tabWidget, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); connect(tabWidget, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &)));
ui.verticalLayout->addWidget(tabWidget); ui.verticalLayout->addWidget(tabWidget);
tabWidget->setTabPosition(QTabWidget::South); tabWidget->setTabPosition(QTabWidget::South);
Sess = newWindow(this, TabType[0], "Sess 1"); Sess = newWindow(this, TabType[0], "Sess 1");
@ -1283,7 +1335,7 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
discAction = mymenuBar->addAction("&Disconnect"); discAction = mymenuBar->addAction("&Disconnect");
// Place discAction in mac preferences menu, otherwise it doesn't appear // Place discAction in mac app menu, otherwise it doesn't appear
if (is_mac == true) { if (is_mac == true) {
QMenu * app_menu = mymenuBar->addMenu("App Menu"); QMenu * app_menu = mymenuBar->addMenu("App Menu");
discAction->setMenuRole(QAction::ApplicationSpecificRole); discAction->setMenuRole(QAction::ApplicationSpecificRole);
@ -1371,7 +1423,6 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
AlertAction->setFont(*menufont); AlertAction->setFont(*menufont);
setupMenu->addSeparator(); setupMenu->addSeparator();
actFonts = new QAction("Terminal Font", this); actFonts = new QAction("Terminal Font", this);
setupMenu->addAction(actFonts); setupMenu->addAction(actFonts);
connect(actFonts, SIGNAL(triggered()), this, SLOT(doFonts())); connect(actFonts, SIGNAL(triggered()), this, SLOT(doFonts()));
@ -1437,6 +1488,9 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
monitorMenu = mymenuBar->addMenu(tr("&Monitor")); monitorMenu = mymenuBar->addMenu(tr("&Monitor"));
EnableMonitor = setupMenuLine(monitorMenu, (char *)"Enable Monitoring", this, 0);
EnableMonLog = setupMenuLine(monitorMenu, (char *)"Log to File", this, 0);
MonLocalTime = setupMenuLine(monitorMenu, (char *)"Use local time", this, 0);
MonTX = setupMenuLine(monitorMenu, (char *)"Monitor TX", this, 1); MonTX = setupMenuLine(monitorMenu, (char *)"Monitor TX", this, 1);
MonSup = setupMenuLine(monitorMenu, (char *)"Monitor Supervisory", this, 1); MonSup = setupMenuLine(monitorMenu, (char *)"Monitor Supervisory", this, 1);
MonUI = setupMenuLine(monitorMenu, (char *)"Only Monitor UI Frames", this, 0); MonUI = setupMenuLine(monitorMenu, (char *)"Only Monitor UI Frames", this, 0);
@ -1464,6 +1518,15 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
ListenAction = mymenuBar->addAction("&Listen"); ListenAction = mymenuBar->addAction("&Listen");
connect(ListenAction, SIGNAL(triggered()), this, SLOT(ListenSlot())); connect(ListenAction, SIGNAL(triggered()), this, SLOT(ListenSlot()));
// Place Listen Action in mac app menu, otherwise it doesn't appear
if (is_mac == true)
{
QMenu * app_menu = mymenuBar->addMenu("App Menu");
ListenAction->setMenuRole(QAction::ApplicationSpecificRole);
app_menu->addAction(ListenAction);
}
toolBar->addAction(ListenAction); toolBar->addAction(ListenAction);
YAPPMenu = mymenuBar->addMenu(tr("&YAPP")); YAPPMenu = mymenuBar->addMenu(tr("&YAPP"));
@ -1484,7 +1547,6 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
connect(YAPPSetRX, SIGNAL(triggered()), this, SLOT(doYAPPSetRX())); connect(YAPPSetRX, SIGNAL(triggered()), this, SLOT(doYAPPSetRX()));
connect(YAPPSetSize, SIGNAL(triggered()), this, SLOT(doYAPPSetSize())); connect(YAPPSetSize, SIGNAL(triggered()), this, SLOT(doYAPPSetSize()));
but3 = new QToolButton(); but3 = new QToolButton();
but3->setPopupMode(QToolButton::InstantPopup); but3->setPopupMode(QToolButton::InstantPopup);
but3->setText("YAPP"); but3->setText("YAPP");
@ -1620,11 +1682,17 @@ void QtTermTCP::showContextMenu(const QPoint &point)
QRect Brect = tabBar->rect(); QRect Brect = tabBar->rect();
QPoint myPoint = point; QPoint myPoint = point;
int n = myPoint.y() - (Wrect.height() - Brect.height()); // Get x coordinate of first tab (on Mac tabs are centre aligned)
QRect rect = tabWidget->tabBar()->geometry();
int left = rect.left();
int n = myPoint.y() - (Wrect.height() - Brect.height());
myPoint.setY(n); myPoint.setY(n);
n = myPoint.x() - left;
// QPoint tabBarPoint = mapTo(tabBar, point); myPoint.setX(n);
int tabIndex = tabBar->tabAt(myPoint); int tabIndex = tabBar->tabAt(myPoint);
@ -1644,7 +1712,7 @@ void QtTermTCP::showContextMenu(const QPoint &point)
connect(Act, SIGNAL(triggered()), this, SLOT(autoConnectChecked())); connect(Act, SIGNAL(triggered()), this, SLOT(autoConnectChecked()));
QAction * selected_action = menu.exec(tabWidget->mapToGlobal(point)); menu.exec(tabWidget->mapToGlobal(point));
} }
@ -1710,6 +1778,13 @@ void QtTermTCP::doQuit()
QCoreApplication::quit(); QCoreApplication::quit();
} }
void FlashifNotActive()
{
if (!mythis->isActiveWindow())
QApplication::alert(mythis, 0);
}
// "Copy on select" Code // "Copy on select" Code
@ -2003,6 +2078,47 @@ void QtTermTCP::tabSelected(int Current)
// If a monitor Window, change Monitor config settings // If a monitor Window, change Monitor config settings
EnableMonLog->setChecked(Sess->LogMonitor);
if (AGWUsers && Sess == AGWUsers->MonSess) // AGW Monitor
{
for (int i = 0; i < 64; i++)
SetPortMonLine(i, (char *)"", 0, 0); // Set all hidden
MonTX->setVisible(0);
MonSup->setVisible(0);
MonUI->setVisible(0);
MonColour->setVisible(0);
EnableMonitor->setVisible(1);
EnableMonitor->setChecked(AGWMonEnable);
MonLocalTime->setChecked(Sess->mlocaltime);
MonNodes->setChecked(Sess->MonitorNODES);
}
else if (Sess == KISSMonSess) // KISS Monitor
{
for (int i = 0; i < 64; i++)
SetPortMonLine(i, (char *)"", 0, 0); // Set all hidden
MonTX->setVisible(0);
MonSup->setVisible(0);
MonUI->setVisible(0);
MonColour->setVisible(0);
EnableMonitor->setVisible(1);
EnableMonitor->setChecked(KISSMonEnable);
MonLocalTime->setChecked(Sess->mlocaltime);
MonNodes->setChecked(Sess->MonitorNODES);
}
else
{
EnableMonitor->setVisible(0);
MonTX->setVisible(1);
MonSup->setVisible(1);
MonUI->setVisible(1);
MonColour->setVisible(1);
}
if (Sess->PortMonString[0]) if (Sess->PortMonString[0])
{ {
char * ptr = (char *)malloc(2048); char * ptr = (char *)malloc(2048);
@ -2043,6 +2159,7 @@ void QtTermTCP::tabSelected(int Current)
} }
free(ptr); free(ptr);
MonLocalTime->setChecked(Sess->mlocaltime);
MonTX->setChecked(Sess->mtxparam); MonTX->setChecked(Sess->mtxparam);
MonSup->setChecked(Sess->mcomparam); MonSup->setChecked(Sess->mcomparam);
MonUI->setChecked(Sess->monUI); MonUI->setChecked(Sess->monUI);
@ -2166,6 +2283,10 @@ void QtTermTCP::Connect()
&Sess->portmask, &Sess->mtxparam, &Sess->mcomparam, &Sess->portmask, &Sess->mtxparam, &Sess->mcomparam,
&Sess->MonitorNODES, &Sess->MonitorColour, &Sess->monUI); &Sess->MonitorNODES, &Sess->MonitorColour, &Sess->monUI);
Sess->mlocaltime = (Sess->mtxparam >> 7);
Sess->mtxparam &= 1;
MonLocalTime->setChecked(Sess->mlocaltime);
MonTX->setChecked(Sess->mtxparam); MonTX->setChecked(Sess->mtxparam);
MonSup->setChecked(Sess->mcomparam); MonSup->setChecked(Sess->mcomparam);
MonUI->setChecked(Sess->monUI); MonUI->setChecked(Sess->monUI);
@ -2443,8 +2564,13 @@ void QtTermTCP::menuChecked()
return; return;
} }
if (Act == EnableMonitor)
if (Act == MonTX) ActiveSession->EnableMonitor = state;
else if (Act == EnableMonLog)
ActiveSession->LogMonitor = state;
else if (Act == MonLocalTime)
ActiveSession->mlocaltime = state;
else if (Act == MonTX)
ActiveSession->mtxparam = state; ActiveSession->mtxparam = state;
else if (Act == MonSup) else if (Act == MonSup)
ActiveSession->mcomparam = state; ActiveSession->mcomparam = state;
@ -2499,26 +2625,24 @@ void QtTermTCP::menuChecked()
} }
} }
// Get active Session
/*
QMdiSubWindow *SW = mdiArea->activeSubWindow();
Ui_ListenSession * Sess; if (ActiveSession->clientSocket && ActiveSession->SessionType & Mon)
SendTraceOptions(ActiveSession);
for (int i = 0; i < _sessions.size(); ++i) else if (AGWUsers && ActiveSession == AGWUsers->MonSess)
{ {
Sess = _sessions.at(i); AGWMonEnable = ActiveSession->EnableMonitor;
AGWLocalTime = ActiveSession->mlocaltime;
AGWMonNodes = ActiveSession->MonitorNODES;
Send_AGW_m_Frame((QTcpSocket*)ActiveSession->AGWSession);
}
// for (Ui_ListenSession * Sess : _sessions) else if (ActiveSession == KISSMonSess)
// {
if (Sess->sw == SW)
{ {
*/ KISSLocalTime = ActiveSession->mlocaltime;
KISSMonEnable = ActiveSession->EnableMonitor;
if (ActiveSession->clientSocket && ActiveSession->SessionType & Mon) KISSMonNodes = ActiveSession->MonitorNODES;
SendTraceOptions(ActiveSession); }
return; return;
} }
@ -2903,8 +3027,14 @@ extern "C" void WritetoOutputWindowEx(Ui_ListenSession * Sess, unsigned char * B
{ {
if (AlertBeep) if (AlertBeep)
myBeep(&IntervalWAV); myBeep(&IntervalWAV);
} }
// Alert if QtTerm not active window (unless Mon window)
if((Sess->SessionType & Mon) == 0)
FlashifNotActive();
// if tabbed and not active tab set tab label red // if tabbed and not active tab set tab label red
if (TermMode == Tabbed) if (TermMode == Tabbed)
@ -3094,6 +3224,8 @@ lineloop:
} }
void WriteMonitorLog(Ui_ListenSession * Sess, char * Msg);
extern "C" void WritetoMonWindow(Ui_ListenSession * Sess, unsigned char * Msg, int len) extern "C" void WritetoMonWindow(Ui_ListenSession * Sess, unsigned char * Msg, int len)
{ {
char * ptr1 = (char *)Msg, *ptr2; char * ptr1 = (char *)Msg, *ptr2;
@ -3172,7 +3304,9 @@ lineloop:
*(ptr2++) = 0; *(ptr2++) = 0;
// if (LogMonitor) WriteMonitorLine(ptr1, ptr2 - ptr1);
if (Sess->LogMonitor)
WriteMonitorLog(Sess, ptr1);
num = ptr2 - ptr1 - 1; num = ptr2 - ptr1 - 1;
@ -3356,10 +3490,10 @@ void GetSettings()
AlertBeep = settings->value("AlertBeep", 1).toInt(); AlertBeep = settings->value("AlertBeep", 1).toInt();
AlertInterval = settings->value("AlertInterval", 300).toInt(); AlertInterval = settings->value("AlertInterval", 300).toInt();
ConnectBeep = settings->value("ConnectBeep", 1).toInt(); ConnectBeep = settings->value("ConnectBeep", 1).toInt();
ConnectWAV = settings->value("ConnectWAV", "").toString().toUtf8(); ConnectWAV = settings->value("ConnectWAV", ":/PCBeep").toString().toUtf8();
AlertWAV = settings->value("AlertWAV", "").toString().toUtf8(); AlertWAV = settings->value("AlertWAV", ":/PCBeep").toString().toUtf8();
BellWAV = settings->value("BellWAV", "").toString().toUtf8(); BellWAV = settings->value("BellWAV", ":/PCBeep").toString().toUtf8();
IntervalWAV = settings->value("IntervalWAV", "").toString().toUtf8(); IntervalWAV = settings->value("IntervalWAV", ":/PCBeep").toString().toUtf8();
UseKeywords = settings->value("UseKeywords", 0).toInt(); UseKeywords = settings->value("UseKeywords", 0).toInt();
KeyWordsFile = settings->value("KeyWordsFile", "keywords.sys").toString().toUtf8(); KeyWordsFile = settings->value("KeyWordsFile", "keywords.sys").toString().toUtf8();
@ -3377,6 +3511,8 @@ void GetSettings()
AGWEnable = settings->value("AGWEnable", 0).toInt(); AGWEnable = settings->value("AGWEnable", 0).toInt();
AGWMonEnable = settings->value("AGWMonEnable", 0).toInt(); AGWMonEnable = settings->value("AGWMonEnable", 0).toInt();
AGWLocalTime = settings->value("AGWLocalTime", 0).toInt();
AGWMonNodes = settings->value("AGWMonNodes", 0).toInt();
strcpy(AGWTermCall, settings->value("AGWTermCall", "").toString().toUtf8()); strcpy(AGWTermCall, settings->value("AGWTermCall", "").toString().toUtf8());
strcpy(AGWBeaconDest, settings->value("AGWBeaconDest", "").toString().toUtf8()); strcpy(AGWBeaconDest, settings->value("AGWBeaconDest", "").toString().toUtf8());
strcpy(AGWBeaconPath, settings->value("AGWBeaconPath", "").toString().toUtf8()); strcpy(AGWBeaconPath, settings->value("AGWBeaconPath", "").toString().toUtf8());
@ -3390,6 +3526,11 @@ void GetSettings()
convUTF8 = settings->value("convUTF8", 0).toInt(); convUTF8 = settings->value("convUTF8", 0).toInt();
KISSEnable = settings->value("KISSEnable", 0).toInt(); KISSEnable = settings->value("KISSEnable", 0).toInt();
KISSMonEnable = settings->value("KISSMonEnable", 1).toInt();
KISSLocalTime = settings->value("KISSLocalTime", 0).toInt();
KISSMonNodes = settings->value("KISSMonNodes", 0).toInt();
KISSListen = settings->value("KISSListen", 1).toInt();
strcpy(MYCALL, settings->value("MYCALL", "").toString().toUtf8()); strcpy(MYCALL, settings->value("MYCALL", "").toString().toUtf8());
strcpy(KISSHost, settings->value("KISSHost", "127.0.0.1").toString().toUtf8()); strcpy(KISSHost, settings->value("KISSHost", "127.0.0.1").toString().toUtf8());
KISSPortNum = settings->value("KISSPort", 8100).toInt(); KISSPortNum = settings->value("KISSPort", 8100).toInt();
@ -3600,6 +3741,8 @@ extern "C" void SaveSettings()
settings->setValue("AGWEnable", AGWEnable); settings->setValue("AGWEnable", AGWEnable);
settings->setValue("AGWMonEnable", AGWMonEnable); settings->setValue("AGWMonEnable", AGWMonEnable);
settings->setValue("AGWLocalTime", AGWLocalTime);
settings->setValue("AGWMonNodes", AGWMonNodes);
settings->setValue("AGWTermCall", AGWTermCall); settings->setValue("AGWTermCall", AGWTermCall);
settings->setValue("AGWBeaconDest", AGWBeaconDest); settings->setValue("AGWBeaconDest", AGWBeaconDest);
settings->setValue("AGWBeaconPath", AGWBeaconPath); settings->setValue("AGWBeaconPath", AGWBeaconPath);
@ -3611,8 +3754,12 @@ extern "C" void SaveSettings()
settings->setValue("AGWPaclen", AGWPaclen); settings->setValue("AGWPaclen", AGWPaclen);
settings->setValue("AGWToCalls", AGWToCalls); settings->setValue("AGWToCalls", AGWToCalls);
settings->setValue("KISSEnable", KISSEnable); settings->setValue("KISSEnable", KISSEnable);
settings->setValue("KISSMonEnable", KISSMonEnable);
settings->setValue("KISSLocalTime", KISSLocalTime);
settings->setValue("KISSMonNodes", KISSMonNodes);
settings->setValue("KISSListen", KISSListen);
settings->setValue("MYCALL", MYCALL); settings->setValue("MYCALL", MYCALL);
settings->setValue("KISSHost", KISSHost); settings->setValue("KISSHost", KISSHost);
settings->setValue("KISSMode", KISSMode); settings->setValue("KISSMode", KISSMode);
@ -3706,6 +3853,9 @@ QtTermTCP::~QtTermTCP()
{ {
Sess = _sessions.at(i); Sess = _sessions.at(i);
if (Sess->monLogfile)
Sess->monLogfile->close();
if (Sess->clientSocket) if (Sess->clientSocket)
{ {
int loops = 100; int loops = 100;
@ -3713,7 +3863,6 @@ QtTermTCP::~QtTermTCP()
while (Sess->clientSocket && loops-- && Sess->clientSocket->state() != QAbstractSocket::UnconnectedState) while (Sess->clientSocket && loops-- && Sess->clientSocket->state() != QAbstractSocket::UnconnectedState)
QThread::msleep(10); QThread::msleep(10);
} }
} }
if (AGWSock && AGWSock->ConnectedState == QAbstractSocket::ConnectedState) if (AGWSock && AGWSock->ConnectedState == QAbstractSocket::ConnectedState)
@ -3809,6 +3958,12 @@ extern "C" void myBeep(QString * WAV)
// Using .wav files // Using .wav files
// QSoundEffect effect;
// effect.setSource(QUrl::fromLocalFile(*WAV));
// effect.setLoopCount(1);
// effect.setVolume(1.0f);
// effect.play();
QSound::play(*WAV); QSound::play(*WAV);
} }
@ -3859,6 +4014,7 @@ void QtTermTCP::KISSSlot()
deviceUI = &UI; deviceUI = &UI;
KISS->KISSEnable->setChecked(KISSEnable); KISS->KISSEnable->setChecked(KISSEnable);
KISS->KISSListen->setChecked(KISSListen);
KISS->MYCALL->setText(MYCALL); KISS->MYCALL->setText(MYCALL);
// connect(KISS->SerialPort, SIGNAL(currentIndexChanged(int)), this, SLOT(PTTPortChanged(int))); // connect(KISS->SerialPort, SIGNAL(currentIndexChanged(int)), this, SLOT(PTTPortChanged(int)));
@ -3912,6 +4068,7 @@ void QtTermTCP::KISSaccept()
strcpy(oldHost, KISSHost); strcpy(oldHost, KISSHost);
KISSEnable = KISS->KISSEnable->isChecked(); KISSEnable = KISS->KISSEnable->isChecked();
KISSListen = KISS->KISSListen->isChecked();
actHost[18]->setVisible(KISSEnable); // Show KISS Connect Line actHost[18]->setVisible(KISSEnable); // Show KISS Connect Line
strcpy(MYCALL, KISS->MYCALL->text().toUtf8().toUpper()); strcpy(MYCALL, KISS->MYCALL->text().toUtf8().toUpper());
@ -4007,16 +4164,21 @@ void QtTermTCP::AlertSlot()
Alert->useBeep->setChecked(useBeep); Alert->useBeep->setChecked(useBeep);
Alert->useFiles->setChecked(!useBeep); Alert->useFiles->setChecked(!useBeep);
Alert->connectFile->setText(ConnectWAV); Alert->connectFile->setCurrentText(ConnectWAV);
Alert->bellsFile->setText(BellWAV); Alert->bellsFile->setCurrentText(BellWAV);
Alert->intervalFile->setText(IntervalWAV); Alert->intervalFile->setCurrentText(IntervalWAV);
Alert->keywordWAV->setText(AlertWAV); Alert->keywordWAV->setCurrentText(AlertWAV);
QObject::connect(Alert->chooseInbound, SIGNAL(clicked()), this, SLOT(chooseInboundWAV())); QObject::connect(Alert->chooseInbound, SIGNAL(clicked()), this, SLOT(chooseInboundWAV()));
QObject::connect(Alert->chooseBells, SIGNAL(clicked()), this, SLOT(chooseBellsWAV())); QObject::connect(Alert->chooseBells, SIGNAL(clicked()), this, SLOT(chooseBellsWAV()));
QObject::connect(Alert->chooseInterval, SIGNAL(clicked()), this, SLOT(chooseIntervalWAV())); QObject::connect(Alert->chooseInterval, SIGNAL(clicked()), this, SLOT(chooseIntervalWAV()));
QObject::connect(Alert->chooseKeyAlert, SIGNAL(clicked()), this, SLOT(chooseAlertWAV())); QObject::connect(Alert->chooseKeyAlert, SIGNAL(clicked()), this, SLOT(chooseAlertWAV()));
QObject::connect(Alert->testBells, SIGNAL(clicked()), this, SLOT(testBellsWAV()));
QObject::connect(Alert->TestInbound, SIGNAL(clicked()), this, SLOT(testInboundWAV()));
QObject::connect(Alert->testInterval, SIGNAL(clicked()), this, SLOT(testIntervalWAV()));
QObject::connect(Alert->TestKeyAlert, SIGNAL(clicked()), this, SLOT(testAlertWAV()));
QObject::connect(Alert->okButton, SIGNAL(clicked()), this, SLOT(alertAccept())); QObject::connect(Alert->okButton, SIGNAL(clicked()), this, SLOT(alertAccept()));
QObject::connect(Alert->cancelButton, SIGNAL(clicked()), this, SLOT(alertReject())); QObject::connect(Alert->cancelButton, SIGNAL(clicked()), this, SLOT(alertReject()));
@ -4033,7 +4195,7 @@ void QtTermTCP::chooseInboundWAV()
ConnectWAV = QFileDialog::getOpenFileName(this, ConnectWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)")); tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->connectFile->setText(ConnectWAV); Alert->connectFile->setCurrentText(ConnectWAV);
} }
@ -4042,7 +4204,7 @@ void QtTermTCP::chooseBellsWAV()
BellWAV = QFileDialog::getOpenFileName(this, BellWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)")); tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->bellsFile->setText(BellWAV); Alert->bellsFile->setCurrentText(BellWAV);
} }
void QtTermTCP::chooseIntervalWAV() void QtTermTCP::chooseIntervalWAV()
@ -4050,7 +4212,7 @@ void QtTermTCP::chooseIntervalWAV()
IntervalWAV = QFileDialog::getOpenFileName(this, IntervalWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)")); tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->intervalFile->setText(IntervalWAV); Alert->intervalFile->setCurrentText(IntervalWAV);
} }
void QtTermTCP::chooseAlertWAV() void QtTermTCP::chooseAlertWAV()
@ -4058,9 +4220,31 @@ void QtTermTCP::chooseAlertWAV()
AlertWAV = QFileDialog::getOpenFileName(this, AlertWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)")); tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->keywordWAV->setText(AlertWAV); Alert->keywordWAV->setCurrentText(AlertWAV);
}
void QtTermTCP::testInboundWAV()
{
QSound::play(Alert->connectFile->currentText());
}
void QtTermTCP::testBellsWAV()
{
QSound::play(Alert->bellsFile->currentText());
}
void QtTermTCP::testIntervalWAV()
{
QSound::play(Alert->intervalFile->currentText());
}
void QtTermTCP::testAlertWAV()
{
QSound::play(Alert->keywordWAV->currentText());
} }
void QtTermTCP::alertAccept() void QtTermTCP::alertAccept()
{ {
QVariant Q; QVariant Q;
@ -4075,10 +4259,10 @@ void QtTermTCP::alertAccept()
UseKeywords = Alert->KeywordBeep->isChecked(); UseKeywords = Alert->KeywordBeep->isChecked();
KeyWordsFile = Alert->keywordFile->text(); KeyWordsFile = Alert->keywordFile->text();
ConnectWAV = Alert->connectFile->text(); ConnectWAV = Alert->connectFile->currentText();
BellWAV = Alert->bellsFile->text(); BellWAV = Alert->bellsFile->currentText();
IntervalWAV = Alert->intervalFile->text(); IntervalWAV = Alert->intervalFile->currentText();
AlertWAV = Alert->keywordWAV->text(); AlertWAV = Alert->keywordWAV->currentText();
delete(Alert); delete(Alert);
SaveSettings(); SaveSettings();
@ -4457,6 +4641,8 @@ void QtTermTCP::onNewConnection()
if (ConnectBeep) if (ConnectBeep)
myBeep(&ConnectWAV); myBeep(&ConnectWAV);
QApplication::alert(mythis, 0);
} }
void QtTermTCP::onSocketStateChanged(QAbstractSocket::SocketState socketState) void QtTermTCP::onSocketStateChanged(QAbstractSocket::SocketState socketState)
@ -4672,8 +4858,8 @@ extern "C" void SendTraceOptions(Ui_ListenSession * Sess)
return; return;
char Buffer[80]; char Buffer[80];
int Len = sprintf(Buffer, "\\\\\\\\%llx %x %x %x %x %x %x %x\r", Sess->portmask, Sess->mtxparam, Sess->mcomparam, int Len = sprintf(Buffer, "\\\\\\\\%llx %x %x %x %x %x %x %x\r", Sess->portmask, Sess->mtxparam | (Sess->mlocaltime << 7),
Sess->MonitorNODES, Sess->MonitorColour, Sess->monUI, 0, 1); Sess->mcomparam, Sess->MonitorNODES, Sess->MonitorColour, Sess->monUI, 0, 1);
strcpy(&MonParams[Sess->CurrentHost][0], &Buffer[4]); strcpy(&MonParams[Sess->CurrentHost][0], &Buffer[4]);
SaveSettings(); SaveSettings();
@ -4798,6 +4984,49 @@ void QtTermTCP::xon_mdiArea_changed()
// If a monitor Window, change Monitor config settings // If a monitor Window, change Monitor config settings
EnableMonLog->setChecked(Sess->LogMonitor);
if (AGWUsers && Sess == AGWUsers->MonSess) // AGW Monitor
{
for (int i = 0; i < 64; i++)
SetPortMonLine(i, (char *)"", 0, 0); // Set all hidden
MonTX->setVisible(0);
MonSup->setVisible(0);
MonUI->setVisible(0);
MonColour->setVisible(0);
EnableMonitor->setVisible(1);
EnableMonitor->setChecked(AGWMonEnable);
MonLocalTime->setChecked(Sess->mlocaltime);
MonNodes->setChecked(Sess->MonitorNODES);
}
else if (Sess == KISSMonSess) // KISS Monitor
{
for (int i = 0; i < 64; i++)
SetPortMonLine(i, (char *)"", 0, 0); // Set all hidden
MonTX->setVisible(0);
MonSup->setVisible(0);
MonUI->setVisible(0);
MonColour->setVisible(0);
EnableMonitor->setVisible(1);
EnableMonitor->setChecked(KISSMonEnable);
MonLocalTime->setChecked(Sess->mlocaltime);
MonNodes->setChecked(Sess->MonitorNODES);
}
else
{
EnableMonitor->setVisible(0);
MonTX->setVisible(1);
MonSup->setVisible(1);
MonUI->setVisible(1);
MonColour->setVisible(1);
}
if (Sess->PortMonString[0]) if (Sess->PortMonString[0])
{ {
char * ptr = (char *)malloc(2048); char * ptr = (char *)malloc(2048);
@ -4838,6 +5067,7 @@ void QtTermTCP::xon_mdiArea_changed()
} }
free(ptr); free(ptr);
MonLocalTime->setChecked(Sess->mlocaltime);
MonTX->setChecked(Sess->mtxparam); MonTX->setChecked(Sess->mtxparam);
MonSup->setChecked(Sess->mcomparam); MonSup->setChecked(Sess->mcomparam);
MonUI->setChecked(Sess->monUI); MonUI->setChecked(Sess->monUI);
@ -5275,12 +5505,12 @@ void QtTermTCP::VARAreadyRead()
if (Mode[0]) if (Mode[0])
{ {
sprintf(Title, "Connected to %s Mode %s", CallFrom, Mode); sprintf(Title, "Connected to %s Mode %s", CallFrom, Mode);
n = sprintf(Message, "Incoming Connected from %s %s Mode\r\n", CallFrom, Mode); n = sprintf(Message, "Incoming VARA Connect from %s %s Mode\r\n", CallFrom, Mode);
} }
else else
{ {
sprintf(Title, "Connected to %s", CallFrom); sprintf(Title, "Connected to %s", CallFrom);
n = sprintf(Message, "Incoming Connected from %s\r\n", CallFrom); n = sprintf(Message, "Incoming VARA Connect from %s\r\n", CallFrom);
} }
WritetoOutputWindow(Sess, (unsigned char *)Message, n); WritetoOutputWindow(Sess, (unsigned char *)Message, n);
@ -5300,6 +5530,14 @@ void QtTermTCP::VARAreadyRead()
setMenus(true); setMenus(true);
if (ConnectBeep)
myBeep(&ConnectWAV);
if (listenCText[0])
VARADataSock->write(listenCText);
QApplication::alert(mythis, 0);
} }
} }
} }
@ -6417,7 +6655,7 @@ void QtTermTCP::onKISSSocketStateChanged(QAbstractSocket::SocketState socketStat
// for (Ui_ListenSession * S: _sessions) // for (Ui_ListenSession * S: _sessions)
// { // {
if ((S->SessionType == Mon) && S->clientSocket == NULL && S->KISSSession == NULL) if ((S->SessionType == Mon) && S->clientSocket == NULL && S->KISSSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
{ {
Sess = S; Sess = S;
break; break;
@ -6439,7 +6677,7 @@ void QtTermTCP::onKISSSocketStateChanged(QAbstractSocket::SocketState socketStat
{ {
S = _sessions.at(i); S = _sessions.at(i);
if (S->clientSocket == NULL && S->KISSSession == NULL) if (S->clientSocket == NULL && S->KISSSession == NULL && S->AGWSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
{ {
Sess = S; Sess = S;
break; break;
@ -6450,7 +6688,7 @@ void QtTermTCP::onKISSSocketStateChanged(QAbstractSocket::SocketState socketStat
{ {
S = _sessions.at(0); S = _sessions.at(0);
if (S->clientSocket == NULL && S->KISSSession == NULL) if (S->clientSocket == NULL && S->AGWSession == NULL && S->KISSSession == NULL && (AGWUsers == NULL || (S != AGWUsers->MonSess)) && S != KISSMonSess)
Sess = S; Sess = S;
} }
@ -6466,6 +6704,9 @@ void QtTermTCP::onKISSSocketStateChanged(QAbstractSocket::SocketState socketStat
else if (TermMode == Single) else if (TermMode == Single)
mythis->setWindowTitle("KISS Monitor Window"); mythis->setWindowTitle("KISS Monitor Window");
Sess->mlocaltime = KISSLocalTime;
Sess->MonitorNODES = KISSMonNodes;
// if (TermMode == Single) // if (TermMode == Single)
// { // {
// discAction->setEnabled(false); // discAction->setEnabled(false);
@ -6495,6 +6736,9 @@ extern "C" void monitor_frame(int snd_ch, string * frame, char * code, int tx,
Len = strlen(Msg); Len = strlen(Msg);
if (Len < 10) // Suppressed NODES
return;
if (Msg[Len - 1] != '\r') if (Msg[Len - 1] != '\r')
{ {
Msg[Len++] = '\r'; Msg[Len++] = '\r';
@ -6506,7 +6750,7 @@ extern "C" void monitor_frame(int snd_ch, string * frame, char * code, int tx,
} }
extern "C" Ui_ListenSession * ax25IncommingConnect(TAX25Port * AX25Sess) extern "C" Ui_ListenSession * ax25IncomingConnect(TAX25Port * AX25Sess)
{ {
// Look for/create Terminal Window for connection // Look for/create Terminal Window for connection
@ -6578,7 +6822,7 @@ extern "C" Ui_ListenSession * ax25IncommingConnect(TAX25Port * AX25Sess)
mythis->setWindowTitle(Title); mythis->setWindowTitle(Title);
AX25Sess->port = 0; AX25Sess->port = 0;
AX25Sess->Sess = Sess; // Crosslink AGW and Term Sessions AX25Sess->Sess = Sess; // Crosslink KISS and Term Sessions
AX25Sess->PID = 240;; AX25Sess->PID = 240;;
Sess->KISSSession = AX25Sess; Sess->KISSSession = AX25Sess;
@ -6588,6 +6832,8 @@ extern "C" Ui_ListenSession * ax25IncommingConnect(TAX25Port * AX25Sess)
if (ConnectBeep) if (ConnectBeep)
myBeep(&ConnectWAV); myBeep(&ConnectWAV);
QApplication::alert(mythis, 0);
// Send CText if defined // Send CText if defined
if (listenCText[0]) if (listenCText[0])
@ -7498,3 +7744,106 @@ void Ui_ListenSession::timerEvent(QTimerEvent *event)
QWidget::timerEvent(event); QWidget::timerEvent(event);
} }
// Monitor Log FIle routines
char * doXMLTransparency(char * string)
{
// Make sure string doesn't contain forbidden XML chars (<>"'&)
char * newstring = (char *)malloc(5 * strlen(string) + 1); // If len is zero still need null terminator
char * in = string;
char * out = newstring;
char c;
c = *(in++);
while (c)
{
switch (c)
{
case '<':
strcpy(out, "&lt;");
out += 4;
break;
case '>':
strcpy(out, "&gt;");
out += 4;
break;
case '"':
strcpy(out, "&quot;");
out += 6;
break;
case '\'':
strcpy(out, "&apos;");
out += 6;
break;
case '&':
strcpy(out, "&amp;");
out += 5;
break;
default:
*(out++) = c;
}
c = *(in++);
}
*(out++) = 0;
return newstring;
}
void WriteMonitorLog(Ui_ListenSession * Sess, char * Msg)
{
// Write as HTML to preserve formatting
char Line[512];
char * HTMLText;
if (Sess->monLogfile == nullptr)
{
QString FN = "QTTermMonLog" + timeLoaded + "_" + QString::number(Sess->sessNo) + ".html";
Sess->monLogfile = new QFile(FN);
if (Sess->monLogfile)
Sess->monLogfile->open(QIODevice::WriteOnly | QIODevice::Text);
else
return;
}
if (Msg[0] == 0x1b)
{
// Colour Escape
if (Msg[1] == 17)
Sess->monSpan = (char *)"<span style=\"color:blue; white-space:pre;font-family: monospace\">";// , monRxColour.data());
else
Sess->monSpan = (char *)"<span style=\"color:red; white-space:pre;font-family: monospace\">";// , monTxColour.data());
HTMLText = doXMLTransparency(&Msg[2]);
}
else
{
// Leave colour at last set value
HTMLText = doXMLTransparency(Msg);
}
sprintf(Line, "%s%s</span><br>\r\n", Sess->monSpan, HTMLText);
Sess->monLogfile->write(Line);
free(HTMLText);
}

@ -29,6 +29,7 @@
#include <QProcess> #include <QProcess>
#include <QtSerialPort/QSerialPort> #include <QtSerialPort/QSerialPort>
#include <QtMultimedia/QSound> #include <QtMultimedia/QSound>
#include <QtMultimedia/QSoundEffect>
#define MAXHOSTS 16 #define MAXHOSTS 16
#define MAXPORTS 64 #define MAXPORTS 64
@ -86,6 +87,8 @@ public:
char PortMonString[2048]; // 64 ports 32 Bytes char PortMonString[2048]; // 64 ports 32 Bytes
uint64_t portmask; uint64_t portmask;
int EnableMonitor;
int mlocaltime;
int mtxparam; int mtxparam;
int mcomparam; int mcomparam;
int monUI; int monUI;
@ -110,6 +113,11 @@ public:
char pageBuffer[4096]; char pageBuffer[4096];
QBasicTimer timer; QBasicTimer timer;
int sessNo; // Used to create unique log filename;
bool LogMonitor;
QFile * monLogfile;
char * monSpan;
protected: protected:
void timerEvent(QTimerEvent *event) override; void timerEvent(QTimerEvent *event) override;
@ -131,6 +139,7 @@ public:
QtTermTCP(QWidget *parent = NULL); QtTermTCP(QWidget *parent = NULL);
void closeEvent(QCloseEvent * event); void closeEvent(QCloseEvent * event);
static void setFonts(); static void setFonts();
~QtTermTCP(); ~QtTermTCP();
private slots: private slots:
@ -158,6 +167,10 @@ private slots:
void chooseBellsWAV(); void chooseBellsWAV();
void chooseIntervalWAV(); void chooseIntervalWAV();
void chooseAlertWAV(); void chooseAlertWAV();
void testInboundWAV();
void testBellsWAV();
void testIntervalWAV();
void testAlertWAV();
void alertAccept(); void alertAccept();
void alertReject(); void alertReject();
void VARASlot(); void VARASlot();

Binary file not shown.

@ -1,5 +1,10 @@
<RCC> <!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/QtTermTCP"> <qresource>
<file alias="LowTone">250x600Hz.wav</file>
<file alias="HighTone">250x1000Hz.wav</file>
<file alias="Ding">ding.wav</file>
<file alias="PCBeep">PCBeep.wav</file>
<file alias="Ring">Ring.wav</file>
<file>QtTermTCP.ico</file> <file>QtTermTCP.ico</file>
</qresource> </qresource>
</RCC> </RCC>

@ -153,7 +153,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>shell32.lib;setupapi.lib;C:\Qt\5.14.2\msvc2017\lib\Qt5Multimedia.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shell32.lib;setupapi.lib;C:\Qt\Qt5.14.2\5.14.2\msvc2017\lib\Qt5Multimedia.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention> <DataExecutionPrevention>true</DataExecutionPrevention>
@ -279,7 +279,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>shell32.lib;setupapi.lib;%(AdditionalDependencies);C:\Qt\5.14.2\msvc2017\lib\Qt5Multimediad.lib</AdditionalDependencies> <AdditionalDependencies>shell32.lib;setupapi.lib;%(AdditionalDependencies);C:\Qt\Qt5.14.2\5.14.2\msvc2017\lib\Qt5Multimediad.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention> <DataExecutionPrevention>true</DataExecutionPrevention>

@ -15,10 +15,6 @@
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier> <UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions> <Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter> </Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Header Files"> <Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
@ -45,6 +41,10 @@
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter> </Filter>
<Filter Include="Form Files\Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="AGWCode.cpp"> <ClCompile Include="AGWCode.cpp">
@ -83,15 +83,15 @@
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="TabDialog.h"> <QtMoc Include="TabDialog.h">
<Filter>Generated Files</Filter> <Filter>Form Files\Generated Files</Filter>
</QtMoc> </QtMoc>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt"> <CustomBuild Include="debug\moc_predefs.h.cbt">
<Filter>Generated Files</Filter> <Filter>Form Files\Generated Files</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="release\moc_predefs.h.cbt"> <CustomBuild Include="release\moc_predefs.h.cbt">
<Filter>Generated Files</Filter> <Filter>Form Files\Generated Files</Filter>
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>..\..\bpq32\CommonSource</LocalDebuggerWorkingDirectory> <LocalDebuggerWorkingDirectory>$(APPDATA)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -15,15 +15,15 @@
<QtLastBackgroundBuild>2022-05-19T07:28:58.9302359Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2022-05-19T07:28:58.9302359Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2023-10-09T09:12:25.3524292Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-14T13:14:56.5532991Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-10-09T09:12:25.6116327Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-14T13:14:56.7231497Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2023-10-09T09:12:25.0706672Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-14T13:14:55.9367569Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-10-09T09:12:25.2024312Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-14T13:14:56.2561805Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -264,6 +264,22 @@ void AGWConnect::myaccept()
strcpy(CallTo, wCallTo->currentText().toUpper().toUtf8()); strcpy(CallTo, wCallTo->currentText().toUpper().toUtf8());
strcpy(Via, Digis->text().toUpper().toUtf8()); strcpy(Via, Digis->text().toUpper().toUtf8());
if (CallFrom[0] == 0)
{
QMessageBox msgBox;
msgBox.setText("Call From missing");
msgBox.exec();
return;
}
if (CallTo[0] == 0)
{
QMessageBox msgBox;
msgBox.setText("Call To missing");
msgBox.exec();
return;
}
// if digis have to form block with byte count followed by n 10 byte calls // if digis have to form block with byte count followed by n 10 byte calls
if (Via[0]) if (Via[0])

@ -38,7 +38,6 @@ void DecodeTeleText(Ui_ListenSession * Sess, char * page);
int Bells = TRUE; int Bells = TRUE;
int StripLF = FALSE; int StripLF = FALSE;
int LogMonitor = FALSE;
int LogOutput = FALSE; int LogOutput = FALSE;
int SendDisconnected = TRUE; int SendDisconnected = TRUE;
int ChatMode = TRUE; int ChatMode = TRUE;
@ -202,7 +201,6 @@ void GetKeyWordFile()
} }
int CheckKeyWord(char * Word, char * Msg) int CheckKeyWord(char * Word, char * Msg)
{ {
char * ptr1 = Msg, *ptr2; char * ptr1 = Msg, *ptr2;
@ -236,15 +234,24 @@ int CheckKeyWords(UCHAR * Msg, int len)
if (UseKeywords == 0 || NumberofKeyWords == 0) if (UseKeywords == 0 || NumberofKeyWords == 0)
return FALSE; return FALSE;
// we need to null terminate Msg, so create a copy
unsigned char * copy = (unsigned char *)malloc(len + 1);
memcpy(copy, Msg, len);
copy[len] = 0;
for (i = 1; i <= NumberofKeyWords; i++) for (i = 1; i <= NumberofKeyWords; i++)
{ {
if (CheckKeyWord(KeyWords[i], (char *)Msg)) if (CheckKeyWord(KeyWords[i], (char *)copy))
{ {
myBeep(&AlertWAV); myBeep(&AlertWAV);
free (copy);
return TRUE; // Alert return TRUE; // Alert
} }
} }
free(copy);
return FALSE; // OK return FALSE; // OK
} }
@ -957,6 +964,8 @@ int InnerProcessYAPPMessage(Ui_ListenSession * Sess, UCHAR * Msg, int Len)
YAPPDate = 0; // Switch to Normal (No Checksum) Mode YAPPDate = 0; // Switch to Normal (No Checksum) Mode
// Drop through
case 6: // Send using YAPPC case 6: // Send using YAPPC
// Start sending message // Start sending message

@ -312,7 +312,7 @@ void AX25_conn(TAX25Port * AX25Sess, int snd_ch, Byte mode)
{ {
case MODE_OTHER: case MODE_OTHER:
Len = sprintf(Msg, "Incomming Connection from %s\r", AX25Sess->corrcall); Len = sprintf(Msg, "Incoming KISS Connection from %s\r", AX25Sess->corrcall);
break; break;
case MODE_OUR: case MODE_OUR:
@ -1405,7 +1405,7 @@ end;
boolean is_last_digi(Byte *path) boolean is_last_digi(Byte *path)
{ {
int len = strlen(path); int len = strlen((char *)path);
if (len == 14) if (len == 14)
return TRUE; return TRUE;
@ -1469,7 +1469,7 @@ boolean is_correct_path(Byte * path, Byte pid)
int i; int i;
if (pid == 0 || strchr(networks, pid)) if (pid == 0 || strchr((char *)networks, pid))
{ {
// Validate calls // Validate calls
@ -1678,7 +1678,7 @@ int number_digi(unsigned char * path)
void get_monitor_path(Byte * path, char * mycall, char * corrcall, char * digi) void get_monitor_path(Byte * path, char * mycall, char * corrcall, char * digi)
{ {
Byte * digiptr = digi; char * digiptr = digi;
digi[0] = 0; digi[0] = 0;
@ -2744,11 +2744,18 @@ TAX25Port * KISSConnectOut(void * Sess, char * CallFrom, char * CallTo, char * D
char ShortDT[] = "HH:MM:SS"; char ShortDT[] = "HH:MM:SS";
int KISSLocalTime = 0;
int KISSMonEnable = 0;
int KISSMonNodes = 0;
char * ShortDateTime() char * ShortDateTime()
{ {
struct tm * tm; struct tm * tm;
time_t NOW = time(NULL); time_t NOW = time(NULL);
if (KISSLocalTime)
tm = localtime(&NOW);
else
tm = gmtime(&NOW); tm = gmtime(&NOW);
sprintf(ShortDT, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); sprintf(ShortDT, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
@ -2756,7 +2763,6 @@ char * ShortDateTime()
} }
char FrameData[1024] = ""; char FrameData[1024] = "";
char * frame_monitor(string * frame, char * code, int tx_stat) char * frame_monitor(string * frame, char * code, int tx_stat)
@ -2769,7 +2775,6 @@ char * frame_monitor(string * frame, char * code, int tx_stat)
Byte _data[512] = ""; Byte _data[512] = "";
Byte * p_data = _data; Byte * p_data = _data;
int _datalen; int _datalen;
;
char CallFrom[10], CallTo[10], Digi[80]; char CallFrom[10], CallTo[10], Digi[80];
char TR = 'R'; char TR = 'R';
@ -2799,11 +2804,25 @@ char * frame_monitor(string * frame, char * code, int tx_stat)
else else
decode_frame(frame->Data, frame->Length, path, data, &pid, &nr, &ns, &f_type, &f_id, &rpt, &pf, &cr); decode_frame(frame->Data, frame->Length, path, data, &pid, &nr, &ns, &f_type, &f_id, &rpt, &pf, &cr);
datap = data->Data; datap = data->Data;
len = data->Length; len = data->Length;
// if (pid == 0xCF) if (pid == 0xCF)
{
if (datap[0] == 255) //Nodes broadcast
{
if (KISSMonNodes == 0)
{
freeString(data);
return 0;
}
}
}
// data = parse_NETROM(data, f_id); // data = parse_NETROM(data, f_id);
// IP parsing // IP parsing
// else if (pid == 0xCC) // else if (pid == 0xCC)

@ -125,17 +125,6 @@ typedef struct TStringList_T
} TStringList; } TStringList;
typedef struct AGWUser_t
{
void *socket;
string * data_in;
TStringList AGW_frame_buf;
boolean Monitor;
boolean Monitor_raw;
boolean reportFreqAndModem; // Can report modem and frequency to host
} AGWUser;
typedef struct TAX25Info_t typedef struct TAX25Info_t
{ {
longint stat_s_pkt; longint stat_s_pkt;

@ -25,6 +25,8 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
UCHAR TimerEvent = TIMER_EVENT_OFF; UCHAR TimerEvent = TIMER_EVENT_OFF;
extern int busy; extern int busy;
int listenEnable; int listenEnable;
int KISSListen = 1;
void * KISSSockCopy[4]; void * KISSSockCopy[4];
extern UCHAR axMYCALL[7] = ""; // Mycall in ax.25 extern UCHAR axMYCALL[7] = ""; // Mycall in ax.25
@ -1023,7 +1025,7 @@ void on_I(void * socket, TAX25Port * AX25Sess, int PID, Byte * path, string * d
} }
/////////////////////////// U-FRAMES //////////////////////////////////// /////////////////////////// U-FRAMES ////////////////////////////////////
void * ax25IncommingConnect(TAX25Port * AX25Sess); void * ax25IncomingConnect(TAX25Port * AX25Sess);
void on_SABM(void * socket, TAX25Port * AX25Sess) void on_SABM(void * socket, TAX25Port * AX25Sess)
{ {
@ -1087,7 +1089,7 @@ void on_SABM(void * socket, TAX25Port * AX25Sess)
add_pkt_buf(AX25Sess, make_frame(NULL, AX25Sess->Path, 0, 0, 0, U_FRM, U_UA, FALSE, SET_P, SET_R)); add_pkt_buf(AX25Sess, make_frame(NULL, AX25Sess->Path, 0, 0, 0, U_FRM, U_UA, FALSE, SET_P, SET_R));
if (ax25IncommingConnect(AX25Sess)) // Attach to Terminal if (ax25IncomingConnect(AX25Sess)) // Attach to Terminal
AX25_conn(AX25Sess, AX25Sess->snd_ch, MODE_OTHER); AX25_conn(AX25Sess, AX25Sess->snd_ch, MODE_OTHER);
return; return;
@ -1550,7 +1552,7 @@ void analiz_frame(int snd_ch, string * frame, void * socket, boolean fecflag)
if (memcmp(path, axMYCALL, 7) != 0) if (memcmp(path, axMYCALL, 7) != 0)
return; // ignore return; // ignore
if (listenEnable == 0) if (KISSListen == 0)
{ {
set_DM(snd_ch, path); set_DM(snd_ch, path);
freeString(data); freeString(data);

@ -1,7 +1,7 @@
#define _MSC_EXTENSIONS #define _MSC_EXTENSIONS
#define _INTEGRAL_MAX_BITS 64 #define _INTEGRAL_MAX_BITS 64
#define _MSC_VER 1916 #define _MSC_VER 1916
#define _MSC_FULL_VER 191627045 #define _MSC_FULL_VER 191627043
#define _MSC_BUILD 0 #define _MSC_BUILD 0
#define _WIN32 #define _WIN32
#define _M_IX86 600 #define _M_IX86 600

@ -1,297 +0,0 @@
#pragma once
#include <QMainWindow>
#include "ui_QtTermTCP.h"
#include "ui_AlertSetup.h"
#include "ui_YAPPRxSize.h"
#include "ui_ColourConfig.h"
#include "ui_VARAConfig.h"
#include "ui_KISSConfig.h"
#include "QTextEdit"
#include "QSplitter"
#include "QLineEdit"
#include "QTcpSocket"
#include <QDataStream>
#include <QKeyEvent>
#include "QThread"
#include "QTcpServer"
#include "QMdiArea"
#include <QMdiSubWindow>
#include "QMessageBox"
#include "QTimer"
#include "QSettings"
#include "QThread"
#include <QFontDialog>
#include <QScrollBar>
#include <QFileDialog>
#include <QTabWidget>
#include <QMenuBar>
#include <QProcess>
#include <QtSerialPort/QSerialPort>
#include <QtMultiMedia/QSound>
#define MAXHOSTS 16
#define MAXPORTS 64
QT_BEGIN_NAMESPACE
class QComboBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QTcpSocket;
class QNetworkSession;
class myTcpSocket : public QTcpSocket
{
public:
QWidget * Sess;
};
class Ui_ListenSession : public QMainWindow
{
Q_OBJECT
public:
explicit Ui_ListenSession(QWidget *Parent = 0) : QMainWindow(Parent) {}
~Ui_ListenSession();
int SessionType; // Type Mask - Term, Mon, Listen
int CurrentWidth;
int CurrentHeight; // Saved so can be restored after Cascade
QTextEdit *termWindow;
QTextEdit *monWindow;
QLineEdit *inputWindow;
QLabel * TTLabel;
myTcpSocket *clientSocket;
QAction * actActivate; // From active Windows menu
char * KbdStack[50];
int StackIndex;
QMdiSubWindow *sw; // The MdiSubwindow is the container for this session
int InputMode;
int SlowTimer;
int MonData;
int OutputSaveLen;
char OutputSave[16384];
int MonSaveLen;
char MonSave[4096];
char PortMonString[2048]; // 64 ports 32 Bytes
uint64_t portmask;
int mtxparam;
int mcomparam;
int monUI;
int MonitorNODES;
int MonitorColour;
int CurrentHost;
int Tab; // Tab Index if Tabbed Mode
void * AGWSession; // Terinal sess - Need to cast to TAGWPort to use it
void * AGWMonSession;
void * KISSSession;
int KISSMode; // Connected or UI
char UIDEST[32];
char UIPATH[128];
// For Teletext Emulator
QImage * TTBitmap; // TT Image buffer
QDialog TTUI;
int TTActive;
int TTFlashToggle;
char pageBuffer[4096];
QBasicTimer timer;
protected:
void timerEvent(QTimerEvent *event) override;
private:
private slots:
};
class QtTermTCP : public QMainWindow
{
Q_OBJECT
public:
QtTermTCP(QWidget *parent = NULL);
void closeEvent(QCloseEvent * event);
static void setFonts();
~QtTermTCP();
private slots:
void Disconnect();
void doYAPPSend();
void doYAPPSetRX();
void doYAPPSetSize();
void sizeaccept();
void sizereject();
void menuChecked();
void Connect();
void displayError(QAbstractSocket::SocketError socketError);
void readyRead();
void showContextMenu(const QPoint & point);
void autoConnectChecked();
void LreturnPressed(Ui_ListenSession * LUI);
void LDisconnect(Ui_ListenSession * LUI);
void SetupHosts();
void MyTimerSlot();
void KISSTimerSlot();
void ListenSlot();
void AGWSlot();
void AlertSlot();
void chooseInboundWAV();
void chooseBellsWAV();
void chooseIntervalWAV();
void chooseAlertWAV();
void alertAccept();
void alertReject();
void VARASlot();
void KISSSlot();
void deviceaccept();
void KISSaccept();
void KISSreject();
void devicereject();
void showContextMenuM(const QPoint &pt);
void showContextMenuT(const QPoint &pt);
void showContextMenuL();
void doQuit();
void onTEselectionChanged();
void onLEselectionChanged();
void setSplit();
void ClearScreen();
void setVDMode();
void showContextMenuMT(const QPoint & pt);
void showContextMenuMOnly(const QPoint & pt);
void onNewConnection();
void onSocketStateChanged(QAbstractSocket::SocketState socketState);
void updateWindowMenu();
void doNewTerm();
void doNewMon();
void doNewCombined();
void doCascade();
void actActivate();
void xon_mdiArea_changed();
void doFonts();
void doMFonts();
void ConnecttoVARA();
void VARATimer();
void AGWdisplayError(QAbstractSocket::SocketError socketError);
void AGWreadyRead();
void onAGWSocketStateChanged(QAbstractSocket::SocketState socketState);
void VARAdisplayError(QAbstractSocket::SocketError socketError);
void VARAreadyRead();
void onVARASocketStateChanged(QAbstractSocket::SocketState socketState);
void KISSdisplayError(QAbstractSocket::SocketError socketError);
void KISSreadyRead();
void onKISSSocketStateChanged(QAbstractSocket::SocketState socketState);
int openSerialPort();
void readSerialData();
void handleError(QSerialPort::SerialPortError serialPortError);
void doColours();
void ColourPressed();
void Colouraccept();
void Colourreject();
QColor setColor(QColor Colour);
void VARADatadisplayError(QAbstractSocket::SocketError socketError);
void VARADatareadyRead();
void onVARADataSocketStateChanged(QAbstractSocket::SocketState socketState);
void HAMLIBdisplayError(QAbstractSocket::SocketError socketError);
void HAMLIBreadyRead();
void onHAMLIBSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoHAMLIB();
void HAMLIBSetPTT(int PTTState);
void FLRigdisplayError(QAbstractSocket::SocketError socketError);
void FLRigreadyRead();
void onFLRigSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoFLRig();
void FLRigSetPTT(int PTTState);
void CATChanged(bool State);
void PTTPortChanged(int Selected);
void OpenPTTPort();
void RadioPTT(bool PTTState);
void tabSelected(int);
void VARAHFChanged(bool state);
void VARAFMChanged(bool State);
void VARASATChanged(bool State);
void SetVARAParams();
protected:
bool eventFilter(QObject* obj, QEvent *event);
private:
void ConnecttoAGW();
void AGWTimer();
Ui::QtTermTCPClass ui;
QMenu *hostsubMenu;
QAction *closeAct;
QAction *closeAllAct;
QAction *tileAct;
QAction *cascadeAct;
QAction *nextAct;
QAction *previousAct;
QAction *windowMenuSeparatorAct;
QAction *newTermAct;
QAction *newMonAct;
QAction *newCombinedAct;
QAction *AGWAction;
QAction *VARAAction;
QAction *KISSAction;
QAction *AlertAction;
QAction *quitAction;
QList<myTcpSocket*> _sockets;
QWidget *centralWidget;
void ConnecttoKISS();
void KISSTimer();
};
extern "C"
{
void EncodeSettingsLine(int n, char * String);
void DecodeSettingsLine(int n, char * String);
void WritetoOutputWindow(Ui_ListenSession * Sess, unsigned char * Buffer, int Len);
void WritetoOutputWindowEx(Ui_ListenSession * Sess, unsigned char * Buffer, int len, QTextEdit * termWindow, int *OutputSaveLen, char * OutputSave, QColor Colour);
void WritetoMonWindow(Ui_ListenSession * Sess, unsigned char * Buffer, int Len);
void ProcessReceivedData(Ui_ListenSession * Sess, unsigned char * Buffer, int len);
void SendTraceOptions(Ui_ListenSession * LUI);
void setTraceOff(Ui_ListenSession * Sess);
void SetPortMonLine(int i, char * Text, int visible, int enabled);
void SaveSettings();
void myBeep(QString * WAV);
void YAPPSendFile(Ui_ListenSession * Sess, char * FN);
int SocketSend(Ui_ListenSession * Sess, char * Buffer, int len);
void SendTraceOptions(Ui_ListenSession * Sess);
int SocketFlush(Ui_ListenSession * Sess);
extern void mySleep(int ms);
extern void setTraceOff(Ui_ListenSession * Sess);
void GetKeyWordFile();
}
extern QString ConnectWAV;
extern QString BellWAV;
extern QString AlertWAV;
char * strlop(char * buf, char delim);
extern "C" void setMenus(int State);
void Send_AGW_Ds_Frame(void * AGW);

@ -1,7 +1,7 @@
#define _MSC_EXTENSIONS #define _MSC_EXTENSIONS
#define _INTEGRAL_MAX_BITS 64 #define _INTEGRAL_MAX_BITS 64
#define _MSC_VER 1916 #define _MSC_VER 1916
#define _MSC_FULL_VER 191627045 #define _MSC_FULL_VER 191627043
#define _MSC_BUILD 0 #define _MSC_BUILD 0
#define _WIN32 #define _WIN32
#define _M_IX86 600 #define _M_IX86 600

@ -1,65 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'TCPHostConfig.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_TCPHOSTCONFIG_H
#define UI_TCPHOSTCONFIG_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QTextEdit>
QT_BEGIN_NAMESPACE
class Ui_Dialog
{
public:
QDialogButtonBox *buttonBox;
QTextEdit *Host;
void setupUi(QDialog *Dialog)
{
if (Dialog->objectName().isEmpty())
Dialog->setObjectName(QString::fromUtf8("Dialog"));
Dialog->resize(400, 300);
QIcon icon;
icon.addFile(QString::fromUtf8("QtTermTCP.ico"), QSize(), QIcon::Normal, QIcon::Off);
Dialog->setWindowIcon(icon);
buttonBox = new QDialogButtonBox(Dialog);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setGeometry(QRect(30, 240, 341, 32));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Save);
buttonBox->setCenterButtons(true);
Host = new QTextEdit(Dialog);
Host->setObjectName(QString::fromUtf8("Host"));
Host->setGeometry(QRect(184, 44, 104, 23));
retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
QMetaObject::connectSlotsByName(Dialog);
} // setupUi
void retranslateUi(QDialog *Dialog)
{
Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "TCP Host Config", nullptr));
} // retranslateUi
};
namespace Ui {
class Dialog: public Ui_Dialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_TCPHOSTCONFIG_H
Loading…
Cancel
Save

Powered by TurnKey Linux.