Automatically trigger refreshing of register widgets, in the TargetRegistersPane, upon a registers written event
This commit is contained in:
@@ -32,6 +32,10 @@ void InsightWorker::startup() {
|
||||
std::bind(&InsightWorker::onTargetIoPortsUpdatedEvent, this, std::placeholders::_1)
|
||||
);
|
||||
|
||||
this->eventListener->registerCallbackForEventType<Events::RegistersWrittenToTarget>(
|
||||
std::bind(&InsightWorker::onTargetRegistersWrittenEvent, this, std::placeholders::_1)
|
||||
);
|
||||
|
||||
this->eventDispatchTimer = new QTimer(this);
|
||||
this->connect(this->eventDispatchTimer, &QTimer::timeout, this, &InsightWorker::dispatchEvents);
|
||||
this->eventDispatchTimer->start(5);
|
||||
@@ -117,6 +121,10 @@ void InsightWorker::onTargetIoPortsUpdatedEvent(const Events::TargetIoPortsUpdat
|
||||
emit this->targetIoPortsUpdated();
|
||||
}
|
||||
|
||||
void InsightWorker::onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event) {
|
||||
emit this->targetRegistersWritten(event.descriptors);
|
||||
}
|
||||
|
||||
void InsightWorker::onTargetControllerStateReported(const Events::TargetControllerStateReported& event) {
|
||||
if (this->lastTargetControllerState == TargetControllerState::ACTIVE
|
||||
&& event.state == TargetControllerState::SUSPENDED
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Bloom
|
||||
void onTargetResumedEvent(const Events::TargetExecutionResumed& event);
|
||||
void onTargetIoPortsUpdatedEvent(const Events::TargetIoPortsUpdated& event);
|
||||
void onTargetControllerStateReported(const Events::TargetControllerStateReported& event);
|
||||
void onTargetRegistersWrittenEvent(const Events::RegistersWrittenToTarget& event);
|
||||
|
||||
private slots:
|
||||
void executeTasks();
|
||||
@@ -65,5 +66,6 @@ namespace Bloom
|
||||
void targetIoPortsUpdated();
|
||||
void targetControllerSuspended();
|
||||
void targetControllerResumed(const Bloom::Targets::TargetDescriptor& targetDescriptor);
|
||||
void targetRegistersWritten(const Bloom::Targets::TargetRegisterDescriptors& descriptors);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user