2015-05-28 Fred Gleason <fredg@paravelsystems.com>

* Added an 'RDMatrix::RossNkScp' value to the 'RDMatrix::Type'
	enumeration in 'lib/rdmatrix.cpp' and 'lib/rdmatrix.h'.
	* Implemented a switcher driver for the Ross NK line of video
	switchers via the SCP/A serial interface in 'ripcd/rossnkscp.cpp'
	and 'riptcd/rossnkscp.h'.
This commit is contained in:
Fred Gleason
2015-05-29 07:13:05 -04:00
parent 16284179cc
commit 888711270d
8 changed files with 210 additions and 4 deletions

View File

@@ -14870,3 +14870,9 @@
* Added default parameters to the 'PadPoint' RLM in 'rlm_padpoint.c'. * Added default parameters to the 'PadPoint' RLM in 'rlm_padpoint.c'.
2015-05-28 Fred Gleason <fredg@paravelsystems.com> 2015-05-28 Fred Gleason <fredg@paravelsystems.com>
* Added rdcleandirs(8) utility in 'utils/rdcleandirs/'. * Added rdcleandirs(8) utility in 'utils/rdcleandirs/'.
2015-05-28 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDMatrix::RossNkScp' value to the 'RDMatrix::Type'
enumeration in 'lib/rdmatrix.cpp' and 'lib/rdmatrix.h'.
* Implemented a switcher driver for the Ross NK line of video
switchers via the SCP/A serial interface in 'ripcd/rossnkscp.cpp'
and 'riptcd/rossnkscp.h'.

View File

@@ -22,6 +22,7 @@ LiveWire Multicast GPIO
Local Audio Adapter Local Audio Adapter
Logitek vGuest Logitek vGuest
Quartz Electronics Type 1 Routing Protocol Quartz Electronics Type 1 Routing Protocol
Ross NK Video Switchers (via SCP/A Serial Interface)
Serial Port Modem Control Lines Serial Port Modem Control Lines
Sierra Automated Systems 16000(D) Audio Router Sierra Automated Systems 16000(D) Audio Router
Sierra Automated Systems 32000 Audio Router Sierra Automated Systems 32000 Audio Router
@@ -511,6 +512,22 @@ Control can done either by means of an RS-232C connection or by means of
TCP/IP to TCP port 23. TCP/IP to TCP port 23.
----------------------------------------------------------------------------
Ross NK Video Switchers (via SCP/A Serial Interface)
Driver Name: Ross NK-SCP/A Interface
Supported RML Commands:
Switch Take ('ST')
GENERAL NOTES:
Control is done by means of an RS-232C connection to a NK-SCP/A serial
interface. Serial port parameters should be set to 9600 baud rate, no parity,
8 data bits, 1 stop bit, CR termination. The Breakaway to use is defined
by setting the 'Card' parameter in the driver configuration, with
Card 0 = Breakaway 1, Card 1 = Breakaway 2, etc.
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
SERIAL PORT MODEM CONTROL LINES SERIAL PORT MODEM CONTROL LINES

View File

@@ -65,7 +65,8 @@ bool __mx_primary_controls[RDMatrix::LastType][RDMatrix::LastControl]=
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // BT GPI-16 {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // BT GPI-16
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // Modem Lines {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // Modem Lines
{0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0}, // Software Authority {0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0}, // Software Authority
{0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0} // SAS 16000 {0,1,1,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,0,1,0,0,0,0}, // SAS 16000
{0,1,0,0,0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0} // Ross NK/SCP
}; };
bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]= bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
{ {
@@ -105,7 +106,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}, // BT GPI-16 {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 GPI-16
{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}, // Modem Lines {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}, // Modem Lines
{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}, // Software Authority {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}, // Software Authority
{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} // SAS 16000 {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}, // SAS 16000
{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} // ROSS NK/SCP
}; };
int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]= int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
@@ -146,7 +148,8 @@ int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
{0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // BT GPI-16 {0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // BT GPI-16
{0,0,0,0,0,0,0,0,0,0,0,0,0,4,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // Modem Lines {0,0,0,0,0,0,0,0,0,0,0,0,0,4,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // Modem Lines
{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,1,0}, // Software Authority {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,1,0}, // Software Authority
{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} // SAS 16000 {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}, // SAS 16000
{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} // Ross NK/SCP
}; };
RDMatrix::RDMatrix(const QString &station,int matrix) RDMatrix::RDMatrix(const QString &station,int matrix)
@@ -698,6 +701,10 @@ QString RDMatrix::typeString(RDMatrix::Type type)
return QString("Software Authority Protocol"); return QString("Software Authority Protocol");
break; break;
case RDMatrix::RossNkScp:
return QString("Ross NK-SCP/A Interface");
break;
default: default:
return QString("Unknown Type"); return QString("Unknown Type");
break; break;

View File

@@ -38,7 +38,7 @@ class RDMatrix
BtSs42=19,LiveWireLwrpAudio=20,Quartz1=21,BtSs44=22,BtSrc8III=23, BtSs42=19,LiveWireLwrpAudio=20,Quartz1=21,BtSs44=22,BtSrc8III=23,
BtSrc16=24,Harlond=25,Acu1p=26,LiveWireMcastGpio=27,Am16=28, BtSrc16=24,Harlond=25,Acu1p=26,LiveWireMcastGpio=27,Am16=28,
LiveWireLwrpGpio=29,BtSentinel4Web=30,BtGpi16=31,ModemLines=32, LiveWireLwrpGpio=29,BtSentinel4Web=30,BtGpi16=31,ModemLines=32,
SoftwareAuthority=33,Sas16000=34,LastType=35}; SoftwareAuthority=33,Sas16000=34,RossNkScp=35,LastType=36};
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

@@ -60,6 +60,7 @@ dist_ripcd_SOURCES = acu1p.cpp acu1p.h\
ripcd.cpp ripcd.h globals.h\ ripcd.cpp ripcd.h globals.h\
ripcd_connection.cpp ripcd_connection.h\ ripcd_connection.cpp ripcd_connection.h\
ripcd_socket.cpp ripcd_socket.h\ ripcd_socket.cpp ripcd_socket.h\
rossnkscp.cpp rossnkscp.h\
sas32000.cpp sas32000.h\ sas32000.cpp sas32000.h\
sas64000.cpp sas64000.h\ sas64000.cpp sas64000.h\
sas64000gpi.cpp sas64000gpi.h\ sas64000gpi.cpp sas64000gpi.h\
@@ -99,6 +100,7 @@ nodist_ripcd_SOURCES = moc_am16.cpp\
moc_quartz1.cpp\ moc_quartz1.cpp\
moc_ripcd.cpp\ moc_ripcd.cpp\
moc_ripcd_socket.cpp\ moc_ripcd_socket.cpp\
moc_rossnkscp.cpp\
moc_sas32000.cpp\ moc_sas32000.cpp\
moc_sas64000.cpp\ moc_sas64000.cpp\
moc_sas64000gpi.cpp\ moc_sas64000gpi.cpp\

View File

@@ -49,6 +49,7 @@
#include <local_gpio.h> #include <local_gpio.h>
#include <modemlines.h> #include <modemlines.h>
#include <quartz1.h> #include <quartz1.h>
#include <rossnkscp.h>
#include <sas16000.h> #include <sas16000.h>
#include <sas32000.h> #include <sas32000.h>
#include <sas64000.h> #include <sas64000.h>
@@ -164,6 +165,10 @@ bool MainObject::LoadSwitchDriver(int matrix_num)
ripcd_switcher[matrix_num]=new Quartz1(matrix,this); ripcd_switcher[matrix_num]=new Quartz1(matrix,this);
break; break;
case RDMatrix::RossNkScp:
ripcd_switcher[matrix_num]=new RossNkScp(matrix,this);
break;
case RDMatrix::Sas16000: case RDMatrix::Sas16000:
ripcd_switcher[matrix_num]=new Sas16000(matrix,this); ripcd_switcher[matrix_num]=new Sas16000(matrix,this);
break; break;

114
ripcd/rossnkscp.cpp Normal file
View File

@@ -0,0 +1,114 @@
// rossnkscp.cpp
//
// A Rivendell switcher driver for the Ross NK switchers via the SCP/A
//
// (C) Copyright 2002-2015 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 <globals.h>
#include <rossnkscp.h>
RossNkScp::RossNkScp(RDMatrix *matrix,QObject *parent,const char *name)
: Switcher(matrix,parent,name)
{
//
// Get Matrix Parameters
//
ross_inputs=matrix->inputs();
ross_outputs=matrix->outputs();
ross_breakaway=matrix->card()+1;
//
// Initialize the TTY Port
//
RDTty *tty=new RDTty(rdstation->name(),matrix->port(RDMatrix::Primary));
ross_device=new RDTTYDevice();
if(tty->active()) {
ross_device->setName(tty->port());
ross_device->setSpeed(tty->baudRate());
ross_device->setWordLength(tty->dataBits());
ross_device->setParity(tty->parity());
ross_device->open(IO_Raw|IO_ReadWrite);
}
delete tty;
}
RossNkScp::~RossNkScp()
{
delete ross_device;
}
RDMatrix::Type RossNkScp::type()
{
return RDMatrix::RossNkScp;
}
unsigned RossNkScp::gpiQuantity()
{
return 0;
}
unsigned RossNkScp::gpoQuantity()
{
return 0;
}
bool RossNkScp::primaryTtyActive()
{
return true;
}
bool RossNkScp::secondaryTtyActive()
{
return false;
}
void RossNkScp::processCommand(RDMacro *cmd)
{
char str[11];
switch(cmd->command()) {
case RDMacro::ST:
if((cmd->arg(1).toInt()<=0)||(cmd->arg(1).toInt()>ross_inputs)||
(cmd->arg(2).toInt()<1)||(cmd->arg(2).toInt()>ross_outputs)) {
cmd->acknowledge(false);
emit rmlEcho(cmd);
return;
}
sprintf(str,"X%03d,%03d,%d\x0d",cmd->arg(2).toInt()-1,
cmd->arg(1).toInt()-1,ross_breakaway);
syslog(LOG_WARNING,"sent: %s\n",str);
ross_device->writeBlock(str,11);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
default:
cmd->acknowledge(false);
emit rmlEcho(cmd);
break;
}
}

55
ripcd/rossnkscp.h Normal file
View File

@@ -0,0 +1,55 @@
// rossnkscp.h
//
// A Rivendell switcher driver for the Ross NK switchers via the SCP/A
//
// (C) Copyright 2015 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 ROSSNKSCP_H
#define ROSSNKSCP_H
#include <rd.h>
#include <rdmatrix.h>
#include <rdmacro.h>
#include <rdtty.h>
#include <switcher.h>
#define ROSSNKSCP_MIN_GAIN -99
#define ROSSNKSCP_MAX_GAIN 28
class RossNkScp : public Switcher
{
Q_OBJECT
public:
RossNkScp(RDMatrix *matrix,QObject *parent=0,const char *name=0);
~RossNkScp();
RDMatrix::Type type();
unsigned gpiQuantity();
unsigned gpoQuantity();
bool primaryTtyActive();
bool secondaryTtyActive();
void processCommand(RDMacro *cmd);
private:
RDTTYDevice *ross_device;
int ross_inputs;
int ross_outputs;
int ross_breakaway;
};
#endif // ROSSNKSCP_H