mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 01:13:50 +02:00
2019-07-05 Fred Gleason <fredg@paravelsystems.com>
* Added switcher support for Grass Valley Series 7000 protocol.
This commit is contained in:
parent
2ee6a00114
commit
b4a0dce32d
@ -18859,3 +18859,5 @@
|
||||
from being restarted in response to a 'ModifyAction' notification.
|
||||
2019-07-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a typo in the 'EditCart' call in 'docs/apis/web_api.xml'.
|
||||
2019-07-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added switcher support for Grass Valley Series 7000 protocol.
|
||||
|
@ -65,6 +65,7 @@ OPSGUIDE_HTML = appendix.filepath_wildcards.html\
|
||||
sect.gpio_switcher_devices.btss44.html\
|
||||
sect.gpio_switcher_devices.btss82.html\
|
||||
sect.gpio_switcher_devices.btu41mlrweb.html\
|
||||
sect.gpio_switcher_devices.gvc7000.html\
|
||||
sect.gpio_switcher_devices.harlond.html\
|
||||
sect.gpio_switcher_devices.kernelgpio.html\
|
||||
sect.gpio_switcher_devices.livewire_lwrpaudio.html\
|
||||
|
@ -773,6 +773,33 @@
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="sect.gpio_switcher_devices.gvc7000">
|
||||
<title>Grass Valley 7000 Protocol</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Driver Name:</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Grass Valley 7000 Protocol
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Supported RML Commands:</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>Switch Take ['<command>ST</command>']</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
Control is by means of a TCP/IP connection to port 12345.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="sect.gpio_switcher_devices.harlond">
|
||||
<title>Harlond Virtual Mixer</title>
|
||||
<variablelist>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Switcher Matrix
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 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
|
||||
@ -72,7 +72,8 @@ bool __mx_primary_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||
{0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, // WheatNet SLIO
|
||||
{0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, // WheatNet LIO
|
||||
{0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, // BT Universale 4.1 MLR>>Web
|
||||
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0} // BT SS 2.1
|
||||
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0}, // BT SS 2.1
|
||||
{0,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0} // GVC 7000
|
||||
};
|
||||
bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||
{
|
||||
@ -121,7 +122,8 @@ bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // WheatNet SLIO
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // WheatNet LIO
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // BT Universal 4.1 MLR>>Web
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} // BT SS 2.1
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // BT SS 2.1
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} // GVC 7000
|
||||
};
|
||||
|
||||
int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||
@ -171,7 +173,8 @@ int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||
{1,0,0,55776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // WheatNet SLIO
|
||||
{1,0,0,55776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // WheatNet LIO
|
||||
{1,0,0,56,0,0,0,0,0,0,0,4,1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // BT Universal 4.1 MLR>>Web
|
||||
{0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0} // BT SS 2.1
|
||||
{0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // BT SS 2.1
|
||||
{1,0,0,12345,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0} // GVC 7000
|
||||
};
|
||||
|
||||
RDMatrix::RDMatrix(const QString &station,int matrix)
|
||||
@ -757,6 +760,10 @@ QString RDMatrix::typeString(RDMatrix::Type type)
|
||||
return QString("BroadcastTools 4.1 MLR>>Web");
|
||||
break;
|
||||
|
||||
case RDMatrix::Gvc7000:
|
||||
return QString("Grass Valley 7000 Protocol");
|
||||
break;
|
||||
|
||||
default:
|
||||
return QString("Unknown Type");
|
||||
break;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Switcher Matrix
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 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
|
||||
@ -39,7 +39,7 @@ class RDMatrix
|
||||
LiveWireLwrpGpio=29,BtSentinel4Web=30,BtGpi16=31,ModemLines=32,
|
||||
SoftwareAuthority=33,Sas16000=34,RossNkScp=35,BtAdms4422=36,
|
||||
BtSs41Mlr=37,Modbus=38,KernelGpio=39,WheatnetSlio=40,
|
||||
WheatnetLio=41,BtU41MlrWeb=42,BtSs21=43,LastType=44};
|
||||
WheatnetLio=41,BtU41MlrWeb=42,BtSs21=43,Gvc7000=44,LastType=45};
|
||||
enum Endpoint {Input=0,Output=1};
|
||||
enum Mode {Stereo=0,Left=1,Right=2};
|
||||
enum VguestAttribute {VguestEngine=0,VguestDevice=1,VguestSurface=2,
|
||||
|
@ -51,6 +51,7 @@ dist_ripcd_SOURCES = acu1p.cpp acu1p.h\
|
||||
btsrc16.cpp btsrc16.h\
|
||||
btsrc8iii.cpp btsrc8iii.h\
|
||||
btu41mlrweb.cpp btu41mlrweb.h\
|
||||
gvc7000.cpp gvc7000.h\
|
||||
harlond.cpp harlond.h\
|
||||
kernelgpio.cpp kernelgpio.h\
|
||||
livewire_lwrpaudio.cpp livewire_lwrpaudio.h\
|
||||
@ -102,6 +103,7 @@ nodist_ripcd_SOURCES = moc_am16.cpp\
|
||||
moc_btss44.cpp\
|
||||
moc_btss82.cpp\
|
||||
moc_btu41mlrweb.cpp\
|
||||
moc_gvc7000.cpp\
|
||||
moc_harlond.cpp\
|
||||
moc_kernelgpio.cpp\
|
||||
moc_livewire_lwrpaudio.cpp\
|
||||
|
210
ripcd/gvc7000.cpp
Normal file
210
ripcd/gvc7000.cpp
Normal file
@ -0,0 +1,210 @@
|
||||
// gvc7000.cpp
|
||||
//
|
||||
// A Rivendell switcher driver for Grass Valley Series 7000 Protocol
|
||||
//
|
||||
// (C) Copyright 2002-2019 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <qsignalmapper.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "gvc7000.h"
|
||||
|
||||
Gvc7000::Gvc7000(RDMatrix *matrix,QObject *parent)
|
||||
: Switcher(matrix,parent)
|
||||
{
|
||||
gvc_matrix=matrix->matrix();
|
||||
|
||||
//
|
||||
// Get Matrix Parameters
|
||||
//
|
||||
gvc_ipaddress=matrix->ipAddress(RDMatrix::Primary);
|
||||
gvc_ipport=matrix->ipPort(RDMatrix::Primary);
|
||||
gvc_inputs=matrix->inputs();
|
||||
gvc_outputs=matrix->outputs();
|
||||
|
||||
//
|
||||
// Keepalive Timer
|
||||
//
|
||||
gvc_keepalive_timer=new QTimer(this);
|
||||
connect(gvc_keepalive_timer,SIGNAL(timeout()),this,SLOT(keepaliveData()));
|
||||
gvc_keepalive_timer->start(GVC7000_KEEPALIVE_INTERVAL);
|
||||
|
||||
//
|
||||
// Reconnection Timer
|
||||
//
|
||||
gvc_reconnect_timer=new QTimer(this);
|
||||
gvc_reconnect_timer->setSingleShot(true);
|
||||
connect(gvc_reconnect_timer,SIGNAL(timeout()),this,SLOT(ipConnect()));
|
||||
|
||||
//
|
||||
// Initialize the connection
|
||||
//
|
||||
gvc_socket=new QTcpSocket(this);
|
||||
connect(gvc_socket,SIGNAL(connected()),this,SLOT(connectedData()));
|
||||
connect(gvc_socket,SIGNAL(disconnected()),this,SLOT(disconnectedData()));
|
||||
connect(gvc_socket,SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
this,SLOT(errorData(QAbstractSocket::SocketError)));
|
||||
ipConnect();
|
||||
}
|
||||
|
||||
|
||||
RDMatrix::Type Gvc7000::type()
|
||||
{
|
||||
return RDMatrix::Gvc7000;
|
||||
}
|
||||
|
||||
|
||||
unsigned Gvc7000::gpiQuantity()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
unsigned Gvc7000::gpoQuantity()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool Gvc7000::primaryTtyActive()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Gvc7000::secondaryTtyActive()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::processCommand(RDMacro *cmd)
|
||||
{
|
||||
switch(cmd->command()) {
|
||||
case RDMacro::ST:
|
||||
if((cmd->arg(1).toInt()<1)||(cmd->arg(1).toInt()>gvc_inputs)||
|
||||
(cmd->arg(2).toInt()<1)||(cmd->arg(2).toInt()>gvc_outputs)) {
|
||||
cmd->acknowledge(false);
|
||||
emit rmlEcho(cmd);
|
||||
return;
|
||||
}
|
||||
SendCommand(ToSeries7000Native(QString().sprintf("TI,%04X,%04X",cmd->arg(2).toInt()-1,cmd->arg(1).toInt()-1)));
|
||||
cmd->acknowledge(true);
|
||||
emit rmlEcho(cmd);
|
||||
break;
|
||||
|
||||
default:
|
||||
cmd->acknowledge(false);
|
||||
emit rmlEcho(cmd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::ipConnect()
|
||||
{
|
||||
gvc_socket->connectToHost(gvc_ipaddress.toString(),gvc_ipport);
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::keepaliveData()
|
||||
{
|
||||
SendCommand(ToSeries7000Native("QJ"));
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::connectedData()
|
||||
{
|
||||
rda->syslog(LOG_INFO,"connection to Gvc7000 device at %s:%d established",
|
||||
(const char *)gvc_ipaddress.toString().toUtf8(),gvc_ipport);
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::disconnectedData()
|
||||
{
|
||||
rda->syslog(LOG_WARNING,
|
||||
"connection to Gvc7000 device at %s:%d closed unexpectedly, attempting reconnect",
|
||||
(const char *)gvc_ipaddress.toString().toUtf8(),gvc_ipport);
|
||||
gvc_reconnect_timer->start(GVC7000_RECONNECT_INTERVAL,true);
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::errorData(QAbstractSocket::SocketError err)
|
||||
{
|
||||
switch(err) {
|
||||
case QAbstractSocket::ConnectionRefusedError:
|
||||
rda->syslog(LOG_WARNING,
|
||||
"connection to Gvc7000 device at %s:%d refused, attempting reconnect",
|
||||
(const char *)gvc_ipaddress.toString().toUtf8(),gvc_ipport);
|
||||
gvc_reconnect_timer->start(GVC7000_RECONNECT_INTERVAL,true);
|
||||
break;
|
||||
|
||||
case QAbstractSocket::HostNotFoundError:
|
||||
rda->syslog(LOG_WARNING,
|
||||
"error on connection to Gvc7000 device at %s:%d: Host Not Found",
|
||||
(const char *)gvc_ipaddress.toString().toUtf8(),
|
||||
gvc_ipport);
|
||||
break;
|
||||
|
||||
case QAbstractSocket::RemoteHostClosedError:
|
||||
break;
|
||||
|
||||
default:
|
||||
rda->syslog(LOG_WARNING,
|
||||
"socket error %d on connection to Gvc7000 device at %s:%d: Socket Read Error",
|
||||
err,
|
||||
(const char *)gvc_ipaddress.toString().toUtf8(),gvc_ipport);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Gvc7000::SendCommand(const QString &str)
|
||||
{
|
||||
syslog(LOG_DEBUG,"gvc7000 sending \"%s\"",(const char *)str.toAscii());
|
||||
gvc_socket->write(str.toAscii());
|
||||
}
|
||||
|
||||
|
||||
QString Gvc7000::ToSeries7000Native(const QString &str) const
|
||||
{
|
||||
QString ret=str;
|
||||
|
||||
ret.replace(",","\t");
|
||||
if(ret.right(1)!="\t") {
|
||||
ret+="\t";
|
||||
}
|
||||
|
||||
QString msg=QString("N")+ // Protocol ID
|
||||
"0"+ // Sequence Flag
|
||||
ret; // Data
|
||||
|
||||
uint8_t sum=0;
|
||||
for(int i=0;i<msg.length();i++) {
|
||||
sum+=msg.at(i).toAscii();
|
||||
}
|
||||
sum=0x100-sum;
|
||||
|
||||
return QChar(1)+ // Header
|
||||
msg+ // Message
|
||||
QString().sprintf("%02X",sum)+ // Checksum
|
||||
QChar(4); // Footer
|
||||
}
|
72
ripcd/gvc7000.h
Normal file
72
ripcd/gvc7000.h
Normal file
@ -0,0 +1,72 @@
|
||||
// gvc7000.h
|
||||
//
|
||||
// A Rivendell switcher driver for Grass Valley Series 7000 Protocol
|
||||
//
|
||||
// (C) Copyright 2002-2019 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef GVC7000_H
|
||||
#define GVC7000_H
|
||||
|
||||
#include <qhostaddress.h>
|
||||
#include <qtcpsocket.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdmatrix.h>
|
||||
#include <rdmacro.h>
|
||||
|
||||
#include <switcher.h>
|
||||
|
||||
#define GVC7000_RECONNECT_INTERVAL 10000
|
||||
#define GVC7000_KEEPALIVE_INTERVAL 5000
|
||||
|
||||
class Gvc7000 : public Switcher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Gvc7000(RDMatrix *matrix,QObject *parent=0);
|
||||
RDMatrix::Type type();
|
||||
unsigned gpiQuantity();
|
||||
unsigned gpoQuantity();
|
||||
bool primaryTtyActive();
|
||||
bool secondaryTtyActive();
|
||||
void processCommand(RDMacro *cmd);
|
||||
|
||||
private slots:
|
||||
void ipConnect();
|
||||
void keepaliveData();
|
||||
void connectedData();
|
||||
void disconnectedData();
|
||||
void errorData(QAbstractSocket::SocketError err);
|
||||
|
||||
private:
|
||||
void SendCommand(const QString &str);
|
||||
QString ToSeries7000Native(const QString &str) const;
|
||||
QTcpSocket *gvc_socket;
|
||||
QHostAddress gvc_ipaddress;
|
||||
int gvc_matrix;
|
||||
int gvc_ipport;
|
||||
int gvc_inputs;
|
||||
int gvc_outputs;
|
||||
QTimer *gvc_keepalive_timer;
|
||||
QTimer *gvc_reconnect_timer;
|
||||
int gvc_input_line;
|
||||
int gvc_output_line;
|
||||
};
|
||||
|
||||
|
||||
#endif // GVC7000_H
|
@ -45,6 +45,7 @@
|
||||
#include "btss44.h"
|
||||
#include "btss82.h"
|
||||
#include "btu41mlrweb.h"
|
||||
#include "gvc7000.h"
|
||||
#include "harlond.h"
|
||||
#include "kernelgpio.h"
|
||||
#include "livewire_lwrpaudio.h"
|
||||
@ -153,6 +154,10 @@ bool MainObject::LoadSwitchDriver(int matrix_num)
|
||||
ripcd_switcher[matrix_num]=new BtU41MlrWeb(matrix,this);
|
||||
break;
|
||||
|
||||
case RDMatrix::Gvc7000:
|
||||
ripcd_switcher[matrix_num]=new Gvc7000(matrix,this);
|
||||
break;
|
||||
|
||||
case RDMatrix::Harlond:
|
||||
ripcd_switcher[matrix_num]=new Harlond(matrix,this);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user