mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-06 07:37:57 +02:00
2014-09-09 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDMatrix::BtGpi16' value to the 'RDMatrix::Type' enumeration in 'lib/rdmatrix.cpp' and 'lib/rdmatrix.cpp'. * Implemented a driver for the Broadcast Tools GPI-16 in 'ripcd/btgpi16.cpp' and 'ripcd/btgpi16.h'.
This commit is contained in:
parent
32ee2c4a03
commit
861332e37e
@ -14439,3 +14439,8 @@
|
|||||||
'utils/rdimport/rdimport.cpp'.
|
'utils/rdimport/rdimport.cpp'.
|
||||||
2014-09-05 Fred Gleason <fredg@paravelsystems.com>
|
2014-09-05 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in 'docs/Makefile.am' that broke the 'make dist' target.
|
* Fixed a bug in 'docs/Makefile.am' that broke the 'make dist' target.
|
||||||
|
2014-09-09 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added an 'RDMatrix::BtGpi16' value to the 'RDMatrix::Type'
|
||||||
|
enumeration in 'lib/rdmatrix.cpp' and 'lib/rdmatrix.cpp'.
|
||||||
|
* Implemented a driver for the Broadcast Tools GPI-16 in
|
||||||
|
'ripcd/btgpi16.cpp' and 'ripcd/btgpi16.h'.
|
||||||
|
@ -7,6 +7,7 @@ Broadcast Tools 10x1 Audio Switcher
|
|||||||
Broadcast Tools 16x1 Audio Switcher
|
Broadcast Tools 16x1 Audio Switcher
|
||||||
Broadcast Tools 16x2 Audio Switcher
|
Broadcast Tools 16x2 Audio Switcher
|
||||||
Broadcast Tools 8x2 Audio Switcher
|
Broadcast Tools 8x2 Audio Switcher
|
||||||
|
Broadcast Tools GPI-16 General Purpose Input Module
|
||||||
Broadcast Tools Sentinel 4 Web AES Switcher
|
Broadcast Tools Sentinel 4 Web AES Switcher
|
||||||
Broadcast Tools SS 12.4 Audio Switcher
|
Broadcast Tools SS 12.4 Audio Switcher
|
||||||
Broadcast Tools SS 16.4 Audio Switcher
|
Broadcast Tools SS 16.4 Audio Switcher
|
||||||
@ -125,6 +126,25 @@ down the F1 button on the switcher while powering up.
|
|||||||
Operation in 'multidrop' mode is not supported.
|
Operation in 'multidrop' mode is not supported.
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
BROADCAST TOOLS GPI-16 General Purpose Input Module
|
||||||
|
|
||||||
|
Driver Name: BroadcastTools GPI-16
|
||||||
|
|
||||||
|
Supported RML Commands:
|
||||||
|
GPI Enable ('GE')
|
||||||
|
GPI Set ('GI')
|
||||||
|
|
||||||
|
GENERAL NOTES:
|
||||||
|
Control is done by means of a serial connection to the unit's integrated
|
||||||
|
serial port. There is also a 'plus' version that features an integrated
|
||||||
|
type B USB interface that simulates a serial port.
|
||||||
|
|
||||||
|
The unit should work correctly with factory default settings. The Rivendell
|
||||||
|
serial interface should be set to use 9600 bits/sec, 8 bits, 1 stop bit and
|
||||||
|
no flow control.
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
BROADCAST TOOLS SENTINEL 4 WEB AES SWITCHER
|
BROADCAST TOOLS SENTINEL 4 WEB AES SWITCHER
|
||||||
|
|
||||||
@ -166,6 +186,7 @@ by setting DIP switches SW1-7 and SW-1-3 to OFF.
|
|||||||
Operation in 'multidrop' mode is not supported.
|
Operation in 'multidrop' mode is not supported.
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
Driver Name: BroadcastTools SS 16.4
|
Driver Name: BroadcastTools SS 16.4
|
||||||
|
|
||||||
Supported RML Commands:
|
Supported RML Commands:
|
||||||
|
@ -61,7 +61,8 @@ bool __mx_primary_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
|||||||
{0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,1}, // LiveWire Multicast GPIO
|
{0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,0,0,0,1}, // LiveWire Multicast GPIO
|
||||||
{0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0}, // 360 AM16
|
{0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0}, // 360 AM16
|
||||||
{0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0}, // LiveWire LWRP GPIO
|
{0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0}, // LiveWire LWRP GPIO
|
||||||
{0,0,1,1,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 Sentinel 4 Web
|
{0,0,1,1,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 Sentinel 4 Web
|
||||||
|
{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
|
||||||
};
|
};
|
||||||
bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
bool __mx_backup_controls[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||||
{
|
{
|
||||||
@ -97,7 +98,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}, // LiveWire Multicast 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}, // LiveWire Multicast 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}, // 360 AM16
|
{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}, // 360 AM16
|
||||||
{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}, // LiveWire LWRP 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}, // LiveWire LWRP 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} // BT Sentinel 4 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 Sentinel 4 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 GPI-16
|
||||||
};
|
};
|
||||||
|
|
||||||
int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
|
int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
|
||||||
@ -134,7 +136,8 @@ int __mx_default_values[RDMatrix::LastType][RDMatrix::LastControl]=
|
|||||||
{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,5,0}, // LiveWire Multicast GPIO
|
{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,5,0}, // LiveWire Multicast GPIO
|
||||||
{0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // 360 AM16
|
{0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // 360 AM16
|
||||||
{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,5,0}, // LiveWire LWRP GPIO
|
{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,5,0}, // LiveWire LWRP GPIO
|
||||||
{1,0,0,0,0,0,0,0,0,0,0,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0} // BT Sentinel 4 Web
|
{1,0,0,0,0,0,0,0,0,0,0,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, // BT Sentinel 4 Web
|
||||||
|
{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
|
||||||
};
|
};
|
||||||
|
|
||||||
RDMatrix::RDMatrix(const QString &station,int matrix)
|
RDMatrix::RDMatrix(const QString &station,int matrix)
|
||||||
@ -670,6 +673,10 @@ QString RDMatrix::typeString(RDMatrix::Type type)
|
|||||||
return QString("BroadcastTools Sentinel 4 Web");
|
return QString("BroadcastTools Sentinel 4 Web");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDMatrix::BtGpi16:
|
||||||
|
return QString("BroadcastTools GPI-16");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QString("Unknown Type");
|
return QString("Unknown Type");
|
||||||
break;
|
break;
|
||||||
|
@ -39,7 +39,7 @@ class RDMatrix
|
|||||||
LogitekVguest=16,BtSs164=17,StarGuideIII=18,BtSs42=19,
|
LogitekVguest=16,BtSs164=17,StarGuideIII=18,BtSs42=19,
|
||||||
LiveWireLwrpAudio=20,Quartz1=21,BtSs44=22,BtSrc8III=23,BtSrc16=24,
|
LiveWireLwrpAudio=20,Quartz1=21,BtSs44=22,BtSrc8III=23,BtSrc16=24,
|
||||||
Harlond=25,Acu1p=26,LiveWireMcastGpio=27,Am16=28,
|
Harlond=25,Acu1p=26,LiveWireMcastGpio=27,Am16=28,
|
||||||
LiveWireLwrpGpio=29,BtSentinel4Web=30,LastType=31};
|
LiveWireLwrpGpio=29,BtSentinel4Web=30,BtGpi16=31,LastType=32};
|
||||||
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,
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
##
|
##
|
||||||
## (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
|
## (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
|
||||||
##
|
##
|
||||||
## $Id: Makefile.am,v 1.43.8.10 2014/02/17 02:19:02 cvs Exp $
|
|
||||||
##
|
|
||||||
## 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
|
||||||
## published by the Free Software Foundation.
|
## published by the Free Software Foundation.
|
||||||
@ -40,6 +38,7 @@ dist_ripcd_SOURCES = acu1p.cpp acu1p.h\
|
|||||||
bt16x2.cpp bt16x2.h\
|
bt16x2.cpp bt16x2.h\
|
||||||
bt8x2.cpp bt8x2.h\
|
bt8x2.cpp bt8x2.h\
|
||||||
btacs82.cpp btacs82.h\
|
btacs82.cpp btacs82.h\
|
||||||
|
btgpi16.cpp btgpi16.h\
|
||||||
btsentinel4web.cpp btsentinel4web.h\
|
btsentinel4web.cpp btsentinel4web.h\
|
||||||
btss124.cpp btss124.h\
|
btss124.cpp btss124.h\
|
||||||
btss164.cpp btss164.h\
|
btss164.cpp btss164.h\
|
||||||
@ -78,6 +77,7 @@ nodist_ripcd_SOURCES = moc_am16.cpp\
|
|||||||
moc_bt16x2.cpp\
|
moc_bt16x2.cpp\
|
||||||
moc_bt8x2.cpp\
|
moc_bt8x2.cpp\
|
||||||
moc_btacs82.cpp\
|
moc_btacs82.cpp\
|
||||||
|
moc_btgpi16.cpp\
|
||||||
moc_btsentinel4web.cpp\
|
moc_btsentinel4web.cpp\
|
||||||
moc_btsrc16.cpp\
|
moc_btsrc16.cpp\
|
||||||
moc_btsrc8iii.cpp\
|
moc_btsrc8iii.cpp\
|
||||||
|
229
ripcd/btgpi16.cpp
Normal file
229
ripcd/btgpi16.cpp
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
// btgpi16.cpp
|
||||||
|
//
|
||||||
|
// A Rivendell switcher driver for the BroadcastTools GPI-16
|
||||||
|
//
|
||||||
|
// (C) Copyright 2002-2005,2010 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
//
|
||||||
|
// $Id:
|
||||||
|
//
|
||||||
|
// 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 <qtimer.h>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <globals.h>
|
||||||
|
#include <btgpi16.h>
|
||||||
|
|
||||||
|
|
||||||
|
BtGpi16::BtGpi16(RDMatrix *matrix,QObject *parent,const char *name)
|
||||||
|
: Switcher(matrix,parent,name)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Initialize Data Structures
|
||||||
|
//
|
||||||
|
bt_istate=0;
|
||||||
|
for(int i=0;i<BTGPI16_GPIO_PINS;i++) {
|
||||||
|
bt_gpi_state[i]=false;
|
||||||
|
bt_gpi_mask[i]=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get Matrix Parameters
|
||||||
|
//
|
||||||
|
bt_matrix=matrix->matrix();
|
||||||
|
bt_gpis=matrix->gpis();
|
||||||
|
|
||||||
|
//
|
||||||
|
// 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());
|
||||||
|
if(!bt_device->open(IO_Raw|IO_ReadWrite)) {
|
||||||
|
LogLine(RDConfig::LogWarning,"unable to open serial device \""+tty->port()+"\".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete tty;
|
||||||
|
|
||||||
|
//
|
||||||
|
// The Poll Timer
|
||||||
|
//
|
||||||
|
QTimer *timer=new QTimer(this,"poll_timer");
|
||||||
|
connect(timer,SIGNAL(timeout()),this,SLOT(processStatus()));
|
||||||
|
timer->start(BTGPI16_POLL_INTERVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BtGpi16::~BtGpi16()
|
||||||
|
{
|
||||||
|
delete bt_device;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RDMatrix::Type BtGpi16::type()
|
||||||
|
{
|
||||||
|
return RDMatrix::BtGpi16;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned BtGpi16::gpiQuantity()
|
||||||
|
{
|
||||||
|
return bt_gpis;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned BtGpi16::gpoQuantity()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool BtGpi16::primaryTtyActive()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool BtGpi16::secondaryTtyActive()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BtGpi16::processCommand(RDMacro *cmd)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BtGpi16::processStatus()
|
||||||
|
{
|
||||||
|
char buffer[256];
|
||||||
|
int n;
|
||||||
|
int gpi;
|
||||||
|
|
||||||
|
while((n=bt_device->readBlock(buffer,255))>0) {
|
||||||
|
for(int i=0;i<n;i++) {
|
||||||
|
switch(bt_istate) {
|
||||||
|
case 0:
|
||||||
|
if(buffer[i]=='S') {
|
||||||
|
bt_istate=1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if(buffer[i]==(BTGPI16_UNIT_ID+'0')) {
|
||||||
|
bt_istate=2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if(buffer[i]=='P') {
|
||||||
|
bt_istate=3;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if(buffer[i]==',') {
|
||||||
|
bt_istate=4;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
if(buffer[i]=='A') {
|
||||||
|
bt_istate=5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
|
case 13:
|
||||||
|
case 15:
|
||||||
|
case 17:
|
||||||
|
case 19:
|
||||||
|
case 21:
|
||||||
|
case 23:
|
||||||
|
case 25:
|
||||||
|
case 27:
|
||||||
|
case 29:
|
||||||
|
case 31:
|
||||||
|
case 33:
|
||||||
|
case 35:
|
||||||
|
if(buffer[i]==',') {
|
||||||
|
bt_istate++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
case 8:
|
||||||
|
case 10:
|
||||||
|
case 12:
|
||||||
|
case 14:
|
||||||
|
case 16:
|
||||||
|
case 18:
|
||||||
|
case 20:
|
||||||
|
case 22:
|
||||||
|
case 24:
|
||||||
|
case 26:
|
||||||
|
case 28:
|
||||||
|
case 30:
|
||||||
|
case 32:
|
||||||
|
case 34:
|
||||||
|
case 36:
|
||||||
|
if(buffer[i]=='0') {
|
||||||
|
gpi=(bt_istate-6)/2;
|
||||||
|
if(bt_gpi_state[gpi]&&(!bt_gpi_mask[gpi])) {
|
||||||
|
emit gpiChanged(bt_matrix,gpi,false);
|
||||||
|
bt_gpi_state[gpi]=false;
|
||||||
|
}
|
||||||
|
bt_istate++;
|
||||||
|
}
|
||||||
|
if(buffer[i]=='1') {
|
||||||
|
gpi=(bt_istate-6)/2;
|
||||||
|
if((!bt_gpi_state[gpi])&&(!bt_gpi_mask[gpi])) {
|
||||||
|
emit gpiChanged(bt_matrix,gpi,true);
|
||||||
|
bt_gpi_state[gpi]=true;
|
||||||
|
}
|
||||||
|
bt_istate++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
bt_istate=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
68
ripcd/btgpi16.h
Normal file
68
ripcd/btgpi16.h
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
// btgpi16.h
|
||||||
|
//
|
||||||
|
// A Rivendell switcher driver for the BroadcastTools GPI-16
|
||||||
|
//
|
||||||
|
// (C) Copyright 2002-2005,2010,2014 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 BTGPI16_H
|
||||||
|
#define BTGPI16_H
|
||||||
|
|
||||||
|
#include <rd.h>
|
||||||
|
#include <rdmatrix.h>
|
||||||
|
#include <rdmacro.h>
|
||||||
|
#include <rdtty.h>
|
||||||
|
#include <rdoneshot.h>
|
||||||
|
|
||||||
|
#include <switcher.h>
|
||||||
|
|
||||||
|
#define BTGPI16_UNIT_ID 0
|
||||||
|
#define BTGPI16_POLL_INTERVAL 100
|
||||||
|
#define BTGPI16_GPIO_PINS 16
|
||||||
|
|
||||||
|
|
||||||
|
class BtGpi16 : public Switcher
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
BtGpi16(RDMatrix *matrix,QObject *parent=0,const char *name=0);
|
||||||
|
~BtGpi16();
|
||||||
|
RDMatrix::Type type();
|
||||||
|
unsigned gpiQuantity();
|
||||||
|
unsigned gpoQuantity();
|
||||||
|
bool primaryTtyActive();
|
||||||
|
bool secondaryTtyActive();
|
||||||
|
void processCommand(RDMacro *cmd);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void processStatus();
|
||||||
|
// void gpiOneshotData(int value);
|
||||||
|
// void gpoOneshotData(int value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
RDTTYDevice *bt_device;
|
||||||
|
// RDOneShot *bt_gpi_oneshot;
|
||||||
|
// RDOneShot *bt_gpo_oneshot;
|
||||||
|
int bt_matrix;
|
||||||
|
int bt_gpis;
|
||||||
|
// int bt_gpos;
|
||||||
|
int bt_istate;
|
||||||
|
bool bt_gpi_state[BTGPI16_GPIO_PINS];
|
||||||
|
bool bt_gpi_mask[BTGPI16_GPIO_PINS];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // BTGPI16_H
|
@ -32,6 +32,7 @@
|
|||||||
#include <bt16x2.h>
|
#include <bt16x2.h>
|
||||||
#include <bt8x2.h>
|
#include <bt8x2.h>
|
||||||
#include <btacs82.h>
|
#include <btacs82.h>
|
||||||
|
#include <btgpi16.h>
|
||||||
#include <btsentinel4web.h>
|
#include <btsentinel4web.h>
|
||||||
#include <btsrc16.h>
|
#include <btsrc16.h>
|
||||||
#include <btsrc8iii.h>
|
#include <btsrc8iii.h>
|
||||||
@ -88,6 +89,10 @@ bool MainObject::LoadSwitchDriver(int matrix_num)
|
|||||||
ripcd_switcher[matrix_num]=new BtAcs82(matrix,this);
|
ripcd_switcher[matrix_num]=new BtAcs82(matrix,this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDMatrix::BtGpi16:
|
||||||
|
ripcd_switcher[matrix_num]=new BtGpi16(matrix,this);
|
||||||
|
break;
|
||||||
|
|
||||||
case RDMatrix::BtSentinel4Web:
|
case RDMatrix::BtSentinel4Web:
|
||||||
ripcd_switcher[matrix_num]=new BtSentinel4Web(matrix,this);
|
ripcd_switcher[matrix_num]=new BtSentinel4Web(matrix,this);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user