From 47cf0d34e4c791134cfb6e644b116d27076b57e0 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 31 Oct 2022 09:49:19 -0400 Subject: [PATCH] 2022-10-31 Fred Gleason * Removed vestigal support for the 'Reload Heartbeat Configuration' catch protocol command. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdcatch_connect.cpp | 8 +------- lib/rdcatch_connect.h | 3 +-- rdadmin/edit_station.cpp | 1 - rdcatchd/rdcatchd.cpp | 44 ---------------------------------------- rdcatchd/rdcatchd.h | 10 --------- 6 files changed, 5 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23303c4d..939c8292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23590,3 +23590,6 @@ 2022-10-31 Fred Gleason * Removed vestigal support for the 'Heartbeat Pulse' catch protocol command. +2022-10-31 Fred Gleason + * Removed vestigal support for the 'Reload Heartbeat Configuration' + catch protocol command. diff --git a/lib/rdcatch_connect.cpp b/lib/rdcatch_connect.cpp index 78d93955..9d2b0b78 100644 --- a/lib/rdcatch_connect.cpp +++ b/lib/rdcatch_connect.cpp @@ -2,7 +2,7 @@ // // Connect to the Rivendell Netcatcher Daemon. // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // 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 @@ -84,12 +84,6 @@ void RDCatchConnect::enableMetering(bool state) } -void RDCatchConnect::reloadHeartbeat() -{ - SendCommand("RH!"); -} - - void RDCatchConnect::reloadDropboxes() { SendCommand("RX!"); diff --git a/lib/rdcatch_connect.h b/lib/rdcatch_connect.h index 103bcbb6..86b6c8fd 100644 --- a/lib/rdcatch_connect.h +++ b/lib/rdcatch_connect.h @@ -2,7 +2,7 @@ // // Connect to the Rivendell Netcatcher Daemon. // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2022 Fred Gleason // // 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 @@ -46,7 +46,6 @@ class RDCatchConnect : public QObject RDDeck::Status status(unsigned chan) const; int currentId(unsigned chan) const; void enableMetering(bool state); - void reloadHeartbeat(); void reloadDropboxes(); public slots: diff --git a/rdadmin/edit_station.cpp b/rdadmin/edit_station.cpp index ba299654..bc5212cc 100644 --- a/rdadmin/edit_station.cpp +++ b/rdadmin/edit_station.cpp @@ -690,7 +690,6 @@ void EditStation::okData() setEnforcePanelSetup(!station_panel_enforce_box->isChecked()); station_station->setHttpStation(station_http_station_box->currentText()); station_station->setCaeStation(station_cae_station_box->currentText()); - station_catch_connect->reloadHeartbeat(); // // Allow the event loop to run so the packets get delivered diff --git a/rdcatchd/rdcatchd.cpp b/rdcatchd/rdcatchd.cpp index 6688c07b..a1de0eab 100644 --- a/rdcatchd/rdcatchd.cpp +++ b/rdcatchd/rdcatchd.cpp @@ -385,14 +385,6 @@ MainObject::MainObject(QObject *parent) connect(timer,SIGNAL(timeout()),this,SLOT(meterData())); timer->start(RD_METER_UPDATE_INTERVAL); - // - // Heartbeat Timer - // - catch_heartbeat_timer=new QTimer(this); - connect(catch_heartbeat_timer,SIGNAL(timeout()), - this,SLOT(sysHeartbeatData())); - LoadHeartbeat(); - // // Mark Interrupted Events // @@ -1266,16 +1258,6 @@ void MainObject::freeEventsData() } -void MainObject::sysHeartbeatData() -{ - RDCart *cart=new RDCart(catch_heartbeat_cart); - if(cart->exists()) { - ExecuteMacroCart(cart); - } - delete cart; -} - - void MainObject::updateXloadsData() { std::vector::iterator it; @@ -1940,10 +1922,6 @@ void MainObject::DispatchCommand(ServerConnection *conn) } } - if(cmds.at(0)=="RH") { // Reload Heartbeat Configuration - LoadHeartbeat(); - } - if((cmds.at(0)=="MN")&&(cmds.size()==3)) { // Monitor State chan=cmds.at(1).toInt(&ok); if(!ok) { @@ -2488,28 +2466,6 @@ void MainObject::PurgeEvent(int event) } -void MainObject::LoadHeartbeat() -{ - if(catch_heartbeat_timer->isActive()) { - catch_heartbeat_timer->stop(); - } - QString sql=QString("select ")+ - "`HEARTBEAT_CART`,"+ // 00 - "`HEARTBEAT_INTERVAL` "+ // 01 - "from `STATIONS` where "+ - "`NAME`='"+RDEscapeString(rda->station()->name())+"'"; - RDSqlQuery *q=new RDSqlQuery(sql); - if(q->first()) { - if((q->value(0).toUInt()!=0)&&(q->value(1).toUInt()!=0)) { - catch_heartbeat_cart=q->value(0).toUInt(); - sysHeartbeatData(); - catch_heartbeat_timer->start(q->value(1).toUInt()); - } - } - delete q; -} - - void MainObject::CheckInRecording(QString cutname,CatchEvent *evt, unsigned msecs,unsigned threshold) { diff --git a/rdcatchd/rdcatchd.h b/rdcatchd/rdcatchd.h index b6b4792d..f8e316b1 100644 --- a/rdcatchd/rdcatchd.h +++ b/rdcatchd/rdcatchd.h @@ -109,8 +109,6 @@ class MainObject : public QObject void meterData(); void eventFinishedData(int id); void freeEventsData(); - // void heartbeatData(); - void sysHeartbeatData(); void updateXloadsData(); void startupCartData(); void notificationReceivedData(RDNotification *notify); @@ -198,7 +196,6 @@ class MainObject : public QObject int16_t tcp_port; QTcpServer *server; RDCatchConnect *catch_connect; - QList catch_connections; QSignalMapper *catch_ready_mapper; QSignalMapper *catch_kill_mapper; @@ -212,11 +209,9 @@ class MainObject : public QObject int catch_record_id[MAX_DECKS]; QString catch_record_name[MAX_DECKS]; bool catch_record_aborting[MAX_DECKS]; - unsigned catch_record_pending_cartnum[MAX_DECKS]; unsigned catch_record_pending_cutnum[MAX_DECKS]; unsigned catch_record_pending_maxlen[MAX_DECKS]; - bool catch_playout_status[MAX_DECKS]; int catch_playout_card[MAX_DECKS]; int catch_playout_stream[MAX_DECKS]; @@ -227,10 +222,8 @@ class MainObject : public QObject int catch_playout_id[MAX_DECKS]; QString catch_playout_name[MAX_DECKS]; EventPlayer *catch_playout_event_player[MAX_DECKS]; - int catch_monitor_port[MAX_DECKS]; bool catch_monitor_state[MAX_DECKS]; - unsigned catch_record_threshold[MAX_DECKS]; QHostAddress catch_swaddress[MAX_DECKS]; int catch_swmatrix[MAX_DECKS]; @@ -245,9 +238,6 @@ class MainObject : public QObject int catch_macro_event_id[RDCATCHD_MAX_MACROS]; QSignalMapper *catch_event_mapper; std::vector catch_events; - QTimer *catch_heartbeat_timer; - unsigned catch_heartbeat_cart; - int catch_default_format; int catch_default_channels; int catch_default_layer;