2022-10-30 Fred Gleason <fredg@paravelsystems.com>

* Reimplemented the 'Request Deck Status' command using
	'RDCatchEvent'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-10-30 14:54:29 -04:00
parent d38349cf39
commit d65517215b
14 changed files with 413 additions and 72 deletions

View File

@@ -234,6 +234,11 @@ void DeckMon::processCatchEvent(RDCatchEvent *evt)
if(evt->operation()==RDCatchEvent::DeckEventProcessedOp) {
mon_event_light->trigger(evt->eventNumber());
}
if(evt->operation()==RDCatchEvent::DeckStatusResponseOp) {
setStatus(evt->deckStatus(),evt->eventId(),
RDCut::cutName(evt->cartNumber(),evt->cutNumber()));
}
}
}

View File

@@ -159,7 +159,10 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
connect(rda->ripc(),SIGNAL(connected(bool)),
this,SLOT(ripcConnectedData(bool)));
connect(rda,SIGNAL(userChanged()),this,SLOT(ripcUserData()));
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
rda->ripc()->
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
connect(rda->ripc(),SIGNAL(catchEventReceived(RDCatchEvent *)),
this,SLOT(catchEventReceivedData(RDCatchEvent *)));
//
// CAE Connection
@@ -732,6 +735,14 @@ void MainWidget::ripcUserData()
catch_add_button->setEnabled(modification_allowed);
catch_edit_button->setEnabled(modification_allowed);
catch_delete_button->setEnabled(modification_allowed);
//
// Request Deck Statuses
//
RDCatchEvent *evt=new RDCatchEvent();
evt->setOperation(RDCatchEvent::DeckStatusQueryOp);
rda->ripc()->sendCatchEvent(evt);
delete evt;
}

View File

@@ -354,6 +354,7 @@ void RecordListModel::channelCounts(int chan,int *waiting,int *active,
case RDDeck::Offline:
case RDDeck::Idle:
case RDDeck::LastStatus:
break;
}
}
@@ -950,6 +951,7 @@ void RecordListModel::UpdateStatus(int line)
{
switch(d_statuses.at(line)) {
case RDDeck::Offline:
case RDDeck::LastStatus:
d_back_colors[line]=QColor(EVENT_ERROR_COLOR);
break;