mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-04 06:29:08 +02:00
2021-02-06 Fred Gleason <fredg@paravelsystems.com>
* Removed dependencies on 'std::vector' from the SAS USI driver in ripcd(8). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8743ade987
commit
ecefaef5f4
@ -21037,3 +21037,6 @@
|
||||
* Removed 'Q3TextEdit' dependencies from rddgimport(1).
|
||||
2021-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed the 'Q3ListBox' dependencies from rdalsaconfig(1).
|
||||
2021-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed dependencies on 'std::vector' from the SAS USI driver
|
||||
in ripcd(8).
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Rivendell switcher driver for the SAS USI Protocol
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -22,10 +22,8 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include "sasusi.h"
|
||||
|
||||
SasUsi::SasUsi(RDMatrix *matrix,QObject *parent)
|
||||
@ -296,7 +294,7 @@ void SasUsi::processCommand(RDMacro *cmd)
|
||||
}
|
||||
cmd_byte=0x01;
|
||||
}
|
||||
if(cmd->arg(2).toUInt()<=sas_relay_numbers.size()) {
|
||||
if(cmd->arg(2).toInt()<=sas_relay_numbers.size()) {
|
||||
if(sas_relay_numbers[cmd->arg(2).toUInt()-1]>=0) {
|
||||
snprintf(str,256,"\x05R%d%04d\x0D\x0A",cmd_byte,
|
||||
sas_relay_numbers[cmd->arg(2).toUInt()-1]);
|
||||
@ -564,7 +562,7 @@ void SasUsi::DispatchCommand()
|
||||
if(!ok) {
|
||||
return;
|
||||
}
|
||||
for(unsigned i=0;i<sas_console_numbers.size();i++) {
|
||||
for(int i=0;i<sas_console_numbers.size();i++) {
|
||||
if((console==sas_console_numbers[i])&&(source==sas_source_numbers[i])) {
|
||||
action=cmd.mid(1,1).toUInt(&ok);
|
||||
if(!ok) {
|
||||
@ -602,7 +600,7 @@ void SasUsi::DispatchCommand()
|
||||
if(!ok) {
|
||||
return;
|
||||
}
|
||||
for(unsigned i=0;i<sas_relay_numbers.size();i++) {
|
||||
for(int i=0;i<sas_relay_numbers.size();i++) {
|
||||
if(line==sas_relay_numbers[i]) {
|
||||
switch(cmd.mid(1,2).toInt()) {
|
||||
case 0: // Opto
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Rivendell switcher driver for the SAS USI Protocol
|
||||
//
|
||||
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -21,12 +21,8 @@
|
||||
#ifndef SASUSI_H
|
||||
#define SASUSI_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
//#include <q3socket.h>
|
||||
#include <qhostaddress.h>
|
||||
#include <qtcpsocket.h>
|
||||
#include <qtimer.h>
|
||||
#include <QList>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdmatrix.h>
|
||||
@ -64,7 +60,6 @@ class SasUsi : public Switcher
|
||||
QString PrettifyCommand(const char *cmd) const;
|
||||
RDTTYDevice *sas_device;
|
||||
QTcpSocket *sas_socket;
|
||||
// Q3Socket *sas_socket;
|
||||
char sas_buffer[SASUSI_MAX_LENGTH];
|
||||
unsigned sas_ptr;
|
||||
QHostAddress sas_ipaddress;
|
||||
@ -78,9 +73,9 @@ class SasUsi : public Switcher
|
||||
unsigned sas_start_cart;
|
||||
unsigned sas_stop_cart;
|
||||
RDMatrix::PortType sas_porttype;
|
||||
std::vector<int> sas_console_numbers;
|
||||
std::vector<int> sas_source_numbers;
|
||||
std::vector<int> sas_relay_numbers;
|
||||
QList<int> sas_console_numbers;
|
||||
QList<int> sas_source_numbers;
|
||||
QList<int> sas_relay_numbers;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user