2019-02-07 Fred Gleason <fredg@paravelsystems.com>

* Replaced the 'Add Event', 'Delete Event' and 'Modify Event'
	commands in the RDCatch Monitor Protocol with multicast update
	events.
This commit is contained in:
Fred Gleason
2019-02-07 13:35:14 -05:00
parent 34e722849a
commit 06dd4c336b
17 changed files with 96 additions and 236 deletions

View File

@@ -2,7 +2,7 @@
//
// Connect to the Rivendell Netcatcher Daemon.
//
// (C) Copyright 2002-2004,2016-2017 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
@@ -105,24 +105,6 @@ void RDCatchConnect::reloadDropboxes()
}
void RDCatchConnect::addEvent(int id)
{
SendCommand(QString().sprintf("RA %d!",id));
}
void RDCatchConnect::removeEvent(int id)
{
SendCommand(QString().sprintf("RR %d!",id));
}
void RDCatchConnect::updateEvent(int id)
{
SendCommand(QString().sprintf("RU %d!",id));
}
void RDCatchConnect::reset()
{
SendCommand("RS!");

View File

@@ -2,7 +2,7 @@
//
// Connect to the Rivendell Netcatcher Daemon.
//
// (C) Copyright 2002-2004,2016-2017 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
@@ -49,9 +49,6 @@ class RDCatchConnect : public QObject
void reloadDropboxes();
public slots:
void addEvent(int id);
void removeEvent(int id);
void updateEvent(int id);
void reset();
void reload();
void refresh();

View File

@@ -2,7 +2,7 @@
//
// A container class for a Rivendell Notification message.
//
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2018-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,6 +111,10 @@ bool RDNotification::read(const QString &str)
notify_id=QVariant(args[3]);
break;
case RDNotification::CatchEventType:
notify_id=QVariant(args[3].toUInt());
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;
@@ -158,6 +162,10 @@ QString RDNotification::write() const
ret+=notify_id.toString();
break;
case RDNotification::CatchEventType:
ret+=QString().sprintf("%u",notify_id.toUInt());
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;
@@ -187,6 +195,10 @@ QString RDNotification::typeString(RDNotification::Type type)
ret="DROPBOX";
break;
case RDNotification::CatchEventType:
ret="CATCH_EVENT";
break;
case RDNotification::NullType:
case RDNotification::LastType:
break;

View File

@@ -2,7 +2,7 @@
//
// A container class for a Rivendell Notification message.
//
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2018-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
@@ -28,7 +28,7 @@ class RDNotification
{
public:
enum Type {NullType=0,CartType=1,LogType=2,PypadType=3,DropboxType=4,
LastType=5};
CatchEventType=5,LastType=6};
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
LastAction=4};
RDNotification(Type type,Action action,const QVariant &id);