clean up aprs and slow data

lastudp
Tom Early 7 years ago
parent 911e829a3f
commit 5f16de827c

@ -823,7 +823,7 @@ void CQnetGateway::ProcessTimeouts()
// the to_print is an integer that counts down how many 2-voice-frame pairs remain to be processed.
// ABC_grp means that we are processing a 20-character message.
// C_seen means that we are processing the last 2-voice-frame packet on a 20 character message.
void CQnetGateway::ProcessSlowData(unsigned char *data, unsigned short sid, unsigned char &header_type, bool *new_group, short *to_print, bool *ABC_grp, bool *C_seen)
void CQnetGateway::ProcessSlowData(unsigned char *data, unsigned short sid)
{
/* extract 20-byte RADIO ID */
if ((data[0] != 0x55) || (data[1] != 0x2d) || (data[2] != 0x16)) {
@ -1134,13 +1134,6 @@ void CQnetGateway::Process()
int dtmf_last_frame[3] = { 0, 0, 0 };
unsigned int dtmf_counter[3] = { 0, 0, 0 };
// text stuff
bool new_group[3] = { true, true, true };
unsigned char header_type = 0;
short to_print[3] = { 0, 0, 0 };
bool ABC_grp[3] = { false, false, false };
bool C_seen[3] = { false, false, false };
dstar_dv_init();
int max_nfds = 0;
@ -1997,17 +1990,17 @@ void CQnetGateway::Process()
}
vPacketCount++;
if (recvlen == 29) // process the slow data from every voice packet
ProcessSlowData(rptrbuf.vpkt.vasd.text, rptrbuf.vpkt.streamid, header_type, new_group, to_print, ABC_grp, C_seen);
ProcessSlowData(rptrbuf.vpkt.vasd.text, rptrbuf.vpkt.streamid);
else
ProcessSlowData(rptrbuf.vpkt.vasd1.text, rptrbuf.vpkt.streamid, header_type, new_group, to_print, ABC_grp, C_seen);
ProcessSlowData(rptrbuf.vpkt.vasd1.text, rptrbuf.vpkt.streamid);
/* send data to qnlink */
sendto(srv_sock, rptrbuf.pkt_id, recvlen, 0, (struct sockaddr *)&plug, sizeof(struct sockaddr_in));
/* aprs processing */
if (bool_send_aprs)
// streamID seq audio+text size
aprs->ProcessText(ntohs(rptrbuf.vpkt.streamid), rptrbuf.vpkt.ctrl, rptrbuf.vpkt.vasd.voice, (recvlen == 29)?12:15);
// streamID seq audio+text
aprs->ProcessText(ntohs(rptrbuf.vpkt.streamid), rptrbuf.vpkt.ctrl, rptrbuf.vpkt.vasd.voice);
for (int i=0; i<3; i++) {
/* find out if data must go to the remote G2 */

@ -83,13 +83,19 @@ public:
int Init(char *cfgfile);
private:
bool is_icom, is_not_icom;
// text stuff
bool new_group[3] = { true, true, true };
unsigned char header_type = 0;
short to_print[3] = { 0, 0, 0 };
bool ABC_grp[3] = { false, false, false };
bool C_seen[3] = { false, false, false };
SPORTIP g2_internal, g2_external, g2_link, ircddb;
std::string OWNER, owner, local_irc_ip, status_file, dtmf_dir, dtmf_file, echotest_dir, irc_pass, qnvoicefile;
bool bool_send_qrgs, bool_irc_debug, bool_dtmf_debug, bool_regen_header, bool_qso_details, bool_send_aprs, playNotInCache;
bool is_icom, is_not_icom;
int play_wait, play_delay, echotest_rec_timeout, voicemail_rec_timeout, from_remote_g2_timeout, from_local_rptr_timeout, dtmf_digit;
@ -154,7 +160,7 @@ private:
void compute_aprs_hash();
void APRSBeaconThread();
void ProcessTimeouts();
void ProcessSlowData(unsigned char *data, unsigned short sid, unsigned char &header_type, bool *new_group, short *to_print, bool *ABC_grp, bool *C_seen);
void ProcessSlowData(unsigned char *data, unsigned short sid);
bool Flag_is_ok(unsigned char flag);
// read configuration file

@ -52,7 +52,7 @@ void CAPRS::SelectBand(short int rptr_idx, unsigned short streamID)
// Parameter len is either 12 or 15, because we took passed over the first 17 bytes
// in the repeater data
// Paramter seq is the byte at pos# 16(counting from zero) in the repeater data
void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf, unsigned int len)
void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf)
{
unsigned char aprs_data[200];
char aprs_buf[1024];
@ -60,8 +60,6 @@ void CAPRS::ProcessText(unsigned short streamID, unsigned char seq, unsigned cha
short int rptr_idx = -1;
len = len;
for (short int i = 0; i < 3; i++) {
if (streamID == aprs_streamID[i].streamID) {
rptr_idx = i;

@ -58,7 +58,7 @@ public:
~CAPRS();
SRPTR *m_rptr;
void SelectBand(short int rptr_idx, unsigned short streamID);
void ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf, unsigned int len);
void ProcessText(unsigned short streamID, unsigned char seq, unsigned char *buf);
ssize_t WriteSock(char *buffer, size_t n);
void Open(const std::string OWNER);
void Init();

@ -1,5 +1,5 @@
// version strings must be 55 characters or less!
#define IRCDDB_VERSION "QnetGateway-7.4.3"
#define IRCDDB_VERSION "QnetGateway-7.4.4"
#define LINK_VERSION "QnetLink-6.2.0"
#define DVAP_VERSION "QnetDVAP-5.1.2"
#define RELAY_VERSION "QnetRelay-0.2.3"

Loading…
Cancel
Save

Powered by TurnKey Linux.