2018-06-21 Fred Gleason <fredg@paravelsystems.com>

* Added support for the Broadcast Tools SS 2.1 switcher.
This commit is contained in:
Fred Gleason 2018-08-21 18:37:20 +00:00
parent ff078cfd15
commit 8f2fbcab9f
8 changed files with 233 additions and 6 deletions

View File

@ -16661,3 +16661,5 @@
2018-06-20 Fred Gleason <fredg@paravelsystems.com> 2018-06-20 Fred Gleason <fredg@paravelsystems.com>
* Added a 'TranscodingDelay=' parameter to the '[Tuning]' section * Added a 'TranscodingDelay=' parameter to the '[Tuning]' section
of rd.conf(5). of rd.conf(5).
2018-06-21 Fred Gleason <fredg@paravelsystems.com>
* Added support for the Broadcast Tools SS 2.1 switcher.

View File

@ -467,6 +467,40 @@
</para> </para>
</sect1> </sect1>
<sect1 xml:id="sect.gpio_switcher_devices.btss21">
<title>BroadcastTools SS 2.1</title>
<variablelist>
<varlistentry>
<term>Driver Name:</term>
<listitem>
<para>
BroadcastTools SS 2.1
</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 done by means of an RS-232C connection to a four pin RJ11
modular jack on the back of the unit (an adapter to a standard DB9
connector is supplied by Broadcast Tools with the unit). Serial port
parameters should be set to 9600 baud rate, no parity, 8 data bits, 1
stop bit, CR/LF termination.
</para>
<para>
Operation in 'multidrop' mode is not supported.
</para>
</sect1>
<sect1 xml:id="sect.gpio_switcher_devices.btss164"> <sect1 xml:id="sect.gpio_switcher_devices.btss164">
<title>BroadcastTools SS 16.4</title> <title>BroadcastTools SS 16.4</title>
<variablelist> <variablelist>

View File

@ -2,7 +2,7 @@
// //
// Abstract a Rivendell Switcher Matrix // Abstract a Rivendell Switcher Matrix
// //
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -71,7 +71,8 @@ bool __mx_primary_controls[RDMatrix::LastType][RDMatrix::LastControl]=
{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, // Kernel GPIO {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0}, // Kernel GPIO
{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,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,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,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
}; };
bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]= bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
{ {
@ -119,7 +120,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}, // Kernel GPIO {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}, // Kernel GPIO
{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 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}, // 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 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
}; };
int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]= int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
@ -168,7 +170,8 @@ int __mx_default_values[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,1,0}, // Kernel GPIO {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,1,0}, // Kernel GPIO
{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 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,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 {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
}; };
RDMatrix::RDMatrix(const QString &station,int matrix) RDMatrix::RDMatrix(const QString &station,int matrix)
@ -652,6 +655,10 @@ QString RDMatrix::typeString(RDMatrix::Type type)
return QString("Logitek vGuest"); return QString("Logitek vGuest");
break; break;
case RDMatrix::BtSs21:
return QString("BroadcastTools SS2.1");
break;
case RDMatrix::BtSs164: case RDMatrix::BtSs164:
return QString("BroadcastTools SS16.4"); return QString("BroadcastTools SS16.4");
break; break;

View File

@ -2,7 +2,7 @@
// //
// Abstract a Rivendell Switcher Matrix // Abstract a Rivendell Switcher Matrix
// //
// (C) Copyright 2002-2017 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // 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, LiveWireLwrpGpio=29,BtSentinel4Web=30,BtGpi16=31,ModemLines=32,
SoftwareAuthority=33,Sas16000=34,RossNkScp=35,BtAdms4422=36, SoftwareAuthority=33,Sas16000=34,RossNkScp=35,BtAdms4422=36,
BtSs41Mlr=37,Modbus=38,KernelGpio=39,WheatnetSlio=40, BtSs41Mlr=37,Modbus=38,KernelGpio=39,WheatnetSlio=40,
WheatnetLio=41,BtU41MlrWeb=42,LastType=43}; WheatnetLio=41,BtU41MlrWeb=42,BtSs21=43,LastType=44};
enum Endpoint {Input=0,Output=1}; enum Endpoint {Input=0,Output=1};
enum Mode {Stereo=0,Left=1,Right=2}; enum Mode {Stereo=0,Left=1,Right=2};
enum VguestAttribute {VguestEngine=0,VguestDevice=1,VguestSurface=2, enum VguestAttribute {VguestEngine=0,VguestDevice=1,VguestSurface=2,

View File

@ -42,6 +42,7 @@ dist_ripcd_SOURCES = acu1p.cpp acu1p.h\
btgpi16.cpp btgpi16.h\ btgpi16.cpp btgpi16.h\
btsentinel4web.cpp btsentinel4web.h\ btsentinel4web.cpp btsentinel4web.h\
btss124.cpp btss124.h\ btss124.cpp btss124.h\
btss21.cpp btss21.h\
btss164.cpp btss164.h\ btss164.cpp btss164.h\
btss41mlr.cpp btss41mlr.h\ btss41mlr.cpp btss41mlr.h\
btss42.cpp btss42.h\ btss42.cpp btss42.h\
@ -95,6 +96,7 @@ nodist_ripcd_SOURCES = moc_am16.cpp\
moc_btsrc8iii.cpp\ moc_btsrc8iii.cpp\
moc_btss124.cpp\ moc_btss124.cpp\
moc_btss164.cpp\ moc_btss164.cpp\
moc_btss21.cpp\
moc_btss41mlr.cpp\ moc_btss41mlr.cpp\
moc_btss42.cpp\ moc_btss42.cpp\
moc_btss44.cpp\ moc_btss44.cpp\

122
ripcd/btss21.cpp Normal file
View File

@ -0,0 +1,122 @@
// btss21.cpp
//
// A Rivendell switcher driver for the BroadcastTools SS 2.1
//
// (C) Copyright 2002-2018 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 <qstringlist.h>
#include <qtimer.h>
#include <stdlib.h>
#include <globals.h>
#include <btss21.h>
BtSs21::BtSs21(RDMatrix *matrix,QObject *parent)
: Switcher(matrix,parent)
{
//
// Get Matrix Parameters
//
bt_matrix=matrix->matrix();
bt_inputs=matrix->inputs();
bt_outputs=matrix->outputs();
//
// Initialize the TTY Port
//
RDTty *tty=new RDTty(rdstation->name(),matrix->port(RDMatrix::Primary));
bt_device=new RDTTYDevice();
if(tty->active()) {
bt_device->setName(tty->port());
bt_device->setSpeed(tty->baudRate());
bt_device->setWordLength(tty->dataBits());
bt_device->setParity(tty->parity());
bt_device->open(IO_Raw|IO_ReadWrite);
}
delete tty;
}
BtSs21::~BtSs21()
{
delete bt_device;
}
RDMatrix::Type BtSs21::type()
{
return RDMatrix::BtSs21;
}
unsigned BtSs21::gpiQuantity()
{
return 0;
}
unsigned BtSs21::gpoQuantity()
{
return 0;
}
bool BtSs21::primaryTtyActive()
{
return true;
}
bool BtSs21::secondaryTtyActive()
{
return false;
}
void BtSs21::processCommand(RDMacro *cmd)
{
QString str;
switch(cmd->command()) {
case RDMacro::ST:
if((cmd->arg(1).toInt()<0)||(cmd->arg(1).toInt()>bt_inputs)||
(cmd->arg(2).toInt()<1)||(cmd->arg(2).toInt()>1)) {
cmd->acknowledge(false);
emit rmlEcho(cmd);
return;
}
if(cmd->arg(1).toInt()==0) {
str=QString().sprintf("*%dM",BTSS21_UNIT_ID);
bt_device->writeBlock(str,str.length());
}
else {
str=QString().sprintf("*%d%d",BTSS21_UNIT_ID,
cmd->arg(1).toInt());
bt_device->writeBlock(str,str.length());
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
default:
cmd->acknowledge(false);
emit rmlEcho(cmd);
break;
}
}

55
ripcd/btss21.h Normal file
View File

@ -0,0 +1,55 @@
// btss21.h
//
// A Rivendell switcher driver for the BroadcastTools SS 2.1
//
// (C) Copyright 2002-2018 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 BTSS21_H
#define BTSS21_H
#include <rd.h>
#include <rdmatrix.h>
#include <rdmacro.h>
#include <rdtty.h>
#include <rdoneshot.h>
#include <switcher.h>
#define BTSS21_UNIT_ID 0
class BtSs21 : public Switcher
{
Q_OBJECT
public:
BtSs21(RDMatrix *matrix,QObject *parent=0);
~BtSs21();
RDMatrix::Type type();
unsigned gpiQuantity();
unsigned gpoQuantity();
bool primaryTtyActive();
bool secondaryTtyActive();
void processCommand(RDMacro *cmd);
private:
RDTTYDevice *bt_device;
int bt_matrix;
int bt_inputs;
int bt_outputs;
};
#endif // BTSS21_H

View File

@ -37,6 +37,7 @@
#include <btsrc8iii.h> #include <btsrc8iii.h>
#include <btss124.h> #include <btss124.h>
#include <btss164.h> #include <btss164.h>
#include <btss21.h>
#include <btss41mlr.h> #include <btss41mlr.h>
#include <btss42.h> #include <btss42.h>
#include <btss44.h> #include <btss44.h>
@ -126,6 +127,10 @@ bool MainObject::LoadSwitchDriver(int matrix_num)
ripcd_switcher[matrix_num]=new BtSs164(matrix,this); ripcd_switcher[matrix_num]=new BtSs164(matrix,this);
break; break;
case RDMatrix::BtSs21:
ripcd_switcher[matrix_num]=new BtSs21(matrix,this);
break;
case RDMatrix::BtSs41Mlr: case RDMatrix::BtSs41Mlr:
ripcd_switcher[matrix_num]=new BtSs41Mlr(matrix,this); ripcd_switcher[matrix_num]=new BtSs41Mlr(matrix,this);
break; break;