Fixed conflicts in 'ChangeLog'

This commit is contained in:
Fred Gleason 2019-07-27 17:29:49 -04:00
commit 1895c018b7
29 changed files with 216 additions and 217 deletions

View File

@ -18883,3 +18883,5 @@
2019-07-23 Dennis Graiani <dennis.graiani@gmail.com>
* Modified rdwavefile.cpp to set Segue End marker to the End Audio
marker when importing audio from AudioVAULT.
2019-07-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed regressions that made serial device operation unreliable.

View File

@ -2,7 +2,7 @@
//
// Output a string on a Rivendell TTY
//
// (C) Copyright 2002-2003,2016 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
@ -18,9 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <rdtty.h>
#include <rdttyout.h>
#include "rdtty.h"
#include "rdttyout.h"
bool RDTtyOut(const QString &station,unsigned port_id,const QString &str)
{
@ -39,23 +38,23 @@ bool RDTtyOut(const QString &station,unsigned port_id,const QString &str)
delete tty_entry;
return false;
}
tty_device->writeBlock((const char *)str,strlen((const char *)str));
tty_device->write((const char *)str,strlen((const char *)str));
switch(tty_entry->termination()) {
case RDTty::CrTerm:
tty_device->putch(13);
break;
case RDTty::CrTerm:
tty_device->putch(13);
break;
case RDTty::LfTerm:
tty_device->putch(10);
break;
case RDTty::LfTerm:
tty_device->putch(10);
break;
case RDTty::CrLfTerm:
tty_device->putch(13);
tty_device->putch(10);
break;
case RDTty::CrLfTerm:
tty_device->putch(13);
tty_device->putch(10);
break;
default:
break;
case RDTty::NoTerm:
break;
}
tty_device->close();
delete tty_device;

View File

@ -2,7 +2,7 @@
//
// Rivendell switcher driver for the Sine Systems ACU-1 (Prophet)
//
// (C) Copyright 2012,2016 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2012-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
@ -63,7 +63,7 @@ Acu1p::Acu1p(RDMatrix *matrix,QObject *parent)
str[1]=ACU1P_UNIT_ID;
str[2]=0x38;
str[3]=bt_gpo_mask;
bt_device->writeBlock(str,4);
bt_device->write(str,4);
//
// Interval OneShots
@ -166,7 +166,7 @@ void Acu1p::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -217,7 +217,7 @@ void Acu1p::processCommand(RDMacro *cmd)
str[1]=ACU1P_UNIT_ID;
str[2]=0x31;
str[3]=0x01<<(cmd->arg(1).toInt()-1);
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -235,7 +235,7 @@ void Acu1p::processCommand(RDMacro *cmd)
str[1]=ACU1P_UNIT_ID;
str[2]=0x32;
str[3]=0x01<<(cmd->arg(1).toInt()-1);
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -259,7 +259,7 @@ void Acu1p::processCommand(RDMacro *cmd)
str[3]=0x01<<(cmd->arg(1).toInt()-1);
str[4]=~str[3];
}
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -275,7 +275,7 @@ void Acu1p::processCommand(RDMacro *cmd)
void Acu1p::pollData()
{
uint8_t data[]={0xAA,ACU1P_UNIT_ID,0x39};
bt_device->writeBlock((char *)data,3);
bt_device->write((char *)data,3);
}
@ -284,7 +284,7 @@ void Acu1p::readyReadData(int sock)
char data[255];
int n=0;
while((n=bt_device->readBlock(data,255))>0) {
while((n=bt_device->read(data,255))>0) {
if(n==2) {
ProcessGpi(256*(0xFF&data[1])+(0xFF&data[0]));
}
@ -334,7 +334,7 @@ void Acu1p::SetRelay(int gpo,bool state)
str[1]=ACU1P_UNIT_ID;
str[2]=0x38;
str[3]=bt_gpo_mask;
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
@ -347,5 +347,5 @@ void Acu1p::PulseRelay(int gpo)
str[1]=ACU1P_UNIT_ID;
str[2]=0x52;
str[3]=mask;
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools 10x1
//
// (C) Copyright 2002-2003,2016-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
@ -100,11 +100,11 @@ void Bt10x1::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*m\x0d");
bt_device->writeBlock(str,3);
bt_device->write(str,3);
}
else {
sprintf(str,"*%02d\x0d",cmd->arg(1).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools 16x1
//
// (C) Copyright 2002-2004,2016-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
@ -100,11 +100,11 @@ void Bt16x1::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*m\x0d");
bt_device->writeBlock(str,3);
bt_device->write(str,3);
}
else {
sprintf(str,"*%02d\x0d",cmd->arg(1).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools 16x2
//
// (C) Copyright 2002-2004,2016-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
@ -148,7 +148,7 @@ void Bt16x2::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%02dF",BT16X2_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -163,7 +163,7 @@ void Bt16x2::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -176,7 +176,7 @@ void Bt16x2::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%02dL",BT16X2_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -191,7 +191,7 @@ void Bt16x2::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%02dP",BT16X2_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -213,12 +213,12 @@ void Bt16x2::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BT16X2_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BT16X2_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -238,7 +238,7 @@ void Bt16x2::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -352,7 +352,7 @@ void Bt16x2::processStatus()
void Bt16x2::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools 8x2
//
// (C) Copyright 2002-2004,2016-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
@ -100,14 +100,14 @@ void Bt8x2::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*m%d\x0d",cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*M%01d\x0d",cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
sprintf(str,"*%01d%01d0\x0d",
cmd->arg(1).toInt(),3+cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -122,7 +122,7 @@ void Bt8x2::processCommand(RDMacro *cmd)
}
sprintf(str,"*%01d%01d0\x0d",
cmd->arg(1).toInt(),3+cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -136,7 +136,7 @@ void Bt8x2::processCommand(RDMacro *cmd)
}
sprintf(str,"*%01d%01d0\x0d",
cmd->arg(1).toInt(),5+cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools ACS 8.2
//
// (C) Copyright 2002-2004,2016-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
@ -151,7 +151,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dF",BTACS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -166,7 +166,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -179,7 +179,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dL",BTACS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -194,7 +194,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dP",BTACS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -216,7 +216,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTACS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -230,7 +230,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTACS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -244,21 +244,21 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTACS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BTACS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dM%d",BTACS82_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
for(int i=cmd->arg(1).toInt()+1;i<9;i++) {
sprintf(str,"*%d%02dM%d",BTACS82_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
}
cmd->acknowledge(true);
@ -292,7 +292,7 @@ void BtAcs82::processCommand(RDMacro *cmd)
}
sprintf(str,"*%dDM%02d%d",BTACS82_UNIT_ID,
cmd->arg(1).toInt(),lvl);
bt_device->writeBlock(str,7);
bt_device->write(str,7);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -311,7 +311,7 @@ void BtAcs82::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -425,7 +425,7 @@ void BtAcs82::processStatus()
void BtAcs82::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -61,8 +61,7 @@ BtAdms4422::BtAdms4422(RDMatrix *matrix,QObject *parent)
bt_device->setParity(tty->parity());
if(bt_device->open(QIODevice::Unbuffered|QIODevice::ReadWrite)) {
// Set Mix Mode
bt_device->
writeBlock(QString().sprintf("*%uUM0\r\n",BTADMS4422_UNIT_ID),7);
bt_device->write(QString().sprintf("*%uUM0\r\n",BTADMS4422_UNIT_ID),7);
}
else {
rda->syslog(LOG_WARNING,"failed to open port \"%s\"",
@ -161,12 +160,12 @@ void BtAdms4422::processCommand(RDMacro *cmd)
if(cmd->arg(2).toInt()<=4) {
sprintf(str,"*%dOR%dF\r\n",BTADMS4422_UNIT_ID,
cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
else {
sprintf(str,"*%dOO%dF\r\n",BTADMS4422_UNIT_ID,
cmd->arg(2).toInt()-4);
bt_device->writeBlock(str,9);
bt_device->write(str,9);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
@ -182,7 +181,7 @@ void BtAdms4422::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -198,12 +197,12 @@ void BtAdms4422::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
if(cmd->arg(2).toInt()<=4) {
sprintf(str,"*%dOR%dL\r\n",BTADMS4422_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
else {
sprintf(str,"*%dOO%dL\r\n",BTADMS4422_UNIT_ID,
cmd->arg(2).toInt()-4);
bt_device->writeBlock(str,9);
bt_device->write(str,9);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
@ -221,12 +220,12 @@ void BtAdms4422::processCommand(RDMacro *cmd)
if(cmd->arg(2).toInt()<=4) {
sprintf(str,"*%dOR%dP\r\n",BTADMS4422_UNIT_ID,
cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
else {
sprintf(str,"*%dOO%dP\r\n",BTADMS4422_UNIT_ID,
cmd->arg(2).toInt()-4);
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
@ -249,7 +248,7 @@ void BtAdms4422::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,7);
bt_device->write(str,7);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -263,7 +262,7 @@ void BtAdms4422::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dMA%d\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -277,21 +276,21 @@ void BtAdms4422::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d\r\n",BTADMS4422_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
else {
sprintf(str,"*%d%02d%d\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,7);
bt_device->write(str,7);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dMA%d\r\n",BTADMS4422_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,9);
bt_device->write(str,9);
}
for(int i=cmd->arg(1).toInt()+1;i<9;i++) {
sprintf(str,"*%d%02dMA%d\r\n",BTADMS4422_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,9);
bt_device->write(str,9);
}
}
cmd->acknowledge(true);
@ -308,15 +307,15 @@ void BtAdms4422::processCommand(RDMacro *cmd)
if(cmd->arg(2).toInt()==0) {
sprintf(str,"*%dDME%d00\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt());
bt_device->writeBlock(str,10);
bt_device->write(str,10);
}
else {
sprintf(str,"*%dDML%d%d.0\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,13);
bt_device->write(str,13);
sprintf(str,"*%dDME%d01\r\n",BTADMS4422_UNIT_ID,
cmd->arg(1).toInt());
bt_device->writeBlock(str,10);
bt_device->write(str,10);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -336,7 +335,7 @@ void BtAdms4422::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -450,7 +449,7 @@ void BtAdms4422::processStatus()
void BtAdms4422::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SRC-16
//
// (C) Copyright 2002-2005,2010,2016-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
@ -146,7 +146,7 @@ void BtSrc16::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%02dF\r\n",BTSRC16_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,9);
bt_device->write(str,9);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -161,7 +161,7 @@ void BtSrc16::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA\r\n",7);
bt_device->write("*0SPA\r\n",7);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -175,7 +175,7 @@ void BtSrc16::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%02dL\r\n",
BTSRC16_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,9);
bt_device->write(str,9);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -192,7 +192,7 @@ void BtSrc16::processCommand(RDMacro *cmd)
sprintf(str,"*%dOR%02dP%02d\r\n",
BTSRC16_UNIT_ID,cmd->arg(2).toInt(),
cmd->arg(4).toInt()/100+1);
bt_device->writeBlock(str,11);
bt_device->write(str,11);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -219,7 +219,7 @@ void BtSrc16::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -333,7 +333,7 @@ void BtSrc16::processStatus()
void BtSrc16::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SRC-8 III
//
// (C) Copyright 2002-2005,2010,2016-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
@ -146,7 +146,7 @@ void BtSrc8Iii::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dF\r\n",BTSRC8III_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -161,7 +161,7 @@ void BtSrc8Iii::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA\r\n",7);
bt_device->write("*0SPA\r\n",7);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -175,7 +175,7 @@ void BtSrc8Iii::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dL\r\n",
BTSRC8III_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,8);
bt_device->write(str,8);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -192,7 +192,7 @@ void BtSrc8Iii::processCommand(RDMacro *cmd)
sprintf(str,"*%dOR%dP%02d\r\n",
BTSRC8III_UNIT_ID,cmd->arg(2).toInt(),
cmd->arg(4).toInt()/100+1);
bt_device->writeBlock(str,10);
bt_device->write(str,10);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -219,7 +219,7 @@ void BtSrc8Iii::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -317,7 +317,7 @@ void BtSrc8Iii::processStatus()
void BtSrc8Iii::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 12.4
//
// (C) Copyright 2002-2004,2016-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
@ -103,7 +103,7 @@ void BtSs124::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTSS124_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -117,7 +117,7 @@ void BtSs124::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTSS124_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -131,21 +131,21 @@ void BtSs124::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTSS124_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BTSS124_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dM%d",BTSS124_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
for(int i=cmd->arg(1).toInt()+1;i<9;i++) {
sprintf(str,"*%d%02dM%d",BTSS124_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
}
cmd->acknowledge(true);

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 16.4
//
// (C) Copyright 2002-2005,2016-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
@ -149,12 +149,12 @@ void BtSs164::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
if(cmd->arg(2).toInt()<8) {
sprintf(str,"*%dOR%dF",BTSS164_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
else {
sprintf(str,"*%dOOR%02dF",BTSS164_UNIT_ID,
cmd->arg(2).toInt()-8);
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
@ -170,7 +170,7 @@ void BtSs164::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -184,12 +184,12 @@ void BtSs164::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
if(cmd->arg(2).toInt()<8) {
sprintf(str,"*%dOR%dL",BTSS164_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
else {
sprintf(str,"*%dOOR%02dL",BTSS164_UNIT_ID,
cmd->arg(2).toInt()-8);
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
@ -206,12 +206,12 @@ void BtSs164::processCommand(RDMacro *cmd)
if(cmd->arg(1).lower()=="o") {
if(cmd->arg(2).toInt()<8) {
sprintf(str,"*%dOR%dP",BTSS164_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
else {
sprintf(str,"*%dOOR%02dP",BTSS164_UNIT_ID,
cmd->arg(2).toInt()-8);
bt_device->writeBlock(str,8);
bt_device->write(str,8);
}
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
@ -234,7 +234,7 @@ void BtSs164::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTSS164_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -248,7 +248,7 @@ void BtSs164::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTSS164_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -262,14 +262,14 @@ void BtSs164::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTSS164_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%dM%d",BTSS164_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
sprintf(str,"*%d%02d%d",BTSS164_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -289,7 +289,7 @@ void BtSs164::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -419,7 +419,7 @@ void BtSs164::processStatus()
void BtSs164::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 2.1
//
// (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
@ -104,12 +104,11 @@ void BtSs21::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
str=QString().sprintf("*%dM",BTSS21_UNIT_ID);
bt_device->writeBlock(str,str.length());
bt_device->write(str,str.length());
}
else {
str=QString().sprintf("*%d%d",BTSS21_UNIT_ID,
cmd->arg(1).toInt());
bt_device->writeBlock(str,str.length());
str=QString().sprintf("*%d%d",BTSS21_UNIT_ID,cmd->arg(1).toInt());
bt_device->write(str,str.length());
}
cmd->acknowledge(true);
emit rmlEcho(cmd);

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 4.1 MLR
//
// (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
@ -132,12 +132,12 @@ void BtSs41Mlr::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
str=QString().sprintf("*%dMA",BTSS41MLR_UNIT_ID);
bt_device->writeBlock(str,str.length());
bt_device->write(str,str.length());
}
else {
str=QString().sprintf("*%d%02d",BTSS41MLR_UNIT_ID,
cmd->arg(1).toInt());
bt_device->writeBlock(str,str.length());
bt_device->write(str,str.length());
}
cmd->acknowledge(true);
emit rmlEcho(cmd);
@ -156,7 +156,7 @@ void BtSs41Mlr::readyReadData()
char buffer[256];
int n;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(0xFF&buffer[i]) {
case 10:
@ -179,7 +179,7 @@ void BtSs41Mlr::readyReadData()
void BtSs41Mlr::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 4.2
//
// (C) Copyright 2002-2005,2016-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
@ -153,7 +153,7 @@ void BtSs42::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dF",BTSS42_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -168,7 +168,7 @@ void BtSs42::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -186,7 +186,7 @@ void BtSs42::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dL",BTSS42_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -206,7 +206,7 @@ void BtSs42::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dP",BTSS42_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -228,7 +228,7 @@ void BtSs42::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTSS42_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -242,7 +242,7 @@ void BtSs42::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTSS42_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -256,21 +256,21 @@ void BtSs42::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTSS42_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BTSS42_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dM%d",BTSS42_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
for(int i=cmd->arg(1).toInt()+1;i<5;i++) {
sprintf(str,"*%d%02dM%d",BTSS42_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
}
cmd->acknowledge(true);
@ -291,7 +291,7 @@ void BtSs42::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -405,7 +405,7 @@ void BtSs42::processStatus()
void BtSs42::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 4.4
//
// (C) Copyright 2002-2005,2009,2016-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
@ -154,7 +154,7 @@ void BtSs44::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dF",BTSS44_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -169,7 +169,7 @@ void BtSs44::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -187,7 +187,7 @@ void BtSs44::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dL",BTSS44_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -207,7 +207,7 @@ void BtSs44::processCommand(RDMacro *cmd)
else {
sprintf(str,"*%dOR%dP",BTSS44_UNIT_ID,cmd->arg(2).toInt()-4);
}
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -229,7 +229,7 @@ void BtSs44::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTSS44_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -243,7 +243,7 @@ void BtSs44::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTSS44_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -257,21 +257,21 @@ void BtSs44::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTSS44_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BTSS44_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dM%d",BTSS44_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
for(int i=cmd->arg(1).toInt()+1;i<5;i++) {
sprintf(str,"*%d%02dM%d",BTSS44_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
}
cmd->acknowledge(true);
@ -292,7 +292,7 @@ void BtSs44::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -406,7 +406,7 @@ void BtSs44::processStatus()
void BtSs44::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the BroadcastTools SS 8.2
//
// (C) Copyright 2002-2004,2016-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
@ -148,7 +148,7 @@ void BtSs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dF",BTSS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,false);
}
}
@ -163,7 +163,7 @@ void BtSs82::processCommand(RDMacro *cmd)
else {
if(cmd->arg(3).toInt()==-1) { // Clear input
bt_gpi_mask[cmd->arg(2).toInt()-1]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}
else {
if(cmd->arg(4).toInt()==0) { // Turn ON
@ -176,7 +176,7 @@ void BtSs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dL",BTSS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
}
}
@ -191,7 +191,7 @@ void BtSs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).lower()=="o") {
sprintf(str,"*%dOR%dP",BTSS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
emit gpoChanged(bt_matrix,cmd->arg(2).toInt()-1,true);
bt_gpo_oneshot->start(cmd->arg(2).toInt()-1,500);
}
@ -213,7 +213,7 @@ void BtSs82::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02d%d",BTSS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -227,7 +227,7 @@ void BtSs82::processCommand(RDMacro *cmd)
}
sprintf(str,"*%d%02dM%d",BTSS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -241,21 +241,21 @@ void BtSs82::processCommand(RDMacro *cmd)
}
if(cmd->arg(1).toInt()==0) {
sprintf(str,"*%dM%d",BTSS82_UNIT_ID,cmd->arg(2).toInt());
bt_device->writeBlock(str,4);
bt_device->write(str,4);
}
else {
sprintf(str,"*%d%02d%d",BTSS82_UNIT_ID,
cmd->arg(1).toInt(),cmd->arg(2).toInt());
bt_device->writeBlock(str,5);
bt_device->write(str,5);
for(int i=1;i<cmd->arg(1).toInt();i++) {
sprintf(str,"*%d%02dM%d",BTSS82_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
for(int i=cmd->arg(1).toInt()+1;i<9;i++) {
sprintf(str,"*%d%02dM%d",BTSS82_UNIT_ID,
i,cmd->arg(2).toInt());
bt_device->writeBlock(str,6);
bt_device->write(str,6);
}
}
cmd->acknowledge(true);
@ -276,7 +276,7 @@ void BtSs82::processStatus()
int n;
int gpi;
while((n=bt_device->readBlock(buffer,255))>0) {
while((n=bt_device->read(buffer,255))>0) {
for(int i=0;i<n;i++) {
switch(bt_istate) {
case 0:
@ -391,7 +391,7 @@ void BtSs82::processStatus()
void BtSs82::gpiOneshotData(int value)
{
bt_gpi_mask[value]=false;
bt_device->writeBlock("*0SPA",5);
bt_device->write("*0SPA",5);
}

View File

@ -107,7 +107,7 @@ void MainObject::ttyScanData()
for(int i=0;i<MAX_TTYS;i++) {
if(ripcd_tty_dev[i]!=NULL) {
while((n=ripcd_tty_dev[i]->readBlock(buf,255))>0) {
while((n=ripcd_tty_dev[i]->read(buf,255))>0) {
ripcd_tty_trap[i]->scan(buf,n);
}
}
@ -269,7 +269,7 @@ void MainObject::RunLocalMacros(RDMacro *rml_in)
sscanf((const char *)rml->arg(i),"%x",&d);
bin_buf[i-1]=0xFF&d;
}
ripcd_tty_dev[tty_port]->writeBlock(bin_buf,rml->argQuantity()-1);
ripcd_tty_dev[tty_port]->write(bin_buf,rml->argQuantity()-1);
rml->acknowledge(true);
sendRml(rml);
return;

View File

@ -254,16 +254,16 @@ void Quartz1::SendCommand(const char *str)
// LogLine(QString().sprintf("SENDING: %s",str));
for(int i=0;i<2;i++) {
switch(sas_porttype[i]) {
case RDMatrix::TtyPort:
sas_device[i]->writeBlock(str,strlen(str));
break;
case RDMatrix::TtyPort:
sas_device[i]->write(str,strlen(str));
break;
case RDMatrix::TcpPort:
sas_socket[i]->writeBlock(str,strlen(str));
break;
case RDMatrix::TcpPort:
sas_socket[i]->writeBlock(str,strlen(str));
break;
case RDMatrix::NoPort:
break;
case RDMatrix::NoPort:
break;
}
}
}

View File

@ -103,7 +103,7 @@ void RossNkScp::processCommand(RDMacro *cmd)
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);
ross_device->write(str,11);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;

View File

@ -120,7 +120,7 @@ void Sas16000::SendCommand(char *str)
rda->syslog(LOG_INFO,"sending USI cmd: %s",
(const char *)PrettifyCommand(str));
sas_device->writeBlock(str,strlen(str));
sas_device->write(str,strlen(str));
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the SAS32000
//
// (C) Copyright 2002-2004,2016-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
@ -122,7 +122,7 @@ void Sas32000::processCommand(RDMacro *cmd)
}
sprintf(str,"DL%02d%c%03d",cmd->arg(1).toInt(),sign,
10*abs(cmd->arg(2).toInt()));
sas_device->writeBlock(str,8);
sas_device->write(str,8);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -140,7 +140,7 @@ void Sas32000::runQueue()
if(sas_commands.size()==0) {
return;
}
sas_device->writeBlock((const char *)sas_commands.front(),7);
sas_device->write((const char *)sas_commands.front(),7);
sas_commands.pop();
if(sas_commands.size()==0) {
sas_timer->stop();

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the SAS64000
//
// (C) Copyright 2002-2004,2016-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
@ -111,7 +111,7 @@ void Sas64000::SendCommand(RDMacro *cmd,const char *format)
emit rmlEcho(cmd);
}
sprintf(str,format,cmd->arg(1).toInt(),cmd->arg(2).toInt());
sas_device->writeBlock(str,7);
sas_device->write(str,7);
cmd->acknowledge(true);
emit rmlEcho(cmd);
}

View File

@ -3,7 +3,7 @@
// A Rivendell switcher driver for the SAS64000 connected via
// a GPI-1600
//
// (C) Copyright 2002-2004,2016-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
@ -117,7 +117,7 @@ void Sas64000Gpi::processCommand(RDMacro *cmd)
(char)((cmd->arg(1).toInt()-1)/128),
(char)(((cmd->arg(1).toInt()-1)%128)+
((cmd->arg(1).toInt()-1)/128))&0x7F);
sas_device->writeBlock(str,7);
sas_device->write(str,7);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
@ -150,7 +150,7 @@ void Sas64000Gpi::processCommand(RDMacro *cmd)
emit gpoChanged(sas_matrix,cmd->arg(2).toInt()-1,true);
}
sprintf(str,"%c%c\xFF",cmd_byte,cmd->arg(2).toInt()-1);
sas_device->writeBlock(str,3);
sas_device->write(str,3);
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;

View File

@ -422,7 +422,7 @@ void SasUsi::SendCommand(char *str)
(const char *)PrettifyCommand(str));
switch(sas_porttype) {
case RDMatrix::TtyPort:
sas_device->writeBlock(str,strlen(str));
sas_device->write(str,strlen(str));
break;
case RDMatrix::TcpPort:

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the StarGuide III Satellite Receiver
//
// (C) Copyright 2002-2005,2016-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
@ -129,33 +129,33 @@ void StarGuide3::processCommand(RDMacro *cmd)
return;
}
switch(sg_feed[input].mode()) {
case RDMatrix::Left:
route='1';
break;
case RDMatrix::Left:
route='1';
break;
case RDMatrix::Right:
route='2';
break;
case RDMatrix::Right:
route='2';
break;
default:
route='0';
break;
default:
route='0';
break;
}
switch(cmd->command()) {
case RDMacro::ST:
sprintf(str,"SP A,P,%d\rSP A,S,%d\rAM %c,0%c\r",
sg_feed[input].providerId(),
sg_feed[input].serviceId(),
output+'A',
route);
sg_device->writeBlock(str,strlen(str));
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
case RDMacro::ST:
sprintf(str,"SP A,P,%d\rSP A,S,%d\rAM %c,0%c\r",
sg_feed[input].providerId(),
sg_feed[input].serviceId(),
output+'A',
route);
sg_device->write(str,strlen(str));
cmd->acknowledge(true);
emit rmlEcho(cmd);
break;
default:
cmd->acknowledge(false);
emit rmlEcho(cmd);
break;
default:
cmd->acknowledge(false);
emit rmlEcho(cmd);
break;
}
}

View File

@ -2,7 +2,7 @@
//
// A Rivendell switcher driver for the UNITY4000
//
// (C) Copyright 2002-2003,2016-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
@ -144,16 +144,16 @@ void Unity4000::processCommand(RDMacro *cmd)
case RDMacro::ST:
if(input==-1) {
sprintf(str,"\x0DMUTE A/%d\x0D",output+1);
unity_device->writeBlock(str,strlen(str));
unity_device->write(str,strlen(str));
}
else {
sprintf(str,"\x0DUNMUTE A/%d\x0D",output+1);
unity_device->writeBlock(str,strlen(str));
unity_device->write(str,strlen(str));
sprintf(str,"\x0DSETAUDIO %d %c %s\x0D",
output+1,
route,
(const char *)unity_feed[input].feed());
unity_device->writeBlock(str,strlen(str));
unity_device->write(str,strlen(str));
}
cmd->acknowledge(true);
emit rmlEcho(cmd);

View File

@ -609,7 +609,7 @@ void VGuest::SendCommand(char *str,int len)
switch(vguest_porttype[i]) {
case RDMatrix::TtyPort:
if(vguest_device[i]!=NULL) {
vguest_device[i]->writeBlock(str,len);
vguest_device[i]->write(str,len);
}
break;