Tidied TargetControllerComponent class

This commit is contained in:
Nav
2022-05-01 19:23:58 +01:00
parent 64de134a28
commit 17daa5fbb9
2 changed files with 28 additions and 14 deletions

View File

@@ -20,8 +20,9 @@ namespace Bloom::TargetController
using namespace Bloom::Events;
using namespace Bloom::Exceptions;
using Commands::Command;
using Commands::CommandIdType;
using Commands::Command;
using Commands::GetTargetDescriptor;
using Commands::GetTargetState;
using Commands::StopTargetExecution;
@@ -699,13 +700,6 @@ namespace Bloom::TargetController
EventManager::triggerEvent(std::make_shared<Events::TargetReset>());
}
void TargetControllerComponent::emitErrorEvent(int correlationId, const std::string& errorMessage) {
auto errorEvent = std::make_shared<Events::TargetControllerErrorOccurred>();
errorEvent->correlationId = correlationId;
errorEvent->errorMessage = errorMessage;
EventManager::triggerEvent(errorEvent);
}
Targets::TargetDescriptor& TargetControllerComponent::getTargetDescriptor() {
if (!this->cachedTargetDescriptor.has_value()) {
this->cachedTargetDescriptor = this->target->getDescriptor();