mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2020-02-17 Fred Gleason <fredg@paravelsystems.com>
* Removed Q3Socket dependency from the Harlond switcher driver.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Rivendell switcher driver for the Harlond Virtual Mixer
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -58,7 +58,7 @@ Harlond::Harlond(RDMatrix *matrix,QObject *parent)
|
||||
//
|
||||
// Initialize TCP/IP Connection
|
||||
//
|
||||
bt_socket=new Q3Socket(this);
|
||||
bt_socket=new QTcpSocket(this);
|
||||
connect(bt_socket,SIGNAL(connected()),this,SLOT(socketConnectedData()));
|
||||
connect(bt_socket,SIGNAL(disconnected()),this,SLOT(socketDisconnectedData()));
|
||||
connect(bt_socket,SIGNAL(readyRead()),this,SLOT(socketReadyReadData()));
|
||||
@@ -231,15 +231,15 @@ void Harlond::socketReadyReadData()
|
||||
}
|
||||
|
||||
|
||||
void Harlond::socketErrorData(int err)
|
||||
void Harlond::socketErrorData(QAbstractSocket::SocketError err)
|
||||
{
|
||||
bt_watchdog_timer->start(HARLOND_RECONNECT_INTERVAL,true);
|
||||
switch(err) {
|
||||
case Q3Socket::ErrConnectionRefused:
|
||||
case QAbstractSocket::ConnectionRefusedError:
|
||||
rda->syslog(LOG_WARNING,
|
||||
"connection to harlond device at %s:%d refused, attempting reconnect",
|
||||
(const char *)bt_ip_address.toString().toUtf8(),
|
||||
bt_tcp_port);
|
||||
bt_tcp_port);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -255,7 +255,7 @@ void Harlond::socketErrorData(int err)
|
||||
|
||||
void Harlond::watchdogTimeoutData()
|
||||
{
|
||||
if(bt_socket->state()!=Q3Socket::Connected) {
|
||||
if(bt_socket->state()!=QAbstractSocket::Connected) {
|
||||
bt_socket->connectToHost(bt_ip_address.toString(),bt_tcp_port);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Rivendell switcher driver for the Harlond Virtual Mixer
|
||||
//
|
||||
// (C) Copyright 2002-2012,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -26,8 +26,8 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <qsignalmapper.h>
|
||||
#include <qtcpsocket.h>
|
||||
#include <qtimer.h>
|
||||
#include <q3socket.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdmatrix.h>
|
||||
@@ -55,7 +55,7 @@ class Harlond : public Switcher
|
||||
void socketConnectedData();
|
||||
void socketDisconnectedData();
|
||||
void socketReadyReadData();
|
||||
void socketErrorData(int err);
|
||||
void socketErrorData(QAbstractSocket::SocketError err);
|
||||
void watchdogTimeoutData();
|
||||
|
||||
private:
|
||||
@@ -68,7 +68,7 @@ class Harlond : public Switcher
|
||||
bool AddCrosspoint(int input,int output);
|
||||
bool RemoveCrosspoint(int input,int output);
|
||||
QString GetBussCode(int output);
|
||||
Q3Socket *bt_socket;
|
||||
QTcpSocket *bt_socket;
|
||||
QString bt_recv_buffer;
|
||||
QTimer *bt_watchdog_timer;
|
||||
QHostAddress bt_ip_address;
|
||||
|
Reference in New Issue
Block a user