New TC shutdown command
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Bloom::TargetController
|
||||
using Commands::CommandIdType;
|
||||
|
||||
using Commands::Command;
|
||||
using Commands::Shutdown;
|
||||
using Commands::GetTargetDescriptor;
|
||||
using Commands::GetTargetState;
|
||||
using Commands::StopTargetExecution;
|
||||
@@ -139,6 +140,10 @@ namespace Bloom::TargetController
|
||||
EventManager::registerListener(this->eventListener);
|
||||
|
||||
// Register command handlers
|
||||
this->registerCommandHandler<Shutdown>(
|
||||
std::bind(&TargetControllerComponent::handleShutdown, this, std::placeholders::_1)
|
||||
);
|
||||
|
||||
this->registerCommandHandler<GetTargetDescriptor>(
|
||||
std::bind(&TargetControllerComponent::handleGetTargetDescriptor, this, std::placeholders::_1)
|
||||
);
|
||||
@@ -640,6 +645,11 @@ namespace Bloom::TargetController
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<Response> TargetControllerComponent::handleShutdown(Shutdown& command) {
|
||||
this->shutdown();
|
||||
return std::make_unique<Response>();
|
||||
}
|
||||
|
||||
std::unique_ptr<Responses::TargetDescriptor> TargetControllerComponent::handleGetTargetDescriptor(
|
||||
GetTargetDescriptor& command
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user