#pragma once #include "ComplexCommand.h" #include "ByteCommandQueue.h" #include "ReadGuiVersionCommand.h" #include "ByteArrayProvider.h" namespace Incart::DeviceComplexCommands { class MicroMonReadGuiVersionCommand : public ReadGuiVersionCommand { private: Usb::ByteCommandQueue* m_commandQueue; public: MicroMonReadGuiVersionCommand(uint32_t uid, Usb::ByteCommandQueue* commandQueue) : ReadGuiVersionCommand(uid) , m_commandQueue(commandQueue) { } public: std::shared_ptr execute() override { std::shared_ptr command = std::make_shared("ReadGuiVersion", m_commandQueue->generateUid(), std::vector{ 0x7e, 0x01, 0x00, 0x09, 0x20, 0xff, 0xff, 0xbd }); connect(command.get(), &Usb::ByteCommand::answerIsReady, this, &MicroMonReadGuiVersionCommand::handleAnswerIsReady); m_commandQueue->enqueue(command); return std::make_shared(Usb::DeviceCommand::EStatus::OK); } private slots: void handleAnswerIsReady(std::shared_ptr /*command*/, std::vector /*answer*/, int32_t /*status*/) { } }; } // namespace Incart::DeviceComplexCommands